all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Everton J. Carpes" <everton.carpes@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Command line open does not use find-file anymore?
Date: Mon, 18 Sep 2017 14:36:35 -0300	[thread overview]
Message-ID: <CAL2=v67sA5giFP1ZTXV_CcaREFuRs5XrOdrWqrai+wQBs64uQg@mail.gmail.com> (raw)
In-Reply-To: <87y3pcvwju.fsf@qcore>

By "command line" I means starting a new emacs session.

I know the +LINE syntax, but it is not useful when you are dealing with
error reports from a lot of tools which by default will present it like
FILENAME:LINE.

The solution putting the "advice" around find-file works when calling
find-file inside emacs and was working until version 25 also from command
line, but it is not working from command line anymore after updating to 25.



On Mon, Sep 18, 2017 at 12:47 PM, Óscar Fuentes <ofv@wanadoo.es> wrote:

> "Everton J. Carpes" <everton.carpes@gmail.com> writes:
>
> > Until emacs 24 I was able to customize file opening using an "advice"
> > around find-file. It was working for opening from inside emacs and also
> > from command line.
> >
> > I use this to deal with common error reports, which are presented in
> > "filename:lineno" syntax. The suggestion to do this can be found here:
>
> [snip]
>
> By "command line" you refer to starting a new emacs session or invoking
> the emacs server with emacsclient?
>
> The documentation says that find-file is used when visiting a file from
> the command line (i.e. when you start emacs providing a file name). It
> also mentions de syntax +LINE and +LINE:COLUMN for jumping to a specific
> positiong. Here is an excerpt from the relevant info node:
>
>
> C.1 Action Arguments
> ====================
>
> Here is a table of action arguments:
>
> ‘FILE’
> ‘--file=FILE’
> ‘--find-file=FILE’
> ‘--visit=FILE’
>      Visit FILE using ‘find-file’.  *Note Visiting::.
>
>      When Emacs starts up, it displays the startup buffer in one window,
>      and the buffer visiting FILE in another window (*note Windows::).
>      If you supply more than one file argument, the displayed file is
>      the last one specified on the command line; the other files are
>      visited but their buffers are not shown.
>
>      If the startup buffer is disabled (*note Entering Emacs::), then
>      FILE is visited in a single window if one file argument was
>      supplied; with two file arguments, Emacs displays the files in two
>      different windows; with more than two file argument, Emacs displays
>      the last file specified in one window, plus a Buffer Menu in a
>      different window (*note Several Buffers::).  To inhibit using the
>      Buffer Menu for this, change the variable
>      ‘inhibit-startup-buffer-menu’ to ‘t’.
>
> ‘+LINENUM FILE’
>      Visit FILE using ‘find-file’, then go to line number LINENUM in it.
>
> ‘+LINENUM:COLUMNNUM FILE’
>      Visit FILE using ‘find-file’, then go to line number LINENUM and
>      put point at column number COLUMNNUM.
>
>
>


-- 
Everton J. Carpes


  reply	other threads:[~2017-09-18 17:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  9:00 Command line open does not use find-file anymore? Everton J. Carpes
2017-09-18 15:47 ` Óscar Fuentes
2017-09-18 17:36   ` Everton J. Carpes [this message]
2017-09-19 11:38 ` Michael Heerdegen
2017-09-19 16:50   ` Eli Zaretskii
2017-09-20  1:16   ` Everton J. Carpes

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='CAL2=v67sA5giFP1ZTXV_CcaREFuRs5XrOdrWqrai+wQBs64uQg@mail.gmail.com' \
    --to=everton.carpes@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ofv@wanadoo.es \
    /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.