GNU bug report logs - #72426
29.2.50; comint-pager doesn't affect async-shell-command

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Fri, 2 Aug 2024 18:36:01 UTC

Severity: normal

Found in version 29.2.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 72426 <at> debbugs.gnu.org
Subject: bug#72426: 29.2.50; comint-pager doesn't affect async-shell-command
Date: Sat, 03 Aug 2024 18:38:56 +0300
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Sat, 3 Aug 2024 06:47:10 -0400
> Cc: 72426 <at> debbugs.gnu.org
> 
> On Sat, Aug 3, 2024, 1:48 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>  > From: Spencer Baugh <sbaugh <at> janestreet.com>
>  > Date: Fri, 02 Aug 2024 14:35:25 -0400
>  > 
>  > 
>  > 1. PAGER=less emacs -Q
>  > 2. (setq comint-pager "cat")
>  > 3. (async-shell-command "echo $PAGER")
>  > 4. Observe "less" rather than "cat".
>  > 
>  > I intended async-shell-command to also be affected when I added
>  > comint-pager; a patch to fix this will follow.
> 
>  Thanks, I don't think this is right: comint stuff should not affect
>  lower-level primitives, it should only affect comint and its callers.
> 
> comint-terminfo-terminal affects async-shell-command, why not this?

Ugh!  A mistake, IMNSHO.  But that ship sailed a long time ago, so we
cannot fix the mistake.  We can avoid enlarging the mistake, though.

> If the fact that the variable is in comint is the problem, I can rename it and move it elsewhere.

I don't think functions that are almost primitives should pay
attention to application-level features such as this one.

>  Lisp programs that use async-shell-command can arrange for
>  process-environment to have PAGER=SOMETHING as they see fit.
> 
> My intention is primarily to affect interactive usage of async-shell-command.

But comint-term-environment also affects "M-x compile".




This bug report was last modified 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.