From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samer Masterson Newsgroups: gmane.emacs.bugs Subject: bug#19391: [PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion Date: Tue, 03 Mar 2015 23:50:34 -0800 Message-ID: <1425455434.1450.1@mail.samertm.com> References: <1424775586.11596.7@mail.samertm.com> <83a8zuqdle.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-51C2NyWSVKj8eQNJyfH9" X-Trace: ger.gmane.org 1425455490 21206 80.91.229.3 (4 Mar 2015 07:51:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2015 07:51:30 +0000 (UTC) Cc: 19391@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 04 08:51:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YT45I-0006CD-9z for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Mar 2015 08:51:12 +0100 Original-Received: from localhost ([::1]:42556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT45H-0002On-Ix for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Mar 2015 02:51:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT45C-0002KP-Eh for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2015 02:51:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT458-0000o2-Bh for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2015 02:51:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT458-0000nt-7V for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2015 02:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YT457-0000SU-Tv for bug-gnu-emacs@gnu.org; Wed, 04 Mar 2015 02:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Samer Masterson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Mar 2015 07:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19391-submit@debbugs.gnu.org id=B19391.14254554531746 (code B ref 19391); Wed, 04 Mar 2015 07:51:01 +0000 Original-Received: (at 19391) by debbugs.gnu.org; 4 Mar 2015 07:50:53 +0000 Original-Received: from localhost ([127.0.0.1]:34494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YT44y-0000S4-5J for submit@debbugs.gnu.org; Wed, 04 Mar 2015 02:50:52 -0500 Original-Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:34999 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YT44w-0000Rt-5K for 19391@debbugs.gnu.org; Wed, 04 Mar 2015 02:50:50 -0500 Original-Received: from [10.20.1.233] (75-101-62-71.dsl.static.fusionbroadband.com [75.101.62.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by samertm.com (Postfix) with ESMTPSA id 7A40E42D22; Wed, 4 Mar 2015 07:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail; t=1425455430; bh=JRIMTki9s7wSaRzT8UDwLILYGHlQDTCnAM0nRsVE4QA=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=MzWtd5fFTduMIsVSMdTFcinrWy/iRwWJ7YBoAlo12D3j7Ei15LtSgvXlfyxmLd+Xz EAG7riKnWPlnsMaWBTFjPDfU5Tkf3y+yjsY8P2215j0L6W5vQ/EjHntIQLJdMf/VzE XepHQDpG2ug1P0CNqXG2QYfEl4aeGgdO+O685UOs= In-Reply-To: <83a8zuqdle.fsf@gnu.org> X-Mailer: geary/0.9.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100043 Archived-At: --=-51C2NyWSVKj8eQNJyfH9 Content-Type: text/plain; charset=utf-8; format=flowed On Tue, Mar 3, 2015 at 7:56 AM, Eli Zaretskii wrote: > Can you explain why we should lose this user option? I understand > that it causes trouble in this scenario, but can we solve the bug > without losing the option? If not, why having the limitation > documented in the doc string is not good enough? > > Thanks. I think the strongest reason for losing the option is that it currently doesn't work: If you type "echo hello > '*scratch" into eshell and press enter, eshell adds a newline without evaluating the command because it thinks it's in a string because of the unmatched single quote. Its implementation also makes eshell more complex, because eshell-get-target *only* checks for symbols if the option is selected, and then gets-or-creates a buffer with the symbol name. I think having a shorthand for buffers in eshell is a good thing, but it should be different in three ways: - The syntax for the shorthand should be distinct from any other lisp objects, so that we don't have to put out fires when people try to do things that are valid but overlap with the shorthand (e.g. this bug was caused by eshell's external shell feature redirecting to a symbol.) Something like # would work. - The shorthand should be processed as a buffer (similar to how # is processed). That means the shorthand won't require extra code anywhere except for the reader. - The shorthand should be on by default, and probably shouldn't have an option to disable it. The reason for this is that the shorthand would be universally beneficial and backwards compatible, and making it controlled by an option is inviting bugs when we shouldn't be. Let me know what you think of the above, and I can add more detail to the proposal and submit it to emacs-devel. Best, Samer --=-51C2NyWSVKj8eQNJyfH9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 3, 2015 at 7:56 AM, Eli Zaretskii <eliz@gnu.org> wrote:
Can you explain why we should lose this user option? I understa= nd that it causes trouble in this scenario, but can we solve the bug without losing the option? If not, why having the limitation documented in the doc string is not good enough? Thanks.

I think the strongest reason for losing = the option is that it currently doesn't work: If you type "echo hello > = '*scratch" into eshell and press enter, eshell adds a newline without evalu= ating the command because it thinks it's in a string because of the unmatch= ed single quote. Its implementation also makes eshell more complex, because= eshell-get-target *only* checks for symbols if the option is selected, and= then gets-or-creates a buffer with the symbol name.

I think having a shorthand for buffers in eshell is a good thing, but it= should be different in three ways:
 - The syntax for the sh= orthand should be distinct from any other lisp objects, so that we don't ha= ve to put out fires when people try to do things that are valid but overlap= with the shorthand (e.g. this bug was caused by eshell's external shell fe= ature redirecting to a symbol.) Something like #<name-of-buffer> woul= d work.
 - The shorthand should be processed as a buffer (si= milar to how #<buffer name-of-buffer> is processed). That means the s= horthand won't require extra code anywhere except for the reader.
 - The shorthand should be on by default, and probably shouldn't have= an option to disable it. The reason for this is that the shorthand would b= e universally beneficial and backwards compatible, and making it controlled= by an option is inviting bugs when we shouldn't be.

Let me know what you think of the above, and I can add more detail to th= e proposal and submit it to emacs-devel.

Best,
Samer
= --=-51C2NyWSVKj8eQNJyfH9--