all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: how to invoke 'server-visit-files' function from emacsclient -e ?
Date: Wed, 12 Oct 2016 22:40:56 +0300	[thread overview]
Message-ID: <83a8e99wzb.fsf@gnu.org> (raw)
In-Reply-To: <CALyZvKxMRQqGkyUMouuHhGqROethqWFNnNoA4No96HVDet3GFw@mail.gmail.com> (message from Jason Vas Dias on Wed, 12 Oct 2016 15:34:17 +0100)

> 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	other threads:[~2016-10-12 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 14:34 how to invoke 'server-visit-files' function from emacsclient -e ? Jason Vas Dias
2016-10-12 19:40 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a8e99wzb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.