branch: externals/hyperbole commit 17724eff30c08f287e9884fccb72533d179f065d Author: Bob Weiner <r...@gnu.org> Commit: Bob Weiner <r...@gnu.org>
fixup! Fixed a few bugs --- Changes | 7 ++++++- hibtypes.el | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 5e557de..42983b1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +2019-02-06 Bob Weiner <r...@gnu.org> + +* hibtypes.el (ripgrep-msg): Tighted match to ignore empty potential filenames + that matched when they expanded to the current directory. + 2019-02-05 Bob Weiner <r...@gnu.org> * hmouse-tag.el (smart-lisp-mode-p): Removed change-log-mode. @@ -41,7 +46,7 @@ * hui-treemacs.el (treemacs-version): Require v2 or higher. -* hsettings.el (hyperbole-default-web-search-term-max-lines): +* hsettings.el (hyperbole-default-web-search-term-max-lines): (hyperbole-default-web-search-term): Added. * hpath.el (hpath:tramp-file-name-regexp): Added and used in hpath:remote-at-p. diff --git a/hibtypes.el b/hibtypes.el index 37a8107..56a53a0 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -657,12 +657,14 @@ buffer)." (beginning-of-line) (when (looking-at "\\([1-9][0-9]*\\)[-:]") ;; Ripgrep matches and context lines (-A<num> option) - (let ((line-num (match-string-no-properties 1))) + (let ((line-num (match-string-no-properties 1)) + file) (while (and (= (forward-line -1) 0) (looking-at "[1-9][0-9]*[-:]\\|--$"))) - (unless (looking-at "[1-9][0-9]*[-:]\\|--$") - (let* ((file (buffer-substring-no-properties (point-at-bol) (point-at-eol))) - (but-label (concat file ":" line-num)) + (unless (or (looking-at "[1-9][0-9]*[-:]\\|--$") + (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 (if (file-name-absolute-p file) nil (hbut:key-src t)))) (if (stringp source-loc)