branch: externals/hyperbole commit 0798e16ab0765f28fed51bb720f388765a5997a9 Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
Fix doc on switch of cross-window drags create ibuts with Action Key. Add example of ERT test action buttons to DEMO, FAST-DEMO and the manual. Add ERT test action button support for ert-deftext-async definitions from the "ert-async.el" package. Fix smart-lisp tag finding to exclude outside <> chars when are part of action buttons. Fix text-toc actype to only match to given text at the start of a heading. --- ChangeLog | 21 +++++++ DEMO | 7 +++ FAST-DEMO | 5 ++ hactypes.el | 9 ++- hibtypes.el | 19 ++++-- hmouse-tag.el | 36 +++++++----- hui.el | 11 ++-- hypb-ert.el | 21 ++++--- man/hyperbole.html | 168 +++++++++++++++++++++++++++-------------------------- man/hyperbole.info | Bin 619947 -> 619816 bytes man/hyperbole.pdf | Bin 1373590 -> 1373479 bytes man/hyperbole.texi | 146 ++++++++++++++++++++++++---------------------- 12 files changed, 254 insertions(+), 189 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7039b47407..d01e670f6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2023-12-28 Bob Weiner <r...@gnu.org> + +* hypb-ert.el (hypb-ert-def-at-p): Add support for `ert-deftest-async' from the + "ert-async.el" package. + +* hactypes.el (text-toc): Tighten section matching by ensuring it matches to the + beginning of the text of the line aside from any initial whitespace. + Previously, it could match to any part of the line and was not regexp-quoted, + leading to occasional mis-matches. + +* hmouse-tag.el (smart-lisp-at-non-htype-tag-p): Fix to remove any action button + trailing '>' character. Already removed any leading '<'. Match to symbol + and word chars between <> to handle all action button labels. + hibtypes.el (action): Add support for executing ert-deftests and update doc + string for this. + man/hyperbole.texi (Action Buttons): + DEMO (Using Action Buttons): + FAST-DEMO (Action Buttons): Add example action button of a Hyperbole ert test. + man/hyperbole.texi (By Dragging): Eliminate repeated paragraph and update mouse + key references. + 2023-12-27 Bob Weiner <r...@gnu.org> * hmouse-drv.el (hkey-window-link): Invert the meaning of the prefix arg, so without diff --git a/DEMO b/DEMO index c34724dd8f..dea93b59ec 100644 --- a/DEMO +++ b/DEMO @@ -828,6 +828,13 @@ brackets, < >, and come in three types: <$hbut:max-len> + 4. ert-deftest tests - these consist of the test name only as tests take + no arguments, e.g. + + <hbut-tests-ibut-insert-kbd-key> + + This runs one of the Hyperbole regression tests. + An Action Button is recognized only if the first name within the angle brackets is an existing action type or Emacs Lisp symbol. Otherwise, other implicit button types will be tested and may activate instead. diff --git a/FAST-DEMO b/FAST-DEMO index 9e67cf95b8..becac6b553 100644 --- a/FAST-DEMO +++ b/FAST-DEMO @@ -330,6 +330,11 @@ pspell-config(1) - prints information about a libpspell installation Display a Hyperbole Koutline starting from cell 3b10 with lines per cell clipped to 2. + <hbut-tests-ibut-insert-kbd-key> + + Run one of the Hyperbole regression tests. Thus, tests defined with + the Emacs Regression Test framework using `ert-deftest' work too. + ** Many More Implicit Button Types to Learn Across Time diff --git a/hactypes.el b/hactypes.el index cad2b42fc5..f881cca010 100644 --- a/hactypes.el +++ b/hactypes.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 23-Sep-91 at 20:34:36 -;; Last-Mod: 26-Dec-23 at 14:19:50 by Bob Weiner +;; Last-Mod: 28-Dec-23 at 11:55:42 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -745,10 +745,13 @@ Optional SECTIONS-START limits toc entries to those after that point." (goto-char opoint)))) (defact text-toc (section) - "Jump to the text file SECTION referenced by a table of contents entry at point." + "Jump to the text file SECTION referenced by a table of contents entry at point. +SECTION is a string and can be just the leading part of a section heading." (interactive "sGo to section named: ") (when (stringp section) - (actypes::link-to-regexp-match section 2 (current-buffer) t)) + (actypes::link-to-regexp-match + (concat "^[ \t]*" (regexp-quote section)) + 2 (current-buffer) t)) (while (and (= (forward-line -1) 0) (looking-at "[ \t]*[-=][-=]"))) (forward-line 1) diff --git a/hibtypes.el b/hibtypes.el index 8825e147a6..00ccf856d9 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 19-Sep-91 at 20:45:31 -;; Last-Mod: 21-Dec-23 at 13:12:35 by Bob Weiner +;; Last-Mod: 28-Dec-23 at 18:27:19 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1465,14 +1465,16 @@ original DEMO file." (defib action () "The Action Button type. At point, activate any of: an Elisp variable, a Hyperbole -action-type, or an Elisp function call surrounded by <> rather -than (). +action-type, an Elisp function call or an Ert test name +surrounded by <> rather than (). + If an Elisp variable, display a message showing its value. There may not be any <> characters within the expression. The first identifier in the expression must be an Elisp variable, -action type or a function symbol to call, i.e. '<'actype-or-elisp-symbol -arg1 ... argN '>'. For example, <mail nil \"u...@somewhere.org\">." +action type, function symbol to call or test to execute, i.e. +'<'actype-or-elisp-symbol arg1 ... argN '>'. For example, +<mail nil \"u...@somewhere.org\">." (let ((hbut:max-len 0) (lbl-key (hattr:get 'hbut:current 'lbl-key)) (start-pos (hattr:get 'hbut:current 'lbl-start)) @@ -1510,7 +1512,8 @@ arg1 ... argN '>'. For example, <mail nil \"u...@somewhere.org\">." actype-sym) (and (setq actype-sym (intern-soft actype)) (or (fboundp actype-sym) (boundp actype-sym) - (special-form-p actype-sym)) + (special-form-p actype-sym) + (ert-test-boundp actype-sym)) actype-sym))) (when actype ;; For <hynote> buttons, need to double quote each argument so @@ -1539,6 +1542,10 @@ arg1 ... argN '>'. For example, <mail nil \"u...@somewhere.org\">." ;; Is a variable, display its value as the action (setq args `(',actype) actype #'display-variable)) + ((and (null args) (symbolp actype) (ert-test-boundp actype)) + ;; Is an ert-deftest, display the value from executing it + (setq actype #'display-value + args `('(hypb-ert-run-test ,lbl)))) (t ;; All other expressions, display the action result in the minibuffer (setq actype #'display-value diff --git a/hmouse-tag.el b/hmouse-tag.el index dbd039e5aa..9677a8feb3 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 24-Aug-91 -;; Last-Mod: 1-Dec-23 at 23:32:23 by Mats Lidell +;; Last-Mod: 28-Dec-23 at 11:16:10 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -821,23 +821,29 @@ Return nil when point is on the first line of a non-alias Lisp definition." (looking-at "\"\\|\\$[{(]\\|[{]\\$]")) (when (and (looking-at smart-lisp-identifier) ;; Ignore any punctuation matches. - (save-match-data - (not (string-match "\\`[-<>*]+\\'" (match-string 0))))) + (not (string-match-p "\\`[-<>*]+\\'" (match-string 0)))) ;; Ignore any leading '<' character from action buttons or ;; other links, i.e. only when followed by an alphabetic character. - (when (and (eq (following-char) ?\<) (eq ?w (char-syntax (1+ (point))))) - (goto-char (1+ (point)))) - (if no-flash - (if (eq (char-after (1- (match-end 0))) ?:) - (buffer-substring-no-properties (point) (1- (match-end 0))) - (buffer-substring-no-properties (point) (match-end 0))) - (if (eq (char-after (1- (match-end 0))) ?:) + (let* ((action-button-prefix-flag + (and (eq (following-char) ?\<) + (memq (char-syntax (1+ (point))) '(?_ ?w)))) + (suffix-flag + (or (eq (char-after (1- (match-end 0))) ?:) + (and action-button-prefix-flag + (eq (char-after (1- (match-end 0))) ?\>))))) + (when action-button-prefix-flag + (goto-char (1+ (point)))) + (if no-flash + (if suffix-flag + (buffer-substring-no-properties (point) (1- (match-end 0))) + (buffer-substring-no-properties (point) (match-end 0))) + (if suffix-flag + (smart-flash-tag + (buffer-substring-no-properties (point) (1- (match-end 0))) + (point) (1- (match-end 0))) (smart-flash-tag - (buffer-substring-no-properties (point) (1- (match-end 0))) - (point) (1- (match-end 0))) - (smart-flash-tag - (buffer-substring-no-properties (point) (match-end 0)) - (point) (match-end 0))))))))) + (buffer-substring-no-properties (point) (match-end 0)) + (point) (match-end 0)))))))))) ;;;###autoload (defun smart-lisp-mode-p () diff --git a/hui.el b/hui.el index e45746d2f1..07d98fc489 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: 27-Dec-23 at 23:57:10 by Bob Weiner +;; Last-Mod: 28-Dec-23 at 21:34:45 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1138,8 +1138,9 @@ If an explicit button already exists at point, replace it with the new link button and return t; otherwise, return nil. With optional DEPRESS-WINDOW and RELEASE-WINDOW, use the points -from those instead. See also documentation for -`hui:link-possible-types'." +from those instead. See also documentation for `hui:link-possible-types'. + +An Assist Mouse Key drag between windows (when not on an item) runs this command." (interactive (progn ;; Clear smart key variables so this does not ;; improperly reference values left over from a prior @@ -1241,9 +1242,7 @@ With optional NAME-ARG-FLAG (interactively, the prefix argument set to anything other than a single C-u (list 4)), prompt for a name to precede the implicit button. -An Action Mouse Key drag between windows runs this command. -Alternatively, to swap buffers between two windows, Assist Mouse Key -drag from a window to another window's modeline." +An Action Mouse Key drag between windows (when not on an item) runs this command." (interactive (progn ;; Clear smart key variables so this does not ;; improperly reference values left over from a prior diff --git a/hypb-ert.el b/hypb-ert.el index 759ea5e37f..639c2f3ede 100644 --- a/hypb-ert.el +++ b/hypb-ert.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> and Bob Weiner <r...@gnu.org> ;; ;; Orig-Date: 31-Mar-21 at 21:11:00 -;; Last-Mod: 16-Jul-23 at 23:47:09 by Bob Weiner +;; Last-Mod: 28-Dec-23 at 15:33:38 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -52,7 +52,8 @@ (user-error "Invalid test name: %s" test-name)))) (defun hypb-ert-run-tests (test-selector) - "Run the specified TEST-SELECTOR defined ert test." + "Run the specified TEST-SELECTOR defined ert test. +See documentation for `ert-select-tests' for TEST-SELECTOR types." (hypb-ert-require-libraries) (hypb-ert (regexp-quote test-selector))) @@ -65,8 +66,12 @@ (defun hypb-ert-require-libraries () (mapc #'require (hypb-ert-get-require-symbols))) -(defal hyperbole-run-test "hypb-ert-run-test") -(defal hyperbole-run-tests "hypb-ert-run-tests") +(defal hyperbole-run-test "hypb-ert-run-test" + "Run a Hyperbole regression test by double-quoted string name.") + +(defal hyperbole-run-tests "hypb-ert-run-tests" + "Run a set of Hyperbole regression tests given by TEST-SELECTOR. +See documentation for `ert-select-tests' for TEST-SELECTOR types.") (defun hypb-ert-run-all-tests () "Run every ert test." @@ -85,11 +90,11 @@ '(?\( ?\) ?\[ ?\] ?{ ?} ?< ?>))) (save-excursion (forward-line 0) - (when (looking-at (concat "(ert-deftest[ \t]+\\(" - lisp-mode-symbol-regexp - "\\)[ \t]+(")) + (when (looking-at (concat "(ert-deftest\\(-async\\)?[ \t]+" + "\\(" lisp-mode-symbol-regexp "\\)" + "\\s-*(")) (if start-end-flag - (list (match-string-no-properties 1) (match-beginning 1) (match-end 1)) + (list (match-string-no-properties 2) (match-beginning 2) (match-end 2)) (match-string-no-properties 1)))))) (defun hypb-ert-run-test-at-definition (test-name &optional debug-it) diff --git a/man/hyperbole.html b/man/hyperbole.html index a9e9cc8ec3..728182d131 100644 --- a/man/hyperbole.html +++ b/man/hyperbole.html @@ -176,7 +176,7 @@ ul.no-bullet {list-style: none} <ul class="no-bullet"> <li><a name="toc-Creation-Via-Menus" href="#By-Menu">4.7.1.1 Creation Via Menus</a></li> <li><a name="toc-Creation-Via-Buffer-Link" href="#By-Link">4.7.1.2 Creation Via Buffer Link</a></li> - <li><a name="toc-Creation-Via-Action-Key-Drags" href="#By-Dragging">4.7.1.3 Creation Via Action Key Drags</a></li> + <li><a name="toc-Creation-Via-Assist-Key-Drags" href="#By-Dragging">4.7.1.3 Creation Via Assist Key Drags</a></li> </ul></li> <li><a name="toc-Renaming-1" href="#Renaming">4.7.2 Renaming</a></li> <li><a name="toc-Deletion-1" href="#Deletion">4.7.3 Deletion</a></li> @@ -596,11 +596,11 @@ Utilizing Explicit Buttons Creation -</pre></th></tr><tr><td align="left" valign="top">• <a href="#By-Menu">By Menu</a>:</td><td> </td><td align="left" valign="top">Creation Via Menus +</pre></th></tr><tr><td align="left" valign="top">• <a href="#By-Menu">By Menu</a>:</td><td> </td><td align="left" valign="top"> </td></tr> <tr><td align="left" valign="top">• <a href="#By-Link">By Link</a>:</td><td> </td><td align="left" valign="top">Creation Via Buffer Link </td></tr> -<tr><td align="left" valign="top">• <a href="#By-Dragging">By Dragging</a>:</td><td> </td><td align="left" valign="top">Creation Via Action Key Drags +<tr><td align="left" valign="top">• <a href="#By-Dragging">By Dragging</a>:</td><td> </td><td align="left" valign="top">Creation Via Assist Key Drags </td></tr> <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment"> @@ -2407,7 +2407,7 @@ needed, see <a href="#Keyboard-Drags">Keyboard Drags</a>. <p>So now you can put a bunch of buffers and files on your screen wherever you like. Typically, a brief visual pulse is shown first at the source item and then in the destination window, to help you see that the transfer -has been made. An Assist Key Drag will move the the item list buffer to +has been made. An Assist Key drag will move the the item list buffer to the destination (swapping buffers), just as it does with other buffers. </p> <hr> @@ -2427,7 +2427,7 @@ Previous: <a href="#Displaying-Items" accesskey="p" rel="prev">Displaying Items< <a name="index-emulation_002c-drag"></a> <a name="index-keyboard-drags"></a> <p>If you run Emacs under a window system and there is no prior key binding -on <kbd>{M-o}</kbd> when you load Hyperbole, then many Action Key drags can be +on <kbd>{M-o}</kbd> when you load Hyperbole, then many Smart Key drags can be emulated from the keyboard. To do so, press <kbd>{M-o}</kbd>, the <code>hkey-operate</code> command, at the button source location, move to the link destination, e.g. with <kbd>{C-x o}</kbd>, and then press <kbd>{M-o}</kbd> @@ -2796,10 +2796,11 @@ will insert a button that links to the current point within that window. two windows visible across two Emacs frames, then the link referent will be to the point in the other, non-selected window. </p> -<p>With more than two windows on screen, Hyperbole will prompt you to choose -the referent window and its associated point to which to link. If the -Ace Window package is installed and active, this will be used to choose -the window; otherwise, you will be prompted to select it by mouse. +<p>With more than two windows on screen, Hyperbole will prompt you to +choose the referent window and its associated point to which to link. +If the Ace Window package is installed and active, this will be used +to choose the window via keyboard; otherwise, you will be prompted to +select it by mouse. </p> <p>Global buttons are actually explicit buttons stored at the end of your personal button file, see <a href="#Button-Files">Button Files</a>. You can always go into that @@ -2888,8 +2889,8 @@ C-h h i l}</kbd> will additionally prompt to add a name or rename the button at point. With more than two windows, Hyperbole will prompt you to choose the referent window and its associated point to which to link. If the Ace Window package is installed and active, this will be used -to choose the window; otherwise, you will be prompted to select it by -mouse. +to choose the window via keyboard; otherwise, you will be prompted to +select it by mouse. </p> <a name="index-activating-implicit-button"></a> <a name="index-menu-item_002c-Ibut_002fAct"></a> @@ -3581,11 +3582,12 @@ e.g. <samp>::</samp> represent the current directory, <samp>.</samp>. Must have least four paths within the variable value for this to work. </p> <a name="index-ibtypes-hyperbole_002drun_002dtest_002ddefinition"></a> -<a name="index-edebug-a-test"></a> +<a name="index-edebugging-tests"></a> <a name="index-debugging-tests"></a> +<a name="index-executing-tests"></a> <a name="index-running-tests"></a> <a name="index-testing"></a> -<a name="index-ert"></a> +<a name="index-ert-tests"></a> <a name="index-Emacs-Regression-Test-framework"></a> </dd> <dt><code>hyperbole-run-test-definition</code></dt> @@ -3632,10 +3634,11 @@ recognize the action to run. button syntax and all button data stored in the button source file, there are <em>action buttons</em>. </p> -<p><em>Action Buttons</em> are a form of implicit buttons that can execute -any existing action types, Emacs Lisp functions or display the values -of Emacs Lisp variables and constants. Such buttons are delimited by -angle brackets, < >, and come in three types: +<a name="index-ert-tests-1"></a> +<p><em>Action Buttons</em> are a form of implicit buttons that can execute any +existing action types, Emacs Lisp functions, Emacs Regression Tests (ERT +tests) or display the values of Emacs Lisp variables and constants. Such +buttons are delimited by angle brackets, < >, and come in four types: </p> <dl compact="compact"> <dt><em>action type invocations</em></dt> @@ -3661,6 +3664,18 @@ predicate whose name ends in ‘<samp>-p</samp>’, then the result is d in the minibuffer. </p> </dd> +<dt><em>test executions</em></dt> +<dd><p>Each of these consists solely of the name of an ERT test defined with +<code>ert-deftest</code> and surrounded by angle brackets, e.g. +</p> +<div class="example"> +<pre class="example"><hbut-tests-ibut-insert-kbd-key> +</pre></div> + +<p>The above example runs a Hyperbole regression test when activated and +shows the pass/fail result in a pop-up buffer. +</p> +</dd> <dt><em>variable displays</em></dt> <dd><p>These consist of an Emacs Lisp variable name only. They display messages with their variable name and value, e.g. @@ -4331,9 +4346,10 @@ Next: <a href="#Renaming" accesskey="n" rel="next">Renaming</a>, Previous: <a hr immediately after creating them or can utilize the Assist Key to verify what buttons do. </p> -<p>If you want to create an explicit link button to somewhere within an Emacs -window, then simply drag with the Action Mouse Key from an editable buffer -(outside of a draggable item) to the target buffer. +<p>If you want to create an explicit link button to somewhere within an +Emacs window, then simply drag with the Assist Mouse Key from an +editable buffer (outside of a draggable item) to the target buffer. +Note, the same Action Mouse Key drag creates an implicit button. </p> <p>Alternatively, the Hyperbole minibuffer menu item, Ebut/Create, will create any type of explicit button, but requires a few steps. @@ -4342,11 +4358,11 @@ create any type of explicit button, but requires a few steps. modification in detail. </p> <table class="menu" border="0" cellspacing="0"> -<tr><td align="left" valign="top">• <a href="#By-Menu" accesskey="1">By Menu</a>:</td><td> </td><td align="left" valign="top">Creation Via Menus +<tr><td align="left" valign="top">• <a href="#By-Menu" accesskey="1">By Menu</a>:</td><td> </td><td align="left" valign="top"> </td></tr> <tr><td align="left" valign="top">• <a href="#By-Link" accesskey="2">By Link</a>:</td><td> </td><td align="left" valign="top">Creation Via Buffer Link </td></tr> -<tr><td align="left" valign="top">• <a href="#By-Dragging" accesskey="3">By Dragging</a>:</td><td> </td><td align="left" valign="top">Creation Via Action Key Drags +<tr><td align="left" valign="top">• <a href="#By-Dragging" accesskey="3">By Dragging</a>:</td><td> </td><td align="left" valign="top">Creation Via Assist Key Drags </td></tr> </table> @@ -4359,8 +4375,6 @@ Next: <a href="#By-Link" accesskey="n" rel="next">By Link</a>, Previous: <a href <a name="Creation-Via-Menus"></a> <h4 class="subsubsection">4.7.1.1 Creation Via Menus</h4> -<a name="index-link-creation-1"></a> -<a name="index-creating-explicit-links"></a> <a name="index-explicit-button-creation"></a> <a name="index-menu_002c-Ebut"></a> <a name="index-menu-item_002c-Explicit_002dButton"></a> @@ -4402,6 +4416,8 @@ Next: <a href="#By-Dragging" accesskey="n" rel="next">By Dragging</a>, Previous: <a name="Creation-Via-Buffer-Link"></a> <h4 class="subsubsection">4.7.1.2 Creation Via Buffer Link</h4> +<a name="index-link-creation-1"></a> +<a name="index-creating-explicit-links"></a> <a name="index-explicit-link-creation"></a> <a name="index-menu-item_002c-Ebut_002fLink"></a> <a name="index-source-point"></a> @@ -4420,7 +4436,8 @@ or create a new one. <p>With more than two windows on screen, Hyperbole will prompt you to choose the referent window and its associated point to which to link. If the Ace Window package is installed and active, this will be used to choose -the window; otherwise, you will be prompted to select it by mouse. +the window via keyboard; otherwise, you will be prompted to select +it by mouse. </p> <hr> <a name="By-Dragging"></a> @@ -4428,55 +4445,45 @@ the window; otherwise, you will be prompted to select it by mouse. <p> Previous: <a href="#By-Link" accesskey="p" rel="prev">By Link</a>, Up: <a href="#Creation" accesskey="u" rel="up">Creation</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Key-Index" title="Index" rel="index">Index</a>]</p> </div> -<a name="Creation-Via-Action-Key-Drags"></a> -<h4 class="subsubsection">4.7.1.3 Creation Via Action Key Drags</h4> +<a name="Creation-Via-Assist-Key-Drags"></a> +<h4 class="subsubsection">4.7.1.3 Creation Via Assist Key Drags</h4> +<a name="index-creating-explicit-links-1"></a> +<a name="index-link-creation-2"></a> <a name="index-mouse-drag_002c-explicit-link-creation"></a> +<a name="index-mouse-drag_002c-link-creation"></a> <a name="index-drag-1"></a> <a name="index-Assist-Key-drag-1"></a> -<p>Alternatively, to create an explicit link button to something -displayed within an Emacs window (the referent), simply drag with the -Assist (not the Action) Mouse Key depressed from an editable source -window to another window with the desired link referent and then -release. The drag must start outside of a draggable item, -see <a href="#Displaying-Items">Displaying Items</a>. Hyperbole will either automatically select -the button type based on the referent context or will prompt you to -select from one of a few possible link types. -</p> -<a name="index-explicit-button-creation-1"></a> -<a name="index-link-creation-2"></a> -<a name="index-creating-explicit-links-1"></a> -<a name="index-mouse-drag_002c-link-creation"></a> -<a name="index-drag-2"></a> -<a name="index-Action-Key-drag"></a> -<p>The most efficient way to create an explicit link button to something -within an Emacs window is to use the Action Mouse Key to drag from an -editable source window to another window with the desired link referent. -The drag must start outside of a draggable item, see <a href="#Displaying-Items">Displaying Items</a>. Hyperbole will prompt for the button text label and then will -either automatically select the button action type based on the referent -context or will prompt you to select from one of a few possible link -types. +<p>Alternatively, to create an explicit link button to a referent +displayed within an Emacs window, simply drag with the Assist (not the +Action) Mouse Key depressed from an editable source window to another +window with the desired link referent and then release. The drag must +start outside of a draggable item, see <a href="#Displaying-Items">Displaying Items</a>. +Hyperbole will either automatically select the button type based on +the referent context or will prompt you to select from one of a few +possible link types. </p> <p>In detail, you should split your current Emacs frame into two windows: one which contains the point at which you want a button to be inserted and another which shows the point to which you want to link. -Depress the Action Mouse Key at the source point for the button (anywhere +Depress the Assist Mouse Key at the source point for the button (anywhere but on a paired delimiter such as double quotes or parentheses). Then -drag to the other window and release the Action Mouse Key at the start +drag to the other window and release the Assist Mouse Key at the start point of the link referent. The process becomes quite simple with a little practice. (See <a href="#By-Menu">Creation Via Menus</a>, for a more detailed explanation of the explicit button creation process). </p> <p>If a region was selected prior to the start of the drag, it is used as -the button label, otherwise, you are prompted for the label. Then -Hyperbole uses the link referent context to determine the type of link to -make. If there are a few different types of links which are applicable -from the context, you will be prompted with a list of the types. Simply -use the Action Key or the first capital letter of the link type to select -one of the type names and to finish the link creation. Hyperbole will -then insert explicit button delimiters around the button label and will -display a message in the minibuffer indicating the button label, its -action/link type, and any arguments, notably the thing to which it links. +the button label; otherwise, you are prompted for the label. +Hyperbole uses the link referent context to determine the type of link +to make. If there are a few different types of links which are +applicable from the context, you will be prompted with a list of the +types. Simply use the Action Key or the first capital letter of the +link type to select one of the type names to finish the link +creation. Hyperbole will then insert explicit button delimiters +around the button label and will display a message in the minibuffer +indicating the button label, its action/link type, and any arguments, +notably the thing to which it links. </p> <p>The following table shows the type of link that will be created based upon the referent context in which the Action Key is released. @@ -8793,9 +8800,9 @@ if any emacs-related terms are unfamiliar to you. <dl compact="compact"> <dt><b>Ace Window</b></dt> <dd><p>Emacs extension package that labels windows with letters and allows -quick selection or other operations on a specific window. Hyperbole -extends this with a number of additional commands like throw a buffer -to a window or replace a windows’s contents. See <a href="#Keyboard-Drags">Keyboard Drags</a>. +quick keyboard selection or other operations on a specific window. +Hyperbole extends this with a number of additional commands like throw +a buffer to a window or replace a windows’s contents. See <a href="#Keyboard-Drags">Keyboard Drags</a>. </p> </dd> <dt><b>Action</b></dt> @@ -10304,11 +10311,11 @@ in <a href="#HyControl">HyControl</a>. <dd><p>Drag Operation: Keyboard emulation of the start and stop of mouse drags to invoke Smart Key actions. This binding is made only if the key is not bound prior to initializing Hyperbole and if Emacs is run -under a window system. If the Ace Window package is loaded, then -Ace Window commands are typically bound to <kbd>{M-o}</kbd> instead. Then -<kbd>{M-o w}</kbd> may be used to quickly create an explicit link button -in the selected window that links to any other window chosen via the -Ace Window prompt. +under a window system. If the Ace Window package is loaded, then Ace +Window commands are typically bound to <kbd>{M-o}</kbd> instead. Then +<kbd>{M-o w}</kbd> may be used to quickly create an implicit link button in +the selected window that links to a referent in any other window +chosen via the Ace Window prompt. </p> <a name="index-key-binding_002c-C_002dh-h"></a> <a name="index-C_002dh-h-2"></a> @@ -11277,7 +11284,7 @@ the thing. <a name="index-Smart-Mouse-Key"></a> <a name="index-Action-Mouse-Key"></a> <a name="index-Assist-Mouse-Key"></a> -<a name="index-drag-3"></a> +<a name="index-drag-2"></a> <a name="index-copy-and-yank"></a> <a name="index-kill-and-yank"></a> <a name="index-yanking"></a> @@ -11442,8 +11449,8 @@ Next: <a href="#Smart-Mouse-Drags-within-a-Window" accesskey="n" rel="next">Smar See <code>hmouse-drag-item-mode-forms</code> for how to allow for draggable items in other modes. (2) Otherwise, creates a new link button at the drag start location, - linked to the drag end location. Action Key creates an ixplicit button; - Assist Key creates an emplicit button. + linked to the drag end location. Action Key creates an implicit button; + Assist Key creates an explicit button. In Hyperbole versions prior to 9, Assist Key drags between windows would swap buffers. In version 9 and above, start or end the drag between @@ -12147,7 +12154,7 @@ markup language), and not at the end of a line: Note that the press must be on the first character of the delimiter of the thing. -<a name="index-Smart-Mouse-Key-1"></a><a name="index-Action-Mouse-Key-1"></a><a name="index-Assist-Mouse-Key-1"></a><a name="index-drag-4"></a><a name="index-copy-and-yank-2"></a><a name="index-kill-and-yank-2"></a><a name="index-yanking-2"></a><a name="index-pasting-a-region-2"></a>There are also drag actions that work on delimited things. If no +<a name="index-Smart-Mouse-Key-1"></a><a name="index-Action-Mouse-Key-1"></a><a name="index-Assist-Mouse-Key-1"></a><a name="index-drag-3"></a><a name="index-copy-and-yank-2"></a><a name="index-kill-and-yank-2"></a><a name="index-yanking-2"></a><a name="index-pasting-a-region-2"></a>There are also drag actions that work on delimited things. If no region is selected, when the Action Mouse Key is dragged from a thing delimiter to another location, it copies the thing and yanks it at the new location. Similarly, the Assist Mouse Key kills the thing at its @@ -14997,7 +15004,6 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><td></td><td valign="top"><a href="#index-action-button-1">action button</a>:</td><td> </td><td valign="top"><a href="#Action-Buttons">Action Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-action-implicit-button">action implicit button</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-Action-Key">Action Key</a>:</td><td> </td><td valign="top"><a href="#Smart-Keys">Smart Keys</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-Action-Key-drag">Action Key drag</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> <tr><td></td><td valign="top"><a href="#index-Action-Key-in-minibuffer">Action Key in minibuffer</a>:</td><td> </td><td valign="top"><a href="#Smart-Key-Argument-Selection">Smart Key Argument Selection</a></td></tr> <tr><td></td><td valign="top"><a href="#index-Action-Key_002c-cell-argument">Action Key, cell argument</a>:</td><td> </td><td valign="top"><a href="#Relocating-and-Copying">Relocating and Copying</a></td></tr> <tr><td></td><td valign="top"><a href="#index-Action-Key_002c-hide-or-show-cell">Action Key, hide or show cell</a>:</td><td> </td><td valign="top"><a href="#Hiding-and-Showing">Hiding and Showing</a></td></tr> @@ -15219,7 +15225,7 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><td></td><td valign="top"><a href="#index-copying-things-to-registers">copying things to registers</a>:</td><td> </td><td valign="top"><a href="#Default-Hyperbole-Bindings">Default Hyperbole Bindings</a></td></tr> <tr><td></td><td valign="top"><a href="#index-create-link-button">create link button</a>:</td><td> </td><td valign="top"><a href="#Keyboard-Drags">Keyboard Drags</a></td></tr> <tr><td></td><td valign="top"><a href="#index-create_002dtime-attribute">create-time attribute</a>:</td><td> </td><td valign="top"><a href="#Cell-Attributes">Cell Attributes</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-creating-explicit-links">creating explicit links</a>:</td><td> </td><td valign="top"><a href="#By-Menu">By Menu</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-creating-explicit-links">creating explicit links</a>:</td><td> </td><td valign="top"><a href="#By-Link">By Link</a></td></tr> <tr><td></td><td valign="top"><a href="#index-creating-explicit-links-1">creating explicit links</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> <tr><td></td><td valign="top"><a href="#index-creating-global-links">creating global links</a>:</td><td> </td><td valign="top"><a href="#Global-Buttons">Global Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-creating-implicit-links">creating implicit links</a>:</td><td> </td><td valign="top"><a href="#Implicit-Buttons">Implicit Buttons</a></td></tr> @@ -15281,9 +15287,8 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><td></td><td valign="top"><a href="#index-double-click">double click</a>:</td><td> </td><td valign="top"><a href="#Smart-Key-Argument-Selection">Smart Key Argument Selection</a></td></tr> <tr><td></td><td valign="top"><a href="#index-drag">drag</a>:</td><td> </td><td valign="top"><a href="#Implicit-Buttons">Implicit Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-drag-1">drag</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-drag-2">drag</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-drag-3">drag</a>:</td><td> </td><td valign="top"><a href="#Thing-Selection">Thing Selection</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-drag-4">drag</a>:</td><td> </td><td valign="top"><a href="#Smart-Key-_002d-Delimited-Things">Smart Key - Delimited Things</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-drag-2">drag</a>:</td><td> </td><td valign="top"><a href="#Thing-Selection">Thing Selection</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-drag-3">drag</a>:</td><td> </td><td valign="top"><a href="#Smart-Key-_002d-Delimited-Things">Smart Key - Delimited Things</a></td></tr> <tr><td></td><td valign="top"><a href="#index-drag-emulation">drag emulation</a>:</td><td> </td><td valign="top"><a href="#Keyboard-Drags">Keyboard Drags</a></td></tr> <tr><td></td><td valign="top"><a href="#index-drag-item">drag item</a>:</td><td> </td><td valign="top"><a href="#Keyboard-Drags">Keyboard Drags</a></td></tr> <tr><td></td><td valign="top"><a href="#index-drag_002c-buffer-menu-item">drag, buffer menu item</a>:</td><td> </td><td valign="top"><a href="#Displaying-Items">Displaying Items</a></td></tr> @@ -15316,7 +15321,7 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><th><a name="Concept-Index_cp_letter-E">E</a></th><td></td><td></td></tr> <tr><td></td><td valign="top"><a href="#index-e_002dmail-address">e-mail address</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-e_002dmail-address-1">e-mail address</a>:</td><td> </td><td valign="top"><a href="#Cell-Attributes">Cell Attributes</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-edebug-a-test">edebug a test</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-edebugging-tests">edebugging tests</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-elink">elink</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-elisp-identifier">elisp identifier</a>:</td><td> </td><td valign="top"><a href="#Smart-Key-_002d-Lisp-Source-Code">Smart Key - Lisp Source Code</a></td></tr> <tr><td></td><td valign="top"><a href="#index-ellipses">ellipses</a>:</td><td> </td><td valign="top"><a href="#View-Specs">View Specs</a></td></tr> @@ -15346,15 +15351,16 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><td></td><td valign="top"><a href="#index-environment-variables">environment variables</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-environment-variables-1">environment variables</a>:</td><td> </td><td valign="top"><a href="#Link-Variable-Substitution">Link Variable Substitution</a></td></tr> <tr><td></td><td valign="top"><a href="#index-equalize-windows">equalize windows</a>:</td><td> </td><td valign="top"><a href="#HyControl">HyControl</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-ert">ert</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ert-tests">ert tests</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ert-tests-1">ert tests</a>:</td><td> </td><td valign="top"><a href="#Action-Buttons">Action Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-etags-entry">etags entry</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-exchanging-cells">exchanging cells</a>:</td><td> </td><td valign="top"><a href="#Transposing">Transposing</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-executing-tests">executing tests</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> <tr><td></td><td valign="top"><a href="#index-exit-HyControl">exit HyControl</a>:</td><td> </td><td valign="top"><a href="#HyControl">HyControl</a></td></tr> <tr><td></td><td valign="top"><a href="#index-expanding">expanding</a>:</td><td> </td><td valign="top"><a href="#Hiding-and-Showing">Hiding and Showing</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button">explicit button</a>:</td><td> </td><td valign="top"><a href="#Buttons">Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button-1">explicit button</a>:</td><td> </td><td valign="top"><a href="#Explicit-Buttons">Explicit Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button-creation">explicit button creation</a>:</td><td> </td><td valign="top"><a href="#By-Menu">By Menu</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-explicit-button-creation-1">explicit button creation</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button-deletion">explicit button deletion</a>:</td><td> </td><td valign="top"><a href="#Deletion">Deletion</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button-editing">explicit button editing</a>:</td><td> </td><td valign="top"><a href="#Editing">Editing</a></td></tr> <tr><td></td><td valign="top"><a href="#index-explicit-button-formats">explicit button formats</a>:</td><td> </td><td valign="top"><a href="#Operational-and-Storage-Formats">Operational and Storage Formats</a></td></tr> @@ -15672,7 +15678,7 @@ Previous: <a href="#Function" accesskey="p" rel="prev">Function</a>, Up: <a href <tr><td></td><td valign="top"><a href="#index-link-button">link button</a>:</td><td> </td><td valign="top"><a href="#Keyboard-Drags">Keyboard Drags</a></td></tr> <tr><td></td><td valign="top"><a href="#index-link-button-1">link button</a>:</td><td> </td><td valign="top"><a href="#Explicit-Buttons">Explicit Buttons</a></td></tr> <tr><td></td><td valign="top"><a href="#index-link-creation">link creation</a>:</td><td> </td><td valign="top"><a href="#Implicit-Buttons">Implicit Buttons</a></td></tr> -<tr><td></td><td valign="top"><a href="#index-link-creation-1">link creation</a>:</td><td> </td><td valign="top"><a href="#By-Menu">By Menu</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-link-creation-1">link creation</a>:</td><td> </td><td valign="top"><a href="#By-Link">By Link</a></td></tr> <tr><td></td><td valign="top"><a href="#index-link-creation-2">link creation</a>:</td><td> </td><td valign="top"><a href="#By-Dragging">By Dragging</a></td></tr> <tr><td></td><td valign="top"><a href="#index-link-display">link display</a>:</td><td> </td><td valign="top"><a href="#Referent-Display">Referent Display</a></td></tr> <tr><td></td><td valign="top"><a href="#index-link-to-explicit-button">link to explicit button</a>:</td><td> </td><td valign="top"><a href="#Implicit-Button-Types">Implicit Button Types</a></td></tr> diff --git a/man/hyperbole.info b/man/hyperbole.info index 762f3af51d..4da9663da7 100644 Binary files a/man/hyperbole.info and b/man/hyperbole.info differ diff --git a/man/hyperbole.pdf b/man/hyperbole.pdf index 418e5bab13..2e84a229da 100644 Binary files a/man/hyperbole.pdf and b/man/hyperbole.pdf differ diff --git a/man/hyperbole.texi b/man/hyperbole.texi index 6b89e52a1e..3e5fb9737f 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: 28-Dec-23 at 00:49:57 by Bob Weiner +@c Last-Mod: 28-Dec-23 at 21:47:55 by Bob Weiner @c %**start of header (This is for running Texinfo on a region.) @setfilename hyperbole.info @@ -342,9 +342,9 @@ Utilizing Explicit Buttons Creation -* By Menu:: Creation Via Menus +* By Menu:: * By Link:: Creation Via Buffer Link -* By Dragging:: Creation Via Action Key Drags +* By Dragging:: Creation Via Assist Key Drags Koutliner @@ -1744,7 +1744,7 @@ needed, @pxref{Keyboard Drags}. So now you can put a bunch of buffers and files on your screen wherever you like. Typically, a brief visual pulse is shown first at the source item and then in the destination window, to help you see that the transfer -has been made. An Assist Key Drag will move the the item list buffer to +has been made. An Assist Key drag will move the the item list buffer to the destination (swapping buffers), just as it does with other buffers. @node Keyboard Drags, , Displaying Items, Dragging Buffers @@ -1758,7 +1758,7 @@ the destination (swapping buffers), just as it does with other buffers. @cindex emulation, drag @cindex keyboard drags If you run Emacs under a window system and there is no prior key binding -on @bkbd{M-o} when you load Hyperbole, then many Action Key drags can be +on @bkbd{M-o} when you load Hyperbole, then many Smart Key drags can be emulated from the keyboard. To do so, press @bkbd{M-o}, the @code{hkey-operate} command, at the button source location, move to the link destination, e.g.@: with @bkbd{C-x o}, and then press @bkbd{M-o} @@ -2126,10 +2126,11 @@ If you have exactly two Emacs windows in your current frame or exactly two windows visible across two Emacs frames, then the link referent will be to the point in the other, non-selected window. -With more than two windows on screen, Hyperbole will prompt you to choose -the referent window and its associated point to which to link. If the -Ace Window package is installed and active, this will be used to choose -the window; otherwise, you will be prompted to select it by mouse. +With more than two windows on screen, Hyperbole will prompt you to +choose the referent window and its associated point to which to link. +If the Ace Window package is installed and active, this will be used +to choose the window via keyboard; otherwise, you will be prompted to +select it by mouse. Global buttons are actually explicit buttons stored at the end of your personal button file, @pxref{Button Files}. You can always go into that @@ -2212,8 +2213,8 @@ C-h h i l} will additionally prompt to add a name or rename the button at point. With more than two windows, Hyperbole will prompt you to choose the referent window and its associated point to which to link. If the Ace Window package is installed and active, this will be used -to choose the window; otherwise, you will be prompted to select it by -mouse. +to choose the window via keyboard; otherwise, you will be prompted to +select it by mouse. @cindex activating implicit button @cindex menu item, Ibut/Act @@ -2879,11 +2880,12 @@ e.g. @file{::} represent the current directory, @file{.}. Must have at least four paths within the variable value for this to work. @findex ibtypes hyperbole-run-test-definition -@cindex edebug a test +@cindex edebugging tests @cindex debugging tests +@cindex executing tests @cindex running tests @cindex testing -@cindex ert +@cindex ert tests @cindex Emacs Regression Test framework @item hyperbole-run-test-definition With an Action Key press on the name in the first line of an ert test @@ -2920,10 +2922,11 @@ For times when you need a cross between the two, with a universal button syntax and all button data stored in the button source file, there are @emph{action buttons}. -@dfn{Action Buttons} are a form of implicit buttons that can execute -any existing action types, Emacs Lisp functions or display the values -of Emacs Lisp variables and constants. Such buttons are delimited by -angle brackets, < >, and come in three types: +@cindex ert tests +@dfn{Action Buttons} are a form of implicit buttons that can execute any +existing action types, Emacs Lisp functions, Emacs Regression Tests (ERT +tests) or display the values of Emacs Lisp variables and constants. Such +buttons are delimited by angle brackets, < >, and come in four types: @table @dfn @item action type invocations @@ -2947,6 +2950,17 @@ return value is silently ignored. But if a function is a boolean predicate whose name ends in @samp{-p}, then the result is displayed in the minibuffer. +@item test executions +Each of these consists solely of the name of an ERT test defined with +@code{ert-deftest} and surrounded by angle brackets, e.g. + +@example +<hbut-tests-ibut-insert-kbd-key> +@end example + +The above example runs a Hyperbole regression test when activated and +shows the pass/fail result in a pop-up buffer. + @item variable displays These consist of an Emacs Lisp variable name only. They display messages with their variable name and value, e.g. @@ -3519,9 +3533,10 @@ Creating explicit buttons is fun and easy. You can always try them out immediately after creating them or can utilize the Assist Key to verify what buttons do. -If you want to create an explicit link button to somewhere within an Emacs -window, then simply drag with the Action Mouse Key from an editable buffer -(outside of a draggable item) to the target buffer. +If you want to create an explicit link button to somewhere within an +Emacs window, then simply drag with the Assist Mouse Key from an +editable buffer (outside of a draggable item) to the target buffer. +Note, the same Action Mouse Key drag creates an implicit button. Alternatively, the Hyperbole minibuffer menu item, Ebut/Create, will create any type of explicit button, but requires a few steps. @@ -3530,16 +3545,14 @@ The next two subsections examine explicit button creation and modification in detail. @menu -* By Menu:: Creation Via Menus +* By Menu:: * By Link:: Creation Via Buffer Link -* By Dragging:: Creation Via Action Key Drags +* By Dragging:: Creation Via Assist Key Drags @end menu @node By Menu, By Link, Creation, Creation @subsubsection Creation Via Menus -@cindex link creation -@cindex creating explicit links @cindex explicit button creation @cindex menu, Ebut @cindex menu item, Explicit-Button @@ -3576,6 +3589,8 @@ delimited label within a buffer as the same button. @node By Link, By Dragging, By Menu, Creation @subsubsection Creation Via Buffer Link +@cindex link creation +@cindex creating explicit links @cindex explicit link creation @cindex menu item, Ebut/Link @cindex source point @@ -3594,58 +3609,48 @@ or create a new one. With more than two windows on screen, Hyperbole will prompt you to choose the referent window and its associated point to which to link. If the Ace Window package is installed and active, this will be used to choose -the window; otherwise, you will be prompted to select it by mouse. +the window via keyboard; otherwise, you will be prompted to select +it by mouse. @node By Dragging, , By Link, Creation -@subsubsection Creation Via Action Key Drags - -@cindex mouse drag, explicit link creation -@cindex drag -@cindex Assist Key drag -Alternatively, to create an explicit link button to something -displayed within an Emacs window (the referent), simply drag with the -Assist (not the Action) Mouse Key depressed from an editable source -window to another window with the desired link referent and then -release. The drag must start outside of a draggable item, -@pxref{Displaying Items}. Hyperbole will either automatically select -the button type based on the referent context or will prompt you to -select from one of a few possible link types. +@subsubsection Creation Via Assist Key Drags -@cindex explicit button creation -@cindex link creation @cindex creating explicit links +@cindex link creation +@cindex mouse drag, explicit link creation @cindex mouse drag, link creation @cindex drag -@cindex Action Key drag -The most efficient way to create an explicit link button to something -within an Emacs window is to use the Action Mouse Key to drag from an -editable source window to another window with the desired link referent. -The drag must start outside of a draggable item, @pxref{Displaying -Items}. Hyperbole will prompt for the button text label and then will -either automatically select the button action type based on the referent -context or will prompt you to select from one of a few possible link -types. +@cindex Assist Key drag +Alternatively, to create an explicit link button to a referent +displayed within an Emacs window, simply drag with the Assist (not the +Action) Mouse Key depressed from an editable source window to another +window with the desired link referent and then release. The drag must +start outside of a draggable item, @pxref{Displaying Items}. +Hyperbole will either automatically select the button type based on +the referent context or will prompt you to select from one of a few +possible link types. In detail, you should split your current Emacs frame into two windows: one which contains the point at which you want a button to be inserted and another which shows the point to which you want to link. -Depress the Action Mouse Key at the source point for the button (anywhere +Depress the Assist Mouse Key at the source point for the button (anywhere but on a paired delimiter such as double quotes or parentheses). Then -drag to the other window and release the Action Mouse Key at the start +drag to the other window and release the Assist Mouse Key at the start point of the link referent. The process becomes quite simple with a little practice. (@xref{By Menu, Creation Via Menus}, for a more detailed explanation of the explicit button creation process). If a region was selected prior to the start of the drag, it is used as -the button label, otherwise, you are prompted for the label. Then -Hyperbole uses the link referent context to determine the type of link to -make. If there are a few different types of links which are applicable -from the context, you will be prompted with a list of the types. Simply -use the Action Key or the first capital letter of the link type to select -one of the type names and to finish the link creation. Hyperbole will -then insert explicit button delimiters around the button label and will -display a message in the minibuffer indicating the button label, its -action/link type, and any arguments, notably the thing to which it links. +the button label; otherwise, you are prompted for the label. +Hyperbole uses the link referent context to determine the type of link +to make. If there are a few different types of links which are +applicable from the context, you will be prompted with a list of the +types. Simply use the Action Key or the first capital letter of the +link type to select one of the type names to finish the link +creation. Hyperbole will then insert explicit button delimiters +around the button label and will display a message in the minibuffer +indicating the button label, its action/link type, and any arguments, +notably the thing to which it links. The following table shows the type of link that will be created based upon the referent context in which the Action Key is released. @@ -7395,9 +7400,10 @@ if any emacs-related terms are unfamiliar to you. @item Ace Window Emacs extension package that labels windows with letters and allows -quick selection or other operations on a specific window. Hyperbole -extends this with a number of additional commands like throw a buffer -to a window or replace a windows's contents. @xref{Keyboard Drags}. +quick keyboard selection or other operations on a specific window. +Hyperbole extends this with a number of additional commands like throw +a buffer to a window or replace a windows's contents. @xref{Keyboard +Drags}. @item Action An executable behavior associated with a Hyperbole button. @dfn{Links} @@ -8706,11 +8712,11 @@ in @ref{HyControl}. Drag Operation: Keyboard emulation of the start and stop of mouse drags to invoke Smart Key actions. This binding is made only if the key is not bound prior to initializing Hyperbole and if Emacs is run -under a window system. If the Ace Window package is loaded, then -Ace Window commands are typically bound to @bkbd{M-o} instead. Then -@bkbd{M-o w} may be used to quickly create an explicit link button -in the selected window that links to any other window chosen via the -Ace Window prompt. +under a window system. If the Ace Window package is loaded, then Ace +Window commands are typically bound to @bkbd{M-o} instead. Then +@bkbd{M-o w} may be used to quickly create an implicit link button in +the selected window that links to a referent in any other window +chosen via the Ace Window prompt. @cindex key binding, C-h h @kitem C-h h @@ -9684,8 +9690,8 @@ Otherwise, if dragged from inside one window to another: See @code{hmouse-drag-item-mode-forms} for how to allow for draggable items in other modes. (2) Otherwise, creates a new link button at the drag start location, - linked to the drag end location. Action Key creates an ixplicit button; - Assist Key creates an emplicit button. + linked to the drag end location. Action Key creates an implicit button; + Assist Key creates an explicit button. In Hyperbole versions prior to 9, Assist Key drags between windows would swap buffers. In version 9 and above, start or end the drag between