GNU bug report logs -
#59388
Open emacsclient file at last line
Previous Next
Full log
View this message in rfc822 format
> 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.
We can invoke functions in the order of --funcall's, but they should run
after visiting the file. Nothing else makes sense, and was never possible
with emacsclient anyway.
So I stand by what I wrote: --funcall'ed functions should run after
visiting FILE. It's not a problem, as you can see from the implementation
of -position in the protocol.
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.