unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: excalamus@tutanota.com
Cc: 51454@debbugs.gnu.org
Subject: bug#51454: Progress bar in Org source blocks
Date: Sat, 30 Oct 2021 18:43:37 +0200	[thread overview]
Message-ID: <867ddujwee.fsf@gmail.com> (raw)
In-Reply-To: <MnEYGl5--3-2@tutanota.com>

Hi,

On Sat, 30 Oct 2021 at 06:55, excalamus@tutanota.com wrote:
>> try the environment variable INSIDE_EMACS with turns off
>> some fancy shell things.
>>
> This is a good suggestion.  Maybe I'm misunderstanding how
> INSIDE_EMACS works. The docs say:

Thanks for the pointing the Emacs doc.  From my understanding, the
environment variable INSIDE_EMACS is used by Guix to turn on/off
hyperlink support.  It reads,

--8<---------------cut here---------------start------------->8---
(define* (supports-hyperlinks? #:optional (port (current-output-port)))
  "Return true if PORT is a terminal that supports hyperlink escapes."
  ;; Note that terminals are supposed to ignore OSC escapes they don't
  ;; understand (this is the case of xterm as of version 349, for instance.)
  ;; However, Emacs comint as of 26.3 does not ignore it and instead lets it
  ;; through, hence the 'INSIDE_EMACS' special case below.
  (and (isatty?* port)
       (not (getenv "INSIDE_EMACS"))))
--8<---------------cut here---------------end--------------->8---

> "Emacs sets the environment variable INSIDE_EMACS in thesubshell to
> ‘version,comint’, where version is the Emacs version (e.g., ‘24.1’).
> Programs can check this variableto determine whether they are running
> inside an Emacs subshell."

Indeed, Emacs sets automatically this variable.  That’s why it is used
by Guix. :-)


> I understand this to mean that INSIDE_EMACS *is* being set and that
> it's the guix command's responsibility to do something with it (if it
> wants to).

Yes.


> If instead I set INSIDE_EMACS to something falsey (e.g. 1) and run
> through things, I see the same result with color and control
> characters.

Thanks for reporting. I though tweaking that variable would be enough to
fix the odd behaviour you are seeing,

--8<---------------cut here---------------start------------->8---
: guix package: [1;35mwarning: [0mnothing to do
--8<---------------cut here---------------end--------------->8---

which are related to shell fancy “controllers”.  If you have not tried
yet, then NO_COLOR=1 should do the job.  Sorry to not have thought
before. :-)


Cheers,
simon





  reply	other threads:[~2021-10-30 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28  2:10 bug#51454: Progress bar in Org source blocks excalamus--- via Bug reports for GNU Guix
2021-10-29 12:51 ` zimoun
2021-10-30  4:55   ` excalamus--- via Bug reports for GNU Guix
2021-10-30 16:43     ` zimoun [this message]
2021-11-01  2:03       ` excalamus--- via Bug reports for GNU Guix
2021-11-03 14:14         ` zimoun
2021-11-03 17:05           ` excalamus--- via Bug reports for GNU Guix
2021-11-03 17:52             ` zimoun
2021-11-04  0:43               ` excalamus--- via Bug reports for GNU Guix

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867ddujwee.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=51454@debbugs.gnu.org \
    --cc=excalamus@tutanota.com \
    /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/guix.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).