all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19410: [PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion
@ 2014-12-19 11:31 samer
       [not found] ` <handler.19410.B.14189887339892.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: samer @ 2014-12-19 11:31 UTC (permalink / raw)
  To: 19410, dylan

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  <samer@samertm.com>
+
+	* eshell/esh-io.el (eshell-get-target, eshell-buffer-shorthand):
+	Remove eshell-buffer-shorthand (bug#19391).
+
  2014-11-28  Martin Rudalics  <rudalics@gmx.at>

  	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 > #<buffer *scratch*>  ; 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)






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#19410: Acknowledgement ([PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion)
       [not found] ` <handler.19410.B.14189887339892.ack@debbugs.gnu.org>
@ 2014-12-19 11:48   ` samer
  0 siblings, 0 replies; 2+ messages in thread
From: samer @ 2014-12-19 11:48 UTC (permalink / raw)
  To: 19410

Heh, this is a patch for bug#19391, not a new bug. That was a dumb 
mistake :)

-samer





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-19 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 11:31 bug#19410: [PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion samer
     [not found] ` <handler.19410.B.14189887339892.ack@debbugs.gnu.org>
2014-12-19 11:48   ` bug#19410: Acknowledgement ([PATCH] bug#19391: 25.0.50; eshell-buffer-shorthand breaks command dollar expansion) samer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.