[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 9ebfcfe2e3 14/14: Merge pull request #602 fro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 9ebfcfe2e3 14/14: Merge pull request #602 from rswgnu/rsw |
Date: |
Mon, 11 Nov 2024 03:58:25 -0500 (EST) |
branch: externals/hyperbole
commit 9ebfcfe2e35e87c8df3c072c6b00ec4d63a5c47c
Merge: 498f28757c 742ccea3ff
Author: Robert Weiner <rsw@gnu.org>
Commit: GitHub <noreply@github.com>
Merge pull request #602 from rswgnu/rsw
Support latest Treemacs and HyWiki page navigation with it
---
ChangeLog | 74 +++++++++++++++++++++++++++++++-
hui-jmenu.el | 7 +++-
hui-treemacs.el | 91 +++++++++++++++++++++++-----------------
hui-window.el | 121 ++++++++++++++++++++++++++++++++++++++++++++++-------
hui.el | 5 ++-
hycontrol.el | 37 ++++++++--------
hyperbole.el | 7 +++-
hyrolo.el | 10 +++--
hywiki.el | 36 +++++++++++++---
man/hkey-help.txt | 2 +-
man/hyperbole.info | Bin 661556 -> 663085 bytes
man/hyperbole.texi | 110 ++++++++++++++++++++++++++++++------------------
12 files changed, 372 insertions(+), 128 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9353a6c109..f204accc02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,60 @@
+2024-11-10 Bob Weiner <rsw@gnu.org>
+
+* hui-window.el (action-key-modeline-left-edge-function,
+ action-key-modeline-left-edge-function,
+ assist-key-modeline-left-edge-function,
+ action-key-modeline-right-edge-function): Add these
+ customizations.
+ (action-key-modeline-click-left-edge,
+ assist-key-modeline-click-left-edge,
+ action-key-modeline-click-right-edge,
+ assist-key-modeline-click-right-edge): Add these functions
+ as defaults for the above customizations.
+ (hmouse-modeline-default-help-echo): Replacement for default
+ 'mode-line-default-help-echo' function that produces mode line hover doc
+ for the Smart Mouse Keys.
+ hyperbole.el (hyperbole--enable-mode): Update mode-line hover doc in blank
+ areas for button-2 and button-3 if using unshifted Smart Keys.
+
+* hui-jmenu.el (hui-menu-modeline): Add HyWiki-Edit-Pages to display a list
+ of HyWiki page files either in dired or Treemacs.
+
+* hui-treemacs.el (require): Prompt to install package if not yet installed.
+
+* hui-window.el (hmouse-horizontal-assist-drag): Fix doc when one window only.
+
+* man/hyperbole.texi (HyWiki Menu): Add index entries per menu item.
+
+* hywiki.el (hywiki-directory-edit): Rename to 'hywiki-directory-dired-edit'.
+ (hywiki-directory-edit): Make a new version that supports
+ 'treemacs' when 'action-key-modeline-buffer-id-function' is set to
+ 'smart-treemacs-modeline.
+
+* hui-treemacs.el (smart-treemacs): Simplify and no longer call
+ 'treemacs-node-buffer-and-position' which can trigger a marker error.
+ (smart-treemacs-edit): Add to edit/display a dir in Treemacs.
+ (smart-treemacs-modeline): Call above function.
+ hywiki.el (hywiki-directory-treemacs-edit): Add and call above function.
+
+* hycontrol.el (hycontrol-window-display-buffer): Fix to ignore any dedicated
+ windows and prevent an error typically generated when calling this from
+ 'walk-windows' called within 'hycontrol-windows-grid'. Makes window grids
+ work with Treemacs display, for example.
+
+* hui-treemacs.el (smart-treemacs): Fix invocation of TAB command on first line
+ entry (treat it like any other line except at eol). Also, actually invoke
+ latest treemacs TAB command when defined rather that calling the default
+ command normally configured to the TAB key. Ensure all func calls are
+ wrapped with 'hact'.
+ (smart-treemacs-modeline): Ensure always displays just the
+ dir associated with the current buffer. Wrap all func calls with 'hact'.
+ man/hyperbole.texi (Smart Key - Treemacs): Update doc to match above change.
+ (smart-treemacs-quit): Add to ensure treemacs-quit is run
+ within the Treemacs window.
+
+* hywiki.el (hywiki-directory-edit): Support non-bash shells that cannot handle
+ character classes.
+
2024-11-10 Mats Lidell <matsl@gnu.org>
* test/hywiki-tests.el (hywiki-tests--add-hywiki-hooks)
@@ -10,6 +67,21 @@
(hywiki-tests--verify-face-property-when-editing-wikiword-first-char):
Tests using the hook mimicking functions.
+2024-11-03 Bob Weiner <rsw@gnu.org>
+
+* hywiki.el (hywiki-maybe-highlight-page-name,
hywiki-maybe-dehighlight-page-name):
+ Change to use function (hywiki-get-buttonize-characters) rather than the
+ variable, hywiki--buttonize-characters, so do not move back over whitespace
+ when at the beginning of a HyWikiWord.
+
+* hyrolo.el (hyrolo-grep-file): Don't set grepped file to read-only since
+ this can later make org-capture fail. (gh#rswgnu/hyperbole/599)
+
+2024-11-02 Bob Weiner <rsw@gnu.org>
+
+* man/hyperbole.texi: Change all @url to @uref so display properly in
+ Info-format output.
+
2024-11-02 Mats Lidell <matsl@gnu.org>
* test/hywiki-tests.el (hywiki-tests--word-is-p)
@@ -36,7 +108,7 @@
an infinite loop.
(hywiki-add-page, hywiki-make-pages-hasht): Reset
'hywiki--any-page-regexp-list' whenever hasht is rebuilt. Otherwise,
- highlihgting might not include new wikiwords in hasht.
+ highlighting might not include new wikiwords in hasht.
2024-10-27 Bob Weiner <rsw@gnu.org>
diff --git a/hui-jmenu.el b/hui-jmenu.el
index 32033fe7c0..4939f36eaf 100644
--- a/hui-jmenu.el
+++ b/hui-jmenu.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 9-Mar-94 at 23:37:28
-;; Last-Mod: 19-Jan-24 at 14:09:51 by Mats Lidell
+;; Last-Mod: 11-Nov-24 at 00:35:43 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -111,7 +111,8 @@
;;;###autoload
(defun hui-menu-screen-commands ()
- "Popup a menu of buffers, frames, and windows, allowing user to jump to one."
+ "Popup a menu of screen control and jump to menus.
+Jump to: HyWiki pages, buffers, frames, and windows."
(interactive)
(popup-menu '("Hyperbole Screen Commands" :filter hui-menu-modeline)))
@@ -177,6 +178,8 @@ Jump to chosen buffer."
(defun hui-menu-modeline (_ignore)
"Return a modeline menu."
(list
+ ["HyWiki-Edit-Pages" hywiki-directory-edit t]
+ "----"
["Control-Frames" hycontrol-enable-frames-mode t]
["Control-Windows" hycontrol-enable-windows-mode t]
"----"
diff --git a/hui-treemacs.el b/hui-treemacs.el
index 5ff20df418..35ca206d4b 100644
--- a/hui-treemacs.el
+++ b/hui-treemacs.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Nov-17
-;; Last-Mod: 20-Jan-24 at 20:20:00 by Mats Lidell
+;; Last-Mod: 10-Nov-24 at 17:27:30 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -26,7 +26,8 @@
(or (require 'treemacs nil t)
(and (package-installed-p 'treemacs)
- (package-activate 'treemacs)))
+ (package-activate 'treemacs))
+ (hypb:require-package 'treemacs))
(defvar treemacs-version)
@@ -39,10 +40,10 @@
(declare-function treemacs "ext:treemacs")
(declare-function treemacs-current-button "ext:treemacs-core-utils")
(declare-function treemacs-current-visibility "ext:treemacs-scope")
-(declare-function treemacs-get-local-buffer "ext:treemacs-scope")
+(declare-function treemacs-get-local-window "ext:treemacs-scope")
(declare-function treemacs-is-treemacs-window? "ext:treemacs-core-utils")
-(declare-function treemacs-node-buffer-and-position
"etx:treemacs-mouse-interface")
-(declare-function treemacs-quit "ext:treemacs-core-utils")
+(declare-function treemacs-node-buffer-and-position
"ext:treemacs-mouse-interface")
+(declare-function treemacs-quit "ext:treemacs-interface")
(declare-function treemacs-toggle-node "ext:treemacs-interface")
(defvar aw-ignored-buffers)
@@ -68,6 +69,25 @@
(unless (fboundp 'treemacs-quit)
(fset 'treemacs-quit #'bury-buffer))
+;;;###autoload
+(defun smart-treemacs-edit (&optional dir)
+ "Use `treemacs' to edit optional DIR or the `default-directory'."
+ (let ((default-directory (if (stringp dir) dir default-directory)))
+ (cond ((fboundp #'treemacs-add-and-display-current-project-exclusively)
+ (treemacs-add-and-display-current-project-exclusively))
+ ;; Older obsoleted function
+ ((fboundp #'treemacs-display-current-project-exclusively)
+ (treemacs-display-current-project-exclusively))
+ (t (treemacs)))))
+
+(defun smart-treemacs-quit (&optional arg)
+ "Quit treemacs visible in current frame with `bury-buffer'.
+With a prefix ARG call `treemacs-kill-buffer' instead."
+ (interactive "P")
+ (when (eq (treemacs-current-visibility) 'visible)
+ (with-selected-window (treemacs-get-local-window)
+ (treemacs-quit arg))))
+
;;;###autoload
(defun smart-treemacs ()
"Use a single key or mouse key to manipulate directory entries.
@@ -77,37 +97,28 @@ caller has already checked that the key was pressed in an
appropriate buffer
and has moved the cursor there.
If key is pressed:
- (1) on an entry icon, the treemacs TAB command is run to expand and
- collapse the entry;
- (2) elsewhere within an entry line, the item is displayed for editing,
- normally in another window;
- (3) 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;
- (4) on the first line of the buffer (other than the end of line),
- Dired is run on the current directory of this Treemacs;
- (5) at the end of the first or last line of the buffer,
- this Treemacs invocation is quit."
+ (1) on or to the left of an entry icon, run the treemacs TAB command
+ to expand or collapse the entry;
+ (2) elsewhere within an entry line, display the item, which may be a
+ directory, for editing, normally in another window;
+ (3) at the end of an entry line: if an Action Key press, invoke
+ `action-key-eol-function', typically to scroll up proportionally;
+ if an Asisst Key press, invoke `assist-key-eol-function', typically
+ to scroll down proportionally;
+ (4) at the end of the first or last line of the buffer, quit this
+ Treemacs invocation."
(interactive)
- (cond ((first-line-p)
- (if (eolp)
- (treemacs-quit)
- (hact 'link-to-directory default-directory)))
- ((and (last-line-p) (eolp))
- (treemacs-quit))
+ (cond ((and (eolp) (or (first-line-p) (last-line-p)))
+ (hact 'smart-treemacs-quit))
((eolp)
- (funcall (if assist-flag assist-key-eol-function
action-key-eol-function)))
- (t (let ((over-icon (and (treemacs-current-button)
- (= (point) (- (button-start
(treemacs-current-button)) 2))))
- (result (treemacs-node-buffer-and-position)))
- (if (and (not over-icon) result (or (bufferp result) (listp
result)))
- (if (listp result)
- (hact 'link-to-buffer-tmp (seq-elt result 0) (seq-elt
result 1))
- ;; (bufferp result)
- (hact 'link-to-buffer-tmp result))
- (treemacs-toggle-node current-prefix-arg))))))
+ (hact 'funcall (if assist-flag assist-key-eol-function
action-key-eol-function)))
+ (t (if (and (treemacs-current-button)
+ (= (point) (- (button-start (treemacs-current-button)) 2)))
+ ;; Before or on the entry's icon
+ (hact 'treemacs-TAB-action current-prefix-arg)
+ ;; On the entry, handles dirs, files and tag entries
+ (hact 'treemacs-RET-action current-prefix-arg)))))
;;;###autoload
(defun smart-treemacs-modeline ()
@@ -123,21 +134,23 @@ Suitable for use as a value of
`action-key-modeline-buffer-id-function'."
;; Clicked on Treemacs buffer id
((if action-key-depress-window
(treemacs-is-treemacs-window? action-key-depress-window)
- (string-match " Treemacs " (format-mode-line mode-line-format)))
+ (hact 'string-match " Treemacs " (format-mode-line mode-line-format)))
;; Quit/hide treemacs.
- (treemacs-quit))
+ (hact 'treemacs-quit))
;;
;; Treemacs is visible and displaying the same dir as
;; the default dir of the clicked on modeline.
((and (eq (treemacs-current-visibility) 'visible)
(string-equal (expand-file-name default-directory)
- (with-current-buffer (treemacs-get-local-buffer)
- default-directory)))
+ (with-selected-window (treemacs-get-local-window)
+ (save-excursion
+ (goto-char (point-min))
+ default-directory))))
;; Quit/hide treemacs.
- (treemacs-quit))
+ (hact 'smart-treemacs-quit))
;;
;; Otherwise, invoke treemacs on the default dir of the clicked on modeline.
- (t (treemacs))))
+ (t (hact 'smart-treemacs-edit))))
(provide 'hui-treemacs)
;;; hui-treemacs.el ends here
diff --git a/hui-window.el b/hui-window.el
index 5cf2965f19..71bd190756 100644
--- a/hui-window.el
+++ b/hui-window.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Sep-92
-;; Last-Mod: 21-Jan-24 at 10:32:38 by Bob Weiner
+;; Last-Mod: 11-Nov-24 at 00:20:41 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -94,6 +94,30 @@ of screen control commands."
:type 'function
:group 'hyperbole-keys)
+(defcustom action-key-modeline-left-edge-function
#'action-key-modeline-click-left-edge
+ "*Function run on an Action Mouse Key click at a modeline left edge.
+To disable it, set it to #\\='ignore."
+ :type 'function
+ :group 'hyperbole-keys)
+
+(defcustom assist-key-modeline-left-edge-function
#'assist-key-modeline-click-left-edge
+ "*Function run on an Assist Mouse Key click at a modeline left edge.
+To disable it, set it to #\\='ignore."
+ :type 'function
+ :group 'hyperbole-keys)
+
+(defcustom action-key-modeline-right-edge-function
#'action-key-modeline-click-right-edge
+ "*Function run on an Action Mouse Key click at a modeline right edge.
+To disable it, set it to #\\='ignore."
+ :type 'function
+ :group 'hyperbole-keys)
+
+(defcustom assist-key-modeline-right-edge-function
#'assist-key-modeline-click-right-edge
+ "*Function run on an Assist Mouse Key click at a modeline right edge.
+To disable it, set it to #\\='ignore."
+ :type 'function
+ :group 'hyperbole-keys)
+
(defun hmouse-map-modes-to-form (mode-forms)
"Map over MODE-FORMS, a sequence of (major-mode(s) form-to-eval) lists.
Return items with a single `major-mode' in the car, (major-mode form-to-eval)."
@@ -273,6 +297,28 @@ and release to register a diagonal drag.")
;;; Public functions
;;; ************************************************************************
+(defalias 'action-key-modeline-click-left-edge 'bury-buffer
+ "Default function run on an Action Mouse Key click at a modeline left edge.")
+
+(defun assist-key-modeline-click-left-edge ()
+ "Default function run on an Assist Mouse Key click at a modeline left edge."
+ (if (fboundp 'last)
+ (switch-to-buffer (car (last (buffer-list))))
+ (let ((buffers (buffer-list)))
+ (switch-to-buffer (nth (1- (length buffers)) buffers)))))
+
+(defun action-key-modeline-click-right-edge ()
+ "Default function run on an Action Mouse Key click at a modeline right edge."
+ (if (eq major-mode 'Info-mode)
+ (quit-window)
+ (info)))
+
+(defun assist-key-modeline-click-right-edge ()
+ "Default function run on an Assist Mouse Key click at a modeline right edge."
+ (if (string-match "Hyperbole Smart Keys" (buffer-name))
+ (hkey-help-hide)
+ (hkey-summarize 'current-window)))
+
(defun hmouse-at-item-p (start-window)
"Return t if point is on an item draggable by Hyperbole, otherwise nil.
Draggable items include Hyperbole buttons, Dired items, buffer/ibuffer
@@ -687,6 +733,58 @@ If free variable `assist-flag' is non-nil, uses Assist
Key."
(<= (abs (- last-press-x right-side-ln))
hmouse-side-sensitivity))))))
+;; Derived from bindings.el
+(defun hmouse-modeline-default-help-echo (window)
+ "Return default help echo text for WINDOW's mode line."
+ (let* ((frame (window-frame window))
+ (line-1a
+ ;; Show text to select window only if the window is not
+ ;; selected.
+ (not (eq window (frame-selected-window frame))))
+ (line-1b
+ ;; Show text to drag mode line if either the window is not
+ ;; at the bottom of its frame or the minibuffer window of
+ ;; this frame can be resized. This matches a corresponding
+ ;; check in `mouse-drag-mode-line'.
+ (or (not (window-at-side-p window 'bottom))
+ (let ((mini-window (minibuffer-window frame)))
+ (and (eq frame (window-frame mini-window))
+ (or (minibuffer-window-active-p mini-window)
+ (not resize-mini-windows))))))
+ (line-2a
+ (and (boundp 'hyperbole-mode) hyperbole-mode))
+ (line-2b
+ ;; Show text make window occupy the whole frame
+ ;; only if it doesn't already do that.
+ (not (eq window (frame-root-window frame))))
+ (line-3
+ ;; Show text to delete window only if that's possible.
+ (not (eq window (frame-root-window frame)))))
+ (when (or line-1a line-1b line-2a line-2b line-3)
+ (concat
+ (when (or line-1a line-1b)
+ (concat
+ "mouse-1: "
+ (when line-2a " ")
+ (when line-1a "Select window")
+ (when line-1b
+ (if line-1a " (drag to resize)" "Drag to resize"))
+ (when (or line-2a line-2b line-3) "\n")))
+ (cond (line-2a
+ (concat
+ "mouse-2: Show/hide buffer menu\n"
+ "mouse-2 right edge: Show/hide Info manuals buffer\n"))
+ (line-2b
+ (concat
+ "mouse-2: Make window occupy whole frame"
+ (when line-3 "\n"))))
+ (cond (line-2a
+ (concat
+ "mouse-3: Screen Control and Jump Menus\n"
+ "mouse-3 right edge: Show/hide Action/Assist Key actions"))
+ (line-3
+ "mouse-3: Remove window from frame"))))))
+
(defun hmouse-read-only-toggle-key ()
"Return the first toggle read-only mode key binding, or nil if none."
(key-description (where-is-internal #'read-only-mode nil t)))
@@ -723,7 +821,7 @@ Beep and print message if the window cannot be split
further."
(defun hmouse-horizontal-assist-drag ()
"Handle an Assist Key horizontal drag within a window: delete the current
window.
-Beep and print message if the window cannot be split further."
+Beep and print message if the sole window which cannot be deleted."
(condition-case ()
(delete-window)
(error (beep)
@@ -975,11 +1073,10 @@ If the Action Key is:
(when (hmouse-modeline-click)
(cond ((hmouse-emacs-at-modeline-buffer-id-p)
(funcall action-key-modeline-buffer-id-function))
- ((hmouse-release-left-edge) (bury-buffer))
+ ((hmouse-release-left-edge)
+ (funcall action-key-modeline-left-edge-function))
((hmouse-release-right-edge)
- (if (eq major-mode 'Info-mode)
- (quit-window)
- (info)))
+ (funcall action-key-modeline-right-edge-function))
(t (funcall action-key-modeline-function))))))
(defun assist-key-modeline ()
@@ -1004,21 +1101,15 @@ If the Assist Key is:
;; Modeline window resizing is now handled in assist-key-depress
;; via a call to mouse-drag-mode-line, providing live visual
;; feedback.
- (let ((buffers)
- (w (smart-window-of-coords assist-key-depress-args)))
+ (let ((w (smart-window-of-coords assist-key-depress-args)))
(when w (select-window w))
(when (hmouse-modeline-click)
(cond ((hmouse-emacs-at-modeline-buffer-id-p)
(next-buffer))
((hmouse-release-left-edge)
- (if (fboundp 'last)
- (switch-to-buffer (car (last (buffer-list))))
- (setq buffers (buffer-list))
- (switch-to-buffer (nth (1- (length buffers)) buffers))))
+ (funcall assist-key-modeline-left-edge-function))
((hmouse-release-right-edge)
- (if (string-match "Hyperbole Smart Keys" (buffer-name))
- (hkey-help-hide)
- (hkey-summarize 'current-window)))
+ (funcall assist-key-modeline-right-edge-function))
(t (funcall assist-key-modeline-function))))))
(defun hmouse-drag-p ()
diff --git a/hui.el b/hui.el
index f397537d26..3d064a6760 100644
--- a/hui.el
+++ b/hui.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Sep-91 at 21:42:03
-;; Last-Mod: 29-Aug-24 at 17:08:21 by Bob Weiner
+;; Last-Mod: 10-Nov-24 at 15:44:56 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -127,7 +127,8 @@ point; see `hui:delimited-selectable-thing'."
(indicate-copied-region)))))))
;; Override the {M-w} command from "simple.el" when hyperbole-mode is active
-;; to allow copying kcell references or regions.
+;; to allow copying kcell references, active regions and delimited
+;; areas (like sexpressions).
;;;###autoload
(defun hui-kill-ring-save (beg end &optional region)
"Save the active region as if killed, but don't kill it.
diff --git a/hycontrol.el b/hycontrol.el
index 46bcec75ae..581aedcbb4 100644
--- a/hycontrol.el
+++ b/hycontrol.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 1-Jun-16 at 15:35:36
-;; Last-Mod: 16-Sep-24 at 22:40:19 by Bob Weiner
+;; Last-Mod: 10-Nov-24 at 14:57:49 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -905,7 +905,9 @@ Used after selected buffer list is exhausted.")
(defun hycontrol-window-display-buffer (window)
"Given a WINDOW, choose the next appropriate buffer to display.
-Uses `hycontrol--buffer-list'.
+If WINDOW is dedicated, ignore it and do nothing.
+
+Uses hycontrol--buffer-list'.
When `hycontrol--invert-display-buffer-predicates' is non-nil and not
\\='ignore, the list of buffers used is further filtered using the
@@ -915,21 +917,22 @@ files.
Filtering is disabled if a specific list of buffers is sent to the
`hycontrol-make-windows-grid' function that calls this."
- (let ((buf (car hycontrol--buffer-list-pointer)))
- (setq hycontrol--buffer-list-pointer (cdr hycontrol--buffer-list-pointer))
- (while (and buf (or (= (aref (buffer-name buf) 0) ?\ )
- (and (not hycontrol--invert-display-buffer-predicates)
- (not (eval (cons 'or
(hycontrol-display-buffer-predicate-results buf)))))
- (and hycontrol--invert-display-buffer-predicates
- (not (eq
hycontrol--invert-display-buffer-predicates 'ignore))
- (eval (cons 'or
(hycontrol-display-buffer-predicate-results buf))))))
- ;; Buffer is not one to display, get the next one and test again.
- (setq buf (car hycontrol--buffer-list-pointer)
- hycontrol--buffer-list-pointer (cdr
hycontrol--buffer-list-pointer)))
- (set-window-buffer window
- (or buf
- ;; Out of buffers to display, display a blank one
- hycontrol--blank-buffer))))
+ (unless (or (null window) (window-dedicated-p window))
+ (let ((buf (car hycontrol--buffer-list-pointer)))
+ (setq hycontrol--buffer-list-pointer (cdr
hycontrol--buffer-list-pointer))
+ (while (and buf (or (= (aref (buffer-name buf) 0) ?\ )
+ (and (not hycontrol--invert-display-buffer-predicates)
+ (not (eval (cons 'or
(hycontrol-display-buffer-predicate-results buf)))))
+ (and hycontrol--invert-display-buffer-predicates
+ (not (eq
hycontrol--invert-display-buffer-predicates 'ignore))
+ (eval (cons 'or
(hycontrol-display-buffer-predicate-results buf))))))
+ ;; Buffer is not one to display, get the next one and test again.
+ (setq buf (car hycontrol--buffer-list-pointer)
+ hycontrol--buffer-list-pointer (cdr
hycontrol--buffer-list-pointer)))
+ (set-window-buffer window
+ (or buf
+ ;; Out of buffers to display, display a blank one
+ hycontrol--blank-buffer)))))
(defun hycontrol-window-display-buffer-with-repeats (window)
"This is no longer used since Hyperbole V8. Left here for reference.
diff --git a/hyperbole.el b/hyperbole.el
index eed5a3a9d3..72be5db307 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -9,7 +9,7 @@
;; Maintainer: Robert Weiner <rsw@gnu.org>
;; Maintainers: Robert Weiner <rsw@gnu.org>, Mats Lidell <matsl@gnu.org>
;; Created: 06-Oct-92 at 11:52:51
-;; Last-Mod: 23-Aug-24 at 22:36:12 by Bob Weiner
+;; Last-Mod: 11-Nov-24 at 00:03:01 by Bob Weiner
;; Released: 10-Mar-24
;; Version: 9.0.2pre
;; Keywords: comm, convenience, files, frames, hypermedia, languages,
mail, matching, mouse, multimedia, outlines, tools, wp
@@ -522,6 +522,11 @@ frame, those functions by default still return the prior
frame."
(hyperb:init)
(remove-hook 'after-init-hook #'hyperb:init))
;;
+ ;; Update mode-line hover doc in blank areas for button-2 and
+ ;; button-3 if using unshifted Smart Keys.
+ (set-variable mode-line-default-help-echo
#'hmouse-modeline-default-help-echo)
+ (force-mode-line-update t)
+ ;;
;; Abbreviate MSWindows /cygdrive mount point paths.
(when (file-exists-p "/cygdrive")
(add-to-list 'directory-abbrev-alist hyperb:cygdrive))
diff --git a/hyrolo.el b/hyrolo.el
index 608875dd94..729d0570da 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 7-Jun-89 at 22:08:29
-;; Last-Mod: 13-Oct-24 at 15:37:40 by Bob Weiner
+;; Last-Mod: 3-Nov-24 at 09:37:58 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -1996,8 +1996,12 @@ Return number of matching entries found."
(setq incl-hdr nil
max-matches (- max-matches)))))
(set-buffer actual-buf)
- (when new-buf-flag
- (setq buffer-read-only t))
+
+ ;; Comment out next two lines that could set source buffer
+ ;; to read-only since this can break org-capture into the
+ ;; buffer. -- rsw, 2024-11-03
+ ;; (when new-buf-flag
+ ;; (setq buffer-read-only t))
(when (and headline-only
(not (string-match (concat "\\`\\(" (regexp-quote "^")
"\\|" (regexp-quote "\\`") "\\)") pattern)))
diff --git a/hywiki.el b/hywiki.el
index 57accd7add..2327170a30 100644
--- a/hywiki.el
+++ b/hywiki.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Apr-24 at 22:41:13
-;; Last-Mod: 28-Oct-24 at 01:43:34 by Bob Weiner
+;; Last-Mod: 10-Nov-24 at 15:44:27 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -142,6 +142,7 @@
(declare-function hsys-org-at-tags-p "hsys-org")
(declare-function org-link-store-props "ol" (&rest plist))
(declare-function org-publish-property "ox-publish" (property project
&optional default))
+(declare-function smart-treemacs-edit "hui-treemacs" (&optional dir))
;;; ************************************************************************
;;; Public variables
@@ -834,10 +835,33 @@ these are handled by the Org mode link handler."
0)))))
(defun hywiki-directory-edit ()
- "Display and edit HyWiki pages in current `hywiki-directory'."
+ "Edit HyWiki pages in current `hywiki-directory'.
+Use `dired' unless `action-key-modeline-buffer-id-function' is set to
+`smart-treemacs-modeline', then use `treemacs'."
(interactive)
- (dired (concat hywiki-directory "[[:upper:]][[:alpha:]]*"
- (regexp-quote hywiki-file-suffix))))
+ (if (eq action-key-modeline-buffer-id-function #'smart-treemacs-modeline)
+ (hywiki-directory-treemacs-edit)
+ (hywiki-directory-dired-edit)))
+
+(defun hywiki-directory-dired-edit ()
+ "Use `dired' to edit HyWiki pages in current `hywiki-directory'."
+ (interactive)
+ (let ((case-fold-search nil)
+ (shell-name (or shell-file-name "")))
+ (if (string-match-p "bash\\(\\.exe\\)?$" shell-name)
+ (dired (concat hywiki-directory
+ "[[:upper:]][[:alpha:]]*"
+ (regexp-quote hywiki-file-suffix)))
+ (dired (cons hywiki-directory
+ (directory-files hywiki-directory nil
+ (format "^[A-Z][A-Za-z]*%s$"
+ (regexp-quote
hywiki-file-suffix))))))))
+
+(defun hywiki-directory-treemacs-edit ()
+ "Use `treemacs' to edit HyWiki pages in current `hywiki-directory'."
+ (interactive)
+ (require 'hui-treemacs)
+ (smart-treemacs-edit hywiki-directory))
(defun hywiki-directory-get-checksum ()
"Compute and return the checksum for the current set of HyWiki pages."
@@ -1149,7 +1173,7 @@ If in a programming mode, must be within a comment. Use
(unless hywiki--highlighting-done-flag
(unless on-page-name
;; May be a closing delimiter that we have to skip past
- (skip-chars-backward (regexp-quote hywiki--buttonize-characters)))
+ (skip-chars-backward (regexp-quote
(hywiki-get-buttonize-characters))))
;; Skip past HyWikiWord or section
(skip-syntax-backward "^-$()<>._\"\'")
(skip-chars-backward "-_*#[:alpha:]")
@@ -1220,7 +1244,7 @@ the current page unless they have sections attached."
(unless hywiki--highlighting-done-flag
(unless on-page-name
;; May be a closing delimiter that we have to skip past
- (skip-chars-backward (regexp-quote
hywiki--buttonize-characters)))
+ (skip-chars-backward (regexp-quote
(hywiki-get-buttonize-characters))))
;; Skip past HyWikiWord or section
(skip-syntax-backward "^-$()<>._\"\'")
(skip-chars-backward "-_*#[:alpha:]")
diff --git a/man/hkey-help.txt b/man/hkey-help.txt
index 6ec097bff3..8ee3f7ba13 100644
--- a/man/hkey-help.txt
+++ b/man/hkey-help.txt
@@ -66,7 +66,7 @@ Mouse-only Control
Buffer ID Dired on buffer's dir Displays next buffer
or on parent when a dir
Other blank area Action Key modeline hook Assist Key modeline
hook
- Shows/Hides Buffer Menu Popups Jump &
Manage Menu
+ Shows/Hides Buffer Menu Popups Screen &
Jump Menus
Drag in window, region active Error, not allowed Error, not allowed
Horizontal drag in a window Splits window below Deletes window
diff --git a/man/hyperbole.info b/man/hyperbole.info
index 4248c9a6da..0e816ea4ac 100644
Binary files a/man/hyperbole.info and b/man/hyperbole.info differ
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index d6447fd7a3..9ffdc046ca 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -7,7 +7,7 @@
@c Author: Bob Weiner
@c
@c Orig-Date: 6-Nov-91 at 11:18:03
-@c Last-Mod: 27-Oct-24 at 23:09:15 by Bob Weiner
+@c Last-Mod: 10-Nov-24 at 16:01:31 by Bob Weiner
@c %**start of header (This is for running Texinfo on a region.)
@setfilename hyperbole.info
@@ -57,6 +57,12 @@
@itemx @bkbd{\key\}
@end macro
+@c In PDF output, like Info output, display only the label of an @uref
+@c or @url link when given.
+@tex
+\global\urefurlonlylinktrue
+@end tex
+
@copying
This manual is for GNU Hyperbole
(Edition @value{EDITION}, Published @value{UPDATED}).
@@ -602,14 +608,14 @@ archives, the World-Wide Web and much more.
@cindex Hyperbole demo
@cindex demo file
@cindex tutorial
-This is a reference manual with extensive details about Hyperbole use. If
-you prefer a simpler, more interactive introduction to Hyperbole, the
-@file{FAST-DEMO} file included in the Hyperbole distribution demonstrates
-many of Hyperbole's standard facilities without the need to read through this
-reference manual. The @file{FAST-DEMO} is a good way to rapidly understand
-some of what Hyperbole can do for you. Once Hyperbole is installed,
-(@pxref{Setup}), you can access the @file{FAST-DEMO} with the key sequence
-@bkbd{C-h h d d}.
+This is a reference manual with extensive details about Hyperbole use.
+If you prefer a simpler, more interactive introduction to Hyperbole,
+the @file{../FAST-DEMO} file included in the Hyperbole distribution
+demonstrates many of Hyperbole's standard facilities without the need
+to read through this reference manual. The @file{../FAST-DEMO} is a good
+way to rapidly understand some of what Hyperbole can do for you. Once
+Hyperbole is installed, (@pxref{Setup}), you can access the
+@file{../FAST-DEMO} with the key sequence @bkbd{C-h h d d}.
@xref{Glossary}, for definitions of Hyperbole terms. In some cases,
terms are not precisely defined within the body of this manual since they
@@ -1027,7 +1033,7 @@ access to HyControl's window control menu if it was not
already bound
prior to Hyperbole's initialization.
Videos demonstrating Hyperbole's features are listed at
-@url{https://gnu.org/s/hyperbole}.
+@uref{https://gnu.org/s/hyperbole}.
The above are the best interactive ways to learn about Hyperbole.
@@ -1390,7 +1396,7 @@ Hyperbole has some radically cool ways to select regions
of structured text
or source code and to copy or move them between buffers with a single mouse
drag or two key presses. A great deal of smarts are built-in so that it
does the right thing most of the time; many other attempts at similar
-behavior such as @file{thing.el} fail to deal with many file format
+behavior such as @file{thingatpt.el} fail to deal with many file format
complexities.
We use the term @dfn{things} to refer to structured entities that
@@ -1826,7 +1832,7 @@ are not supported without a window system.
@cindex keyboard, jump to window
For even faster keyboard-based display of items and drag emulations,
use the Emacs package @code{ace-window}
-(see @url{https://elpa.gnu.org/packages/ace-window.html}).
+(see @uref{https://elpa.gnu.org/packages/ace-window.html}).
The @dfn{ace-window} package assigns short letter IDs to each Emacs
window and lets you jump to or operate upon a specific window by giving
@@ -2331,7 +2337,7 @@ Below is a list of standard implicit button types in the
order in
which Hyperbole tries to match to the types when looking for an
implicit button (decreasing priority order). @bkbd{C-h h i t
@key{RET}} provides similar information. See the Hyperbole file,
-@file{hibtypes.el}, for examples of how to define implicit button
+@file{../hibtypes.el}, for examples of how to define implicit button
types (in the file, they are listed in reverse order, increasing in
priority).
@@ -2798,11 +2804,11 @@ associated section. Or try it in the Hyperbole
@file{DEMO} file.
@cindex C/C++ cross-reference
@cindex Cscope
@item cscope
-Jump to a C/C++ source line associated with a Cscope C analyzer output line.
-The cscope.el Lisp library available from the Emacs package manager
-must be loaded and the open source cscope program available from
-http://cscope.sf.net must be installed for this button type to do
-anything.
+Jump to a C/C++ source line associated with a Cscope C analyzer output
+line. The cscope.el Lisp library available from the Emacs package
+manager must be loaded and the open source cscope program available
+from @uref{http://cscope.sf.net} must be installed for this button
+type to do anything.
@findex ibtypes etags
@cindex etags entry
@@ -4331,7 +4337,7 @@ Web/ - Select a search engine and term and
search with them or
which determines whether web search results are displayed
within Emacs or with an external web browser. A short
video introduction to the Find/Web menu may be
- found at @url{https://youtu.be/8lMlJed0-OM}.
+ found at @uref{https://youtu.be/8lMlJed0-OM}.
The Find/Web menu looks like this:
@@ -4620,33 +4626,54 @@ many files with interactive search pattern narrowing.
@noindent
Below are descriptions of each menu item.
-@findex hywiki-consult-grep
@cindex HyWiki menu
@cindex menu, HyWiki
@table @asis
+@cindex HyWiki activate link
@item Act
Activate HyWikiWord link at point.
+@cindex HyWiki create a page
@item Create
-Create and display a new HyWiki page. Shows existing page names to aid in new
naming.
+Create and display a new HyWiki page. Shows existing page names to
+aid in new naming.
+@vindex hywiki-directory
+@vindex action-key-modeline-buffer-id-function
+@findex dired
+@findex smart-treemacs-modeline
+@findex treemacs
+@cindex HyWiki dired
+@cindex HyWiki treemacs
+@cindex HyWiki edit pages
@item EditPages
-Display and edit HyWiki pages in current @code{hywiki-directory}.
+Display and edit HyWiki pages in current @code{hywiki-directory}. Use
+@code{dired} unless @code{action-key-modeline-buffer-id-function} is
+set to @code{smart-treemacs-modeline}, then use the @code{treemacs}
+package.
+
+@cindex HyWiki find/edit a page
@item FindPage
Prompt with completion for and find a HyWiki page, typically editable.
If the page is already in a buffer, point is left unchanged.
+@cindex HyWiki interactive grep
+@findex hywiki-consult-grep
@item GrepConsult
Grep over HyWiki pages with interactive @code{hywiki-consult-grep}.
Any words may be used.
+@cindex HyWikiWord attribute help
@item Help
Report on a HyWikiWord's attributes.
+@cindex HyWiki documentation
+@cindex HyWiki manual
@item Info
Display Hyperbole manual section on HyWiki.
+@cindex HyWikiWord link
@item Link
Prompt for and add a link at point to a HyWiki page.
@@ -4676,14 +4703,17 @@ undefined HyWikiWords; otherwise, you must use
@bkbd{C-h h h c} to create a
new HyWiki page instead. Use @samp{None} if you want to
use Org's @bkbd{M-@key{RET}} command in every context within Org mode.
+@cindex HyWiki publish to web
@item Publish
Publish modified pages in the HyWiki to HTML; prefix arg to publish all pages.
-@cindex HyWiki tag search
+@cindex HyWiki search for Org tags
@cindex search, HyWiki tag
@item TagFind
Find a matching Org tag across all HyWiki pages.
+@cindex HyWikiWord interactive grep
+@findex hywiki-consult-grep
@item WikiWordConsult
Use @code{hywiki-consult-grep} to prompt for a HyWikiWord and then
consult grep for and select an occurrence within the HyWiki.
@@ -5924,7 +5954,7 @@ have alphanumeric statement identifiers on the right
side. You can
import such files while maintaining their outline structure. Use
@bkbd{M-x kimport:aug-post-outline @key{RET}} and you will be
prompted for the Augment buffer or file to import and the koutline to
-create. See @url{https://dougengelbart.org/content/view/148/} for more
+create. See @uref{https://dougengelbart.org/content/view/148/} for more
information.
@node Exporting, , Inserting and Importing, Editing Outlines
@@ -6966,7 +6996,7 @@ If you use Google/Gmail Contacts, you can configure the
HyRolo to
query your Google Contacts for matches. First you must download and
install the external @file{google-contacts} package using the Emacs
Package Manager. Then you must install the non-Emacs GNU Privacy
-Guard (GPG) package from @url{https://gnupg.org} so that
+Guard (GPG) package from @uref{https://gnupg.org} so that
the @file{gpg} or @file{gpg2} executable is in your command-line
search path. Once these are in place, either restart Emacs or
use @bkbd{M-x hyrolo-initialize-file-list @key{RET}} to add Google
@@ -8289,7 +8319,7 @@ the current buffer. This number makes the label unique
and so allows
any number of buttons with the same base label within a single buffer.
@item Jedi
-See also @url{https://tkf.github.io/emacs-jedi/latest/}.
+See also @uref{https://tkf.github.io/emacs-jedi/latest/}.
Jedi is a Emacs package for Python completion, definition and documentation
lookup.
@@ -8375,7 +8405,7 @@ See @b{Augment}.
See @b{Link} or @b{Cell}.
@item The OO-Browser
-See also @url{https://www.gnu.org/software/oo-browser}.
+See also @uref{https://www.gnu.org/software/oo-browser}.
The GNU OO-Browser is a multi-windowed, interactive object-oriented class
browser similar in use to the well-known Smalltalk browsers. It runs
@@ -8721,12 +8751,12 @@ Download either:
@table @asis
@item 1. a stable release tar.gz source archive from either:
-@url{ftp://ftp.gnu.org/gnu/hyperbole/} or
-@url{http://ftpmirror.gnu.org/hyperbole/}, which will find the closest
+@uref{ftp://ftp.gnu.org/gnu/hyperbole/} or
+@uref{http://ftpmirror.gnu.org/hyperbole/}, which will find the closest
mirror of the GNU ftp site and show it to you.
@item 2. the latest in-development pre-release tar.gz source archive linked to
at the top of this web page:
-@url{https://elpa.gnu.org/devel/hyperbole.html}.
+@uref{https://elpa.gnu.org/devel/hyperbole.html}.
@end table
Then decompress and unpack the archive to a directory of your
@@ -10558,18 +10588,16 @@ Treemacs items may be dragged with the Action Key to
other windows for display.
@group
When in a Treemacs file browser buffer:
ACTION KEY or ASSIST KEY
- (1) on an entry icon, the treemacs TAB command is run to expand and
- collapse the entry;
- (2) elsewhere within an entry line, the item is displayed for editing,
- normally in another window;
- (3) at the end of an entry line: if an Action Key press, invokes
+ (1) on or to the left of an entry icon, run the treemacs TAB command
+ to expand or collapse the entry;
+ (2) elsewhere within an entry line, display the item, which may be a
+ directory, for editing, normally in another window;
+ (3) at the end of an entry line: if an Action Key press, invoke
@code{action-key-eol-function}, typically to scroll up proportionally;
- if an Assist Key press, invokes @code{assist-key-eol-function},
typically
+ if an Assist Key press, invoke @code{assist-key-eol-function},
typically
to scroll down proportionally;
- (4) on the first line of the buffer (other than the end of line),
- dired is run on the current directory of this Treemacs;
- (5) at the end of the first or last line of the buffer,
- this Treemacs invocation is quit.
+ (4) at the end of the first or last line of the buffer, quit this
+ Treemacs invocation.
@end group
@end format
@@ -12098,7 +12126,7 @@ more deeply. In fact, it makes sense to use them
together and they
are highly compatible. The only overlap we see is that Org-mode has a
more limited kind of hyperlinks and offers some BBDB integration as
Hyperbole does. For a list of some differences, see:
-@url{https://www.emacswiki.org/emacs/Hyperbole}.
+@uref{https://www.emacswiki.org/emacs/Hyperbole}.
Org-mode offers traditional Emacs outlining, todo list management,
agenda and diary management, so it is very complementary to Hyperbole.
- [elpa] externals/hyperbole updated (3555e549f8 -> 9ebfcfe2e3), ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 4571614bc5 11/14: Merge branch 'master' into make-comment-work-as-an-info-ibut, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 742ccea3ff 13/14: Merge branch 'master' into rsw, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 2ec382cdaf 03/14: Add test case for verifying property is updated on edit, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole aecb4ec856 06/14: Revert "Use plain star wildcard and add a test", ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 1dd924149f 05/14: Handle hooks to mimic redisplay behavior, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 74e7c4eb4e 07/14: make comment text into an ibut, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 9f2eff61f2 10/14: Merge pull request #600 from rswgnu/add-more-hywiki-tests, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 498f28757c 12/14: Merge pull request #601 from rswgnu/make-comment-work-as-an-info-ibut, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 8a5b3e2327 01/14: Add hywiki-word-is-p test, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 9ebfcfe2e3 14/14: Merge pull request #602 from rswgnu/rsw,
ELPA Syncer <=
- [elpa] externals/hyperbole 68e68cd893 09/14: hyrolo.el (hyrolo-grep-file) - Fix bug (gh#rswgnu/hyperbole/599), ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole a535696bb4 08/14: Support latest Treemacs and HyWiki page navigation with it, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole 12d84d101f 04/14: Call hook function explicitly to simulate interactive use, ELPA Syncer, 2024/11/11
- [elpa] externals/hyperbole c98bdbf501 02/14: Use plain star wildcard and add a test, ELPA Syncer, 2024/11/11