GNU bug report logs - #18133
Suppressing asynchronous command output

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Mon, 28 Jul 2014 18:48:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Reuben Thomas <rrt <at> sc3d.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: martin rudalics <rudalics <at> gmx.at>, 18133 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#18133: Suppressing asynchronous command output
Date: Tue, 27 Dec 2016 22:21:11 +0000
[Message part 1 (text/plain, inline)]
On 27 December 2016 at 09:28, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Reuben Thomas <rrt <at> sc3d.org>
> > Date: Tue, 27 Dec 2016 09:01:32 +0000
> > Cc: Juri Linkov <juri <at> linkov.net>, martin rudalics <rudalics <at> gmx.at>,
> 18133 <at> debbugs.gnu.org
> >
> >  > +(defun comint-make-newly-written-buffer-visible (string process)
> >  > + "Make the output buffer visible when output is added to an empty
> buffer.
> >  > +Useful in `comint-preoutput-filter-functions'."
> >  > + (let ((buffer (process-buffer process)))
> >  > + (when (and (= 0 (buffer-size buffer))
> >  > + (string-match-p "\\*Async Shell Command\\*"
> >  > + (buffer-name buffer)))
> >  > + (display-buffer (process-buffer process))))
> >  > + string)
> >
> >  Why are we hard-coding a certain buffer name in a function that is
> >  supposed to be more general, judging by its name and doc string?
> >
> > ​I found it hard-coded several times in other places, so I hard-coded it
> here. What do you suggest?
>
> I don't see it hard-coded in any context such as this.
>

​I'm not quite sure what you mean by "in any context such as this". I see
the string repeated in source code, and never assigned to a variable name.
This seems OK, since strings and symbols are pretty much interchangeable
when of this sort (e.g. not internationalised).​


> I think the regexp against which buffer names are matched in
> comint-make-newly-written-buffer-visible should be customizable, with
> "*Async Shell Command*" being (in) the default value.
>

This is already the case.​

And another question: where's the user option to turn this feature on
> or off (including the default being off)?
>

​M-x​ customize-variable RET display-buffer-alist RET

You can tick/untick the option for "*Async Shell Command*", and, when it is
ticked, the regexp can be edited.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 248 days ago.

Previous Next


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