bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11474: Patch for Emacsclient --eval bug


From: Lars Ingebrigtsen
Subject: bug#11474: Patch for Emacsclient --eval bug
Date: Thu, 27 Jun 2019 17:29:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> 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).

Hm...  I think I agree with the patch Scott posted, and not with this
solution.  :-)

The use case here would be if you say something like

$ emacsclient -a nano --eval '(my-emacs-setup-thing)'

The eval bit is meaningful in Emacs, and may be something that the user
feels is something that Emacs should do when called from emacsclient.
But if there's no server, then we should use nano.

The current behaviour is to use nano with the file name
'(my-emacs-setup-thing)', while you propose to call nano with
--eval '(my-emacs-setup-thing)', which would be even worse, I think,
while just dropping the parameters completely in the -a case would make
this usable.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]