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


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Gregory Heytings <gregory <at> heytings.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: xerusx <at> pm.me, 59388 <at> debbugs.gnu.org
Subject: bug#59388: Open emacsclient file at last line
Date: Sat, 19 Nov 2022 12:08:06 -0800
On 11/19/2022 10:07 AM, Gregory Heytings wrote:
> Hmmm...  I must be missing something.  What do you mean?  emacsclient 
> --eval means "do not visit files but instead evaluate the arguments as 
> Emacs Lisp expressions".

I have two thoughts about this:

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

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




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.