GNU bug report logs - #8252
Please add a function to get files in *grep*

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 14 Mar 2011 21:47:01 UTC

Severity: wishlist

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: 8252 <at> debbugs.gnu.org
Subject: bug#8252: Please add a function to get files in *grep*
Date: Mon, 14 Mar 2011 22:46:05 +0100
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))




This bug report was last modified 3 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.