From: Pablo Barbachano <pablo.barbachano@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 37814@debbugs.gnu.org
Subject: bug#37814: [PATCH] Add an option to preserve ANSI sequences
Date: Fri, 01 Nov 2019 21:25:28 +0100 [thread overview]
Message-ID: <87y2wz9wef.fsf@exupery.localdomain> (raw)
In-Reply-To: <838sph8ds3.fsf@gnu.org>
Hi,
> Could you please elaborate on the use case(s) that could benefit from
> this change?
My use case is when running shell code in org-babel and capturing the resulting output. I can get it to interpret the ANSI sequences, but when I save the org buffer, the ANSI information would get lost.
This is actually what I'm trying to do: https://emacs.stackexchange.com/questions/35364/how-do-i-attach-a-custom-function-to-process-org-mode-babel-shell-output
> Also, using overlays would mean that copying the text elsewhere will
> reveal the SGR sequences, is that intended? If not, perhaps using
> text properties would be better?
So far I haven't had a need for that. Also, since the rest of the code uses overlays, would it be OK to mix text properties and overlays?
> Did you consider using some non-trivial invisibility spec instead of
> just t? It's hard to say if this would make sense without knowing the
> use cases you had in mind.
I didn't think of it. But I can see now that a keyword argument would allow for different behaviors:
- nil - delete the sequences (default)
- 'invisible - invisible overlay over the sequences
- 'keep - don't delete the sequences
I will rework the patch to allow that.
> The commit log message is not formatted according to our conventions;
> see CONTRIBUTE in the Emacs sources for the details.
Thanks. I will look at it.
> Finally, these changes are too large for us to accept them without a
> copyright assignment. Would you like to start the legal paperwork to
> that end? If so, I will send you the form to fill.
Yes, please, send me the form.
> Thanks again for your interest in Emacs.
Thank you for the fast review!
--
Pablo
next prev parent reply other threads:[~2019-11-01 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 18:18 bug#37814: [PATCH] Add an option to preserve ANSI sequences Pablo Barbáchano
2019-10-19 6:12 ` Eli Zaretskii
2019-11-01 20:25 ` Pablo Barbachano [this message]
2019-11-01 21:01 ` Eli Zaretskii
2020-08-09 18:42 ` Lars Ingebrigtsen
2020-08-09 19:38 ` Eli Zaretskii
2020-09-14 15:04 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2wz9wef.fsf@exupery.localdomain \
--to=pablo.barbachano@gmail.com \
--cc=37814@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).