From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Tino Calancha <tino.calancha@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#30280: async-shell-command-display-buffer doesn't work anymore
Date: Wed, 09 May 2018 22:57:30 +0900
Message-ID: <87r2mlszhx.fsf@gmail.com>
References: <87a7wxd1g9.fsf@mail.linkov.net> <83607kinmx.fsf@gnu.org>
	<877erz41re.fsf@tcd.ie> <87zi4tu2ic.fsf@mail.linkov.net>
	<83lggbd661.fsf@gnu.org> <87tvuyqhz8.fsf@tcd.ie>
	<87tvuxojag.fsf@mail.linkov.net> <874ljkn4fb.fsf@tcd.ie>
	<87zi1budeg.fsf@gmail.com> <87zi1911tg.fsf@tcd.ie>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1525874171 31236 195.159.176.226 (9 May 2018 13:56:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 9 May 2018 13:56:11 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Cc: rrt@sc3d.org, 30280@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
To: <contovob@tcd.ie>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 09 15:56:06 2018
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1fGPZe-0007zw-Dk
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 May 2018 15:56:06 +0200
Original-Received: from localhost ([::1]:56737 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1fGPbj-0000VW-SM
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 May 2018 09:58:15 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42858)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fGPbb-0000VD-B0
	for bug-gnu-emacs@gnu.org; Wed, 09 May 2018 09:58:08 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fGPbY-00058I-9s
	for bug-gnu-emacs@gnu.org; Wed, 09 May 2018 09:58:07 -0400
Original-Received: from debbugs.gnu.org ([208.118.235.43]:47561)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1fGPbY-00057l-6G
	for bug-gnu-emacs@gnu.org; Wed, 09 May 2018 09:58:04 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1fGPbW-0006Bz-AP
	for bug-gnu-emacs@gnu.org; Wed, 09 May 2018 09:58:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Tino Calancha <tino.calancha@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 09 May 2018 13:58:02 +0000
Resent-Message-ID: <handler.30280.B30280.152587426623779@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 30280
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
Original-Received: via spool by 30280-submit@debbugs.gnu.org id=B30280.152587426623779
	(code B ref 30280); Wed, 09 May 2018 13:58:02 +0000
Original-Received: (at 30280) by debbugs.gnu.org; 9 May 2018 13:57:46 +0000
Original-Received: from localhost ([127.0.0.1]:55458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1fGPbG-0006BT-HQ
	for submit@debbugs.gnu.org; Wed, 09 May 2018 09:57:46 -0400
Original-Received: from mail-pl0-f44.google.com ([209.85.160.44]:41844)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <tino.calancha@gmail.com>) id 1fGPbF-0006BH-2D
	for 30280@debbugs.gnu.org; Wed, 09 May 2018 09:57:45 -0400
Original-Received: by mail-pl0-f44.google.com with SMTP id az12-v6so4350500plb.8
	for <30280@debbugs.gnu.org>; Wed, 09 May 2018 06:57:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 
	h=from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version;
	bh=ct21uD9gzcPlod/py3R2G5w6lJPrvQjwHUzHk9BZzNU=;
	b=RdeA+cpt93+3tM+Jx3MrlnyBSw/vCygXKwFOdp70sIWoT4kzgemU0F5WUIzvDYAimJ
	VM6lc6Ow/UeFsdR48W0edr/mM1QNnd8CyHpCg5ydNettgG+F3qgH7JeowyucmXxIZPIy
	RBV87dT+6Yml3qxFwf3GiSoVKSY/H0We0Te4gl61gIrHMW8dqAZxlXqIFWq/5+qTMmgs
	BX6QZIQSM51R5vejwNNp99nwgql9omfWg7SZuFfhvdEUR5FQL5VouoiRqUJODg/0LHMZ
	DSb1oQvOAV9j0S9BJNQJLOSplZxibMfEn2BDsQ67Y4orZrHnZtdMjqBCsKo87q6D6wJz
	aWrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
	:message-id:user-agent:mime-version;
	bh=ct21uD9gzcPlod/py3R2G5w6lJPrvQjwHUzHk9BZzNU=;
	b=OPQrgtqxkcJYrxB/jP4VMm6LwT4ufO6+zGIR241/9n3PeMgPZfO8btVGvS86cYSzM+
	u4NWHQSE2ZJVVgrleHck1dzWPgNilIAHhj1/dpYRZ+Dy+IZtOMnJ0/VP6VA/zqUZ8fAD
	/jfQlh23TXDALcV34IhT8fdHXXWAIDGaC5fqQal7iMbHNrxwja5vAzaASl7jXgZLd6Un
	fKtY5kilPRq6YTPy0xSTYwwvgpRVofzf+UnL/Ga5iwf8lAxpFLuPpSrDvRglDbIy4Y/3
	G8DfNgWYii1kue7erMh5iUR9GznR1iGwcjHWX5Wd2w4wqRd/oXbQo6qNEFvaqddGscLr
	y24g==
X-Gm-Message-State: ALQs6tABJf9bRzH3N+VjT9Pr7s0dvXjD41SSK8e72d4fvA6vZXTwngT5
	mSh2PIKkJszEc0ZBv+3UyNg=
X-Google-Smtp-Source: AB8JxZoFOeG0VpL+HORcZQ/fKGZ6iFNrqnb3XdQLqirjZ4/ungEPnCZtMiOFI/I0M/FrRQG1d0JQfA==
X-Received: by 2002:a17:902:b60a:: with SMTP id
	b10-v6mr44988664pls.221.1525874259155; 
	Wed, 09 May 2018 06:57:39 -0700 (PDT)
Original-Received: from calancha-pc (228.225.128.101.dy.bbexcite.jp. [101.128.225.228])
	by smtp.gmail.com with ESMTPSA id
	t1-v6sm15339251pgu.41.2018.05.09.06.57.36
	(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
	Wed, 09 May 2018 06:57:38 -0700 (PDT)
In-Reply-To: <87zi1911tg.fsf@tcd.ie> (Basil L. Contovounesios's message of
	"Wed, 09 May 2018 12:54:51 +0100")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
	the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
	<bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:146091
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/146091>

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> I reattach the patches with the buffer name changes removed.
Thank you Basil!

IMHO this patch looks OK.
I have two minor comments.

I)
> +(declare-function comint-output-filter "comint" (process string))
> +
What is the purpose of this? AFICT no warning is shown when compiling
the file.
* We require `shell.el' inside `shell-coomand'.
* `shell.el' requires `comint.el'.
Is the purpose to serve as documentation? In that case I don't think we
need it (the prefix 'comint-' already makes obvious where this function
belongs to).

II)
It's better to keep consistent with the indentation of the function you
are modifying:  here, `shell-command' is indenting with TAB.

Tip:
You can see the tabs searching them with:
C-s C-q C-I
or you can persistenly highlight them with:
M-s h r C-I RET RET

For instance, here you are changing:
1) ' ---> #'
;; and
2) \t\t\s\s 000> \s\s\s\s...\s (18 white spaces)

Please, do not change 2).
>  		  ;; Use the comint filter for proper handling of
>  		  ;; carriage motion (see comint-inhibit-carriage-motion).
> -		  (set-process-filter proc 'comint-output-filter)
> +                  (set-process-filter proc #'comint-output-filter)

>                    (if async-shell-command-display-buffer
>                        ;; Display buffer immediately.
>                        (display-buffer buffer '(nil (allow-no-window . t)))