From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Everton J. Carpes" Newsgroups: gmane.emacs.help Subject: Re: Command line open does not use find-file anymore? Date: Mon, 18 Sep 2017 14:36:35 -0300 Message-ID: References: <87y3pcvwju.fsf@qcore> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1505756220 22751 195.159.176.226 (18 Sep 2017 17:37:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 17:37:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 18 19:36:56 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtzyZ-0005gA-IO for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 19:36:55 +0200 Original-Received: from localhost ([::1]:38031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtzyg-0000zQ-Sk for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 13:37:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtzyI-0000z1-U2 for help-gnu-emacs@gnu.org; Mon, 18 Sep 2017 13:36:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtzyH-0000KQ-Ml for help-gnu-emacs@gnu.org; Mon, 18 Sep 2017 13:36:38 -0400 Original-Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:43269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtzyH-0000Jd-EF for help-gnu-emacs@gnu.org; Mon, 18 Sep 2017 13:36:37 -0400 Original-Received: by mail-pf0-x22b.google.com with SMTP id y29so593267pff.0 for ; Mon, 18 Sep 2017 10:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ovmube9QgG8IB/AgGWhYeWpGwvFzT5yKqb9zxMC45No=; b=Szn0rdPVs1nVbgwDj2Q8tX43pviqQjSC1SN1qaZ3SPTNGXRRZHCTo2S58Xp0X+0YFE 96zUTAzCOMGtHmv28kbhwKHMXVHKdAxUibDKXaT2FV2N/SC12aGk0WcaoCPTXuyAImM9 tJsbkWLasjnH/3s41asCXRc/QoY/e7qa+tt/nFqGPObzDB2ucz06MH91oitzOd9lK28o CBcTjlbBMNN/dZYb/rbxYB34F7/7iesKfUXfsPGUmbgrDkU58rZaGeXdpelYiPA+zHa0 KRnNCMb8f34T5XNe9sScc/O+mH1vezL7iM9qbHqVNNdkCF6VxuTde3b85fTvYuyYkdBD 8PMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ovmube9QgG8IB/AgGWhYeWpGwvFzT5yKqb9zxMC45No=; b=MJNAIKieu+gnDXvjtZrKbl/J+jSbVLe43ie4seOUXWLjyNlayyWg9tC8okfAhWRr7i FekfufTNwXx7GIPIJVvZ9QU+ukK22QGCXJpv/ypw2Zf09yGLS2eVmOIPvTwJPwwEjE/s EtOOaFqVzQTEZUI2leuTV5ra8AVNqWnorBI1DJtdqUid/VzjQgeXi8wa5uIR9eOUsVc9 nk7s6F0YkKp1LavYiNBSTmz81vXG07Po7/dYcdFZFeOfT7ZH9oghaxkGH8xrpXVitqfK NsbJULwrC27+g2hLPx0Z8bBEsWuvQqFMQLKibM7UDxqr6wtYLilM+XhxSmIJz3nC6is2 5KDQ== X-Gm-Message-State: AHPjjUi6clHurhHZRpaJfj6JliRhJeA/DmfSBhU3ReKSwrUlZ75uZjK+ H3ZQsRBzorQyl+ree3HunPlJyGCfmp4HTfyNf308qA== X-Google-Smtp-Source: ADKCNb4NxhIjfjprGyn/Zti+6SdpHYl8xuh5SzUl90wDNObEEir1zTuPIcNHPDypl4lfCWRi/yx8t7SZcwEBSuvUusI= X-Received: by 10.98.150.27 with SMTP id c27mr25934331pfe.123.1505756196199; Mon, 18 Sep 2017 10:36:36 -0700 (PDT) Original-Received: by 10.100.149.1 with HTTP; Mon, 18 Sep 2017 10:36:35 -0700 (PDT) In-Reply-To: <87y3pcvwju.fsf@qcore> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22b X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114305 Archived-At: 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, =C3=93scar Fuentes wrote= : > "Everton J. Carpes" 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Here is a table of action arguments: > > =E2=80=98FILE=E2=80=99 > =E2=80=98--file=3DFILE=E2=80=99 > =E2=80=98--find-file=3DFILE=E2=80=99 > =E2=80=98--visit=3DFILE=E2=80=99 > Visit FILE using =E2=80=98find-file=E2=80=99. *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 > =E2=80=98inhibit-startup-buffer-menu=E2=80=99 to =E2=80=98t=E2=80=99= . > > =E2=80=98+LINENUM FILE=E2=80=99 > Visit FILE using =E2=80=98find-file=E2=80=99, then go to line number= LINENUM in it. > > =E2=80=98+LINENUM:COLUMNNUM FILE=E2=80=99 > Visit FILE using =E2=80=98find-file=E2=80=99, then go to line number= LINENUM and > put point at column number COLUMNNUM. > > > --=20 Everton J. Carpes