From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Scott Turner <srt19170@gmail.com>
Cc: 11474@debbugs.gnu.org
Subject: bug#11474: Patch for Emacsclient --eval bug
Date: Wed, 02 Apr 2014 10:57:56 -0400 [thread overview]
Message-ID: <jwv1txfokm0.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CA+fxJPTKScTWsMaWNMoK9FVjVyxN9KbM-mfZXJ8w=EmFH0D_-Q@mail.gmail.com> (Scott Turner's message of "Fri, 13 Dec 2013 10:30:17 -0500")
[ Thanks for your patience. ]
> emacsclient --alternate-editor "emacs" --eval "(make-frame-visible)"
> results in an Emacs with a buffer named "(make-frame-visible)".
Hmm... indeed, we have a problem here. But I think the problem is that
it's very unclear what should be the right behavior. IOW using both
"--alternate-editor" and "--eval" at the same time is "ill defined" and
the current behavior in that situation is particularly non-sensical.
> The patch provided below simply discards the Elisp arguments when
> emacsclient falls through to the alternate editor. There may be better
> fixes, but this does the least harm while retaining compatibility.
Silently dropping arguments is not very polite, so I'm not really happy
with your solution. I think the "right" behavior would be to call the
alternate editor while preserving most arguments; IOW the right fix
in this case would be to add a "--eval" argument, so that your
alternate_editor can decide whether to drop args when it gets an
"--eval" or to prepend all other args with a "--eval=" (or do whatever
else it fancies).
WDYT?
Stefan
next prev parent reply other threads:[~2014-04-02 14:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 5:27 bug#11474: 24.1.50; eval a command does the wrong thing with emacsclientw.exe Jason Lewis
2013-12-13 15:30 ` bug#11474: Patch for Emacsclient --eval bug Scott Turner
2013-12-24 14:56 ` Scott Turner
2013-12-24 16:03 ` Stefan Monnier
2013-12-24 16:11 ` Scott Turner
2014-04-02 14:57 ` Stefan Monnier [this message]
2014-04-02 15:34 ` Scott Turner
2014-04-02 16:34 ` Stefan Monnier
2019-06-27 15:29 ` Lars Ingebrigtsen
2019-06-27 18:17 ` Stefan Monnier
2019-06-27 18:40 ` Lars Ingebrigtsen
2019-06-27 18:56 ` Lars Ingebrigtsen
2019-06-27 19:00 ` Lars Ingebrigtsen
2019-06-27 19:14 ` Stefan Monnier
2019-06-27 19:19 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1txfokm0.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11474@debbugs.gnu.org \
--cc=srt19170@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.