|
From: | Jim Porter |
Subject: | bug#59388: Open emacsclient file at last line |
Date: | Sun, 20 Nov 2022 11:37:51 -0800 |
On 11/20/2022 11:00 AM, Eli Zaretskii wrote:
Date: Sun, 20 Nov 2022 10:49:10 -0800 Cc: gregory@heytings.org, xerusx@pm.me, 59388@debbugs.gnu.org From: Jim Porter <jporterbugs@gmail.com>Then I think I'm okay with adding --funcall to emacsclient, as a solution for this feature request. With the proviso that the named function will be called _after_ visiting the named FILE, right?Assuming it's possible, I think the most flexible, obvious, and consistent[1] way for it to work would be to obey the order of the arguments. So "emacsclient --funcall func file.txt" calls func and then visits file.txt, whereas "emacsclient file.txt --funcall func" visits file.txt and then calls func.This won't work, because emacsclient thinks everything after the first FILE cannot be an option. Which is why +LINE:COLUMN FILE works, although LINE and COLUMN refer to FILE that comes after it.
Ok, then I think your proposal is fine.(Though these surprising differences between how "emacs" and "emacsclient" handle arguments are making me wonder about reimplementing the client, perhaps as "emacs-client" with a hyphen. Maybe it's worth an experiment at least. That obviously doesn't have to happen as part of this bug though.)
[Prev in Thread] | Current Thread | [Next in Thread] |