GNU bug report logs - #59388
Open emacsclient file at last line

Previous Next

Package: emacs;

Reported by: Janek F <xerusx <at> pm.me>

Date: Sat, 19 Nov 2022 15:45:02 UTC

Severity: wishlist

Full log


Message #41 received at 59388 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: gregory <at> heytings.org, xerusx <at> pm.me, 59388 <at> debbugs.gnu.org
Subject: Re: bug#59388: Open emacsclient file at last line
Date: Sat, 19 Nov 2022 22:33:16 +0200
> Date: Sat, 19 Nov 2022 12:08:06 -0800
> Cc: xerusx <at> pm.me, 59388 <at> debbugs.gnu.org
> From: Jim Porter <jporterbugs <at> 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.

> 2. Assuming we don't change --eval as above, maybe the proposed --apply
>     option discussed in bug#57752 could work:
> 
>       emacsclient --apply end-of-buffer -- foo.c
> 
>     I believe this would even work if you defined a shell alias like so:
> 
>       alias edit=end="emacsclient --apply end-of-buffer --"
>       edit-end foo.txt
> 
>     That said, adding --apply to emacsclient (and emacs, too!) seemed
>     like a fair bit of work when I looked at it...

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




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.