From: Lennart Borgman <lennart.borgman@gmail.com>
To: 8252@debbugs.gnu.org
Subject: bug#8252: Please add a function to get files in *grep*
Date: Mon, 14 Mar 2011 22:46:05 +0100 [thread overview]
Message-ID: <AANLkTinY+5GXLREt2cDBf_y5jiv4S_VY7xwXFGy4vaZb@mail.gmail.com> (raw)
For example something like this (which I just added to
ourcomments-util.el in nXhtml) works now:
(defun grep-grepped-file (pt)
"Return grepped file at PT in a `grep-mode' buffer.
The returned file name is relative."
(let* ((msg (get-text-property (point) 'compilation-message))
(loc (when msg (compilation--message->loc msg)))
(file (when loc (caar (compilation--loc->file-struct loc)))))
file))
next reply other threads:[~2011-03-14 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 21:46 Lennart Borgman [this message]
2011-03-15 2:16 ` bug#8252: Please add a function to get files in *grep* Stefan Monnier
2011-03-15 9:31 ` Lennart Borgman
2021-07-17 14:54 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinY+5GXLREt2cDBf_y5jiv4S_VY7xwXFGy4vaZb@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=8252@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).