[elpa] externals/hyperbole f55f332 03/25: Smart Key activation of global Org links and Agenda items
branch: externals/hyperbole commit f55f332f3d66f2c8dea47fe7d4efda9d3e11c77a Author: Bob Weiner Commit: Bob Weiner Smart Key activation of global Org links and Agenda items --- Changes | 9 HY-NEWS | 14 hsys-org.el | 75 - 3 files changed, 67 insertions(+), 31 deletions(-) diff --git a/Changes b/Changes index e6af09f..f1bc3b9 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,12 @@ +2020-07-22 Bob Weiner + +* hsys-org.el (org-mode): Added support for global Org link activation +(Org links outside of Org buffers) and for Org Agenda item activation. + +2020-07-21 Bob Weiner + +* hyperbole.el (hkey-global-set-key): Documented. + 2020-07-20 Bob Weiner * hbdata.el (hbdata:write): Fixed so first explicit button created in a directory diff --git a/HY-NEWS b/HY-NEWS index a27c46a..c3df751 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -2,6 +2,20 @@ by Bob Weiner === +* V7.1.3 +=== + + SMART (ACTION AND ASSIST) KEYS + +- Global Org Link Activation: The Action Key now activates Org links in + non-Org buffers if 'inhibit-hsys-org' is nil (the default). The Assist + Key shows help. + +- Org Agenda Item Display: The Action Key displays the Org node + associated with Agenda items such as TODOs in another window. The + Assist Key shows help. + +=== * V7.1.2 === diff --git a/hsys-org.el b/hsys-org.el index 442d74f..3094cb7 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -36,7 +36,7 @@ :group 'hyperbole-buttons) (defvar hsys-org-mode-function #'hsys-org-mode-p - "*Boolean function of no arguments that determines whether hsys-org actions are triggered or not.") + "*Boolean function of no arguments that determines whether point is in an Org mode-related buffer or not.") ;; Make Org-mode's M-RET binding activate implicit buttons (add-hook 'org-metareturn-hook #'hsys-org-hbut-activate-p) @@ -93,39 +93,47 @@ Org mode standard binding of {M-RET}, (org-meta-return). To disable ALL Hyperbole support within Org major and minor modes, set the custom option `inhibit-hsys-org' to t. Then in Org modes, this will -simply invoke `org-meta-return'." - (when (and (funcall hsys-org-mode-function) -;; Prevent infinite recursion when called via org-metareturn-hook -;; from org-meta-return invocation. -(not (hyperb:stack-frame '(org-meta-return -(if inhibit-hsys-org - (hact 'org-meta-return) - (let (start-end) - (cond ((setq start-end (hsys-org-internal-link-target-at-p)) - (hsys-org-set-ibut-label start-end) - (hact 'org-internal-link-target)) - ((hsys-org-radio-target-def-at-p) - (hact 'org-radio-target)) - ((setq start-end (hsys-org-link-at-p)) - (hsys-org-set-ibut-label start-end) - (hact 'org-link)) - ((org-at-heading-p) - (hact 'hsys-org-cycle)) - ((hsys-org-at-block-start-p) - (org-ctrl-c-ctrl-c)) - (t - (hact 'org-meta-return))) +simply invoke `org-meta-return'. Org links in non-" + (let (start-end) +(cond ((and (funcall hsys-org-mode-function) + ;; Prevent infinite recursion when called via org-metareturn-hook + ;; from org-meta-return invocation. + (not (hyperb:stack-frame '(org-meta-return + (if inhibit-hsys-org + (hact 'org-meta-return) +(cond ((setq start-end (hsys-org-internal-link-target-at-p)) + (hsys-org-set-ibut-label start-end) + (hact 'org-internal-link-target)) + ((hsys-org-radio-target-def-at-p) + (hact 'org-radio-target)) + ((setq start-end (hsys-org-link-at-p)) + (hsys-org-set-ibut-label start-end) + (hact 'org-link)) + ((org-at-heading-p) + (hact 'hsys-org-cycle)) + ((hsys-org-block-start-at-p) + (org-ctrl-c-ctrl-c)) + (t + (hact 'org-meta-return) + ;; Org links may be used outside of Org mode + ((unless inhibit-hsys-org +(setq start-end (hsys-org-link-at-p))) + (hsys-org-set-ibut-label start-end) + (hact 'org-open-at-point-global)) + ((hsys-org-agenda-item-at-p) + (hsys-org-set-ibut-label (cons (line-beginning-position) (line-end-position))) + (hact 'org-agenda-show-and
[elpa] externals/hyperbole 6f36320 08/25: Merge branch 'master' of github.com:rswgnu/hyperbole
branch: externals/hyperbole commit 6f363207ef2284156d62985b666fa6205527 Merge: af73116 82653d5 Author: Bob Weiner Commit: Bob Weiner Merge branch 'master' of github.com:rswgnu/hyperbole
[elpa] externals/hyperbole e26ab90 04/25: (hyperb:init): Remove WSL abbrev of /mnt/c as /c since may not exist
branch: externals/hyperbole commit e26ab90df058c6b17db7edc6892576e2db97337a Author: Bob Weiner Commit: Bob Weiner (hyperb:init): Remove WSL abbrev of /mnt/c as /c since may not exist --- Changes | 10 ++ hyperbole.el | 7 +++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index f1bc3b9..4c85148 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,10 @@ * hbdata.el (hbdata:write): Fixed so first explicit button created in a directory works before saving its source buffer (by saving the directory .hypb file). +2020-07-19 Bob Weiner + +* hyperbole.el (hyperb:init): Remove WSL abbrev of /mnt/c as /c since may not exist. + 2020-07-08 Bob Weiner * hbut.el (hbut:delete, ibut:delete): Added. @@ -77,6 +81,12 @@ V7.1.3 changes : end-of-visual-line, kill-visual-line): Overrode in kotl-mode-map. +2020-03-25 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode:yank): Fix hypb:replace-match-string call to use +a replacement function rather than a string containing "\\0" which doesn't +work. + 2020-03-11 Bob Weiner * kotl/klink.el (require 'kcell): Removed, caused recursive require loop. diff --git a/hyperbole.el b/hyperbole.el index 57b4c7b..bfbe6a1 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -681,10 +681,9 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." ;; Conditionally initialize Hyperbole key bindings (when hkey-init is t). (hkey-initialize) ;; - ;; Abbreviate MSWindows mount point paths. - (when (or (file-exists-p "/mnt/c") - (file-exists-p "/cygdrive")) -(add-to-list 'directory-abbrev-alist '("\\`\\(/mnt\\|/cygdrive\\)/" . "/"))) + ;; Abbreviate MSWindows /cygdrive mount point paths. + (when (file-exists-p "/cygdrive") +(add-to-list 'directory-abbrev-alist '("\\`/cygdrive/" . "/"))) ;; When running under a POSIX system with possible access to MSWindows servers, ;; cache valid MSWindows mount points. (hpath:cache-mswindows-mount-points)
[elpa] externals/hyperbole a4f880c 01/25: hbdata.el (hbdata:write): Make first ebut in dir work immediately
branch: externals/hyperbole commit a4f880ce4692a8fa3ee2c171987835df9eea7be2 Author: Bob Weiner Commit: Bob Weiner hbdata.el (hbdata:write): Make first ebut in dir work immediately --- Changes | 7 ++- DEMO | 2 +- hbdata.el | 42 +++--- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index 33fcf06..e6af09f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +2020-07-20 Bob Weiner + +* hbdata.el (hbdata:write): Fixed so first explicit button created in a directory +works before saving its source buffer (by saving the directory .hypb file). + 2020-07-08 Bob Weiner * hbut.el (hbut:delete, ibut:delete): Added. @@ -19,7 +24,7 @@ V7.1.3 changes : clickable Emacs buttons and proper highlighting when dragging mouse-1. This also allowed for deletion of Info-mode-map mouse-1 bindings. - 2020-07-05 Bob Weiner +2020-07-05 Bob Weiner * hbut.el (ibut:to): Fix not handling ibut names by substituting ibut:label-p call for ibut:at-p. diff --git a/DEMO b/DEMO index 700f2ad..c48d7dd 100644 --- a/DEMO +++ b/DEMO @@ -419,7 +419,7 @@ Hyperbole provides a history command that returns you to previous button locations in the reverse order of the way you traverse them. It actually restores your complete frame and window configuration at the time of the button press. You access it by selecting the Hist command from the top-level -Hyperbole menu, C-h h h. Remember this because you will want to use that +Hyperbole menu, {C-h h h}. Remember this because you will want to use that command to return to this DEMO later. diff --git a/hbdata.el b/hbdata.el index 1765263..a2d4481 100644 --- a/hbdata.el +++ b/hbdata.el @@ -358,19 +358,20 @@ one and returns buffer, otherwise returns nil." (buf (or (get-file-buffer file) (and (or create existing-file) (find-file-noselect file) -(if buf - (progn (set-buffer buf) - (or (verify-visited-file-modtime (get-file-buffer file)) - (cond ((yes-or-no-p - "Hyperbole button data file has changed, read new contents? ") - (revert-buffer t t) - ))) - (or (= (point-max) 1) (eq (char-after 1) ?\^L) - (error "File %s is not a valid Hyperbole button data table" file)) - (or (equal (buffer-name) file) (rename-buffer file)) - (setq buffer-read-only nil) - (or existing-file (hbmap:dir-add (file-name-directory file))) - buf +(when buf + (set-buffer buf) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (cond ((yes-or-no-p + "Hyperbole button data file has changed, read new contents? ") + (revert-buffer t t + (or (= (point-max) 1) (eq (char-after 1) ?\^L) + (error "File %s is not a valid Hyperbole button data table" file)) + (unless (equal (buffer-name) file) + (rename-buffer file)) + (setq buffer-read-only nil) + (unless existing-file + (hbmap:dir-add (file-name-directory file))) + buf))) (defun hbdata:to-entry-buf (key-src &optional directory create) @@ -419,15 +420,18 @@ a button instance string to append to button label or t when first instance. On failure, return nil." (let ((cons (hbdata:build orig-lbl-key but-sym)) entry lbl-instance) -(if (or (and buffer-file-name -(not (file-writable-p buffer-file-name))) - (null cons)) - nil +(unless (or (and buffer-file-name (not (file-writable-p buffer-file-name))) + (null cons)) (setq entry (car cons) lbl-instance (cdr cons)) (prin1 entry (current-buffer)) (terpri (current-buffer)) - (or lbl-instance t) - ))) + (when buffer-file-name (not (file-exists-p buffer-file-name)) + ;; This is the first explicit button created in this + ;; directory, so .hypb does not yet exist and unless it is saved + ;; here, the first explicit button won't work until its source + ;; buffer is saved. + (save-buffer)) + (or lbl-instance t ;;;
[elpa] externals/hyperbole 21b2b1c 20/25: Use magit if available for git social button (#32)
branch: externals/hyperbole commit 21b2b1c456bc40596a2cf8ec231d24ff6d5911d2 Author: Mats Lidell Commit: GitHub Use magit if available for git social button (#32) * Use magit if available for git social button * Use featurep and hpath:display-buffer * Make git buttons magit behaviour configurable and default to off --- hib-social.el | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hib-social.el b/hib-social.el index 92e1b5f..6760b1e 100644 --- a/hib-social.el +++ b/hib-social.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date:20-Jul-16 at 22:41:34 ;; -;; Copyright (C) 2016-2017 Free Software Foundation, Inc. +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -198,6 +198,11 @@ :type 'string :group 'hyperbole-button) +(defcustom hibtypes-git-use-magit-status nil + "If magit is available then use git social button to display magit status buffer." + :type 'boolean + :group 'hyperbole-button) + (defcustom hibtypes-github-default-project nil "Default project name to associate with any Github commit link." :type 'string @@ -803,8 +808,12 @@ PROJECT value is provided, it defaults to the value of (princ (format "Command: %s\n\n" cmd)) (princ (shell-command-to-string cmd) ;; Project-only reference, run dired on the project home directory - (hpath:display-buffer (dired-noselect -(file-name-as-directory project-dir) + (if (and hibtypes-git-use-magit-status (featurep 'magit)) + (hpath:display-buffer (save-window-excursion + (magit-status-setup-buffer + (file-name-as-directory project-dir + (hpath:display-buffer (dired-noselect + (file-name-as-directory project-dir)) (t (if project-dir (error "(git-reference): git project `%s' directory is unreadable or invalid: \"%s\"" project project-dir)
[elpa] externals/hyperbole 7eae539 05/25: (hui:ibut-label-create): Skip back past opening delimiter
branch: externals/hyperbole commit 7eae5391efd76a058579bdb421288370ea9db888 Author: Bob Weiner Commit: Bob Weiner (hui:ibut-label-create): Skip back past opening delimiter --- Changes | 5 + hui.el | 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 4c85148..d4d97a5 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +2020-07-23 Bob Weiner + +* hui.el (hui:ibut-label-create): Fixed to skip back past opening delimiter +before adding new label. + 2020-07-22 Bob Weiner * hsys-org.el (org-mode): Added support for global Org link activation diff --git a/hui.el b/hui.el index ef8edfe..2d048ce 100644 --- a/hui.el +++ b/hui.el @@ -634,7 +634,10 @@ its buttons, the label is simply inserted at point." (ibut (save-excursion (when ibut-start - (goto-char ibut-start)) + (goto-char ibut-start) + ;; Skip over any non-whitespace or symbol chars to move + ;; back past any opening delimiter + (skip-syntax-backward "^-_")) (save-excursion ;; Check if ibut has an existing preceding label (skip-chars-backward "][:=<>a-zA-Z0-9#@!$%^&* -")
[elpa] externals/hyperbole 845119a 24/25: hib-social.el - Rename to hibtypes-git-use-magit-flag; make first ebut in file work without saving
branch: externals/hyperbole commit 845119a62b1aa54569263add36b8ea92f398a5bf Author: Bob Weiner Commit: Bob Weiner hib-social.el - Rename to hibtypes-git-use-magit-flag; make first ebut in file work without saving --- Changes | 14 +- HY-NEWS | 8 TALK/HY-TALK.org | 4 +++- hbdata.el| 7 --- hbut.el | 5 + hib-social.el| 6 +++--- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Changes b/Changes index 9c1e89a..10c2c50 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,12 @@ +2020-08-02 Bob Weiner + +* hbut.el (hbut:key-src-set-buffer): Fixed explicit button creation in a new +file that has not yet been saved. + +* hib-social.el (git-reference, hibtypes-git-use-magit-flag): Added this flag. +If Magit is available, when activating a git directory button, use Magit +rather than Dired. + 2020-08-01 Bob Weiner * hui-mini.el (hui:menu-get-keys): Cleared hui:menu-keys to prevent multiple @@ -75,11 +84,6 @@ * hyperbole.el (hkey-global-set-key): Documented. -2020-07-20 Bob Weiner - -* hbdata.el (hbdata:write): Fixed so first explicit button created in a directory -works before saving its source buffer (by saving the directory .hypb file). - 2020-07-19 Bob Weiner * hyperbole.el (hyperb:init): Remove WSL abbrev of /mnt/c as /c since may not exist. diff --git a/HY-NEWS b/HY-NEWS index a20f8ca..0d8b16b 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -37,6 +37,14 @@ - Markdown In-file Links: With point on the link title, in-file links are now activated properly (previously point had to be on the link itself). +- Git#directory Buttons: New flag, hibtypes-git-use-magit-flag, which if + set to t and Magit is available, then when activating a git directory + button, such as git#/hyperbole, use Magit rather than Dired. + +- Explicit Buttons Work Immdiately: Previously you had to save the buffer + in which you created an explicit button before it would work. Now they + work immediately after creation. + DOCUMENTATION - Helm Mode: Added Hyperbole Manual section, "Smart Key - Helm Mode" diff --git a/TALK/HY-TALK.org b/TALK/HY-TALK.org index af1487d..e430cfd 100644 --- a/TALK/HY-TALK.org +++ b/TALK/HY-TALK.org @@ -1,4 +1,6 @@ -* [[file:hyperbole-banner.png]] +* [[file:../hyperbole-banner.png]] + +GNU Hyperbole Make Your Text Come Alive diff --git a/hbdata.el b/hbdata.el index a2d4481..511c1b1 100644 --- a/hbdata.el +++ b/hbdata.el @@ -425,15 +425,8 @@ On failure, return nil." (setq entry (car cons) lbl-instance (cdr cons)) (prin1 entry (current-buffer)) (terpri (current-buffer)) - (when buffer-file-name (not (file-exists-p buffer-file-name)) - ;; This is the first explicit button created in this - ;; directory, so .hypb does not yet exist and unless it is saved - ;; here, the first explicit button won't work until its source - ;; buffer is saved. - (save-buffer)) (or lbl-instance t - ;;; ;;; Private variables ;;; diff --git a/hbut.el b/hbut.el index 4a5fab6..7907827 100644 --- a/hbut.el +++ b/hbut.el @@ -995,6 +995,11 @@ represent the output of particular document formatters." src) ((file-readable-p (setq src (hpath:symlink-referent src))) (set-buffer (find-file-noselect src)) +src) + ;; Buffer may be newly created with an attached file that has + ;; not yet been saved, so it can't be read. + ((get-file-buffer src) +(set-buffer (get-file-buffer src)) src))) (defunhbut:key-to-label (lbl-key) diff --git a/hib-social.el b/hib-social.el index 6760b1e..f3fca08 100644 --- a/hib-social.el +++ b/hib-social.el @@ -198,8 +198,8 @@ :type 'string :group 'hyperbole-button) -(defcustom hibtypes-git-use-magit-status nil - "If magit is available then use git social button to display magit status buffer." +(defcustom hibtypes-git-use-magit-flag nil + "If magit is available, when activating a git directory button, use Magit rather than Dired." :type 'boolean :group 'hyperbole-button) @@ -808,7 +808,7 @@ PROJECT value is provided, it defaults to the value of (princ (format "Command: %s\n\n" cmd)) (princ (shell-command-to-string cmd) ;; Project-only reference, run dired on the project home directory - (if (and hibtypes-git-use-magit-status (featurep 'magit)) + (if (and hibtypes-git-use-magit-flag (fboundp #'magit-status-setup-buffer)) (hpath:display-buffer (save-window-excursion (m
[elpa] externals/hyperbole 734c6a8 11/25: Merge branch 'master' of github.com:rswgnu/hyperbole
branch: externals/hyperbole commit 734c6a84fb802346cc24a9b0738faac6f2558277 Merge: 97a4d80 42487cb Author: Bob Weiner Commit: Bob Weiner Merge branch 'master' of github.com:rswgnu/hyperbole --- Changes | 3 ++- hib-kbd.el | 30 -- hsys-org.el | 12 ++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index fdef571..723976f 100644 --- a/Changes +++ b/Changes @@ -9,7 +9,8 @@ 2020-07-25 Bob Weiner * hib-kbd.el (kbd-key:execute-special-series): Added and used in kbd-key:act -to make key series work properly when helm-mode or counsel-mode are enabled. +to make key series work properly when helm-mode is enabled. Counsel-mode +works without any change. 2020-07-23 Bob Weiner diff --git a/hib-kbd.el b/hib-kbd.el index 074d5f8..4545a90 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -129,30 +129,32 @@ Returns t if KEY-SERIES has a binding, else nil." (defun kbd-key:execute-special-series (key-series) "Execute key series." - (if (eq (key-binding [?\M-x]) #'execute-extended-command) + (if (memq (key-binding [?\M-x]) #'(execute-extended-command counsel-M-x)) (kbd-key:key-series-to-events key-series) -;; Disable helm or counsel while processing M-x commands; helm at -;; least gobbles final RET key, +;; Disable helm while processing M-x commands; helm +;; gobbles final RET key. Counsel works without modification. (let ((orig-binding (global-key-binding [?\M-x])) - (counsel-flag (and (boundp 'counsel-mode) counsel-mode)) (helm-flag (and (boundp 'helm-mode) helm-mode))) (unwind-protect (progn - (when counsel-flag (counsel-mode -1)) - (when helm-flag(helm-mode -1)) + (when helm-flag (helm-mode -1)) (global-set-key [?\M-x] 'execute-extended-command) - (kbd-key:key-series-to-events key-series) - (sit-for 0.001)) - (when counsel-flag (counsel-mode 1)) - (when helm-flag (helm-mode 1)) - (global-set-key [?\M-x] orig-binding) + (kbd-key:key-series-to-events key-series)) + (kbd-key:key-series-to-events +(format "M-: SPC (kbd-key:maybe-enable-helm SPC %s SPC #'%S) RET" +helm-flag orig-binding)) + +(defun kbd-key:maybe-enable-helm (helm-flag orig-M-x-binding) + "Enable helm-mode if HELM-FLAG is non-nil. Restore M-x binding to ORIG-M-X-BINDING." + (when helm-flag (helm-mode 1)) + (global-set-key [?\M-x] orig-M-x-binding)) (defun kbd-key:key-series-to-events (key-series) - "Insert the key-series as a series of keyboard events into Emacs' unread input stream." + "Insert the key-series as a series of keyboard events into Emacs' unread input stream. +Emacs then executes them when its command-loop regains control." (setq unread-command-events (nconc unread-command-events (listify-key-sequence - (kbd-key:kbd - key-series) + (kbd-key:kbd key-series) (defun kbd-key:doc (key-series &optional full) "Show first line of doc for binding of keyboard KEY-SERIES in minibuffer. diff --git a/hsys-org.el b/hsys-org.el index 3094cb7..89ae575 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 2-Jul-16 at 14:54:14 ;; -;; Copyright (C) 2016-2019 Free Software Foundation, Inc. +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -15,11 +15,11 @@ ;; triggered when the major mode is org-mode or is derived from ;; org-mode and point is anywhere other than at the end of a line. ;; -;; When: -;; on an Org mode link - displays the link referent -;; on an Org mode heading - cycles through the available display -;; views for that heading -;; anywhere else - executes `org-meta-return'. +;; See the doc for ibtypes::org-mode for details of what it does and +;; its compatibility with org-mode. +;; +;; For a good tutorial on basic use of Org-mode, see: +;; https://orgmode.org/worg/org-tutorials/orgtutorial_dto.html ;;; Code: ;;;
[elpa] externals/hyperbole af73116 07/25: hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x
branch: externals/hyperbole commit af731168cf7d7057da8e4e9716c45571b49d2bad Author: Bob Weiner Commit: Bob Weiner hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x --- Changes| 5 + HY-NEWS| 7 +++ hib-kbd.el | 50 ++ 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/Changes b/Changes index d4d97a5..2aef647 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +2020-07-25 Bob Weiner + +* hib-kbd.el (kbd-key:execute-special-series): Added and used in kbd-key:act +to make key series work properly when helm-mode or counsel-mode are enabled. + 2020-07-23 Bob Weiner * hui.el (hui:ibut-label-create): Fixed to skip back past opening delimiter diff --git a/HY-NEWS b/HY-NEWS index c3df751..d980eb7 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -15,6 +15,13 @@ associated with Agenda items such as TODOs in another window. The Assist Key shows help. + BUTTON TYPES + +- {Key Series} Button Support for Helm and Counsel: Key series buttons + with M-x commands now work properly when counsel-mode or helm-mode are + enabled and M-x is rebound. + + === * V7.1.2 === diff --git a/hib-kbd.el b/hib-kbd.el index b3736cc..074d5f8 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -29,6 +29,7 @@ ;;; (require 'hactypes) +(require 'seq) (defvar kbd-key:named-key-list '("add" "backspace" "begin" "bs" "clear" "decimal" "delete" "del" @@ -117,10 +118,8 @@ Returns t if KEY-SERIES has a binding, else nil." (setq current-prefix-arg nil) ;; Execution of the key-series may set it. (let ((binding (kbd-key:binding key-series))) (cond ((null binding) - ;; If this is a special key seqence, execute it by adding - ;; its keys to the stream of unread command events. (when (kbd-key:special-sequence-p key-series) - (kbd-key:key-series-to-events key-series) +(kbd-key:execute-special-series key-series) t)) ((memq binding '(action-key action-mouse-key hkey-either)) (beep) @@ -128,9 +127,32 @@ Returns t if KEY-SERIES has a binding, else nil." t) (t (call-interactively binding) t +(defun kbd-key:execute-special-series (key-series) + "Execute key series." + (if (eq (key-binding [?\M-x]) #'execute-extended-command) + (kbd-key:key-series-to-events key-series) +;; Disable helm or counsel while processing M-x commands; helm at +;; least gobbles final RET key, +(let ((orig-binding (global-key-binding [?\M-x])) + (counsel-flag (and (boundp 'counsel-mode) counsel-mode)) + (helm-flag (and (boundp 'helm-mode) helm-mode))) + (unwind-protect + (progn + (when counsel-flag (counsel-mode -1)) + (when helm-flag(helm-mode -1)) + (global-set-key [?\M-x] 'execute-extended-command) + (kbd-key:key-series-to-events key-series) + (sit-for 0.001)) + (when counsel-flag (counsel-mode 1)) + (when helm-flag (helm-mode 1)) + (global-set-key [?\M-x] orig-binding) + (defun kbd-key:key-series-to-events (key-series) "Insert the key-series as a series of keyboard events into Emacs' unread input stream." - (setq unread-command-events (nconc unread-command-events (listify-key-sequence (kbd-key:kbd key-series) + (setq unread-command-events (nconc unread-command-events +(listify-key-sequence + (kbd-key:kbd + key-series) (defun kbd-key:doc (key-series &optional full) "Show first line of doc for binding of keyboard KEY-SERIES in minibuffer. @@ -263,12 +285,13 @@ For an approximate inverse of this, see `key-description'." (setq times (string-to-number (substring word 0 (match-end 1 (setq word (substring word (1+ (match-end 1) (cond ((string-match "^<<.+>>$" word) - (setq key (vconcat (if (eq (key-binding [?\M-x]) - 'execute-extended-command) - [?\M-x] - (or (car (where-is-internal - 'execute-extended-command)) - [?\M-x])) + (setq key (vconcat (cond ((memq (key-binding [?\M-x]) + kbd-key:extended-command-binding-list) +[?\M-x]) + ((seq-filter + (lambda (elt) (car (where-is-internal elt))) +
[elpa] externals/hyperbole updated (7184b30 -> d65920b)
monnier pushed a change to branch externals/hyperbole. from 7184b30 Fix ibut:delete new a4f880c hbdata.el (hbdata:write): Make first ebut in dir work immediately new 9e13b43 hui-select.el and hyperbole.el reformatting; no logic changes new f55f332 Smart Key activation of global Org links and Agenda items new e26ab90 (hyperb:init): Remove WSL abbrev of /mnt/c as /c since may not exist new 7eae539 (hui:ibut-label-create): Skip back past opening delimiter new af73116 hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x new 82653d5 hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x new 6f36320 Merge branch 'master' of github.com:rswgnu/hyperbole new 97a4d80 Raise org-mode ibtype priority to near top; fix markdown # link activation new 42487cb Temporarily disable helm-mode when executing a key series new 734c6a8 Merge branch 'master' of github.com:rswgnu/hyperbole new 09032d9 Disable minibuffer-completion-confirm while processing key series new 3c0df00 Add support for dired-sidebar (#33) new 74922d1 Merge Mats dired-sidebar support and rsw mods new 335441d Fix that Action Key did not expand collapsed Koutline trees new 1cf5f3d Allow Action Key to expand a tree when point is on the ellipsis new f633365 Normalize committer email addresses new 8ef773d Add Action/Assist key support for magit modes new 520ecae Fix improper registering of a drag outside of Emacs when none new 55a73f9 Add TALK subdirectory for upcoming talk on Hyperbole new 008182b Fixes, Helm and Magit Smart Key support doc in prep. for 7.1.3 new 21b2b1c Use magit if available for git social button (#32) new b8fd1e8 Merge branch 'master' of github.com:rswgnu/hyperbole new 845119a hib-social.el - Rename to hibtypes-git-use-magit-flag; make first ebut in file work without saving new d65920b V7.1.3 - Improve key series, mouse handling and Summary of changes: .hypb| Bin 3226 -> 3509 bytes .mailmap |7 + Changes | 133 - DEMO |4 +- HY-ABOUT |2 +- HY-NEWS | 57 +++ HY-TALK/.hypb|4 + HY-TALK/HY-TALK.org | 456 + HY-TALK/HYPB | 44 ++ MANIFEST | 158 +++--- Makefile |2 +- README.md|2 +- README.md.html |2 +- hbdata.el| 37 +- hbut.el |7 +- hib-kbd.el | 120 +++-- hib-social.el| 15 +- hibtypes.el | 107 ++-- hmouse-drv.el| 87 ++-- hsys-org.el | 87 ++-- hui-dired-sidebar.el | 64 +++ hui-mini.el | 12 +- hui-mouse.el | 58 ++- hui-select.el| 1331 +- hui-window.el| 25 +- hui.el | 18 +- hversion.el |2 +- hycontrol.el |2 +- hypb.el | 17 + hyperbole.el | 39 +- kotl/kotl-mode.el| 23 +- man/hkey-help.txt|5 +- man/hyperbole.html | 347 - man/hyperbole.info | Bin 528429 -> 534000 bytes man/hyperbole.pdf| Bin 1284189 -> 1289960 bytes man/hyperbole.texi | 145 +- man/version.texi |8 +- 37 files changed, 2298 insertions(+), 1129 deletions(-) create mode 100644 .mailmap create mode 100644 HY-TALK/.hypb create mode 100644 HY-TALK/HY-TALK.org create mode 100644 HY-TALK/HYPB create mode 100644 hui-dired-sidebar.el
[elpa] externals/hyperbole 3c0df00 12/25: Add support for dired-sidebar (#33)
branch: externals/hyperbole commit 3c0df008da0a2e781a42c3d49324f3367f4c6091 Author: Mats Lidell Commit: GitHub Add support for dired-sidebar (#33) * Add support for dired-sidebar * Add doc about dired-sidebar support --- Changes | 4 HY-NEWS | 4 hui-dired-sidebar.el | 64 hui-mouse.el | 4 man/hkey-help.txt| 3 ++- man/hyperbole.texi | 32 -- 6 files changed, 108 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index a09de9f..9f4e1d6 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +2020-07-27 Mats Lidell + +* hui-dired-sidebar.el: Support for dired-sidebar added. + 2020-07-25 Bob Weiner * hib-kbd.el (kbd-key:execute-special-series): Added and used in kbd-key:act diff --git a/HY-NEWS b/HY-NEWS index d980eb7..945be78 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -15,6 +15,10 @@ associated with Agenda items such as TODOs in another window. The Assist Key shows help. +- Smart Dired Sidebar: Smart Key support for the dired-sidebar + package. See "(hyperbole)Smart Key - Dired Sidebar Mode". + + BUTTON TYPES - {Key Series} Button Support for Helm and Counsel: Key series buttons diff --git a/hui-dired-sidebar.el b/hui-dired-sidebar.el new file mode 100644 index 000..a86f71a --- /dev/null +++ b/hui-dired-sidebar.el @@ -0,0 +1,64 @@ +;;; hui-dired-sidebar.el --- Hyperbole Smart Key support for dired sidebar +;; +;; Author: Mats Lidell +;; +;; Orig-Date:25-Jul-20 +;; +;; Copyright (C) 2020 Free Software Foundation, Inc. See the +;; "HY-COPY" file for license information. +;; +;; This file is part of GNU Hyperbole. + +;;; Commentary: + +;;; Code: +;;; +;;; Other required Elisp libraries +;;; + +(eval-and-compile (require 'dired-sidebar nil t)) + +;;; +;;; smart-dired-sidebar functions +;;; + +;;;###autoload +(defun smart-dired-sidebar () + "Use a single key or mouse key to manipulate directory entries. + +Invoked via a key press when in dired-sidebar-mode. It assumes +that its caller has already checked that the key was pressed in +an appropriate buffer and has moved the cursor there. + +If key is pressed: + (1) within an entry line, the item is displayed for editing, + normally in another window, or if it is a directory and + `dired-sidebar-cycle-subtree-on-click' is t it will expand + and collapse the entry + (2) at the end of an entry line: invoke `action-key-eol-function', + typically to scroll up proportionally, if an Action Key press; invoke + `assist-key-eol-function', typically to scroll down proportionally, + if an Asisst Key press; + (3) on the first line of the buffer (other than the end of line), + dired is run on the current directory of this dired-sidebar; + (4) at the end of the first or last line of the buffer, + this dired-sidebar invocation is hidden." + + (interactive) + (cond ((first-line-p) +(if (eolp) +(dired-sidebar-toggle-sidebar) + (hact 'link-to-directory default-directory))) + ((and (last-line-p) (eolp)) +(dired-sidebar-toggle-sidebar)) + ((eolp) +(funcall (if assist-flag assist-key-eol-function action-key-eol-function))) + (t (let ((file (dired-get-file-for-visit))) +(if (and dired-sidebar-cycle-subtree-on-click + (file-directory-p file) + (not (string-suffix-p "." file))) +(hact 'dired-sidebar-subtree-toggle) + (hact 'dired-sidebar-find-file file)) + +(provide 'hui-dired-sidebar) +;;; hui-dired-sidebar.el ends here diff --git a/hui-mouse.el b/hui-mouse.el index 38df759..47af510 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -100,6 +100,10 @@ Its default value is #'smart-scroll-down." (memq company-active-map (current-minor-mode-maps))) . ((smart-company-to-definition) . (smart-company-help))) ;; +;; dired-sidebar-mode +((eq major-mode 'dired-sidebar-mode) . + ((smart-dired-sidebar) . (smart-dired-sidebar))) +;; ;; Treemacs hierarchical file manager ((eq major-mode 'treemacs-mode) . ((smart-treemacs) . (smart-treemacs))) diff --git a/man/hkey-help.txt b/man/hkey-help.txt index 17ae28c..1d1289e 100644 --- a/man/hkey-help.txt +++ b/man/hkey-help.txt @@ -78,7 +78,8 @@ Mouse-only Control Hyperbole Key Press/Click in Special Modes Region Active Yanks region at releaseKills and yanks at release Company Mode Completion Displays definitionDisplays documentation - Treemacs Displays
[elpa] externals/hyperbole 97a4d80 10/25: Raise org-mode ibtype priority to near top; fix markdown # link activation
branch: externals/hyperbole commit 97a4d804e894af90df6ad95af5614cbb35995d27 Author: Bob Weiner Commit: Bob Weiner Raise org-mode ibtype priority to near top; fix markdown # link activation --- Changes | 8 + HY-NEWS | 7 hibtypes.el | 107 3 files changed, 72 insertions(+), 50 deletions(-) diff --git a/Changes b/Changes index 2aef647..fdef571 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,11 @@ +2020-07-26 Bob Weiner + +* hibtypes.el (hsys-org): Move org links/refs to near top of priority list so things +like URLs embeded within Org links are handled by Org, not Hyperbole. + (markdown-follow-inline-link-p): Fixed to defer in-file links with +point on the link title to the `pathname' ibtype since +markdown-follow-link-at-point does not handle them properly. + 2020-07-25 Bob Weiner * hib-kbd.el (kbd-key:execute-special-series): Added and used in kbd-key:act diff --git a/HY-NEWS b/HY-NEWS index d980eb7..3869ab1 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -15,12 +15,19 @@ associated with Agenda items such as TODOs in another window. The Assist Key shows help. +- Org-mode: Raised to near top priority in implicit button types so that + pathnames, URLs, etc. within Org links are handled by Org rather than + Hyperbole. + BUTTON TYPES - {Key Series} Button Support for Helm and Counsel: Key series buttons with M-x commands now work properly when counsel-mode or helm-mode are enabled and M-x is rebound. +- Markdown In-file Links: With point on the link title, in-file links are + now activated properly (previously point had to be on the link itself). + === * V7.1.2 diff --git a/hibtypes.el b/hibtypes.el index db7f019..7c5bd0c 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -65,14 +65,6 @@ (run-hooks 'hibtypes-begin-load-hook) ;;; -;;; Follows Org mode links and radio targets and cycles Org heading views -;;; - -;; Set the custom option `inhibit-hsys-org' non-nil to disable ALL Hyperbole -;; support within Org major and minor modes. -(require 'hsys-org) - -;;; ;;; Composes mail, in another window, to the e-mail address at point. ;;; @@ -146,7 +138,7 @@ match. See `hpath:find' function documentation for special file display options." ;; ;; Ignore paths in Buffer menu, dired and helm modes. - (unless (or (eq major-mode 'helm-major-mode) + (unless (or (derived-mode-p 'helm-major-mode) (delq nil (mapcar (lambda (substring) (string-match substring (format-mode-line mode-name))) '("Buffer Menu" "IBuffer" "Dired" @@ -287,49 +279,56 @@ Return t if jump and nil otherwise." t))) (defun markdown-follow-inline-link-p (opoint) - "Test to see if on an inline link, jump to its referent if it is absolute (not relative within the file), otherwise return to OPOINT." - (skip-chars-forward "^\]\[()") - (if (looking-at "\][\[()]") - (progn (if (looking-at "\(") -(skip-chars-backward "^\]\[()") - (skip-chars-forward "\]\[\(")) -;; Leave point on the link even if not activated -;; here, so that code elsewhere activates it. -(when (and (markdown-link-p) - (save-match-data (not (or (hpath:www-at-p) (hpath:at-p) - ;; In-file referents are handled by the 'markdown-internal-link' - ;; implicit button type, not here. - (ibut:label-set (match-string-no-properties 0) (match-beginning 0) (match-end 0)) - (hpath:display-buffer (current-buffer)) - (hact 'markdown-follow-link-at-point))) -(goto-char opoint) -nil)) + "Test to see if on an inline link, jump to its referent if it is absolute (not relative within the file) and return non-nil. +Otherwise, if an internal link, move back to OPOINT and return nil." + (let (handle-link-flag + result) +(skip-chars-forward "^\]\[()") +(when (looking-at "\][\[()]") + (if (looking-at "\(") + (skip-chars-backward "^\]\[()") + (skip-chars-forward "\]\[\(")) + ;; Leave point on the link even if not activated + ;; here, so that other ibtypes activate it. If point is after + ;; the # character of an in-file link, then the following predicate + ;; fails and the `pathname' ibtype will handle it
[elpa] externals/hyperbole 42487cb 09/25: Temporarily disable helm-mode when executing a key series
branch: externals/hyperbole commit 42487cb95661ec6de3ad73111ed6cbd11aa608cc Author: Bob Weiner Commit: Bob Weiner Temporarily disable helm-mode when executing a key series --- Changes | 3 ++- hib-kbd.el | 30 -- hsys-org.el | 12 ++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index 2aef647..a09de9f 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,8 @@ 2020-07-25 Bob Weiner * hib-kbd.el (kbd-key:execute-special-series): Added and used in kbd-key:act -to make key series work properly when helm-mode or counsel-mode are enabled. +to make key series work properly when helm-mode is enabled. Counsel-mode +works without any change. 2020-07-23 Bob Weiner diff --git a/hib-kbd.el b/hib-kbd.el index 074d5f8..4545a90 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -129,30 +129,32 @@ Returns t if KEY-SERIES has a binding, else nil." (defun kbd-key:execute-special-series (key-series) "Execute key series." - (if (eq (key-binding [?\M-x]) #'execute-extended-command) + (if (memq (key-binding [?\M-x]) #'(execute-extended-command counsel-M-x)) (kbd-key:key-series-to-events key-series) -;; Disable helm or counsel while processing M-x commands; helm at -;; least gobbles final RET key, +;; Disable helm while processing M-x commands; helm +;; gobbles final RET key. Counsel works without modification. (let ((orig-binding (global-key-binding [?\M-x])) - (counsel-flag (and (boundp 'counsel-mode) counsel-mode)) (helm-flag (and (boundp 'helm-mode) helm-mode))) (unwind-protect (progn - (when counsel-flag (counsel-mode -1)) - (when helm-flag(helm-mode -1)) + (when helm-flag (helm-mode -1)) (global-set-key [?\M-x] 'execute-extended-command) - (kbd-key:key-series-to-events key-series) - (sit-for 0.001)) - (when counsel-flag (counsel-mode 1)) - (when helm-flag (helm-mode 1)) - (global-set-key [?\M-x] orig-binding) + (kbd-key:key-series-to-events key-series)) + (kbd-key:key-series-to-events +(format "M-: SPC (kbd-key:maybe-enable-helm SPC %s SPC #'%S) RET" +helm-flag orig-binding)) + +(defun kbd-key:maybe-enable-helm (helm-flag orig-M-x-binding) + "Enable helm-mode if HELM-FLAG is non-nil. Restore M-x binding to ORIG-M-X-BINDING." + (when helm-flag (helm-mode 1)) + (global-set-key [?\M-x] orig-M-x-binding)) (defun kbd-key:key-series-to-events (key-series) - "Insert the key-series as a series of keyboard events into Emacs' unread input stream." + "Insert the key-series as a series of keyboard events into Emacs' unread input stream. +Emacs then executes them when its command-loop regains control." (setq unread-command-events (nconc unread-command-events (listify-key-sequence - (kbd-key:kbd - key-series) + (kbd-key:kbd key-series) (defun kbd-key:doc (key-series &optional full) "Show first line of doc for binding of keyboard KEY-SERIES in minibuffer. diff --git a/hsys-org.el b/hsys-org.el index 3094cb7..89ae575 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date: 2-Jul-16 at 14:54:14 ;; -;; Copyright (C) 2016-2019 Free Software Foundation, Inc. +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -15,11 +15,11 @@ ;; triggered when the major mode is org-mode or is derived from ;; org-mode and point is anywhere other than at the end of a line. ;; -;; When: -;; on an Org mode link - displays the link referent -;; on an Org mode heading - cycles through the available display -;; views for that heading -;; anywhere else - executes `org-meta-return'. +;; See the doc for ibtypes::org-mode for details of what it does and +;; its compatibility with org-mode. +;; +;; For a good tutorial on basic use of Org-mode, see: +;; https://orgmode.org/worg/org-tutorials/orgtutorial_dto.html ;;; Code: ;;;
[elpa] externals/hyperbole 55a73f9 21/25: Add TALK subdirectory for upcoming talk on Hyperbole
branch: externals/hyperbole commit 55a73f9296bff96eaf6dc09c99a3452731ba69ab Author: Bob Weiner Commit: Bob Weiner Add TALK subdirectory for upcoming talk on Hyperbole --- TALK/HY-TALK.org | 262 +++ TALK/HYPB| 11 +++ 2 files changed, 273 insertions(+) diff --git a/TALK/HY-TALK.org b/TALK/HY-TALK.org new file mode 100644 index 000..af1487d --- /dev/null +++ b/TALK/HY-TALK.org @@ -0,0 +1,262 @@ +* [[file:hyperbole-banner.png]] + + Make Your Text Come Alive + + + Bob Weiner + + +NYC Emacs Meetup -- August 3, 2020 + + +* Hyperbole, the Word + + Pronounciation: hī-pûr′b-lē + + Definition: An extravagant statement or assertion + not intended to be understood literally. + +"Hyperbole lets me interact with information (as well as frames +and windows) in a consistent and predictable way, on any Emacs +install and it does this without my needing to think much about +it, because Hyperbole more or less knows what to do out of the +box." + +* Hyperbole, the Emacs Package + + | Hyperbole Component | Description | + |-+--| + | Action/Assist Keys | 2 global keys for hypertext everywhere in Emacs | + | | | + | Implicit Buttons| Text patterns automatically become hyperbuttons | + | | | + | Button Action Types | Buttons can execute arbitrary Lisp (do anything) | + | | | + | Button Files| Global and dir-specific quick access files of buttons| + | | | + | HyRolo | Fast retrieval of hyperlinked records in * outline files | + | | | + | HyControl | Fast control of your windows and frames | + | | | + | Koutliner | Live legal-type multi-level autonumbered outlining | + | | with hyper-anchors per node and multiple views | + + +* Setup and Use + + - Install:{M-x install-package RET hyperbole RET} + + - Activate Text + Action Key: {M-RET} or {Shift-Button2} or {Button2} + Assist Key: {C-u M-RET} or {Shift-Button3} or {Button3} + + - Keyboard Menus: {C-h h} + + +* Alright Already, Let's See Some Action + + "This isn't Mission Difficult Mr Hunt, it's Mission Impossible... + Difficult should be a walk in the park for you." + + https://www.youtube.com/watch?v=QMHMBX4KHp0 + + +* Quick Demo + + "Seek not what is, but what can be." + + "Wax on ... wax off." + + +* Buttons + + Hyperbole offers 3 categories of buttons: + +- {Implicit Buttons}: automatically defined buttons, recognized by boolean type +predicates that match to text in a buffer and then +perform actions in response + +- <(Explicit Buttons)>: created one at a time and embedded within specific files + +- <(Global Buttons)>: stored in a personal button file, activated by name + + + All button categories can invoke arbitrary actions, not just link to resources. + + +* Implicit Buttons + + + +* + + +* It's too hard to rapidly create and replicate display spaces for working with your hypertexts and code, so HyControl was born to simplify this process. Specialized web search is also too hard to do manually, so people end up just doing generalized searches. Hyperbole's Find and Web Search features are meant to more easily connect you to the information you desire. Isn't that why we build hypertexts in the first place? + +* For programming language modes, you do not need to add explicit buttons to each file to benefit from Hyperbole. When you press the special Action Key on an identifier, Hyperbole searches up the directory tree of the current file, finds the first matching TAGS file and uses it to jump to the definition of the identifier. If xref.el is in use, it uses that as well, all transparently. It also does this with Java documentation cross-refs and many other similar implicit links. + +Thank you for asking the question. I am the author of GNU Hyperbole so I use it all the time. Once in awhile I will start Emacs without Hyperbole loaded and it very quickly feels like it is missing many features that speed my editing and information retrieval. + +A major new release of Hyperbole is now available with many advancements, so have a look at
[elpa] externals/hyperbole 520ecae 19/25: Fix improper registering of a drag outside of Emacs when none
branch: externals/hyperbole commit 520ecae64af21b7969a82db910cc6eac7a0e8974 Author: Bob Weiner Commit: Bob Weiner Fix improper registering of a drag outside of Emacs when none --- Changes | 14 +++ hib-kbd.el| 2 +- hmouse-drv.el | 78 --- 3 files changed, 57 insertions(+), 37 deletions(-) diff --git a/Changes b/Changes index eaa0dba..dfb9067 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,17 @@ +2020-08-01 Bob Weiner + +* hmouse-drv.el (hkey-help): Fixed to not show 'OR' before first 'CALL' listing +and to only display Action/Assist Mouse Button contexts when last use was +ia mouse button and not keyboard. Also, displayed whether showing mouse or +keyboard help. + +* hmouse-drv.el (hmouse-key-release-window): Required position of last action/assist + mouse key release event. This fixed the problem of improperly registering a + drag to outside of an emacs frame because action/assist-key-release-window was not + set properly. +(hmouse-function): Sent action/assist-key-release-position as argument +to hmouse-key-release-window call. + 2020-07-29 Bob Weiner * man/hkey-help.txt: Added magit modes. diff --git a/hib-kbd.el b/hib-kbd.el index a75706f..02f5503 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -256,7 +256,7 @@ keyboad input queue, as if they had been typed by the user." ;;; (defun kbd-key:binding (key-series) - "Return any existing key binding for KEY-SERIES or nil." + "Return key binding for KEY-SERIES if it is a single key sequence or nil." ;; This custom function is used to prevent the (kbd) call from ;; mistakenly removing angle brackets from Hyperbole implicit button ;; names, like: <[td]>. diff --git a/hmouse-drv.el b/hmouse-drv.el index c168d2e..e7109f8 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -190,7 +190,7 @@ EVENT will be passed to 'hmouse-function'." (apply #'action-mouse-key (hmouse-key-release-args-emacs event))) (defun assist-mouse-key-emacs (event) - "Set point to the current mouse cursor position and execute 'action-key'. + "Set point to the current mouse cursor position and execute 'assist-key'. EVENT will be passed to 'hmouse-function'." (interactive "e") (apply #'assist-mouse-key (hmouse-key-release-args-emacs event))) @@ -829,15 +829,16 @@ Return non-nil iff a non-nil predicate is found." (defun hkey-help (&optional assist-flag) "Display help for the Action Key command in current context. -With optional ASSIST-FLAG non-nil, display help for the Assist Key command. +With optional ASSIST-FLAG prefix arg non-nil, display help for the Assist Key command. Return non-nil iff associated help documentation is found." (interactive "P") - (unless (or action-key-depressed-flag action-key-help-flag) -(action-key-clear-variables)) - (unless (or assist-key-depressed-flag assist-key-help-flag) -(assist-key-clear-variables)) - (let ((hkey-forms hmouse-alist) - hkey-form pred-value call calls cmd-sym doc) + (let* ((mouse-flag (or action-key-depress-position assist-key-depress-position)) +(hkey-forms (if mouse-flag hmouse-alist hkey-alist)) +hkey-form pred-value call calls cmd-sym doc) +(unless (or action-key-depressed-flag action-key-help-flag) + (action-key-clear-variables)) +(unless (or assist-key-depressed-flag assist-key-help-flag) + (assist-key-clear-variables)) (while (and (null pred-value) (setq hkey-form (car hkey-forms))) (or (setq pred-value (eval (car hkey-form))) (setq hkey-forms (cdr hkey-forms @@ -863,39 +864,44 @@ Return non-nil iff associated help documentation is found." (progn (let* ((condition (car hkey-form)) (temp-buffer-show-hook -(lambda (buf) - (set-buffer buf) - (help-mode) - (let ((owind (selected-window))) -(if (br-in-browser) -(save-excursion - (br-to-view-window) - (select-window (previous-window)) - (display-buffer buf 'other-win)) - (display-buffer buf 'other-win)) -(if (or (and (boundp 'help-window-select) - help-window-select) -(and (boundp 'help-selects-help-window) - help-selects-help-window)) -(select-window (get-buffer-window buf)) - (select-window owind) + (lambda (buf) + (set-buffer buf) + (help-mode) +
[elpa] externals/hyperbole 1cf5f3d 16/25: Allow Action Key to expand a tree when point is on the ellipsis
branch: externals/hyperbole commit 1cf5f3dc07382ba24a887231a7a87cc334356c89 Author: Bob Weiner Commit: Bob Weiner Allow Action Key to expand a tree when point is on the ellipsis --- Changes | 8 hui-mouse.el | 2 +- kotl/kotl-mode.el | 15 +-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index 4570f3e..41f9b71 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,11 @@ +2020-07-29 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode:eolp): Added optional 'next-char-visible' arg. +(kotl-mode:action-key, kotl-mode:assist-key): + hui-mouse.el (hkey-alist): In kotl-mode, matched to eol only if following +char is not invisible. This allows Action Key to expand a tree when point +is on the ellipsis (invisible portion of tree). + 2020-07-28 Bob Weiner * kotl/kotl-mode.el (kotl-mode): Set outline-regexp so outline-on-heading-p and diff --git a/hui-mouse.el b/hui-mouse.el index ac3285e..a0c41d6 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -149,7 +149,7 @@ Its default value is #'smart-scroll-down." ;; ;; If at the end of a line (eol), invoke the associated Smart Key handler EOL handler. ((if (eq major-mode 'kotl-mode) -(and (not (kotl-mode:eobp)) (kotl-mode:eolp)) +(and (not (kotl-mode:eobp)) (kotl-mode:eolp t)) (smart-eolp)) . ((funcall action-key-eol-function) . (funcall assist-key-eol-function))) ;; diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index 36874b4..523ffd4 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -1918,12 +1918,15 @@ If at tail cell already, do nothing and return nil." (kotl-mode:bocp (point))) -(defun kotl-mode:eolp () - "Return t if point is at the end of a visible line or the end of the buffer." +(defun kotl-mode:eolp (&optional next-char-visible) + "Return t if point is at the end of a visible line or the end of the buffer. +With optional NEXT-CHAR-VISIBLE, return t only if the following char is visible." (or (eobp) (and (eolp) - (or (not (kview:char-invisible-p)) - (not (kview:char-invisible-p (1- (point) + (if next-char-visible + (not (kview:char-invisible-p)) +(or (not (kview:char-invisible-p)) +(not (kview:char-invisible-p (1- (point)) t))) (defun kotl-mode:first-cell-p () @@ -1965,7 +1968,7 @@ If key is pressed: a windowful." (interactive) (cond((kotl-mode:eobp) (kotl-mode:show-all)) - ((kotl-mode:eolp) (funcall action-key-eol-function)) + ((kotl-mode:eolp t) (funcall action-key-eol-function)) ((not (kview:valid-position-p)) (if (markerp action-key-depress-prev-point) (progn (select-window @@ -2000,7 +2003,7 @@ If assist-key is pressed: a windowful." (interactive) (cond ((kotl-mode:eobp) (kotl-mode:overview)) - ((kotl-mode:eolp) (funcall assist-key-eol-function)) + ((kotl-mode:eolp t) (funcall assist-key-eol-function)) ((not (kview:valid-position-p)) (if (markerp assist-key-depress-prev-point) (progn (select-window
[elpa] externals/hyperbole 74922d1 14/25: Merge Mats dired-sidebar support and rsw mods
branch: externals/hyperbole commit 74922d11b6e8cde77e294a6d3d14fab3d7c28b56 Merge: 09032d9 3c0df00 Author: Bob Weiner Commit: Bob Weiner Merge Mats dired-sidebar support and rsw mods --- Changes | 4 ++ HY-NEWS | 3 + MANIFEST | 157 ++- hui-dired-sidebar.el | 64 + hui-mouse.el | 4 ++ man/hkey-help.txt| 3 +- man/hyperbole.texi | 32 ++- 7 files changed, 186 insertions(+), 81 deletions(-) diff --git a/Changes b/Changes index 723976f..d0461ed 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +2020-07-27 Mats Lidell + +* hui-dired-sidebar.el: Support for dired-sidebar added. + 2020-07-26 Bob Weiner * hibtypes.el (hsys-org): Move org links/refs to near top of priority list so things diff --git a/HY-NEWS b/HY-NEWS index 3869ab1..8ace3b9 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -19,6 +19,9 @@ pathnames, URLs, etc. within Org links are handled by Org rather than Hyperbole. +- Smart Dired Sidebar: Smart Key support for the dired-sidebar + package. See "(hyperbole)Smart Key - Dired Sidebar Mode". + BUTTON TYPES - {Key Series} Button Support for Helm and Counsel: Key series buttons diff --git a/MANIFEST b/MANIFEST index 9a4f19c..7a3931c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,96 +1,97 @@ --- INTRODUCTION --- -COPYING - GNU General Public License -DEMO- Interactive Demonstration of many GNU Hyperbole capabilities -DEMO-ROLO.otl - Sample Hyperbole Rolo file for use with DEMO -hyrolo-demo.el - Code to support DEMO introduction to HyRolo -HY-ABOUT- Introductory description of GNU Hyperbole -HY-ANNOUNCE - GNU Hyperbole release announcement -HY-COPY - GNU Hyperbole Copyright -HY-NEWS - What's new in each release of GNU Hyperbole -HY-WHY.kotl - Quick list of great reasons to use Hyperbole -INSTALL - GNU Hyperbole installation and invocation instructions -Makefile- Build GNU Hyperbole directories and distributions -README - Information GNU Hyperbole users and maintainers should read -README.md - Markdown formatted introduction combining README, INSTALL and HY-ABOUT -README.md.html - HTML formatted introduction combining README, INSTALL and HY-ABOUT -hversion.el - GNU Hyperbole version and system information setup -hyperbole.el- Loads and initializes GNU Hyperbole -Changes - Summary of changes in recent GNU Hyperbole releases +COPYING - GNU General Public License +DEMO - Interactive Demonstration of many GNU Hyperbole capabilities +DEMO-ROLO.otl- Sample Hyperbole Rolo file for use with DEMO +hyrolo-demo.el - Code to support DEMO introduction to HyRolo +HY-ABOUT - Introductory description of GNU Hyperbole +HY-ANNOUNCE - GNU Hyperbole release announcement +HY-COPY - GNU Hyperbole Copyright +HY-NEWS - What's new in each release of GNU Hyperbole +HY-WHY.kotl - Quick list of great reasons to use Hyperbole +INSTALL - GNU Hyperbole installation and invocation instructions +Makefile - Build GNU Hyperbole directories and distributions +README - Information GNU Hyperbole users and maintainers should read +README.md- Markdown formatted introduction combining README, INSTALL and HY-ABOUT +README.md.html - HTML formatted introduction combining README, INSTALL and HY-ABOUT +hversion.el - GNU Hyperbole version and system information setup +hyperbole.el - Loads and initializes GNU Hyperbole +Changes - Summary of changes in recent GNU Hyperbole releases --- DOCUMENTATION --- -man/dir - GNU Hyperbole Info directory tree entry -man/hyperbole.html - The GNU Hyperbole Manual (web version) -man/hyperbole.info - The GNU Hyperbole Manual (GNU Info version) -man/hyperbole.pdf - The GNU Hyperbole Manual (printable version) -man/hyperbole.texi - The GNU Hyperbole Manual (GNU Texinfo source form) -man/hkey-help.txt - Summarizes Smart Key behaviors in different contexts +man/dir - GNU Hyperbole Info directory tree entry +man/hyperbole.html - The GNU Hyperbole Manual (web version) +man/hyperbole.info - The GNU Hyperbole Manual (GNU Info version) +man/hyperbole.pdf- The GNU Hyperbole Manual (printable version) +man/hyperbole.texi - The GNU Hyperbole Manual (GNU Texinfo source form) +man/hkey-help.txt- Summarizes Smart Key behaviors in different contexts --- USER INTERFACE --- -hmouse-info.el - Walks through Info networks using one key -hmouse-drv.el - Smart Key/Mouse driver functions -hmouse-key.el - Setup Smart Key mouse bindings -hmouse-mod.el - Action Key acts as CONTROL modifier and Assist Key as META modifier (Unus
[elpa] externals/hyperbole b8fd1e8 23/25: Merge branch 'master' of github.com:rswgnu/hyperbole
branch: externals/hyperbole commit b8fd1e83cd46567e8d7661369df7f6b7c6f595ff Merge: 008182b 21b2b1c Author: Bob Weiner Commit: Bob Weiner Merge branch 'master' of github.com:rswgnu/hyperbole --- hib-social.el | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hib-social.el b/hib-social.el index 92e1b5f..6760b1e 100644 --- a/hib-social.el +++ b/hib-social.el @@ -4,7 +4,7 @@ ;; ;; Orig-Date:20-Jul-16 at 22:41:34 ;; -;; Copyright (C) 2016-2017 Free Software Foundation, Inc. +;; Copyright (C) 2016-2020 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -198,6 +198,11 @@ :type 'string :group 'hyperbole-button) +(defcustom hibtypes-git-use-magit-status nil + "If magit is available then use git social button to display magit status buffer." + :type 'boolean + :group 'hyperbole-button) + (defcustom hibtypes-github-default-project nil "Default project name to associate with any Github commit link." :type 'string @@ -803,8 +808,12 @@ PROJECT value is provided, it defaults to the value of (princ (format "Command: %s\n\n" cmd)) (princ (shell-command-to-string cmd) ;; Project-only reference, run dired on the project home directory - (hpath:display-buffer (dired-noselect -(file-name-as-directory project-dir) + (if (and hibtypes-git-use-magit-status (featurep 'magit)) + (hpath:display-buffer (save-window-excursion + (magit-status-setup-buffer + (file-name-as-directory project-dir + (hpath:display-buffer (dired-noselect + (file-name-as-directory project-dir)) (t (if project-dir (error "(git-reference): git project `%s' directory is unreadable or invalid: \"%s\"" project project-dir)
[elpa] externals/hyperbole 09032d9 13/25: Disable minibuffer-completion-confirm while processing key series
branch: externals/hyperbole commit 09032d90b4b4816ad4803bd8f69b7bc1d8c6aebd Author: Bob Weiner Commit: Bob Weiner Disable minibuffer-completion-confirm while processing key series --- hib-kbd.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hib-kbd.el b/hib-kbd.el index 4545a90..a75706f 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -134,7 +134,8 @@ Returns t if KEY-SERIES has a binding, else nil." ;; Disable helm while processing M-x commands; helm ;; gobbles final RET key. Counsel works without modification. (let ((orig-binding (global-key-binding [?\M-x])) - (helm-flag (and (boundp 'helm-mode) helm-mode))) + (helm-flag (and (boundp 'helm-mode) helm-mode)) + (minibuffer-completion-confirm)) (unwind-protect (progn (when helm-flag (helm-mode -1))
[elpa] externals/hyperbole 008182b 22/25: Fixes, Helm and Magit Smart Key support doc in prep. for 7.1.3
branch: externals/hyperbole commit 008182b5a9b30d143134b80a48128e4784b7a5f7 Author: Bob Weiner Commit: Bob Weiner Fixes, Helm and Magit Smart Key support doc in prep. for 7.1.3 --- Changes| 12 ++ HY-ABOUT | 2 +- HY-NEWS| 17 ++- Makefile | 2 +- README.md | 2 +- README.md.html | 2 +- hmouse-drv.el | 12 +- hui-mini.el| 4 +- hui.el | 5 +- hversion.el| 2 +- hyperbole.el | 4 +- kotl/kotl-mode.el | 2 +- man/hkey-help.txt | 3 +- man/hyperbole.html | 339 - man/hyperbole.info | Bin 528429 -> 534000 bytes man/hyperbole.pdf | Bin 1284189 -> 1289079 bytes man/hyperbole.texi | 105 ++--- man/version.texi | 8 +- 18 files changed, 375 insertions(+), 146 deletions(-) diff --git a/Changes b/Changes index dfb9067..9c1e89a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,17 @@ 2020-08-01 Bob Weiner +* hui-mini.el (hui:menu-get-keys): Cleared hui:menu-keys to prevent multiple +calls from concatenating results. + +* hmouse-drv.el (hkey-help): Added note that implicit button types are displayed +in highest priority first order when listing all of them. + +* man/hyperbole.texi (Smart Key - Helm Mode): + (Smart Key - Magit Mode): Added new nodes to document these. + +* kotl/kotl-mode.el (kotl-mode): Used setq-local to ensure fill-paragraph-function +is set only for kotl-mode. + * hmouse-drv.el (hkey-help): Fixed to not show 'OR' before first 'CALL' listing and to only display Action/Assist Mouse Button contexts when last use was ia mouse button and not keyboard. Also, displayed whether showing mouse or diff --git a/HY-ABOUT b/HY-ABOUT index 5f7a7af..afed370 100644 --- a/HY-ABOUT +++ b/HY-ABOUT @@ -3,7 +3,7 @@ Designed and Written by Bob Weiner Maintained by Mats Lidell and Bob Weiner https://www.gnu.org/software/hyperbole/ -Version 7.1.2 +Version 7.1.3 Say thanks or send a testimonial if you like Hyperbole: Email: diff --git a/HY-NEWS b/HY-NEWS index 8ace3b9..a20f8ca 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -15,13 +15,19 @@ associated with Agenda items such as TODOs in another window. The Assist Key shows help. -- Org-mode: Raised to near top priority in implicit button types so that +- Org Mode: Raised to near top priority in implicit button types so that pathnames, URLs, etc. within Org links are handled by Org rather than Hyperbole. - Smart Dired Sidebar: Smart Key support for the dired-sidebar package. See "(hyperbole)Smart Key - Dired Sidebar Mode". +- Helm Mode: The Smart Keys do all sorts of things in helm completion buffers + and the associated minibuffer. See "(hyperbole)Smart Key - Helm Mode". + +- Magit Mode: Action Key expands/collapses like {TAB} and Assist Key + jumps to items like {RET}. See "(hyperbole)Smart Key - Magit Mode". + BUTTON TYPES - {Key Series} Button Support for Helm and Counsel: Key series buttons @@ -31,6 +37,15 @@ - Markdown In-file Links: With point on the link title, in-file links are now activated properly (previously point had to be on the link itself). + DOCUMENTATION + +- Helm Mode: Added Hyperbole Manual section, "Smart Key - Helm Mode" + that works on helm completions. See "(hyperbole)Smart Key - + Helm Mode". + +- Magit Mode: Added Hyperbole Manual section, "Smart Key - Magit Mode" + that expands/collapses/jumps to Magit items. See "(hyperbole)Smart Key - + Magit Mode". === * V7.1.2 diff --git a/Makefile b/Makefile index 418ffcf..8be3052 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ # This ver setup won't work under any make except GNU make, so set it manually. #HYPB_VERSION = "`head -3 hversion.el | tail -1 | sed -e 's/.*|\(.*\)|.*/\1/'`" -HYPB_VERSION = 7.1.2 +HYPB_VERSION = 7.1.3 # Emacs executable used to byte-compile .el files into .elc's. # Possibilities include: emacs, infodock, etc. diff --git a/README.md b/README.md index ab64963..b866918 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GNU Hyperbole 7.1.2 - The Everyday Hypertextual Information Manager +# GNU Hyperbole 7.1.3 - The Everyday Hypertextual Information Manager [Say thanks or send a testimonial if you like Hyperbole.(mailto:r...@gnu.org)] diff --git a/README.md.html b/README.md.html index 95d8bb5..6609767 100644 --- a/README.md.html +++ b/README.md.html @@ -1,5 +1,5 @@ -GNU Hyperbole 7.1.2 - The Everyday Hypertextual Information Manager +GNU Hyperbole 7.1.3 - The Everyday Hypertextual Information Manager [Say thanks or send a testimonial if y
[elpa] externals/hyperbole 82653d5 06/25: hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x
branch: externals/hyperbole commit 82653d5e920b42bebfa7c7e52dea1f4a552f439a Author: Bob Weiner Commit: Bob Weiner hib-kbd.el: Recognize helm-M-x or counsel-M-x bound to M-x --- hib-kbd.el | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hib-kbd.el b/hib-kbd.el index b3736cc..b01951f 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -29,6 +29,7 @@ ;;; (require 'hactypes) +(require 'seq) (defvar kbd-key:named-key-list '("add" "backspace" "begin" "bs" "clear" "decimal" "delete" "del" @@ -263,12 +264,13 @@ For an approximate inverse of this, see `key-description'." (setq times (string-to-number (substring word 0 (match-end 1 (setq word (substring word (1+ (match-end 1) (cond ((string-match "^<<.+>>$" word) - (setq key (vconcat (if (eq (key-binding [?\M-x]) - 'execute-extended-command) - [?\M-x] - (or (car (where-is-internal - 'execute-extended-command)) - [?\M-x])) + (setq key (vconcat (cond ((memq (key-binding [?\M-x]) + kbd-key:extended-command-binding-list) +[?\M-x]) + ((seq-filter + (lambda (elt) (car (where-is-internal elt))) + kbd-key:extended-command-binding-list) +[?\M-x])) (substring word 2 -2) "\r"))) ((and (string-match "^\\(\\([ACHMsS]-\\)*\\)<\\(.+\\)>$" word) (progn @@ -409,8 +411,11 @@ a M-x extended command, ;;; (defconst kbd-key:extended-command-prefix - (kbd-key:normalize (key-description (where-is-internal 'execute-extended-command (current-global-map) t))) - "Normalized prefix string that invokes an extended command; typically ESC x.") + (format "\\_<%s\\_>" (kbd-key:normalize "M-x")) + "Normalized prefix regular expression that invokes an extended command; by default, M-x.") + +(defconst kbd-key:extended-command-binding-list '(execute-extended-command helm-M-x counsel-M-x) + "List of commands that may be bound to M-x to invoke extended/named commands.") (defvar kbd-key:mini-menu-key nil "The key sequence that invokes the Hyperbole minibuffer menu.")
[elpa] externals/hyperbole 9e13b43 02/25: hui-select.el and hyperbole.el reformatting; no logic changes
branch: externals/hyperbole commit 9e13b4396a4860e14367fc31d3ec440725b09650 Author: Bob Weiner Commit: Bob Weiner hui-select.el and hyperbole.el reformatting; no logic changes --- hui-select.el | 1331 - hyperbole.el |4 +- 2 files changed, 668 insertions(+), 667 deletions(-) diff --git a/hui-select.el b/hui-select.el index 5fa90de..282527e 100644 --- a/hui-select.el +++ b/hui-select.el @@ -136,7 +136,7 @@ (defcustom hui-select-indent-modes (append '(altmath-mode asm-mode csh-mode eiffel-mode ksh-mode math-mode miranda-mode python-mode pascal-mode sather-mode) - hui-select-text-modes) + hui-select-text-modes) "*List of language major modes that use indentation mostly to define syntactic structure." :type '(repeat (function :tag "Mode")) :group 'hyperbole-commands) @@ -219,26 +219,26 @@ The non-nil value returned is the function to call to select that syntactic unit (or (numberp pos) (setq pos (point))) (setq hui-select-previous 'char) (let* ((syntax (char-syntax (or (char-after pos) (char-before pos - (pair (assq syntax hui-select-syntax-alist))) + (pair (assq syntax hui-select-syntax-alist))) (and pair (or hui-select-whitespace (not (eq (cdr pair) 'thing-whitespace))) - ;; Ignore matches that are preceded by '\' as a quote, e.g. ?\' - (or (not (char-after pos)) - (= pos (point-min)) - (and (char-before pos) (/= ?\\ (char-before pos - (cdr pair) + ;; Ignore matches that are preceded by '\' as a quote, e.g. ?\' + (or (not (char-after pos)) + (= pos (point-min)) + (and (char-before pos) (/= ?\\ (char-before pos + (cdr pair) ;;;###autoload (defun hui-select-goto-matching-delimiter () "Jump back and forth between the start and end delimiters of a thing." (interactive) (cond ((memq major-mode hui-select-markup-modes) -(hui-select-goto-matching-tag)) - ((and (preceding-char) (or (= ?\) (char-syntax (preceding-char))) - (= ?\" (preceding-char -(backward-sexp)) - ((and (following-char) (or (= ?\( (char-syntax (following-char))) - (= ?\" (following-char -(forward-sexp +(hui-select-goto-matching-tag)) + ((and (preceding-char) (or (= ?\) (char-syntax (preceding-char))) + (= ?\" (preceding-char +(backward-sexp)) + ((and (following-char) (or (= ?\( (char-syntax (following-char))) + (= ?\" (following-char +(forward-sexp ;;;###autoload (defun hui-select-initialize () @@ -247,33 +247,32 @@ Also, add language-specific syntax setups to aid in thing selection." (interactive) (unless (boundp 'hyperbole-loading) (require 'hyperbole)) - (if hkey-init - (progn - (transient-mark-mode 1) - (hkey-global-set-key [double-down-mouse-1] nil) - (hkey-global-set-key [double-mouse-1] 'hui-select-thing-with-mouse) - (hkey-global-set-key [triple-down-mouse-1] nil) - (hkey-global-set-key [triple-mouse-1] 'hui-select-thing-with-mouse))) + (when hkey-init +(transient-mark-mode 1) +(hkey-global-set-key [double-down-mouse-1] nil) +(hkey-global-set-key [double-mouse-1] 'hui-select-thing-with-mouse) +(hkey-global-set-key [triple-down-mouse-1] nil) +(hkey-global-set-key [triple-mouse-1] 'hui-select-thing-with-mouse)) ;; ;; These hooks let you select C++ and Java methods and classes by ;; double-clicking on the first character of a definition or on its ;; opening or closing brace. This is all necessary since some ;; programmers don't put their function braces in the first column. (var:add-and-run-hook 'java-mode-hook (lambda () - (setq defun-prompt-regexp - "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f [...] + (setq defun-prompt-regexp + "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z
[elpa] externals/hyperbole d65920b 25/25: V7.1.3 - Improve key series, mouse handling and
branch: externals/hyperbole commit d65920b8f3d5b821253a81949851f7e42201206d Author: Bob Weiner Commit: Bob Weiner V7.1.3 - Improve key series, mouse handling and --- .hypb | Bin 3226 -> 3509 bytes Changes | 35 DEMO| 2 +- HY-NEWS | 5 +- HY-TALK/.hypb | 4 + HY-TALK/HY-TALK.org | 456 HY-TALK/HYPB| 44 + MANIFEST| 1 + TALK/HY-TALK.org| 264 -- TALK/HYPB | 11 -- hbut.el | 2 +- hib-kbd.el | 63 hmouse-drv.el | 17 +- hui-mini.el | 8 +- hui-window.el | 25 +-- hui.el | 8 +- hycontrol.el| 2 +- hypb.el | 17 ++ hyperbole.el| 16 +- man/hyperbole.html | 8 +- man/hyperbole.info | Bin 534000 -> 534000 bytes man/hyperbole.pdf | Bin 1289079 -> 1289960 bytes man/hyperbole.texi | 10 +- 23 files changed, 654 insertions(+), 344 deletions(-) diff --git a/.hypb b/.hypb index 64db9c9..8fdc058 100644 Binary files a/.hypb and b/.hypb differ diff --git a/Changes b/Changes index 10c2c50..1e2b9b7 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,38 @@ +2020-09-21 Bob Weiner + +* hversion.el: Released 7.1.3. + +2020-09-06 Bob Weiner + +* hyperbole.el (hkey-define-key): Added to support help-map being +somewhere other than C-h. + (hkey-initialize): Updated to support the above. + hui-mini.el (hui:menu-doc): Updated to support the above. Trigger an +error if the 'hyperbole' command is not bound to a key. + +* hmouse-drv.el (hkey-help): Fix to properly reflect and describe mouse +drags and only reflect mouse usage if last-command-event was a +mouse event. Move clearing of action/assist key variables until +after the last specified action is recorded. + +* hib-kbd.el (kbd-key): Improve brace matching by temporarily tagging +braces with list delimiter syntax. + +* hypb.el (hypb:set-raw-syntax-descriptor): Add so can restore saved +syntax table entries. + (hypb:get-raw-syntax-descriptor): Add to get raw syntax +descriptors. Emacs does not provide these functions. + +* hui-window.el (smart-coords-in-window-p): Ensure any window returned is +still valid and fix eventp condition to return window rather than t. + +2020-08-03 Bob Weiner + +* hui.el (hui:ebut-delete-op, hui:ibut-delete-op): Display deletion msg +when used in a key series or kbd macro. + +* hbut.el (ibut:delete): Fix to pass key instead of but symbol to ibut:to. + 2020-08-02 Bob Weiner * hbut.el (hbut:key-src-set-buffer): Fixed explicit button creation in a new diff --git a/DEMO b/DEMO index c48d7dd..60e9c6c 100644 --- a/DEMO +++ b/DEMO @@ -222,7 +222,7 @@ There are two submodes of HyControl: one for controlling windows and one for controlling frames, although a number of commands are available in both modes where they are useful. -Hyperbole binds {C-c \\} to invoke HyControl windows control; otherwise, the +Hyperbole binds {C-c \ } to invoke HyControl windows control; otherwise, the Hyperbole minibuffer menu item, Screen/WindowsControl {C-h h s w}, will do the same thing. diff --git a/HY-NEWS b/HY-NEWS index 0d8b16b..6140066 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -41,7 +41,7 @@ set to t and Magit is available, then when activating a git directory button, such as git#/hyperbole, use Magit rather than Dired. -- Explicit Buttons Work Immdiately: Previously you had to save the buffer +- Explicit Buttons Work Immediately: Previously you had to save the buffer in which you created an explicit button before it would work. Now they work immediately after creation. @@ -51,6 +51,9 @@ that works on helm completions. See "(hyperbole)Smart Key - Helm Mode". +- Hyperbole Slides: Slides used in a talk by the author on the history + and capabilities of Hyperbole, see "HY-TALK/HY-TALK.org". + - Magit Mode: Added Hyperbole Manual section, "Smart Key - Magit Mode" that expands/collapses/jumps to Magit items. See "(hyperbole)Smart Key - Magit Mode". diff --git a/HY-TALK/.hypb b/HY-TALK/.hypb new file mode 100644 index 000..ada57d5 --- /dev/null +++ b/HY-TALK/.hypb @@ -0,0 +1,4 @@ + +"HYPB" +("Hyperbole_Todos" nil nil link-to-file ("${hyperb:dir}/Todo.txt" 422) "r...@gnu.org" "20200803:15:14:32" nil nil) +("line-count" nil nil eval-elisp ((message "Lines in %s = %s" (buffer-name) (count-lines (point-min) (point-max "r...@gnu.org" "20200301:17:56:53" nil nil) diff --git a/HY-TALK/HY-TALK.org b/HY-TALK/HY-TALK.org new file mode 100644 index 000..a9add8d --- /dev/null +++ b/HY-TALK/HY-TALK.org @@ -0,0 +1,456 @@ +* <(Make Your Text Come Alive)> + + + <(GNU Hyperbole)> + + Bob Weiner + + + N
[elpa] externals/hyperbole 8ef773d 18/25: Add Action/Assist key support for magit modes
branch: externals/hyperbole commit 8ef773d9abe3d5f9db7824e7a6bf95bd10cfea9f Author: Bob Weiner Commit: Bob Weiner Add Action/Assist key support for magit modes --- Changes | 4 hui-mouse.el | 52 +++- man/hkey-help.txt | 1 + 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 41f9b71..eaa0dba 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ 2020-07-29 Bob Weiner +* man/hkey-help.txt: Added magit modes. + hui-mouse.el (smart-magit, smart-magit-assist): Added. + (hkey-alist): Added support for magit modes. + * kotl/kotl-mode.el (kotl-mode:eolp): Added optional 'next-char-visible' arg. (kotl-mode:action-key, kotl-mode:assist-key): hui-mouse.el (hkey-alist): In kotl-mode, matched to eol only if following diff --git a/hui-mouse.el b/hui-mouse.el index a0c41d6..e0759a2 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -370,6 +370,9 @@ Its default value is #'smart-scroll-down." ((eq major-mode 'gomoku-mode) . ((gomoku-human-plays) . (gomoku-human-takes-back))) ;; +((string-prefix-p "magit-" (symbol-name major-mode)) . + ((smart-magit) . (smart-magit-assist))) +;; ;; Support the OO-Browser when available. It is a separate Emacs ;; package not included with Hyperbole. Hyperbole supplies a stub ;; `br-in-browser' test for use here. @@ -1188,7 +1191,7 @@ buffer and has moved the cursor to the selected buffer." ;;; (defun smart-imenu-display-item-where (item-name item-pos) - "Displays an ITEM-NAME defined at ITEM-POS within the current buffer. + "Display an ITEM-NAME defined at ITEM-POS within the current buffer. Uses the imenu library and the value of `hpath:display-where' to display." (hpath:display-buffer (current-buffer)) (funcall imenu-default-goto-function item-name item-pos)) @@ -1250,6 +1253,53 @@ NO-RECURSE-FLAG non-nil prevents infinite recursions." ;;; ;;; In "hmouse-info.el". + +;;; +;;; smart-magit functions +;;; + +(defun smart-magit () + "Use a key or mouse key to jump to source and to hide/show changes. + +Invoked via a key press when in a magit mode and not on a button. +It assumes that its caller has already checked that the key was +pressed in an appropriate buffer and has moved the cursor to the +selected buffer. + +If key is pressed: + (1) on the last line, quit from the magit mode (\"q\" key binding); + (2) at the end of a line, scroll up a windowful; + (3) anywhere else, hide/show the thing at point (\"TAB\" key binding)." + (interactive) + (cond ((last-line-p) +(call-interactively (key-binding "q"))) + ((eolp) +(smart-scroll-up)) + (t +(call-interactively (key-binding "\t") + +(defun smart-magit-assist () + "Use an assist key or mouse key to jump to source and to hide/show changes. + +Invoked via an assist key press when in a magit mode and not on a +button. It assumes that its caller has already checked that the +assist-key was pressed in an appropriate buffer and has moved the +cursor to the selected buffer. + +If assist-key is pressed: + (1) on the last line, quit from the magit mode (\"q\" key binding); + (2) at the end of a line, scroll down a windowful; + (3) anywhere else, jump to the thing at point (\"RET\" key binding)." + (interactive) + (cond ((last-line-p) +(call-interactively (key-binding "q"))) + ((eolp) +(smart-scroll-down)) + (t +(setq current-prefix-arg 1) +(let ((magit-display-file-buffer-function #'hpath:display-buffer)) + (call-interactively (key-binding "\r")) + ;;; ;;; smart-man functions ;;; diff --git a/man/hkey-help.txt b/man/hkey-help.txt index 1d1289e..0b8645d 100644 --- a/man/hkey-help.txt +++ b/man/hkey-help.txt @@ -103,6 +103,7 @@ Hyperbole Key Press/Click in Special Modes Include fileJumps to Texinfo referent Button help code/var reference Displays doc for referent Button help Org Mode Follows links and cycles outline views + Magit Modes Collapses and expands things Outline Major/Minor Modes Collapses, expands, and moves outline entries Man Apropos Displays man page entry<- same Man Pages Follows cross refs, file refs and C code refs
[elpa] externals/hyperbole f633365 17/25: Normalize committer email addresses
branch: externals/hyperbole commit f633365379d3040cddde3beccb4b540e2488614d Author: Bob Weiner Commit: Bob Weiner Normalize committer email addresses --- .mailmap | 7 +++ 1 file changed, 7 insertions(+) diff --git a/.mailmap b/.mailmap new file mode 100644 index 000..5e0ad56 --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +Bob Weiner Bob Weiner +Bob Weiner Bob Weiner +Bob Weiner Robert Weiner +Mats Lidell Mats Lidell +Mats Lidell Mats Lidell +Mats Lidell Mats Lidell +
[elpa] externals/hyperbole 335441d 15/25: Fix that Action Key did not expand collapsed Koutline trees
branch: externals/hyperbole commit 335441dfce09c0f0c928a488e5cf5f2df00bc952 Author: Bob Weiner Commit: Bob Weiner Fix that Action Key did not expand collapsed Koutline trees --- Changes | 11 +-- hyperbole.el | 10 ++ kotl/kotl-mode.el | 6 -- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index d0461ed..4570f3e 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,17 @@ +2020-07-28 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode): Set outline-regexp so outline-on-heading-p and +smart-outline-subtree-hidden-p use it and the Action Key expands cells properly. + +* hyperbole.el (outline-invisible-in-p): Fixed to detect if tree is collapsed anywhere. + 2020-07-27 Mats Lidell -* hui-dired-sidebar.el: Support for dired-sidebar added. +* hui-dired-sidebar.el: Added support for dired-sidebar. 2020-07-26 Bob Weiner -* hibtypes.el (hsys-org): Move org links/refs to near top of priority list so things +* hibtypes.el (hsys-org): Moved org links/refs to near top of priority list so things like URLs embeded within Org links are handled by Org, not Hyperbole. (markdown-follow-inline-link-p): Fixed to defer in-file links with point on the link title to the `pathname' ibtype since diff --git a/hyperbole.el b/hyperbole.el index bfbe6a1..8498706 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -594,10 +594,12 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (defun outline-invisible-in-p (beg end) "Return t if there is an invisible character between BEG and END, else nil." (catch 'result - (delq nil (mapcar (lambda (o) - (if (eq 'outline (overlay-get o 'invisible)) - (throw 'result t))) - (overlays-in beg end)) + (let ((p beg)) + (while (< p end) + (when (eq (get-char-property p 'invisible) 'outline) + (throw 'result t)) + (setq p (1+ p + nil))) ;;; ;;; Message System Support Configuration diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index 3cf210b..36874b4 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -16,7 +16,7 @@ ;;; Other required Lisp Libraries ;;; -(eval-and-compile (mapc #'require '(delsel hsettings hmail kfile kvspec kcell))) +(eval-and-compile (mapc #'require '(delsel hsettings hmail kfile kvspec kcell outline))) ;;; ;;; Public variables @@ -86,6 +86,7 @@ It provides the following keys: (mapc #'make-local-variable '(kotl-previous-mode indent-line-function indent-region-function outline-isearch-open-invisible-function +outline-regexp line-move-ignore-invisible minor-mode-alist selective-display-ellipses paragraph-separate paragraph-start)) @@ -102,7 +103,8 @@ It provides the following keys: minor-mode-alist) ;; Remove indication that buffer is narrowed. mode-line-format (copy-sequence mode-line-format) - mode-line-format (set:remove "%n" mode-line-format))) + mode-line-format (set:remove "%n" mode-line-format) + outline-regexp (concat " *[0-9][0-9a-z.]*" kview:default-label-separator))) ;; (if (fboundp 'add-to-invisibility-spec) (add-to-invisibility-spec '(outline . t)))