[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/urgrep 99e1de4eb1 105/115: Fix an edge case when unable
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/urgrep 99e1de4eb1 105/115: Fix an edge case when unable to get the grouped filename for highlighting |
|
Date: |
Wed, 10 May 2023 03:00:49 -0400 (EDT) |
branch: externals/urgrep
commit 99e1de4eb1d2f37e6ca852968f2f28de4a708201
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
Fix an edge case when unable to get the grouped filename for highlighting
Sometimes, this code can run before `urgrep-filter` has propertized the
filenames, resulting in it being unable to find the file name. On Emacs 27
and
lower, this breaks compilation-mode.
---
urgrep.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/urgrep.el b/urgrep.el
index 831baa2ae3..c0c3947dd4 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -764,8 +764,10 @@ versions, it's half-open. Use this to adjust the value as
needed in
"Look backwards for the filename when a match is found in grouped output."
(save-excursion
(if-let ((match (text-property-search-backward 'urgrep-file-name)))
- (buffer-substring (prop-match-beginning match)
- (prop-match-end match)))))
+ (buffer-substring-no-properties (prop-match-beginning match)
+ (prop-match-end match))
+ ;; Emacs 27 and lower will break if we return nil from this function.
+ (when (< emacs-major-version 28) "*unknown*"))))
(defconst urgrep-regexp-alist
;; XXX: Try to rely on ANSI escapes as with the match highlight?
- [elpa] externals/urgrep b03a3d84ec 098/115: Add `suffix` argument to `urgrep--get-prop(-pcase)?`, (continued)
- [elpa] externals/urgrep b03a3d84ec 098/115: Add `suffix` argument to `urgrep--get-prop(-pcase)?`, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep eb5191bfd5 097/115: Update copyright year, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 43c82e84ec 082/115: Add CI for Emacs 27.1, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 3082d89bd9 099/115: Add support for abbreviating the command in urgrep buffers, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep b5b426e9ca 084/115: Fix hiding excessive part of rgrep command in Emacs 28, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 56acdfe434 087/115: Improve how we wait for urgrep to finish in tests, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 30cc9e363e 085/115: Fix context-line detection for find/grep, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 0b036cdcf4 100/115: Improve explanation of `C-u C-u` for choosing directory, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 6614dfe651 102/115: Update checkout action in CI, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 01fbe92f2c 103/115: In tests, wait for grep to finish before doing any checks, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 99e1de4eb1 105/115: Fix an edge case when unable to get the grouped filename for highlighting,
ELPA Syncer <=
- [elpa] externals/urgrep f5b41c672b 106/115: Use `rx` in several places, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 91e3807239 109/115: Properly evaluate rx forms, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 1d4bdca3d8 111/115: Add package keywords and such, ELPA Syncer, 2023/05/10
- [elpa] externals/urgrep 61ef67450b 114/115: Assign copyright to the FSF, ELPA Syncer, 2023/05/10