GNU bug report logs -
#59388
Open emacsclient file at last line
Previous Next
Full log
View this message in rfc822 format
On 11/20/2022 11:00 AM, Eli Zaretskii wrote:
>> Date: Sun, 20 Nov 2022 10:49:10 -0800
>> Cc: gregory <at> heytings.org, xerusx <at> pm.me, 59388 <at> debbugs.gnu.org
>> From: Jim Porter <jporterbugs <at> 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.)
This bug report was last modified 2 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.