emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole 498070c 4/5: Match grep/ripgrep-type lines wh


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 498070c 4/5: Match grep/ripgrep-type lines where path has env or Elisp var
Date: Sun, 5 Dec 2021 17:57:20 -0500 (EST)

branch: externals/hyperbole
commit 498070cb1bad1abd2f7ffb0f3d70b8cb60488a29
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Match grep/ripgrep-type lines where path has env or Elisp var
---
 ChangeLog          |  6 ++++++
 hibtypes.el        | 13 +++++++++----
 test/demo-tests.el |  1 -
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8e3c125..f7494d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,12 @@
     under an Emacs dumb terminal in batch mode, so only run interactively.
 
 * hibtypes.el (grep-msg, ripgrep-msg): Allow for ${emacs-lisp-var} with : in 
its name
+    within the filename/pathname at the start of the line.
+
+* test/demo-tests.el (demo-smart-scrolling-proportional-test): Make run
+    only when running on a window system since does not work properly
+    in batch mode on Macs.
+
 2021-11-28  Bob Weiner  <rsw@gnu.org>
 
 * hbut.el (ibut:to-name): Move to the start of the name of a given implicit
diff --git a/hibtypes.el b/hibtypes.el
index 167b9ed..27afe98 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -880,7 +880,9 @@ buffer)."
                       (and (setq file (buffer-substring-no-properties 
(point-at-bol) (point-at-eol)))
                            (string-empty-p (string-trim file))))
             (let* ((but-label (concat file ":" line-num))
-                   (source-loc (unless (file-name-absolute-p file)
+                  ;; RSW 12-05-2021 - Added hpath:expand in next line to
+                  ;; resolve any variables in the path before checking if 
absolute.
+                  (source-loc (unless (file-name-absolute-p (hpath:expand 
file))
                                  (hbut:key-src t))))
               (when (stringp source-loc)
                 (setq file (expand-file-name file (file-name-directory 
source-loc))))
@@ -900,8 +902,9 @@ in grep and shell buffers."
     (save-excursion
       (beginning-of-line)
       (when (or
-             ;; Grep matches, UNIX C compiler and Introl 68HC11 C compiler 
errors
-             (looking-at "\\([^ \t\n\r:\"'`]+\\): ?\\([1-9][0-9]*\\)[ :]")
+             ;; Grep matches (allowing for Emacs Lisp vars with : in
+            ;; name within the pathname), UNIX C compiler and Introl 68HC11 C 
compiler errors
+             (looking-at "\\([^ \t\n\r\"'`]*[^ \t\n\r:\"'`]\\): 
?\\([1-9][0-9]*\\)[ :]")
              ;; Grep matches, UNIX C compiler and Introl 68HC11 C
              ;; compiler errors, allowing for file names with
              ;; spaces followed by a null character rather than a :
@@ -933,7 +936,9 @@ in grep and shell buffers."
         (let* ((file (match-string-no-properties 1))
                (line-num  (match-string-no-properties 2))
                (but-label (concat file ":" line-num))
-               (source-loc (unless (file-name-absolute-p file)
+              ;; RSW 12-05-2021 - Added hpath:expand in next line to
+              ;; resolve any variables in the path before checking if absolute.
+               (source-loc (unless (file-name-absolute-p (hpath:expand file))
                              (hbut:key-src t))))
           (when (stringp source-loc)
             (setq file (expand-file-name file (file-name-directory 
source-loc))))
diff --git a/test/demo-tests.el b/test/demo-tests.el
index fa7ad80..ed7ff5c 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -81,7 +81,6 @@
               (pos (point)))
           (end-of-line)
           (action-key)
-         (sit-for 2)
           (should (= pos (window-start)))))
     (kill-buffer "DEMO")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]