[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 9812d9d 1/2: Add Hyperbole menu customization
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 9812d9d 1/2: Add Hyperbole menu customization for Org Smart Key control |
Date: |
Sun, 9 May 2021 01:57:11 -0400 (EDT) |
branch: externals/hyperbole
commit 9812d9d625be45e4ca441552acc2b1e8f1ff96b7
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Add Hyperbole menu customization for Org Smart Key control
In smart-org, only invoke org-meta-return if Hyperbole hkey-either
or action-key are bound to one of the same keys that Org mode binds
that command.
Many other bug fixes, ibtype repriortization and some doc updates.
---
.hypb | Bin 3753 -> 2341 bytes
ChangeLog | 57 +++++++++++++++++
hbdata.el | 80 +++++++++++------------
hbut.el | 71 ++++++++++++---------
hibtypes.el | 108 +++++++++++++++----------------
hmouse-drv.el | 6 +-
hmouse-tag.el | 79 +++++++++++++----------
hsys-org.el | 24 +++++--
hui-menu.el | 29 +++++++--
hui-mini.el | 8 +++
hui-mouse.el | 27 +++++---
hui.el | 4 +-
hypb.el | 6 +-
hyperbole.el | 52 +++++++--------
kotl/kview.el | 6 +-
man/hyperbole.html | 184 ++++++++++++++++++++++++++++-------------------------
man/hyperbole.info | Bin 554562 -> 554837 bytes
man/hyperbole.pdf | Bin 1308551 -> 1309400 bytes
man/hyperbole.texi | 181 +++++++++++++++++++++++++++-------------------------
man/version.texi | 4 +-
20 files changed, 539 insertions(+), 387 deletions(-)
diff --git a/.hypb b/.hypb
index ffc3722..e7f0a59 100644
Binary files a/.hypb and b/.hypb differ
diff --git a/ChangeLog b/ChangeLog
index fe2e2a2..fea0c3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,60 @@
+2021-05-09 Bob Weiner <rsw@gnu.org>
+
+* hsys-org.el (hsys-org-radio-target-at-p,
+ hsys-org-radio-target-link-at-p): Fix to return
+ def or target region.
+
+2021-05-08 Bob Weiner <rsw@gnu.org>
+
+* hsys-org.el (hsys-org-mode-function): Autoload this variable.
+
+* hui-mouse.el (action-key-error, assist-key-error): Document.
+
+* hsys-org.el (hsys-org-meta-return-shared-p): Add to enable full
+ Smart Key functionality in Org mode if either Org or Hyperbole
+ has rebound its M-RET key so there is no need for shared behavior.
+ Affects default setting of hsys-org-enable-smart-keys option.
+
+* hui.el (hui:buf-writable-err): Indicate that buffer is read-only
+ in msg.
+
+* hbut.el (ebut:operate): Fix bug where ebut:operate has been called
+ once, so action key is considered depressed and then one of the
+ hui button commands or gbut:program is invoked independently, in
+ which case the original source location of the depress should be
+ ignored.
+
+* hbdata.el (hbdata:apply-entry): Add '-flag' to last 2 arg names
+ for clarity.
+ (hbdata:delete-entry): Make cross-platform by replacing
+ shell cmd 'rm' with Elisp 'delete-file'.
+
+* hmouse-tag.el (smart-lisp-find-tag, smart-lisp): Add new function
+ smart-lisp-find-tag split out from smart-lisp, so can be used
+ as an actype or bound to a key in lieu of xref-find-definitions.
+
+* hbut.el (ebut:operate): Fix to reuse label text within activated
+ region if point is at the end of the region.
+
+2021-05-07 Bob Weiner <rsw@gnu.org>
+
+* hui-menu.el (hui-menu-options):
+ hui-mini.el (hui:menus): Add Cust/Org-Meta-Return setting to menus.
+
+* man/hyperbole.texi (Smart Key - Smart Scrolling):
+ hui-mouse.el (action-key-eol-function, assist-key-eol-function):
+ Explain how to disable these functions when desired.
+
+* man/hyperbole.texi (Implicit Button Types): Update to new ordering
+ of org-mode, mail-address, hsys-www, and pathname ibtypes. This
+ resolves a bug where URLs are mis-categorized as pathnames.
+ hibtypes.el (hpath:www-at-p, mail-address): Make higher priority
+ than pathname ibtype.
+ hmouse-drv.el (hkey-debug): Send all used vars as params to remove
+ dynamic variable binding.
+ (hkey-execute): Update hkey-debug call.
+
+
2021-05-04 Bob Weiner <rsw@gnu.org>
* man/hyperbole.texi (Manual Stable Release Installation): Add this
diff --git a/hbdata.el b/hbdata.el
index 0db9fe1..4331e14 100644
--- a/hbdata.el
+++ b/hbdata.el
@@ -98,7 +98,7 @@
(defun hbdata:loc-p (hbdata)
"[Hyp V1] Return 'L iff HBDATA referent is within a local file system.
-Returns 'R if remote and nil if irrelevant for button action type."
+Return 'R if remote and nil if irrelevant for button action type."
(nth 1 hbdata))
(defun hbdata:modifier (hbdata)
@@ -143,9 +143,9 @@ Search is case-insensitive. Return list with elements:
;;; ------------------------------------------------------------------------
(defun hbdata:build (&optional mod-lbl-key but-sym)
- "Construct button data from optional MOD-LBL-KEY and BUT-SYM; modifies
BUT-SYM attributes.
+ "Construct button data from optional MOD-LBL-KEY and BUT-SYM; modify BUT-SYM
attributes.
MOD-LBL-KEY nil means create a new entry, otherwise modify existing one.
-Nil BUT-SYM means use 'hbut:current'. If successful, returns a cons of
+Nil BUT-SYM means use 'hbut:current'. If successful, return a cons of
(button-data . button-instance-str), else nil."
(let* ((but)
(b (hattr:copy (or but-sym 'hbut:current) 'but))
@@ -216,7 +216,7 @@ Nil BUT-SYM means use 'hbut:current'. If successful,
returns a cons of
(defun hbdata:get-entry (lbl-key key-src &optional directory)
"Return button data entry given by LBL-KEY, KEY-SRC and optional DIRECTORY.
-Returns nil if no matching entry is found.
+Return nil if no matching entry is found.
A button data entry is a list of attribute values. Use methods from
class 'hbdata' to operate on the entry."
(hbdata:apply-entry
@@ -238,7 +238,7 @@ Nil if LBL-KEY is nil."
(defun hbdata:instance-last (lbl-key key-src &optional directory)
"Return highest instance number for repeated button label.
1 if not repeated, nil if no instance.
-Takes arguments LBL-KEY, KEY-SRC and optional DIRECTORY."
+Utilize arguments LBL-KEY, KEY-SRC and optional DIRECTORY."
(hbdata:apply-entry
(lambda ()
(if (looking-at "[0-9]+")
@@ -247,9 +247,10 @@ Takes arguments LBL-KEY, KEY-SRC and optional DIRECTORY."
lbl-key key-src directory nil 'instance))
(defun hbdata:delete-entry (lbl-key key-src &optional directory)
- "Deletes button data entry given by LBL-KEY, KEY-SRC and optional DIRECTORY.
-Returns entry deleted (a list of attribute values) or nil.
-Use methods from class 'hbdata' to operate on the entry."
+ "Delete button data entry given by LBL-KEY, KEY-SRC and optional DIRECTORY.
+Return entry deleted (a list of attribute values) or nil.
+Use methods from class 'hbdata' to operate on the entry.
+If the hbdata buffer is blank/empty, kill it and remove the associated file."
(hbdata:apply-entry
(lambda ()
(prog1 (read (current-buffer))
@@ -272,7 +273,7 @@ Use methods from class 'hbdata' to operate on the entry."
(let ((fname buffer-file-name))
(erase-buffer) (save-buffer) (kill-buffer nil)
(hbmap:dir-remove (file-name-directory fname))
- (call-process "rm" nil 0 nil "-f" fname))))))))
+ (delete-file fname))))))))
lbl-key key-src directory))
(defun hbdata:delete-entry-at-point ()
@@ -280,7 +281,7 @@ Use methods from class 'hbdata' to operate on the entry."
(defun hbdata:to-entry (but-key key-src &optional directory instance)
"Return button data entry indexed by BUT-KEY, KEY-SRC, optional DIRECTORY.
-Returns nil if entry is not found. Leaves point at start of entry when
+Return nil if entry is not found. Leave point at start of entry when
successful or where entry should be inserted if unsuccessful.
A button entry is a list. Use methods from class 'hbdata' to operate on the
entry. Optional INSTANCE non-nil means search for any button instance matching
@@ -303,17 +304,17 @@ but-key."
;;; ************************************************************************
(defun hbdata:apply-entry (function lbl-key key-src &optional directory
- create instance)
+ create-flag instance-flag)
"Invoke FUNCTION with point at hbdata entry given by LBL-KEY, KEY-SRC,
optional DIRECTORY.
-With optional CREATE, if no such line exists, inserts a new file entry at the
+With optional CREATE-FLAG, if no such line exists, insert a new file entry at
the
beginning of the hbdata file (which is created if necessary).
-INSTANCE non-nil means search for any button instance matching LBL-KEY and
+INSTANCE-FLAG non-nil means search for any button instance matching LBL-KEY and
call FUNCTION with point right after any 'ebut:instance-sep' in match.
-Returns value of evaluation when a matching entry is found or nil."
- (let ((found)
- (rtn)
- (opoint)
- (end-func))
+Return value of evaluation when a matching entry is found or nil."
+ (let (found
+ rtn
+ opoint
+ end-func)
(save-excursion
(unwind-protect
(progn
@@ -339,28 +340,29 @@ Returns value of evaluation when a matching entry is
found or nil."
(hmail:msg-narrow)
(goto-char opoint)
(lnews:to))))))
- (setq found (hbdata:to-entry-buf key-src directory create)))
- (if found
- (let ((case-fold-search t)
- (qkey (regexp-quote lbl-key))
- (end (save-excursion (if (search-forward "\n\^L" nil t)
- (point) (point-max)))))
- (if (if instance
- (re-search-forward
- (concat "\n(\"" qkey "["
- ebut:instance-sep "\"]") end t)
- (search-forward (concat "\n(\"" lbl-key "\"") end t))
- (progn
- (or instance (beginning-of-line))
- (let (buffer-read-only)
- (setq rtn (funcall function)))))))
- (if end-func (funcall end-func))))
+ (setq found (hbdata:to-entry-buf key-src directory create-flag)))
+ (when found
+ (let ((case-fold-search t)
+ (qkey (regexp-quote lbl-key))
+ (end (save-excursion (if (search-forward "\n\^L" nil t)
+ (point) (point-max)))))
+ (if (if instance-flag
+ (re-search-forward
+ (concat "\n(\"" qkey "["
+ ebut:instance-sep "\"]") end t)
+ (search-forward (concat "\n(\"" lbl-key "\"") end t))
+ (progn
+ (unless instance-flag
+ (beginning-of-line))
+ (let (buffer-read-only)
+ (setq rtn (funcall function)))))))
+ (when end-func (funcall end-func))))
rtn))
(defun hbdata:to-hbdata-buffer (dir &optional create)
"Read in the file containing DIR's button data, if any, and return buffer.
-If it does not exist and optional CREATE is non-nil, creates a new
-one and returns buffer, otherwise returns nil."
+If it does not exist and optional CREATE is non-nil, create a new
+one and return buffer, otherwise return nil."
(let* ((file (expand-file-name hattr:filename (or dir default-directory)))
(existing-file (or (file-exists-p file) (get-file-buffer file)))
(buf (or (get-file-buffer file)
@@ -384,11 +386,11 @@ one and returns buffer, otherwise returns nil."
(defun hbdata:to-entry-buf (key-src &optional directory create)
"Move point to end of line in but data buffer matching KEY-SRC.
-Uses hbdata file in KEY-SRC's directory, or optional DIRECTORY or if nil, uses
+Use hbdata file in KEY-SRC's directory, or optional DIRECTORY or if nil, use
`default-directory'.
-With optional CREATE, if no such line exists, inserts a new file entry at the
+With optional CREATE, if no such line exists, insert a new file entry at the
beginning of the hbdata file (which is created if necessary).
-Returns non-nil if KEY-SRC is found or created, else nil."
+Return non-nil if KEY-SRC is found or created, else nil."
(let ((rtn) (ln-dir))
(if (bufferp key-src)
;; Button buffer has no file attached
diff --git a/hbut.el b/hbut.el
index a59125d..45a5f2b 100644
--- a/hbut.el
+++ b/hbut.el
@@ -317,25 +317,25 @@ button is found in the current buffer."
(hmail:msg-narrow))))
(if instance-flag
(progn
- (if modify
- ;; Rename all occurrences of button - those with same label
- (let* ((but-key-and-pos (ebut:label-p nil nil nil 'pos))
- (at-but (equal (car but-key-and-pos)
- (ebut:label-to-key new-label))))
- (when at-but
- (ebut:delimit (nth 1 but-key-and-pos)
- (nth 2 but-key-and-pos)
- instance-flag))
- (cond ((ebut:map
- (lambda (lbl start end)
- (delete-region start end)
- (ebut:delimit
- (point)
- (progn (insert new-label) (point))
- instance-flag))
- lbl-regexp 'include-delims))
- (at-but)
- ((hypb:error "(ebut:operate): No button matching: %s"
curr-label))))
+ (when modify
+ ;; Rename all occurrences of button - those with same label
+ (let* ((but-key-and-pos (ebut:label-p nil nil nil 'pos))
+ (at-but (equal (car but-key-and-pos)
+ (ebut:label-to-key new-label))))
+ (when at-but
+ (ebut:delimit (nth 1 but-key-and-pos)
+ (nth 2 but-key-and-pos)
+ instance-flag))
+ (cond ((ebut:map
+ (lambda (lbl start end)
+ (delete-region start end)
+ (ebut:delimit
+ (point)
+ (progn (insert new-label) (point))
+ instance-flag))
+ lbl-regexp 'include-delims))
+ (at-but)
+ ((hypb:error "(ebut:operate): No button matching: %s"
curr-label))))
;; Add a new button recording its start and end positions
(let (start end mark prev-point buf-lbl)
@@ -344,17 +344,28 @@ button is found in the current buffer."
(insert new-label)
(setq end (point)))
((and (hmouse-use-region-p)
- (setq mark (marker-position (hypb:mark-marker t)))
- (setq prev-point (and action-key-depress-prev-point
- (marker-position
action-key-depress-prev-point)))
- (setq start (if (and prev-point mark (<= prev-point
mark))
- prev-point
- (region-beginning))
- end (if (and prev-point mark (> prev-point
mark))
- prev-point
- (region-end))
- buf-lbl (buffer-substring start end))
- (equal buf-lbl curr-label))
+ (if (hyperb:stack-frame
+ '(hui:ebut-create hui:ebut-edit
+ hui:ebut-modify hui:gbut-create
+ hui:gbut-modify
hui:link-create ebut:program))
+ ;; Ignore action-key-depress-prev-point
+ (progn (setq mark (marker-position
(hypb:mark-marker t))
+ start (region-beginning)
+ end (region-end)
+ buf-lbl (buffer-substring start end))
+ (equal buf-lbl curr-label))
+ ;; Utilize any action-key-depress-prev-point
+ (progn (setq mark (marker-position
(hypb:mark-marker t)))
+ (setq prev-point (and
action-key-depress-prev-point
+ (marker-position
action-key-depress-prev-point)))
+ (setq start (if (and prev-point mark (<=
prev-point mark))
+ prev-point
+ (region-beginning))
+ end (if (and prev-point mark (>
prev-point mark))
+ prev-point
+ (region-end))
+ buf-lbl (buffer-substring start end))
+ (equal buf-lbl curr-label))))
nil)
((progn (when start (goto-char start))
(looking-at (regexp-quote curr-label)))
diff --git a/hibtypes.el b/hibtypes.el
index 2ff28cb..8024c2d 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -101,60 +101,6 @@ line and check for a source reference line again."
(load "hypb-ert")
;;; ========================================================================
-;;; Follows URLs by invoking a web browser.
-;;; ========================================================================
-
-(load "hsys-www")
-
-;;; ========================================================================
-;;; Composes mail, in another window, to the e-mail address at point.
-;;; ========================================================================
-
-(defvar mail-address-mode-list
- '(fundamental-mode prog-mode text-mode)
- "List of major modes in which mail address implicit buttons are active.")
-
-(defun mail-address-at-p ()
- "Return e-mail address, a string, that point is within or nil."
- (let ((case-fold-search t))
- (save-excursion
- (skip-chars-backward "^ \t\n\r\f\"\'(){}[];:<>|")
- (and (or (looking-at mail-address-regexp)
- (looking-at (concat "mailto:" mail-address-regexp)))
- (save-match-data
- (string-match mail-address-tld-regexp (match-string-no-properties
1)))
- (match-string-no-properties 1)))))
-
-(defib mail-address ()
- "If on an e-mail address in a specific buffer type, compose mail to that
address in another window.
-Applies to any major mode in `mail-address-mode-list', the HyRolo match buffer,
-any buffer attached to a file in `hyrolo-file-list', or any buffer with
-\"mail\" or \"rolo\" (case-insensitive) within its name."
- (when (let ((case-fold-search t))
- (or
- (and (or (null mail-address-mode-list)
- (apply #'derived-mode-p mail-address-mode-list))
- (not (string-match "-Elements\\'" (buffer-name)))
- ;; Don't want this to trigger within an OOBR-FTR buffer.
- (not (string-match "\\`\\(OOBR.*-FTR\\|oobr.*-ftr\\)"
- (buffer-name)))
- (not (string-equal "*Implementors*" (buffer-name))))
- (and
- (string-match "mail\\|rolo" (buffer-name))
- ;; Don't want this to trigger in a mail/news summary buffer.
- (not (or (hmail:lister-p) (hnews:lister-p))))
- (when (boundp 'hyrolo-display-buffer)
- (equal (buffer-name) hyrolo-display-buffer))
- (and buffer-file-name
- (boundp 'hyrolo-file-list)
- (set:member (current-buffer)
- (mapcar 'get-file-buffer hyrolo-file-list)))))
- (let ((address (mail-address-at-p)))
- (when address
- (ibut:label-set address (match-beginning 1) (match-end 1))
- (hact 'mail-other-window nil address)))))
-
-;;; ========================================================================
;;; Displays files and directories when a valid pathname is activated.
;;; ========================================================================
@@ -260,6 +206,60 @@ display options."
))))))
;;; ========================================================================
+;;; Follows URLs by invoking a web browser.
+;;; ========================================================================
+
+(load "hsys-www")
+
+;;; ========================================================================
+;;; Composes mail, in another window, to the e-mail address at point.
+;;; ========================================================================
+
+(defvar mail-address-mode-list
+ '(fundamental-mode prog-mode text-mode)
+ "List of major modes in which mail address implicit buttons are active.")
+
+(defun mail-address-at-p ()
+ "Return e-mail address, a string, that point is within or nil."
+ (let ((case-fold-search t))
+ (save-excursion
+ (skip-chars-backward "^ \t\n\r\f\"\'(){}[];:<>|")
+ (and (or (looking-at mail-address-regexp)
+ (looking-at (concat "mailto:" mail-address-regexp)))
+ (save-match-data
+ (string-match mail-address-tld-regexp (match-string-no-properties
1)))
+ (match-string-no-properties 1)))))
+
+(defib mail-address ()
+ "If on an e-mail address in a specific buffer type, compose mail to that
address in another window.
+Applies to any major mode in `mail-address-mode-list', the HyRolo match buffer,
+any buffer attached to a file in `hyrolo-file-list', or any buffer with
+\"mail\" or \"rolo\" (case-insensitive) within its name."
+ (when (let ((case-fold-search t))
+ (or
+ (and (or (null mail-address-mode-list)
+ (apply #'derived-mode-p mail-address-mode-list))
+ (not (string-match "-Elements\\'" (buffer-name)))
+ ;; Don't want this to trigger within an OOBR-FTR buffer.
+ (not (string-match "\\`\\(OOBR.*-FTR\\|oobr.*-ftr\\)"
+ (buffer-name)))
+ (not (string-equal "*Implementors*" (buffer-name))))
+ (and
+ (string-match "mail\\|rolo" (buffer-name))
+ ;; Don't want this to trigger in a mail/news summary buffer.
+ (not (or (hmail:lister-p) (hnews:lister-p))))
+ (when (boundp 'hyrolo-display-buffer)
+ (equal (buffer-name) hyrolo-display-buffer))
+ (and buffer-file-name
+ (boundp 'hyrolo-file-list)
+ (set:member (current-buffer)
+ (mapcar 'get-file-buffer hyrolo-file-list)))))
+ (let ((address (mail-address-at-p)))
+ (when address
+ (ibut:label-set address (match-beginning 1) (match-end 1))
+ (hact 'mail-other-window nil address)))))
+
+;;; ========================================================================
;;; Follows Org links that are in non-Org mode buffers
;;; ========================================================================
diff --git a/hmouse-drv.el b/hmouse-drv.el
index 1f93b9b..d0ed4da 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -818,7 +818,7 @@ frame instead."
;; Drag frame when the window is on the bottom of its frame.
(mouse-drag-frame start-event 'move)))))
-(defun hkey-debug ()
+(defun hkey-debug (pred pred-value hkey-action)
(message (format "(HyDebug) %sContext: %s; %s: %s; Buf: %s; Mode: %s;
MinibufDepth: %s"
(cond ((eq pred-value 'hbut:current)
(format "ButType: %s; ButLabel: %s; "
@@ -838,14 +838,14 @@ Non-nil ASSIST-FLAG means evaluate second form, otherwise
evaluate first form.
Return non-nil iff a non-nil predicate is found."
;; Keep in mind that hkey-alist may be set to hmouse-alist here, with
additional predicates.
(let ((hkey-forms hkey-alist)
- (pred-value) (hkey-action) hkey-form pred)
+ pred-value hkey-action hkey-form pred)
(while (and (null pred-value) (setq hkey-form (car hkey-forms)))
(if (setq hkey-action (if assist-flag (cddr hkey-form) (cadr hkey-form))
pred (car hkey-form)
pred-value (eval pred))
;; Conditionally debug after Smart Key release and evaluation
;; of matching predicate but before hkey-action is executed.
- (progn (when hkey-debug (hkey-debug))
+ (progn (when hkey-debug (hkey-debug pred pred-value hkey-action))
(eval hkey-action))
(setq hkey-forms (cdr hkey-forms))))
pred-value))
diff --git a/hmouse-tag.el b/hmouse-tag.el
index 4055554..3113348 100644
--- a/hmouse-tag.el
+++ b/hmouse-tag.el
@@ -609,40 +609,51 @@ buffer."
(goto-char (match-beginning 0))
(error "(smart-lisp): Found autoload library but no
definition for `%s'" name)))
t)))
- (let* ((elisp-flag (smart-emacs-lisp-mode-p))
- (tag (smart-lisp-at-tag-p t))
- (tag-sym (intern-soft tag)))
- (cond ((and show-doc elisp-flag)
- ;; Emacs Lisp function, variable and face documentation display.
- (cond ((fboundp tag-sym) (describe-function tag-sym))
- ((and tag-sym (boundp tag-sym)) (describe-variable tag-sym))
- ((facep tag-sym) (describe-face tag-sym))
- (t (error "(smart-lisp): `%s' unbound symbol definition not
found" tag))))
- ((and elisp-flag (fboundp 'find-function-noselect)
- (let ((result (smart-lisp-bound-symbol-def tag-sym)))
- (when (cdr result)
- (hpath:display-buffer (car result))
- (goto-char (cdr result))
- t))))
- ;; If elisp-flag is true, then make xref use tags tables to
- ;; find symbols not yet loaded into Emacs; otherwise, use
- ;; standard xref backends for the current language.
- (t (let ((etags-mode (and elisp-flag (boundp 'xref-etags-mode)
xref-etags-mode)))
- (unwind-protect
- (progn
- (and (not etags-mode) elisp-flag (fboundp
'xref-etags-mode)
- (xref-etags-mode 1))
- (condition-case ()
- ;; Tag of any language
- (and (featurep 'etags) (smart-tags-display tag
show-doc))
- (error (unless (and elisp-flag (stringp
smart-emacs-tags-file)
- (condition-case ()
- (smart-tags-display
- tag show-doc (list
smart-emacs-tags-file))
- (error nil)))
- (error "(smart-lisp): No definition found for
`%s'" tag)))))
- (and (not etags-mode) elisp-flag (fboundp 'xref-etags-mode)
- (xref-etags-mode 0)))))))))
+ (smart-lisp-find-tag nil show-doc)))
+
+(defun smart-lisp-find-tag (&optional tag show-doc)
+ "Find the definition of optional Lisp TAG (or identifier at point) or show
its documentation with optional prefix arg SHOW-DOC non-nil.
+Use `hpath:display-buffer' to show definition or documentation."
+ (interactive
+ (list (read-string (format "%s Lisp identifier: "
+ (if current-prefix-arg
+ "Show doc for" "Find")))
+ current-prefix-arg))
+ (unless (stringp tag)
+ (setq tag (smart-lisp-at-tag-p t)))
+ (let* ((elisp-flag (smart-emacs-lisp-mode-p))
+ (tag-sym (intern-soft tag)))
+ (cond ((and show-doc elisp-flag)
+ ;; Emacs Lisp function, variable and face documentation display.
+ (cond ((fboundp tag-sym) (describe-function tag-sym))
+ ((and tag-sym (boundp tag-sym)) (describe-variable tag-sym))
+ ((facep tag-sym) (describe-face tag-sym))
+ (t (error "(smart-lisp): `%s' unbound symbol definition not
found" tag))))
+ ((and elisp-flag (fboundp 'find-function-noselect)
+ (let ((result (smart-lisp-bound-symbol-def tag-sym)))
+ (when (cdr result)
+ (hpath:display-buffer (car result))
+ (goto-char (cdr result))
+ t))))
+ ;; If elisp-flag is true, then make xref use tags tables to
+ ;; find symbols not yet loaded into Emacs; otherwise, use
+ ;; standard xref backends for the current language.
+ (t (let ((etags-mode (and elisp-flag (boundp 'xref-etags-mode)
xref-etags-mode)))
+ (unwind-protect
+ (progn
+ (and (not etags-mode) elisp-flag (fboundp 'xref-etags-mode)
+ (xref-etags-mode 1))
+ (condition-case ()
+ ;; Tag of any language
+ (and (featurep 'etags) (smart-tags-display tag
show-doc))
+ (error (unless (and elisp-flag (stringp
smart-emacs-tags-file)
+ (condition-case ()
+ (smart-tags-display
+ tag show-doc (list
smart-emacs-tags-file))
+ (error nil)))
+ (error "(smart-lisp): No definition found for
`%s'" tag)))))
+ (and (not etags-mode) elisp-flag (fboundp 'xref-etags-mode)
+ (xref-etags-mode 0))))))))
(defun smart-lisp-at-definition-p ()
"Return t when point is in a non-help buffer on the first line of a
non-alias Lisp definition, else nil."
diff --git a/hsys-org.el b/hsys-org.el
index 2a5750b..291a70d 100644
--- a/hsys-org.el
+++ b/hsys-org.el
@@ -28,13 +28,24 @@
;;; ************************************************************************
(eval-when-compile (require 'hmouse-drv))
-
(require 'hbut)
(require 'org)
(require 'org-element)
;;;###autoload
-(defcustom hsys-org-enable-smart-keys 'buttons
+(defun hsys-org-meta-return-shared-p ()
+ "Return non-nil iff hyperbole-mode is active and it shares the
org-meta-return key binding."
+ (let ((org-meta-return-keys (where-is-internal #'org-meta-return
org-mode-map)))
+ (when (or (set:intersection org-meta-return-keys
+ (where-is-internal #'hkey-either
hyperbole-mode-map))
+ (set:intersection org-meta-return-keys
+ (where-is-internal #'action-key
hyperbole-mode-map)))
+ t)))
+
+;;;###autoload
+(defcustom hsys-org-enable-smart-keys (if (hsys-org-meta-return-shared-p)
+ 'buttons
+ t)
"This option applies only in Org major/minor modes when hyperbole-mode is
active.
The following table shows what the Smart Keys do in various contexts
with different settings of this option. For example, a nil value makes
@@ -57,6 +68,7 @@ with different settings of this option. For example, a nil
value makes
;;; Public variables
;;; ************************************************************************
+;;;###autoload
(defvar hsys-org-mode-function #'hsys-org-mode-p
"*Boolean function of no arguments that determines whether point is in an
Org mode-related buffer or not.")
@@ -190,7 +202,8 @@ Assume caller has already checked that the current buffer
is in `org-mode'."
(defun hsys-org-radio-target-link-at-p ()
"Return (target-start . target-end) positions iff point is on an Org mode
radio target link (referent), else nil."
(and (hsys-org-face-at-p 'org-link)
- (hsys-org-link-at-p)))
+ (hsys-org-link-at-p)
+ (hsys-org-region-with-text-property-value (point) 'face)))
(defun hsys-org-radio-target-def-at-p ()
"Return (target-start . target-end) positions iff point is on an Org mode
radio target (definition), including any delimiter characters, else nil."
@@ -205,8 +218,9 @@ Assume caller has already checked that the current buffer
is in `org-mode'."
(defun hsys-org-radio-target-at-p ()
"Return (target-start . target-end) positions iff point is on an Org mode
<<<radio target definition>>> or radio target link (referent), including any
delimiter characters, else nil."
- (or (hsys-org-radio-target-def-at-p)
- (hsys-org-radio-target-link-at-p)))
+ (and (or (hsys-org-radio-target-def-at-p)
+ (hsys-org-radio-target-link-at-p))
+ (hsys-org-region-with-text-property-value (point) 'face)))
(defun hsys-org-internal-link-target-at-p ()
"Return (target-start . target-end) positions iff point is on an Org mode
<<link target>>, including any delimiter characters, else nil."
diff --git a/hui-menu.el b/hui-menu.el
index 8938cd3..0c1accd 100644
--- a/hui-menu.el
+++ b/hui-menu.el
@@ -218,6 +218,23 @@ Return t if cutoff, else nil."
'("----")
(hui-menu-browser "Display-Web-Searches-in"
hyperbole-web-search-browser-function)
'("----")
+ '(("Org-M-RETURN"
+ "----"
+ "----"
+ ["All-Programmed-Contexts"
+ (customize-save-variable 'hsys-org-enable-smart-keys t)
+ :style radio :selected (when (boundp 'hsys-org-enable-smart-keys)
+ (eq hsys-org-enable-smart-keys t))]
+ ["Hypb-Buttons-Only"
+ (customize-save-variable 'hsys-org-enable-smart-keys 'buttons)
+ :style radio :selected (when (boundp 'hsys-org-enable-smart-keys)
+ (eq hsys-org-enable-smart-keys
'buttons))]
+ ["Ignore"
+ (customize-save-variable 'hsys-org-enable-smart-keys nil)
+ :style radio :selected (when (boundp 'hsys-org-enable-smart-keys)
+ (eq hsys-org-enable-smart-keys nil))]
+ ))
+ '("----")
'(("Smart-Key-Press-at-Eol"
"----"
"----"
@@ -226,18 +243,18 @@ Return t if cutoff, else nil."
;; with a conditional.
["Scrolls-a-Windowful"
(setq smart-scroll-proportional nil)
- :style radio :selected (if (boundp 'smart-scroll-proportional)
- (null smart-scroll-proportional))]
+ :style radio :selected (when (boundp 'smart-scroll-proportional)
+ (null smart-scroll-proportional))]
["Scrolls-Proportionally"
(setq smart-scroll-proportional t)
- :style radio :selected (if (boundp 'smart-scroll-proportional)
- smart-scroll-proportional)]
+ :style radio :selected (when (boundp 'smart-scroll-proportional)
+ smart-scroll-proportional)]
))
'("----"
["Toggle-Isearch-Invisible-Text" hypb:toggle-isearch-invisible
:visible (boundp 'isearch-invisible)
- :style toggle :selected (and (boundp 'isearch-invisible)
- isearch-invisible)]
+ :style toggle :selected (when (boundp 'isearch-invisible)
+ isearch-invisible)]
["Toggle-Messaging-Explicit-Buttons" hyperbole-toggle-messaging
:style toggle :selected (not inhibit-hyperbole-messaging)]
["Toggle-Rolo-Dates" hyrolo-toggle-datestamps
diff --git a/hui-mini.el b/hui-mini.el
index 1d31dce..0f8d3c5 100644
--- a/hui-mini.el
+++ b/hui-mini.el
@@ -533,6 +533,9 @@ constructs. If not given, the top level Hyperbole menu is
used."
("KeyBindings/" (menu . cust-keys) "Rebinds global Hyperbole keys.")
("Msg-Toggle-Ebuts" hyperbole-toggle-messaging
"Toggle Hyperbole support for explicit buttons in mail and news
buffers.")
+ ("Org-M-RET/" (menu . cust-org)
+ "Sets how much of Hyperbole Smart Key behavior is enabled in Org
mode.")
+
("Referents/" (menu . cust-referents)
"Sets where Hyperbole button referents are displayed.")
("Smart-Key-at-Eol/" (menu . cust-eol)
@@ -558,6 +561,11 @@ constructs. If not given, the top level Hyperbole menu is
used."
("SmartHelp" (hui:bind-key #'hkey-help))
;; {C-h A}
("WinControl" (hui:bind-key #'hycontrol-enable-windows-mode))
;; {C-c \}
))
+ '(cust-org .
+ (("Org M-RETURN>")
+ ("All-Programmed-Contexts" (customize-save-variable
'hsys-org-enable-smart-keys t))
+ ("Hypb-Buttons-Only" (customize-save-variable
'hsys-org-enable-smart-keys 'buttons))
+ ("Ignore" (customize-save-variable
'hsys-org-enable-smart-keys nil))))
'(cust-referents .
(("Ref Display>")
("Any-Frame" (setq hpath:display-where 'other-frame))
diff --git a/hui-mouse.el b/hui-mouse.el
index 811d56a..15d4b27 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -37,6 +37,7 @@
;;; Other required Elisp libraries
;;; ************************************************************************
+(eval-when-compile (require 'hsys-org))
(require 'hbut)
(unless (fboundp 'smart-info)
(require 'hmouse-info))
@@ -52,11 +53,16 @@
"*Command that sets point to the mouse cursor position.")
(defun action-key-error ()
- (if (hsys-org-mode-p)
+ "If in Org mode and Hyperbole shares {M-RET}, run org-meta-return, else
signal an error."
+ (if (and (funcall hsys-org-mode-function)
+ (hsys-org-meta-return-shared-p))
(hact 'org-meta-return current-prefix-arg)
(hypb:error "(Hyperbole Action Key): No action defined for this context;
try another location")))
+
(defun assist-key-error ()
- (if (hsys-org-mode-p)
+ "If in Org mode and Hyperbole shares {M-RET}, run org-meta-return, else
signal an error."
+ (if (and (funcall hsys-org-mode-function)
+ (hsys-org-meta-return-shared-p))
(hact 'org-meta-return current-prefix-arg)
(hypb:error "(Hyperbole Assist Key): No action defined for this context;
try another location")))
@@ -81,13 +87,15 @@ to use the Treemacs file manager package instead."
(defcustom action-key-eol-function #'smart-scroll-up
"*Function run by the Action Key at the end of a line.
-Its default value is #'smart-scroll-up."
+Its default value is #'smart-scroll-up. To disable it, set it to
+#'ignore."
:type 'function
:group 'hyperbole-keys)
(defcustom assist-key-eol-function #'smart-scroll-down
"*Function run by the Assist Key at the end of a line.
-Its default value is #'smart-scroll-down."
+Its default value is #'smart-scroll-down. To disable it, set it to
+#'ignore."
:type 'function
:group 'hyperbole-keys)
@@ -1594,7 +1602,8 @@ Org links may be used outside of Org mode buffers. Such
links are
handled by the separate implicit button type, `org-link-outside-org-mode'."
(when (funcall hsys-org-mode-function)
(cond ((not hsys-org-enable-smart-keys)
- (hact 'org-meta-return current-prefix-arg)
+ (when (hsys-org-meta-return-shared-p)
+ (hact 'org-meta-return current-prefix-arg))
;; Ignore any further Smart Key non-Org contexts
t)
((eq hsys-org-enable-smart-keys t)
@@ -1652,9 +1661,11 @@ handled by the separate implicit button type,
`org-link-outside-org-mode'."
(if (not assist-flag)
(hact 'hbut:act)
(hact 'hkey-help)))
- (t (hact 'org-meta-return current-prefix-arg)))
- ;; Ignore any further Smart Key non-Org contexts
- t)
+ (t
+ (when (hsys-org-meta-return-shared-p)
+ (hact 'org-meta-return current-prefix-arg))
+ ;; Ignore any further Smart Key non-Org contexts
+ t)))
(t
;; hsys-org-enable-smart-keys is set to t, so try other Smart
;; contexts
diff --git a/hui.el b/hui.el
index c6540d0..b818567 100644
--- a/hui.el
+++ b/hui.el
@@ -165,7 +165,7 @@ Signal an error if point is not within a button."
(hui:ebut-delete-op interactive but-key key-src))))
(defun hui:ebut-edit ()
- "Create or modifies an explicit Hyperbole button when conditions are met.
+ "Create or modify an explicit Hyperbole button when conditions are met.
A region must have been delimited with the action-key and point must now be
within it before this function is called or it will do nothing. The region
must be no larger than the size given by a call to (hbut:max-len). It must
@@ -871,7 +871,7 @@ DEFAULT-ACTYPE may be a valid symbol or symbol name."
;; (file-name-nondirectory buffer-file-name))))
(if buffer-read-only
(setq err
- (format "(%s) Hyperbole button buffer '%s' cannot be edited. Use
{%s} to enable edits."
+ (format "(%s) Read-only error in Hyperbole button buffer '%s'.
Use {%s} to enable edits."
func-name (buffer-name but-buf)
(hmouse-read-only-toggle-key))))
(set-buffer obuf)
(if err (progn (pop-to-buffer but-buf) (hypb:error err)))))
diff --git a/hypb.el b/hypb.el
index ee97ecf..50005ec 100644
--- a/hypb.el
+++ b/hypb.el
@@ -270,8 +270,8 @@ FILE is temporarily read into a buffer to determine the
major mode if necessary.
(kill-buffer buf)))))
(defun hypb:format-quote (arg)
- "Replace all single % with %% in any string ARG so that a call to `format'
or `message' ignore them.
-Return either the modified string or the original ARG."
+ "Replace all single % with %% in any string ARG so that a call to `format'
or `message' ignores them.
+Return either the modified string or the original ARG when not modified."
(if (stringp arg)
(replace-regexp-in-string
"@@@" "%%" (replace-regexp-in-string
@@ -281,7 +281,7 @@ Return either the modified string or the original ARG."
arg))
(defun hypb:function-copy (func-symbol)
- "Copy FUNC-SYMBOL's body for overloading. Return copy of body."
+ "Copy FUNC-SYMBOL's body for overloading. Return a copy of the body."
(if (fboundp func-symbol)
(let ((func (hypb:indirect-function func-symbol)))
(cond ((listp func) (copy-sequence func))
diff --git a/hyperbole.el b/hyperbole.el
index 5aa4526..323d992 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -127,6 +127,32 @@
"Hyperbole multi-level autonumbered outliner customizations."
:group 'hyperbole)
+(defvar hyperbole-mode-map (make-sparse-keymap)
+ "Keymap for the GNU Hyperbole global minor mode.
+See `hkey-initialize'.")
+
+(defcustom hyperbole-mode-lighter " Hypb"
+ "Text to display in the minor-mode area of the modeline when the Hyperbole
global minor mode is active."
+ :type 'string
+ :group 'hyperbole)
+
+;;;###autoload
+(define-minor-mode hyperbole-mode
+ "Toggle the Everyday Hypertextual Information Manager global minor mode
(Hyperbole mode).
+
+When Hyperbole mode is enabled, the `hyperbole-mode' variable
+is non-nil, Hyperbole menus are enabled, as are Hyperbole keys.
+
+Invoke the Hyperbole minibuffer menu with \\[hyperbole]. See the
+documentation at \"(hyperbole)Top\".
+
+\\{hyperbole-mode-map}"
+ :global t
+ :lighter hyperbole-mode-lighter
+ (if hyperbole-mode
+ (hyperbole--enable-mode)
+ (hyperbole--disable-mode)))
+
;;; ************************************************************************
;;; Other required Elisp libraries
;;; ************************************************************************
@@ -698,32 +724,6 @@ This is used only when running from git source and not a
package release."
'write-file-hooks)
#'hattr:save))
-(defvar hyperbole-mode-map (make-sparse-keymap)
- "Keymap for the GNU Hyperbole global minor mode.
-See `hkey-initialize'.")
-
-(defcustom hyperbole-mode-lighter " Hypb"
- "Text to display in the minor-mode area of the modeline when the Hyperbole
global minor mode is active."
- :type 'string
- :group 'hyperbole)
-
-;;;###autoload
-(define-minor-mode hyperbole-mode
- "Toggle the Everyday Hypertextual Information Manager global minor mode
(Hyperbole mode).
-
-When Hyperbole mode is enabled, the `hyperbole-mode' variable
-is non-nil, Hyperbole menus are enabled, as are Hyperbole keys.
-
-Invoke the Hyperbole minibuffer menu with \\[hyperbole]. See the
-documentation at \"(hyperbole)Top\".
-
-\\{hyperbole-mode-map}"
- :global t
- :lighter hyperbole-mode-lighter
- (if hyperbole-mode
- (hyperbole--enable-mode)
- (hyperbole--disable-mode)))
-
;; This next expression initializes the Hyperbole keymap but does not
;; activate Hyperbole. The only user-visible change it should make is
;; to globally bind {C-h h} to 'hyperbole' which when invoked will both
diff --git a/kotl/kview.el b/kotl/kview.el
index cd2f006..477706c 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -402,9 +402,9 @@ is not part of the current view, else nil."
"Move to start of previous cell within current view.
With optional VISIBLE-P, consider only visible cells.
Return t unless no previous cell."
- (if (kcell-view:previous-kcell visible-p label-sep-len)
- (progn (goto-char (kcell-view:start nil label-sep-len))
- t)))
+ (when (kcell-view:previous-kcell visible-p label-sep-len)
+ (goto-char (kcell-view:start nil label-sep-len))
+ t))
(defun kcell-view:plist (&optional pos)
"Return attributes associated with cell at optional POS or point."
diff --git a/man/hyperbole.html b/man/hyperbole.html
index b7d21af..fb640b8 100644
--- a/man/hyperbole.html
+++ b/man/hyperbole.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU Hyperbole
-(Edition 8.0.0, Published May, 2021).
+(Edition 8.0.0pre, Published May, 2021).
Copyright (C) 1989-2021 Free Software Foundation, Inc.
@@ -358,7 +358,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P>
<PRE>
Edition 8.0.0pre
-Printed May 4, 2021.
+Printed May 9, 2021.
Published by the Free Software Foundation, Inc.
Author: Bob Weiner
@@ -2546,7 +2546,65 @@ implicit button types (they are listed in increasing
order of priority).
</p>
<dl compact="compact">
<dd>
-<span id="index-ibtypes-doc_002did"></span>
+<span id="index-ibtypes-org_002dmode"></span>
+<span id="index-Org_002dmode"></span>
+<span id="index-radio-target"></span>
+<span id="index-code-block"></span>
+<span id="index-links"></span>
+<span id="index-C_002dc-C_002dc"></span>
+<span id="index-M_002dRET-1"></span>
+<span id="index-org_002dctrl_002dc_002dctrl_002dc"></span>
+<span id="index-org_002dmeta_002dreturn"></span>
+<span id="index-hsys_002dorg_002denable_002dsmart_002dkeys"></span>
+<span id="index-enable-org_002dmode-support"></span>
+<span id="index-disable-org_002dmode-support"></span>
+<span id="index-inhibit-org_002dmode-support"></span>
+</dd>
+<dt><code>org-mode</code></dt>
+<dd><p>For users of Emacs Org-mode, Hyperbole does quite a few things.
+</p>
+<p>First, the Action Key follows internal links in Org-mode files. When
+pressed on a link referent/target, the link definition is displayed,
+allowing two-way navigation between definitions and targets.
+</p>
+<p>Second, the Action Key follows Org-mode external links. The Assist
+Key displays help when pressed on an Org-mode link.
+</p>
+<p>Third, within a radio target definition, the Action Key jumps to the
+first occurrence of an associated radio target.
+</p>
+<p>Fourth, when point is on an outline heading in Org-mode, the Action Key
+cycles the view of the subtree at point and the Assist Key cycles the
+view of all headings in the buffer.
+</p>
+<p>Fifth, with point on the first line of a code block definition, the
+Action Key executes the code block via the Org-mode standard binding
+of <kbd>{C-c C-c}</kbd>, <code>org-ctrl-c-ctrl-c</code>.
+</p>
+<p>In any other context besides the end of a line, the Action Key invokes
+the Org-mode standard binding of <kbd>{M-<span class="key">RET</span>}</kbd>,
<code>org-meta-return</code>.
+</p>
+<p>To disable Hyperbole support within Org major and minor modes, set
+the custom option <code>hsys-org-enable-smart-keys</code> to <code>nil</code>.
Then in
+Org modes, the Action Key will simply invoke <code>org-meta-return</code>. The
+following table summarizes the effect of this option setting.
+</p></dd>
+</dl>
+
+<div class="format">
+<pre class="verbatim">@group
+|--------------+-------------------+------------------+----------+------------------|
+| This Setting | Smart Key Context | Hyperbole Button | Org Link | Fallback
Command |
+|--------------+-------------------+------------------+----------+------------------|
+| buttons | Ignore | Activate | Activate |
org-meta-return |
+| nil | Ignore | Ignore | Ignore |
org-meta-return |
+| t | Activate | Activate | Activate | None
|
+|--------------+-------------------+------------------+----------+------------------|
+@end group
+</pre></div>
+
+<dl compact="compact">
+<dd><span id="index-ibtypes-doc_002did"></span>
<span id="index-online-library"></span>
<span id="index-document-identifier"></span>
</dd>
@@ -2621,17 +2679,6 @@ is shown.
<p>For @code, @findex, @var and @vindex references, the associated
documentation string is displayed.
</p>
-<span id="index-ibtypes-mail_002daddress"></span>
-<span id="index-e_002dmail-address"></span>
-<span id="index-rolo-address"></span>
-<span id="index-address"></span>
-</dd>
-<dt><code>mail-address</code></dt>
-<dd><p>If on an e-mail address in a specific buffer type, compose mail to that
-address in another window. Applies to the rolo match buffer, any buffer
-attached to a file in <code>hyrolo-file-list</code>, or any buffer
-with <samp>mail</samp> or <samp>rolo</samp> (case-insensitive) within its name.
-</p>
<span id="index-ibtypes-patch_002dmsg"></span>
<span id="index-patch-output"></span>
</dd>
@@ -3097,6 +3144,31 @@ path at <em>line-num</em> and optional
<em>column-num</em>. Also works
for remote pathnames. May also contain hash-style link references
with the following format:
<samp><path>[#<link-anchor>]:<line-num>[:<column-num>]</samp>.
</p>
+<span id="index-ibtypes-mail_002daddress"></span>
+<span id="index-e_002dmail-address"></span>
+<span id="index-rolo-address"></span>
+<span id="index-address"></span>
+</dd>
+<dt><code>mail-address</code></dt>
+<dd><p>If on an e-mail address in a specific buffer type, compose mail to that
+address in another window. Applies to the rolo match buffer, any buffer
+attached to a file in <code>hyrolo-file-list</code>, or any buffer
+with <samp>mail</samp> or <samp>rolo</samp> (case-insensitive) within its name.
+</p>
+<span id="index-ibtypes-www_002durl"></span>
+<span id="index-URL"></span>
+<span id="index-World_002dwide-Web"></span>
+<span id="index-WWW"></span>
+<span id="index-Action-Key_002c-web-browsing"></span>
+<span id="index-Action-Key_002c-web-browsing-1"></span>
+<span id="index-browse_002durl_002dbrowser_002dfunction"></span>
+</dd>
+<dt><code>www-url</code></dt>
+<dd><p>When not in an Emacs web browser buffer, follow any non-ftp URL (link)
at point.
+The variable, <code>browse-url-browser-function</code>, may be used to
customize
+which URL browser is called. Terse URLs which lack a protocol prefix,
+like www.gnu.org, are also recognized.
+</p>
<span id="index-ibtypes-pathname"></span>
<span id="index-hpath_003aat_002dp"></span>
<span id="index-hpath_003afind"></span>
@@ -3130,75 +3202,9 @@ delimiters. See the variable documentation for
<code>hpath:suffixes</code> for
suffixes that are added to or removed from the pathname when searching
for a valid match. See the function documentation for <code>hpath:find</code>
for special file display options.
-</p>
-<span id="index-ibtypes-www_002durl"></span>
-<span id="index-URL"></span>
-<span id="index-World_002dwide-Web"></span>
-<span id="index-WWW"></span>
-<span id="index-Action-Key_002c-web-browsing"></span>
-<span id="index-Action-Key_002c-web-browsing-1"></span>
-<span id="index-browse_002durl_002dbrowser_002dfunction"></span>
-</dd>
-<dt><code>www-url</code></dt>
-<dd><p>When not in an Emacs web browser buffer, follow any non-ftp URL (link)
at point.
-The variable, <code>browse-url-browser-function</code>, may be used to
customize
-which URL browser is called. Terse URLs which lack a protocol prefix,
-like www.gnu.org, are also recognized.
-</p>
-<span id="index-ibtypes-org_002dmode"></span>
-<span id="index-Org_002dmode"></span>
-<span id="index-radio-target"></span>
-<span id="index-code-block"></span>
-<span id="index-links"></span>
-<span id="index-C_002dc-C_002dc"></span>
-<span id="index-M_002dRET-1"></span>
-<span id="index-org_002dctrl_002dc_002dctrl_002dc"></span>
-<span id="index-org_002dmeta_002dreturn"></span>
-<span id="index-hsys_002dorg_002denable_002dsmart_002dkeys"></span>
-<span id="index-enable-org_002dmode-support"></span>
-<span id="index-disable-org_002dmode-support"></span>
-<span id="index-inhibit-org_002dmode-support"></span>
-</dd>
-<dt><code>org-mode</code></dt>
-<dd><p>For users of Emacs Org-mode, Hyperbole does quite a few things.
-</p>
-<p>First, the Action Key follows internal links in Org-mode files. When
-pressed on a link referent/target, the link definition is displayed,
-allowing two-way navigation between definitions and targets.
-</p>
-<p>Second, the Action Key follows Org-mode external links. The Assist
-Key displays help when pressed on an Org-mode link.
-</p>
-<p>Third, within a radio target definition, the Action Key jumps to the
-first occurrence of an associated radio target.
-</p>
-<p>Fourth, when point is on an outline heading in Org-mode, the Action Key
-cycles the view of the subtree at point and the Assist Key cycles the
-view of all headings in the buffer.
-</p>
-<p>Fifth, with point on the first line of a code block definition, the
-Action Key executes the code block via the Org-mode standard binding
-of <kbd>{C-c C-c}</kbd>, <code>org-ctrl-c-ctrl-c</code>.
-</p>
-<p>In any other context besides the end of a line, the Action Key invokes
-the Org-mode standard binding of <kbd>{M-<span class="key">RET</span>}</kbd>,
<code>org-meta-return</code>.
-</p>
-<p>To disable Hyperbole support within Org major and minor modes, set
-the custom option <code>hsys-org-enable-smart-keys</code> to <code>nil</code>.
Then in
-Org modes, the Action Key will simply invoke <code>org-meta-return</code>. The
-following table summarizes the effect of this option setting.
</p></dd>
</dl>
-<div class="format">
-<pre
class="verbatim">|--------------+-------------------+------------------+----------+------------------|
-| This Setting | Smart Key Context | Hyperbole Button | Org Link | Fallback
Command |
-|--------------+-------------------+------------------+----------+------------------|
-| buttons | Ignore | Activate | Activate |
org-meta-return |
-| nil | Ignore | Ignore | Ignore |
org-meta-return |
-| t | Activate | Activate | Activate | None
|
-|--------------+-------------------+------------------+----------+------------------|
-</pre></div>
<hr>
<span id="Action-Buttons"></span><div class="header">
@@ -3325,9 +3331,10 @@ within the same directory. If you want to view some
other
directory-specific button file, simply use the normal Emacs file
finding commands.
</p>
-<p>If you want group and site-specific button files, simply place links to such
-files at the top of your personal button file and do so for your colleagues.
-This provides a flexible means of connecting to such resources.
+<p>If you want group and site-specific button files, simply place links
+to such files at the top of your personal button file and do so for
+your colleagues. This provides a flexible means of connecting to
+such resources.
</p>
<hr>
<span id="Action-Types"></span><div class="header">
@@ -3378,7 +3385,8 @@ inserted, in which case, delete the completions window.
<span id="index-actypes-eval_002delisp"></span>
</dd>
<dt><code>eval-elisp</code></dt>
-<dd><p>Evaluate a Lisp expression LISP-EXPR for its side-effects and return
any non-nil value.
+<dd><p>Evaluate a Lisp expression LISP-EXPR for its side-effects and return
+any non-nil value.
</p>
<span id="index-actypes-exec_002dkbd_002dmacro"></span>
</dd>
@@ -10366,7 +10374,9 @@ Next: <a href="#Smart-Key-_002d-Smart-Menus"
accesskey="n" rel="next">Smart Key
<code>smart-scroll-proportional</code> is nil or if point is on the top
window line, it scrolls up (forward) a windowful. Otherwise, it tries
to bring the current line to the top of the window, leaving point at
- the end of the line and returning t if scrolled, nil if not.
+ the end of the line and returning t if scrolled, nil if not. To disable
+ this behavior entirely, evaluate this line:
+ <code>(customize-set-variable 'action-key-eol-function #'ignore)</code>
</pre></div>
<div class="format">
<pre class="format"> ASSIST KEY
@@ -10376,7 +10386,9 @@ Next: <a href="#Smart-Key-_002d-Smart-Menus"
accesskey="n" rel="next">Smart Key
<code>smart-scroll-proportional</code> is nil or if point is on the bottom
window line, it scrolls down (backward) a windowful. Otherwise, it tries
to bring the current line to the bottom of the window, leaving point at
- the end of the line and returning t if scrolled, nil if not.
+ the end of the line and returning t if scrolled, nil if not. To disable
+ this behavior entirely, evaluate this line:
+ <code>(customize-set-variable 'assist-key-eol-function #'ignore)</code>
</pre></div>
<hr>
diff --git a/man/hyperbole.info b/man/hyperbole.info
index 345b81a..fb9463e 100644
Binary files a/man/hyperbole.info and b/man/hyperbole.info differ
diff --git a/man/hyperbole.pdf b/man/hyperbole.pdf
index 1c76807..a875d01 100644
Binary files a/man/hyperbole.pdf and b/man/hyperbole.pdf differ
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index cd6eb1c..29e48ae 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -155,7 +155,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P>
<PRE>
Edition 8.0.0pre
-Printed May 4, 2021.
+Printed May 9, 2021.
Published by the Free Software Foundation, Inc.
Author: Bob Weiner
@@ -197,7 +197,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@example
Edition 8.0.0pre
-May 4, 2021
+May 9, 2021
Published by the Free Software Foundation, Inc.
Author: Bob Weiner
@@ -1989,6 +1989,64 @@ implicit button types (they are listed in increasing
order of priority).
@table @code
+@findex ibtypes org-mode
+@cindex Org-mode
+@cindex radio target
+@cindex code block
+@cindex links
+@kindex C-c C-c
+@kindex M-@key{RET}
+@findex org-ctrl-c-ctrl-c
+@findex org-meta-return
+@vindex hsys-org-enable-smart-keys
+@cindex enable org-mode support
+@cindex disable org-mode support
+@cindex inhibit org-mode support
+@item org-mode
+For users of Emacs Org-mode, Hyperbole does quite a few things.
+
+First, the Action Key follows internal links in Org-mode files. When
+pressed on a link referent/target, the link definition is displayed,
+allowing two-way navigation between definitions and targets.
+
+Second, the Action Key follows Org-mode external links. The Assist
+Key displays help when pressed on an Org-mode link.
+
+Third, within a radio target definition, the Action Key jumps to the
+first occurrence of an associated radio target.
+
+Fourth, when point is on an outline heading in Org-mode, the Action Key
+cycles the view of the subtree at point and the Assist Key cycles the
+view of all headings in the buffer.
+
+Fifth, with point on the first line of a code block definition, the
+Action Key executes the code block via the Org-mode standard binding
+of @bkbd{C-c C-c}, @code{org-ctrl-c-ctrl-c}.
+
+In any other context besides the end of a line, the Action Key invokes
+the Org-mode standard binding of @bkbd{M-@key{RET}}, @code{org-meta-return}.
+
+To disable Hyperbole support within Org major and minor modes, set
+the custom option @code{hsys-org-enable-smart-keys} to @code{nil}. Then in
+Org modes, the Action Key will simply invoke @code{org-meta-return}. The
+following table summarizes the effect of this option setting.
+@end table
+
+@smallformat
+@verbatim
+@group
+|--------------+-------------------+------------------+----------+------------------|
+| This Setting | Smart Key Context | Hyperbole Button | Org Link | Fallback
Command |
+|--------------+-------------------+------------------+----------+------------------|
+| buttons | Ignore | Activate | Activate |
org-meta-return |
+| nil | Ignore | Ignore | Ignore |
org-meta-return |
+| t | Activate | Activate | Activate | None
|
+|--------------+-------------------+------------------+----------+------------------|
+@end group
+@end verbatim
+@end smallformat
+
+@table @code
@findex ibtypes doc-id
@cindex online library
@cindex document identifier
@@ -2057,16 +2115,6 @@ is shown.
For @@code, @@findex, @@var and @@vindex references, the associated
documentation string is displayed.
-@findex ibtypes mail-address
-@cindex e-mail address
-@cindex rolo address
-@cindex address
-@item mail-address
-If on an e-mail address in a specific buffer type, compose mail to that
-address in another window. Applies to the rolo match buffer, any buffer
-attached to a file in @code{hyrolo-file-list}, or any buffer
-with @file{mail} or @file{rolo} (case-insensitive) within its name.
-
@findex ibtypes patch-msg
@cindex patch output
@item patch-msg
@@ -2496,6 +2544,29 @@ path at @emph{line-num} and optional @emph{column-num}.
Also works
for remote pathnames. May also contain hash-style link references
with the following format:
@file{<path>[#<link-anchor>]:<line-num>[:<column-num>]}.
+@findex ibtypes mail-address
+@cindex e-mail address
+@cindex rolo address
+@cindex address
+@item mail-address
+If on an e-mail address in a specific buffer type, compose mail to that
+address in another window. Applies to the rolo match buffer, any buffer
+attached to a file in @code{hyrolo-file-list}, or any buffer
+with @file{mail} or @file{rolo} (case-insensitive) within its name.
+
+@findex ibtypes www-url
+@cindex URL
+@cindex World-wide Web
+@cindex WWW
+@cindex Action Key, web browsing
+@kindex Action Key, web browsing
+@vindex browse-url-browser-function
+@item www-url
+When not in an Emacs web browser buffer, follow any non-ftp URL (link) at
point.
+The variable, @code{browse-url-browser-function}, may be used to customize
+which URL browser is called. Terse URLs which lack a protocol prefix,
+like www.gnu.org, are also recognized.
+
@findex ibtypes pathname
@findex hpath:at-p
@findex hpath:find
@@ -2530,76 +2601,8 @@ delimiters. See the variable documentation for
@code{hpath:suffixes} for
suffixes that are added to or removed from the pathname when searching
for a valid match. See the function documentation for @code{hpath:find}
for special file display options.
-
-@findex ibtypes www-url
-@cindex URL
-@cindex World-wide Web
-@cindex WWW
-@cindex Action Key, web browsing
-@kindex Action Key, web browsing
-@vindex browse-url-browser-function
-@item www-url
-When not in an Emacs web browser buffer, follow any non-ftp URL (link) at
point.
-The variable, @code{browse-url-browser-function}, may be used to customize
-which URL browser is called. Terse URLs which lack a protocol prefix,
-like www.gnu.org, are also recognized.
-
-@findex ibtypes org-mode
-@cindex Org-mode
-@cindex radio target
-@cindex code block
-@cindex links
-@kindex C-c C-c
-@kindex M-@key{RET}
-@findex org-ctrl-c-ctrl-c
-@findex org-meta-return
-@vindex hsys-org-enable-smart-keys
-@cindex enable org-mode support
-@cindex disable org-mode support
-@cindex inhibit org-mode support
-@item org-mode
-For users of Emacs Org-mode, Hyperbole does quite a few things.
-
-First, the Action Key follows internal links in Org-mode files. When
-pressed on a link referent/target, the link definition is displayed,
-allowing two-way navigation between definitions and targets.
-
-Second, the Action Key follows Org-mode external links. The Assist
-Key displays help when pressed on an Org-mode link.
-
-Third, within a radio target definition, the Action Key jumps to the
-first occurrence of an associated radio target.
-
-Fourth, when point is on an outline heading in Org-mode, the Action Key
-cycles the view of the subtree at point and the Assist Key cycles the
-view of all headings in the buffer.
-
-Fifth, with point on the first line of a code block definition, the
-Action Key executes the code block via the Org-mode standard binding
-of @bkbd{C-c C-c}, @code{org-ctrl-c-ctrl-c}.
-
-In any other context besides the end of a line, the Action Key invokes
-the Org-mode standard binding of @bkbd{M-@key{RET}}, @code{org-meta-return}.
-
-To disable Hyperbole support within Org major and minor modes, set
-the custom option @code{hsys-org-enable-smart-keys} to @code{nil}. Then in
-Org modes, the Action Key will simply invoke @code{org-meta-return}. The
-following table summarizes the effect of this option setting.
@end table
-@group
-@smallformat
-@verbatim
-|--------------+-------------------+------------------+----------+------------------|
-| This Setting | Smart Key Context | Hyperbole Button | Org Link | Fallback
Command |
-|--------------+-------------------+------------------+----------+------------------|
-| buttons | Ignore | Activate | Activate |
org-meta-return |
-| nil | Ignore | Ignore | Ignore |
org-meta-return |
-| t | Activate | Activate | Activate | None
|
-|--------------+-------------------+------------------+----------+------------------|
-@end verbatim
-@end smallformat
-@end group
@node Action Buttons, , Implicit Button Types, Implicit Buttons
@subsection Action Buttons
@@ -2715,9 +2718,10 @@ within the same directory. If you want to view some
other
directory-specific button file, simply use the normal Emacs file
finding commands.
-If you want group and site-specific button files, simply place links to such
-files at the top of your personal button file and do so for your colleagues.
-This provides a flexible means of connecting to such resources.
+If you want group and site-specific button files, simply place links
+to such files at the top of your personal button file and do so for
+your colleagues. This provides a flexible means of connecting to
+such resources.
@node Action Types, Button Type Precedence, Button Files, Buttons
@section Action Types
@@ -2761,7 +2765,8 @@ Display a message showing the given variable name and its
value.
@findex actypes eval-elisp
@item eval-elisp
-Evaluate a Lisp expression LISP-EXPR for its side-effects and return any
non-nil value.
+Evaluate a Lisp expression LISP-EXPR for its side-effects and return
+any non-nil value.
@findex actypes exec-kbd-macro
@item exec-kbd-macro
@@ -8885,7 +8890,9 @@ When pressed at the end of a line but not the end of a
buffer:
@code{smart-scroll-proportional} is nil or if point is on the top
window line, it scrolls up (forward) a windowful. Otherwise, it tries
to bring the current line to the top of the window, leaving point at
- the end of the line and returning t if scrolled, nil if not.
+ the end of the line and returning t if scrolled, nil if not. To disable
+ this behavior entirely, evaluate this line:
+ @code{(customize-set-variable 'action-key-eol-function #'ignore)}
@end group
@end format
@format
@@ -8897,7 +8904,9 @@ When pressed at the end of a line but not the end of a
buffer:
@code{smart-scroll-proportional} is nil or if point is on the bottom
window line, it scrolls down (backward) a windowful. Otherwise, it tries
to bring the current line to the bottom of the window, leaving point at
- the end of the line and returning t if scrolled, nil if not.
+ the end of the line and returning t if scrolled, nil if not. To disable
+ this behavior entirely, evaluate this line:
+ @code{(customize-set-variable 'assist-key-eol-function #'ignore)}
@end group
@end format
diff --git a/man/version.texi b/man/version.texi
index c514998..608d0ec 100644
--- a/man/version.texi
+++ b/man/version.texi
@@ -1,4 +1,4 @@
@set UPDATED May, 2021
@set UPDATED-MONTH May 2021
-@set EDITION 8.0.0
-@set VERSION 8.0.0
+@set EDITION 8.0.0pre
+@set VERSION 8.0.0pre
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/hyperbole 9812d9d 1/2: Add Hyperbole menu customization for Org Smart Key control,
ELPA Syncer <=