help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to invoke 'server-visit-files' function from emacsclient -e ?


From: Eli Zaretskii
Subject: Re: how to invoke 'server-visit-files' function from emacsclient -e ?
Date: Wed, 12 Oct 2016 22:40:56 +0300

> From: Jason Vas Dias <jason.vas.dias@gmail.com>
> Date: Wed, 12 Oct 2016 15:34:17 +0100
> 
> I am trying to write a shell script that will accept a list of ( file
> name, line number ) pairs
> and get the user's running emacs process to visit each file, scroll to
> the line number, and
> wait for the user to press 'C-x+#' (invoke the 'server-edit' function)
> before allowing
> the next file to be visited .
> 
> Since emacsclient does most of this (except scrolling to the line number,
> a very important feature for this application) , [...]

??? Invoking emacsclient with the +LINE argument causes Emacs to
scroll to the specified line.  So I'm not sure why you need to do
anything beyond invoking emacsclient.  There must be some details you
didn't tell.

> Can anyone suggest a way of acheiving the desired result:
>    - loading one of many files into a running emacs , causing emacs to
> scroll to a given line number
>      in that file, and then waiting for user to press 'C-x #' before
> allowing the next file to be loaded ?

Just

  emacsclient +LINE1 FILE1 +LINE2 FILE2 ...

should do what you want.  It does for me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]