|
From: | Jim Porter |
Subject: | bug#59388: Open emacsclient file at last line |
Date: | Sat, 19 Nov 2022 15:06:14 -0800 |
On 11/19/2022 12:33 PM, Eli Zaretskii wrote:
Date: Sat, 19 Nov 2022 12:08:06 -0800 Cc: xerusx@pm.me, 59388@debbugs.gnu.org From: Jim Porter <jporterbugs@gmail.com> 1. Why does --eval do that? You can mix filenames and --eval with the regular emacs program: emacs -Q foo.txt --eval '(message "hi")' Why doesn't emacsclient work similarly? (On the other hand, changing this might break compatibility, so we should be careful here.)I don't think we can change the semantics of --eval.
Yeah, probably not. I'm not sure how important fixing this inconsistency is, but if we *were* to fix it, I think the least-disruptive would be to add a new option like "emacsclient --eval-one" that behaves like "emacs --eval" and add an obsoletion warning to "emacsclient --eval". Then, after a few versions, make "emacsclient --eval" work like "emacsclient --eval-one".
This might be more effort than it's worth though...
Maybe we don't need to go as far as that discussion led us? Just adding a switch --funcall, to mimic what Emacs has, could be enough? Then we'd be able to say emacsclient -f eob FILE (assuming we also add a function 'eob' to Emacs).
With the caveat that -f is already used for --server-file, I think this would be fine. --funcall is a lot simpler to implement than --apply, at least from emacsclient.
[Prev in Thread] | Current Thread | [Next in Thread] |