branch: scratch/hyperbole-lexbind commit e64750287764377e5c968985b39d77ab120e5ede Author: Bob Weiner <bob.wei...@duffandphelps.com> Commit: Bob Weiner <bob.wei...@duffandphelps.com>
BSD zgrep support for Hyperbole grep command --- Changes | 9 +++++++++ DEMO | 11 ++++++----- hypb.el | 6 +++++- hyrolo-menu.el | 7 ++++--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Changes b/Changes index 863a46a..1a3004f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,12 @@ +2019-08-06 Bob Weiner <r...@gnu.org> + +* hyrolo-menu.el (infodock-hyrolo-menu): Fixed Edit-Rolo to call a function rather than an sexp. + +2019-08-05 Bob Weiner <r...@gnu.org> + +* hypb.el (hypb:rgrep-command): Changed to use zgrep only when it is the BSD version, + since only that one supports the options needed by Hyperbole. + 2019-07-28 Bob Weiner <r...@gnu.org> * DEMO, man/hyperbole.texi (Implicit Button Type Summaries): Updated to expanded diff --git a/DEMO b/DEMO index 0c0feb2..10dcb7d 100644 --- a/DEMO +++ b/DEMO @@ -427,9 +427,10 @@ of 'My Emacs Files': <[My Emacs Files]>: "~/.emacs.d" -You see that the label is delimited by <[ and ]> and can be followed by any -number of :, - or = characters, including none. You can activate the button -either from its label or its text. With point on an implicit button, you can +You see that the label is delimited by <[ and ]> and can be followed +by any number of :, - or = characters, including none, and then a +whitespace character. You can activate the button either from its +label or its pattern text. With point on an implicit button, you can label it by using {C-h h i l}. Now let's explore some implicit button types. @@ -521,7 +522,7 @@ headings preceded by asterisks rather than hash marks. So to jump back to the Org Mode section in this file, press the Action Key on "#Org-Mode". HTML hash-links are case-sensitive; other hash-links are not. Hash links -typically use dashes in place of the spaces that referents may contain but if +typically use dashes in place of the spaces that referents may contain, but if the link is enclosed in quotes, Hyperbole allows spaces to be used as well. In fact, it is best practice to always enclose hash-style links in quotes so Hyperbole can distinguish them from other similar looking constructs, such as @@ -550,7 +551,7 @@ Thus an Action Key press on "simple.el", "hyperbole.info" or even Some file types require external programs to view them, such as pdf files. The function (hpath:get-external-display-alist) determines the file -suffixes which should be viewed externally together with their associated +suffixes which should be viewed externally, together with their associated viewer programs, on a per-frame, per window-system basis. See its documentation for more details. The association lists used by this function are stored in variables for each available window system: diff --git a/hypb.el b/hypb.el index fadbdd4..29b11b1 100644 --- a/hypb.el +++ b/hypb.el @@ -27,7 +27,11 @@ This should end with a space.") (defcustom hypb:rgrep-command - (format "%sgrep -insIHr" (if (executable-find "zgrep") "z" "")) + ;; Only the FreeBSD version of zgrep supports all of the grep + ;; options that Hyperbole needs: -r, --include, and --exclude + (format "%sgrep -insIHr" (if (and (executable-find "zgrep") + (string-match-p "bsd" (shell-command-to-string "zgrep --version | head -1"))) + "z" "")) "*Grep command string and initial arguments to send to `hypb:rgrep' command. It must end with a space." :type 'string diff --git a/hyrolo-menu.el b/hyrolo-menu.el index 24b8bd7..874dbe5 100644 --- a/hyrolo-menu.el +++ b/hyrolo-menu.el @@ -35,9 +35,10 @@ ["Display-Prior-Matches" (id-tool-invoke 'hyrolo-display-matches) t] ["Edit-Entry" (id-tool-invoke 'hyrolo-edit) t] ["Edit-Rolo" (id-tool-invoke - '(progn (require 'hyrolo) - (find-file (car hyrolo-file-list)) - (setq buffer-read-only nil))) + '(lambda () + (require 'hyrolo) + (find-file (car hyrolo-file-list)) + (setq buffer-read-only nil))) t] ["Insert-Entry-at-Point" (id-tool-invoke 'hyrolo-yank) t] ["Mail-to-Address" (id-tool-invoke 'hyrolo-mail-to) t]