all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Proposal: new syntax for eshell-buffer-shorthand (related: bug#19391)
@ 2015-03-05  8:20 Samer Masterson
  2015-05-16  2:59 ` [PATCH] " Samer Masterson
  0 siblings, 1 reply; 9+ messages in thread
From: Samer Masterson @ 2015-03-05  8:20 UTC (permalink / raw)
  To: Emacs developers; +Cc: Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

Hi list,

Eshell has a buffer shorthand, which you can enable by making 
"eshell-buffer-shorthand" non-nil. The shorthand looks like this:

~$ echo "words" > '*scratch*

It's currently broken in two ways:
 - Creating a symbol with a single quote doesn't work in eshell, 
because the single quote starts a string (which follows POSIX).
 - The feature works by adding a branch to eshell-get-target that 
checks if the target is a symbol, which means internal eshell functions 
that create symbols to be evaluated are broken, like the external 
subshell syntax (bug#19391).

I propose that we change eshell-buffer-shorthand in the following 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 (such as 
bug#19391). Something like #<name-of-buffer> would work.
 - The shorthand should be processed as a buffer (similar to how 
#<buffer name-of-buffer> is processed). That means the shorthand won't 
require extra code anywhere except for the reader.
 - The shorthand should be on by default, and 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.

So the above example would look like:

~$ echo "words" > #<*scratch*>

I haven't looked into how eshell reads input, so I don't know if there 
are any significant technical issues with using this syntax. If there 
aren't any, I'll start working on this. Let me know if you have any 
questions.

-samer

[-- Attachment #2: Type: text/html, Size: 1939 bytes --]

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

end of thread, other threads:[~2015-05-17 21:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05  8:20 Proposal: new syntax for eshell-buffer-shorthand (related: bug#19391) Samer Masterson
2015-05-16  2:59 ` [PATCH] " Samer Masterson
2015-05-16  7:24   ` Eli Zaretskii
2015-05-16  8:05     ` Samer Masterson
2015-05-16  9:00       ` Eli Zaretskii
2015-05-16  9:56         ` Samer Masterson
2015-05-16 13:46           ` Stefan Monnier
2015-05-17 21:34         ` Samer Masterson
2015-05-16 13:45     ` Stefan Monnier

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.