[erlang-patches] Support ANSI in the console
Björn-Egil Dahlberg
egil@REDACTED
Wed Jan 9 19:24:40 CET 2013
On 2013-01-09 18:59, Yurii Rashkovskii wrote:
> While we are at it, would the OTP team considering merging a patch
> that adds isatty functionality to Erlang, in relation to this ANSI
> improvement?
>
> It would allow developers to print ANSI sequences only when the
> program is using an actual terminal.
We would certainly review it but I have no other thoughts on the matter
right now. It seems like a good thing to do.
We are getting pressed for time. Code freeze for R16A is 23/1 and we
have a lot of other things that needs to get done. If you have a patch
ready - send it. Nothing to lose. I can't guarantee we have the time to
review it though, depends on complexity =)
// Björn-Egil
>
>
> On Wed, Jan 9, 2013 at 8:38 AM, Björn-Egil Dahlberg
> <wallentin.dahlberg@REDACTED <mailto:wallentin.dahlberg@REDACTED>>
> wrote:
>
> I have placed this patch into opu - i.e. a final integration test
> through our daily builds.
>
> I've reconsidered its impact. It should not have any impact if you
> don't use control sequences, which probably is the case in legacy
> code since those were filtered anyways. I also agree that not
> resetting the console is a user error.
>
> An easy way to reset the console if problems arise might be a nice
> future addition though.
>
> Your patch will probably be merged later this week if it passes
> final integration, shouldn't be a problem though.
>
> // Björn-Egil
>
> 2012/12/18 Pedram Nimreezi <mc@REDACTED
> <mailto:mc@REDACTED>>
>
> Yes that was intentionally omitted, as a small percentage of
> the time
> it affected the ( ) brace matching (in smaller terminals)..
> Also not properly resetting ANSI colors once a color is set is
> technically a user error.
> Would agree always resetting is the way to go, if it doesn't
> affect
> anything else.
>
> On Tue, Dec 18, 2012 at 9:36 AM, Björn-Egil Dahlberg
> <wallentin.dahlberg@REDACTED
> <mailto:wallentin.dahlberg@REDACTED>> wrote:
> > This seems nice.
> >
> > I use colors directly in the bash shell normally. Also via
> Erlang. Could be
> > nice with colors in erlang shell also. Seems more modern =)
> >
> > Is:
> > --- a/lib/stdlib/src/shell.erl 2011-11-22 08:57:01.000000000
> -0500
> > +++ b/lib/stdlib/src/shell.erl 2011-12-10 14:25:58.000000000
> -0500
> > @@ -674,6 +674,7 @@ exprs([E0|Es], Bs1, RT, Lf, Ef, Bs0, W)
> > [io:requests([{put_chars, VS}, nl]) || W =:= cmd],
> > %% Don't send the result back if it will be
> > %% discarded anyway.
> > + io:fwrite("\e[0m"),
> > V = if
> > W =:= pmt ->
> > {W,V0};
> >
> > intentionally omitted?
> > Always clearing the shell might be the way to go =)
> >
> > // Björn-Egil
> >
> > 2012/11/22 Henrik Nord <henrik@REDACTED
> <mailto:henrik@REDACTED>>
> >>
> >> This mailing list + github is the only way atm.
> >>
> >> We are considering letting a view of our daily build result
> page show up
> >> to the public via erlang.org <http://erlang.org>
> >> That would increase transparency and possible decrease the
> turnaround time
> >> for patches as the authors themselves could check the test
> results of their
> >> patches.
> >>
> >>
> >> On 2012-11-22 10:11, Yurii Rashkovskii wrote:
> >>
> >> Is there any *reliable* way to track what's in pu/master-pu?
> >>
> >>
> >> On Thu, Nov 22, 2012 at 1:07 AM, Henrik Nord
> <henrik@REDACTED <mailto:henrik@REDACTED>> wrote:
> >>>
> >>> No its in there, it was just removed temporary from the push
> >>>
> >>>
> >>>
> >>> On 2012-11-21 19:01, Yurii Rashkovskii wrote:
> >>>
> >>> Forgive me if I am missing something, but did this patch
> somehow not make
> >>> it to master-pu?
> >>>
> >>>
> >>>
> https://github.com/erlang/otp/blob/master-pu/erts/emulator/drivers/unix/ttsl_drv.c#L915
> >>>
> >>> (pu doesn't have it either
> >>>
> https://github.com/erlang/otp/blob/pu/erts/emulator/drivers/unix/ttsl_drv.c#L915)
> >>>
> >>> Is it intentional or is it an omission?
> >>>
> >>>
> >>> On Thu, Nov 15, 2012 at 4:20 AM, Henrik Nord
> <henrik@REDACTED <mailto:henrik@REDACTED>> wrote:
> >>>>
> >>>> Thank you for your contribution, I have added the patch
> to 'master-pu'
> >>>>
> >>>>
> >>>>
> >>>> On 2012-11-14 14:49, Pedram Nimreezi wrote:
> >>>>>
> >>>>>
> >>>>>
> https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L901
> >>>>>
> >>>>>
> https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L599
> >>>>>
> >>>>>
> https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L609
> >>>>
> >>>>
> >>>> --
> >>>> /Henrik Nord Erlang/OTP
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> erlang-patches mailing list
> >>>> erlang-patches@REDACTED <mailto:erlang-patches@REDACTED>
> >>>> http://erlang.org/mailman/listinfo/erlang-patches
> >>>
> >>>
> >>>
> >>> --
> >>> /Henrik Nord Erlang/OTP
> >>
> >>
> >>
> >> --
> >> /Henrik Nord Erlang/OTP
> >>
> >>
> >> _______________________________________________
> >> erlang-patches mailing list
> >> erlang-patches@REDACTED <mailto:erlang-patches@REDACTED>
> >> http://erlang.org/mailman/listinfo/erlang-patches
> >>
> >
> >
> > _______________________________________________
> > erlang-patches mailing list
> > erlang-patches@REDACTED <mailto:erlang-patches@REDACTED>
> > http://erlang.org/mailman/listinfo/erlang-patches
> >
>
>
>
> --
> /* Sincerely
> --------------------------------------------------------------
> Pedram Nimreezi - Chief Technology Officer */
>
> // The hardest part of design ... is keeping features out. -
> Donald Norman
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED <mailto:erlang-patches@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-patches
>
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130109/cb09ad14/attachment.htm>
More information about the erlang-patches
mailing list