From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: samer Newsgroups: gmane.emacs.bugs Subject: bug#19410: [PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion Date: Fri, 19 Dec 2014 03:31:12 -0800 Message-ID: <02ec0b96564b9f98529b94bcc922a724@samertm.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1418988802 21958 80.91.229.3 (19 Dec 2014 11:33:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 11:33:22 +0000 (UTC) To: 19410@debbugs.gnu.org, dylan@hardison.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 19 12:33:15 2014 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 1Y1vo2-0004Xn-KH for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 12:33:14 +0100 Original-Received: from localhost ([::1]:57876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vo2-0005yA-19 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 06:33:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vnv-0005xv-1o for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:33:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1vnq-0007p4-ML for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:33:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vnq-0007p0-Jl for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y1vnq-0002aq-EL for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: samer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Dec 2014 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19410 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, dylan@hardison.net Original-Received: via spool by submit@debbugs.gnu.org id=B.14189887339892 (code B ref -1); Fri, 19 Dec 2014 11:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Dec 2014 11:32:13 +0000 Original-Received: from localhost ([127.0.0.1]:50859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1vn2-0002ZT-FC for submit@debbugs.gnu.org; Fri, 19 Dec 2014 06:32:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58249) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1vn0-0002ZK-K3 for submit@debbugs.gnu.org; Fri, 19 Dec 2014 06:32:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1vmw-0007WI-4D for submit@debbugs.gnu.org; Fri, 19 Dec 2014 06:32:10 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vmw-0007WE-1e for submit@debbugs.gnu.org; Fri, 19 Dec 2014 06:32:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vmr-0005Gg-PJ for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:32:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1vml-0007RP-PG for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:32:01 -0500 Original-Received: from samertm.com ([162.243.37.26]:36045 helo=mail.samertm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1vml-0007Nv-Mj for bug-gnu-emacs@gnu.org; Fri, 19 Dec 2014 06:31:55 -0500 Original-Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id 693E580904; Fri, 19 Dec 2014 11:31:12 +0000 (UTC) X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:97564 Archived-At: The issue is that the subcommand requests a target for the symbol 'eshell-temp', but eshell-get-target returns the point marker for a buffer named 'eshell-temp' instead of setting 'eshell-temp's value to nil and returning the symbol. That's because eshell-get-target can't tell the difference between a symbol and a buffer when eshell-buffer-shorthand is set, so it assumes that every symbol is a buffer. We could treat 'eshell-temp' similarly to 't and 'nil by ignoring this branch if the name of the symbol is 'eshell-temp', but I'm 90% sure that eshell-buffer-shorthand doesn't work anyways and it's probably better to remove it (notice that the examples in the docstring for eshell-buffer-shorthand don't work). Also, I've submitted a patch for the issue regarding external subcommands having no output on bug #12680. Best, Samer Patch below: 2 files changed, 17 insertions(+), 28 deletions(-) lisp/ChangeLog | 10 ++++++++++ lisp/eshell/esh-io.el | 35 +++++++---------------------------- Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45ba279..9aec808 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2014-12-19 Samer Masterson + + * eshell/esh-io.el (eshell-get-target, eshell-buffer-shorthand): + Remove eshell-buffer-shorthand (bug#19391). + 2014-11-28 Martin Rudalics Fix two issues around help-window-select. (Bug#11039) (Bug#19012) Modified lisp/eshell/esh-io.el diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index ebbca58..3f70f48 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -98,19 +98,6 @@ other buffers) ." :type 'integer :group 'eshell-io) -(defcustom eshell-buffer-shorthand nil - "If non-nil, a symbol name can be used for a buffer in redirection. -If nil, redirecting to a buffer requires buffer name syntax. If this -variable is set, redirection directly to Lisp symbols will be -impossible. - -Example: - - echo hello > '*scratch* ; works if `eshell-buffer-shorthand' is t - echo hello > # ; always works" - :type 'boolean - :group 'eshell-io) - (defcustom eshell-print-queue-size 5 "The size of the print queue, for doing buffered printing. This is basically a speed enhancement, to avoid blocking the Lisp code @@ -355,21 +342,13 @@ it defaults to `insert'." (goto-char (point-max)))) (point-marker)))))) - ((or (bufferp target) - (and (boundp 'eshell-buffer-shorthand) - (symbol-value 'eshell-buffer-shorthand) - (symbolp target) - (not (memq target '(t nil))))) - (let ((buf (if (bufferp target) - target - (get-buffer-create - (symbol-name target))))) - (with-current-buffer buf - (cond ((eq mode 'overwrite) - (erase-buffer)) - ((eq mode 'append) - (goto-char (point-max)))) - (point-marker)))) + ((bufferp target) + (with-current-buffer target + (cond ((eq mode 'overwrite) + (erase-buffer)) + ((eq mode 'append) + (goto-char (point-max)))) + (point-marker))) ((functionp target) nil)