unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8252: Please add a function to get files in *grep*
@ 2011-03-14 21:46 Lennart Borgman
  2011-03-15  2:16 ` Stefan Monnier
  2021-07-17 14:54 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman @ 2011-03-14 21:46 UTC (permalink / raw)
  To: 8252

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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-17 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 21:46 bug#8252: Please add a function to get files in *grep* Lennart Borgman
2011-03-15  2:16 ` Stefan Monnier
2011-03-15  9:31   ` Lennart Borgman
2021-07-17 14:54 ` Lars Ingebrigtsen

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).