diff --git a/ChangeLog b/ChangeLog index f598e0ae..984f6ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,966 @@ +2024-01-20 Mats Lidell + +* hmouse-sh.el (hmouse-move-point-eterm): Remove unused function. + +* Cleanup using flycheck resolving info and warning messages. + +* Update copyright date of latest updated version to be 2024 for all files + with copyright string that so far have been updated in git under 2024. + +* test/hsettings-test.el: New test file for hsettings. + (hsettings-test--hyperbole-web-search): Test hyperbole-web-search. + +* Makefile (package-lint): Add explicit loading of package-lint from Melpa + for this target. Only needed there. + +* test/hy-test-dependencies.el: Do not load package-lint for running + tests. + (string-replace): Remove not needed compatibility code. + +* test/hyrolo-tests.el (hyrolo-tests--outline-content-otl) + (hyrolo-tests--outline-content-md): Use replace-regexp-in-string for + compatibility with old Emacs versions. + +2024-01-17 Bob Weiner + +* test/hy-test-dependencies.el (org-reloaded): Show Org src dir. + (string-replace): Conditionally define + this from "compat" package, since is from Emacs28 and not available + in Emacs27. + +* hsys-org.el (hsys-org-fix-version): Rewrite to reload any Org libraries + previously loaded from the wrong builtin Org path, if a newer + user-installed Org version exists on the 'load-path'. + (hsys-org-get-libraries-to-reload): Add to compute wrong + Org libraries loaded and use in above function. + +2024-01-16 Mats Lidell + +* Makefile (eln): Use echo target for showing build info as part of the + eln build. + (echo): Show Emacs location and version in build environment info. + +2024-01-15 Bob Weiner + +* hyrolo.el (hyrolo-to-entry-beginning): Rewrite to move properly. + (hyrolo-move-backward): Remove, no longer used. + +2024-01-16 Mats Lidell + +* test/hyrolo-tests.el + (hyrolo-tests--forward-same-level-all-file-types-level1-depth2) + (hyrolo-tests--forward-same-level-all-file-types-level2): Add test + with more file types and second level headings. + + (hyrolo-tests--outline-content-org, hyrolo-tests--outline-content-otl) + (hyrolo-tests--outline-content-md); Add test content constants. + + (hyrolo-tests--gen-kotl-outline): Add depth arg to kotl to generate + child cells in test data. + +2024-01-15 Bob Weiner + +* test/hyrolo-tests.el (hyrolo-tests--forward-same-level-all-file-types-level1): + Fix test error by removing last forward list element so does not move past. + +* hyrolo.el (hyrolo-map-matches, hyrolo-funcall-match): Disable 'orgtbl-mode' + only if enabled. + +* man/hkey-help.txt: Add ref to Org Meta Return. + +* hui-mouse.el (smart-hyrolo): Extend to edit source location from any line + within the header, not just the @loc> line. + man/hyperbole.texi (Smart Key - HyRolo Match Buffers): Document above change. + +* kotl/kotl-mode.el (kotl-mode): Set 'outline-level' to 'hyrolo-outline-level' + which works for all HyRolo supported modes. + +* hyrolo.el (hyrolo-mode-map): Change {b} to 'hyrolo-outline-backward-same-level'. + Change {f} to 'hyrolo-outline-forward-same-level' and rewrite. + (hyrolo-outline-get-last-sibling, hyrolo-outline-get-next-sibling): + Add to support {f} and {b} commands. + (hyrolo-mode): Add set of buffer read-only to ensure no editing. Any + commands that change text therein need to also update the buffer caches. + (hyrolo-forward-same-level, hyrolo-backward-same-level): Remove, + duplicates of above hyrolo-outline-* functions. + (hyrolo-outline-next-visible-heading): Change to return whether any + next heading/header is found. + (hyrolo-outline-forward-same-level, hyrolo-outline-backward-same-level): + Rewrite based on 'hyrolo-outline-next-visible-heading'. + (hyrolo-outline-get-level): Add and call from above 2 functions. + (hyrolo-markdown-outline-level): Remove and use 'hyrolo-outline-level'. + (hyrolo-outline-level): Fix to handle kotl-mode properly. + (hyrolo-outline-move-subtree-up, hyrolo-outline-move-subtree-down, + hyrolo-outline-insert-heading, hyrolo-outline-demote, + hyrolo-outline-promote): Barf if buffer is read-only for these cmds. + +2024-01-15 Mats Lidell + +* test/hyrolo-tests.el (hyrolo-tests--forward-same-level-all-file-types-level1) + (hyrolo-tests--forward-same-level-org-level2): Add tests for hyrolo + forward and backward movement on same level. + +2024-01-14 Bob Weiner + +* hypb.el (require 'org): Add to define 'org-show-all'. Fix typo + missing leading h in 'hsys-org-enable-smart-keys'. + +* hsys-org.el (hsys-org-fix-version): Remove unused 'org-dir-version'. + +* hsys-xref.el (smart-emacs-lisp-mode-p): Declare this function. + +* hycontrol.el (hycontrol-windows-grid-buffer-list): Remove use of + free variable, 'mode', since this is never called when a specific + 'major-mode' is set. + +* hsys-org.el (package): Add (require 'package). + +* hmouse-tag.el (smart-tags-display): Fix missed rename of + 'hsys-xref-item-buffer' and 'hsys-xref-item-position'. + +* hui.el (hui:ebut-act, hui:ebut-act): Fix 'hui:hbut-operate' call + to use 'hbut:act' which takes a button argument as opposed to + 'ebut:act' and 'ibut:act' which each take a label argument. + +2024-01-13 Mats Lidell + +* test/hbut-tests.el (ebut-program-link-to-directory): Remove test in + favor of almost identical copy but keep the simpler name. + + (ebut-program-link-to-directory-in-non-file-buffer) + (ebut-program-link-to-directory-in-message-mode-buffer) + (ebut-delete-removes-ebut-in-non-file-buffer) + (ebut-delete-removes-ebut-in-message-mode-buffer): Add tests for + non-file buffer and non-file in message-mode buffer. + +2024-01-13 Bob Weiner + +* test/hy-test-dependencies.el: Print status of resolving any + multi-version/mixed Org installations. + +* hyrolo.el (hyrolo-any-file-type-problem-p): Disable printing + output if 'hyrolo-boolean-only-flag' is non-nil, used in + testing. + test/hyrolo-tests.el (hyrolo-tests--get-file-list-wrong-suffix): + Use above flag. + +* Makefile (test-ert): Do not ellide any stack traces, i.e. set + 'ert-batch-print-length' to nil. + Change test SELECTOR= to test= and document how to run. + +* hyrolo.el (hyrolo-any-file-type-problem-p): Disable printing of + any output when 'hyrolo-boolean-only-flag' is non-nil, typically + used for testing purposes. + +* hui.el (hui:ebut-unmark): Fix to handle a non-file-based buffer as + 'key-src'. + +* hsys-org.el (hsys-org-fix-version): Add. Add .org suffix to + 'auto-mode-alist' as it may be removed in this function. Return + t when Org is reloaded, nil if not. Require Org libraries even + when no reload is done. Handle when 'org-version' differs from + version number in 'org-dir'. + hyperbole.el (hyperb:init): Add call to 'hsys-org-fix-version' when + detect a mixed version installation of Org, typically part of + built-in Org loaded before loading a newer packaged version. + +* hargs.el (hargs:at-p): Fix 'no-default' arg handling to not select + non-existent dirs and files when no-default is true. + +* hsys-xref.el (hsys-xref-definitions): Fix to pass symbol, not string to + 'ert-test-boundp'. + +* hmouse-drv.el (hkey-help-show): Rename local var from 'org-help' to + 'hkey-org-help' to eliminate any confusion that this is an Org variable. + +* hyrolo.el (hyrolo-any-file-type-problem-p): Print error buffer to stdout + when run noninteractively (batch mode). + +* hyrolo.el (hyrolo-org-mode): Conditionalize org-fold usage as it is only + available in newer Org versions. Add missing forward declarations. + +* hyrolo.el (hyrolo-org-mode): Add newer Org 9.7-pre hide/show support. + test/hyrolo-tests.el (hyrolo-tests--outline-hide-show-heading, + hyrolo-tests--outline-show-when-moving-out-of-hidden-line): + The above change fixes these tests, so they have been re-enabled. + +* hmouse-tag.el (smart-lisp-identifier-chars): Add @ char as advised + functions use the orig-function@advice-wrapper-name to refer to the + advice. + +* hpath.el (hpath:variables): Move 'load-path' and 'exec-path' before + 'Info-directory-list' as they should be higher priority matches. + Remove old 'Info-directory'. + +2024-01-12 Bob Weiner + +* hypb.el (hypb:display-file-with-logo): Expand any folded headings + in the file. + + Improve use in tests by doing the following when in batch mode + (noninteractive): Kill off any non-modified buffer showing the file + to display before freshly reading it. + +2024-01-10 Bob Weiner + +* hui-mouse.el (hkey-alist): Move 'smart-eolp' to immediately before + 'smart-org' clause. + hsys-org.el (hsys-org-cycle-bob-file-list): Add to list files auto + set to 'org-mode' with minor 'view-mode' that allow org global + cycling of headings with {TAB} when at the beginning of buffer and + not on a heading. + hyrolo.el (hyrolo-verify): Allow buffers associated with files from + 'hsys-org-cycle-bob-file-list' as well. + hui-mouse.el (smart-org-bob-and-non-heading-p): Check whether {TAB} or + {M-RET} should org-global-cycle at point." + (smart-eolp): Allow for org global cycling at start of + buffer on a non-heading line in Hyperbole doc files when displayed from + Hyperbole menu items. + hypb.el (hypb:insert-hyperbole-banner): Update so Hyperbole logo link + does not include the first blank line, allowing for a different + action on {RET} there. + +* hyrolo.el (hyrolo-verify): Remove mentions of HyNote (not in this release). + +* hypb.el (hypb:display-file-with-logo): Remove call (skip-syntax-forward "-") + so point stays at the beginning of buffer for Org global display cycling. + Replace 'id-browse-file' and 'view-mode' with 'hyrolo-mode'. + +* hsys-flymake.el (repeat-mode): Add missing (require 'repeat) since + 'repeat-mode' function used herein is not autoloaded. + (flymake-mode-hook): Check whether `repeat-mode' is + fboundp or not before trying to enable it (should be autoloaded when + it exists, probably in Emacs 28 or greater). + +2024-01-09 Bob Weiner + +* hsys-xref.el: Add forgotten file. + +2024-01-09 Mats Lidell + +* test/hyrolo-tests.el (hyrolo-tests--outline-next-visible-heading-md) + (hyrolo-tests--outline-next-visible-heading-all) + (hyrolo-tests--outline-next-visible-heading-kotl) + (hyrolo-tests--outline-next-visible-heading-all-file-types) + (hyrolo-tests--outline-show-when-moving-out-of-hidden-line): Add more + test cases for hyrolo outline show, hide and movement. + + (hyrolo-tests--gen-kotl-outline, hyrolo-tests--verify-hidden-line) + (hyrolo-tests--verify-not-hidden-line): Add helper functions and use. + +2024-01-09 Bob Weiner + +* hact.el (htype:def-symbol, htype:names, actype:def-symbol): Change call + from 'make-symbol' to 'intern' for efficiency. + +2024-01-07 Bob Weiner + +* hbut.el (hbut:actype, ibut:type): Add for Hyperbole API use. + (ibut:at-type-p): Rewrite using 'ibtype:elisp-symbol' and + 'ibut:type'. + (ibut:is-type-p): Add to give both an ibut and a type for + comparison and API use. + (ibtype:def-symbol, hattr:report): Change call from 'make-symbol' + to 'intern' for efficiency. + +* hmouse-tag.el (smart-tags-noselect-function): Change function reference + to new name, 'hsys-xref-definition'. + +* MANIFEST: + Makefile (EL_COMPILE): + hsys-xref.el (hsys-xref-definitions): Move xref utility functions + from "hmouse-tag.el" to here and add Hyperbole unique hsys- prefix. + +* test/hy-test-helpers.el (hy-delete-files-and-buffers): Add helper for + cleaning up multiple files and buffers. + +2024-01-06 Mats Lidell + +* Makefile (HYPB_ERT_BATCH, HYPB_ERT_BATCH_BT): Add command line arg to + run test specified by selector. Example to run all hyrolo tests + + make test SELECTOR=hyrolo + + Bonus. Control size of backtraces so that we get more info on + errors. For full backtrace add command line argument FULL_BT= + + make test SELECTOR=hyrolo FULL_BT= + +2024-01-06 Bob Weiner + +* Makefile (test-all): Revert to use 'ert-run-tests-interactively' again + instead of 'ert-run-tests-batch' so get interactive *ert* features + including {b} to show backtraces for failed tests. With new updates, + now can run a previously run test from its definition with the Action + Key and it will simply update the result in the existing buffer rather + than overwriting the buffer with just that test. + +* test/hypb-ert-tests.el (hypb-ert-tests--edebug-is-called): Fix this + test by removing mock of `edebug-defun' which is necessary to set + the symbol property that registers the name as an ert test. Without + this, `hypb-ert-run-test-at-definition' will not run the test. + +2024-01-05 Bob Weiner + +* test/hypb-ert-tests.el (hypb-ert-tests--edebug-is-called): + hypb-ert.el (hypb-ert-run-test-at-definition, + hyperbole-run-test-definition, + hyperbole-run-test-definition:help): Remove 'test-name' arg + and find any name at point instead. Return t if run a test, else nil. + Simplify logic. + +* hmouse-tag.el (smart-emacs-lisp-mode-p): Include 'ert-results-mode'. + (smart-lisp-find-tag): Allow 'tag' arg to be a symbol, + not just a string. This allows it to be used as a target function + in 'find-function-regexp-alist' which is used in the ert results buffer + with the {.} command to jump to the ert test definition at point. + (xref-definitions, xref-definition): Rewrite to handle + ert-deftests. + +* Makefile (test-all): Change 'ert-run-tests-interactively' to + 'ert-run-tests-batch' because this shows tracebacks of any tests that + fail in the *Messages* buffer, speeding debugging. Although it does + have the side-effect of not producing the interactive *ert* buffer that + lets you jump to test source. However, you can paste the test results + into another Emacs and use Hyperbole to jump to test/symbol definitions. + (test-all-output): Save outputs including backtraces written + to *Messages* buffer in file "ERT-OUTPUT". + +* test/hib-kbd-tests.el (kbd-key-hy-demo-factorial-test): Remove use of *ert* + buffer which may not exist if run in batch mode. + +* hyrolo.el (hyrolo-any-file-type-problem-p): If problem occurs within a 'let', + then show backtrace so know where the let-binding was set. + +2024-01-04 Bob Weiner + +* hyrolo.el (hyrolo-org-mode): Force font-lock-mode off in this major mode for speed. + (hyrolo-funcall-match): Add optional arg 'backward-flag' to select + proper major mode for a *HyRolo* match file when moving backwards. + test/hyrolo-tests.el (hyrolo-tests--outline-next-visible-heading, + hyrolo-tests--outline-next-visible-heading-two-sections): + Fix tests to work with fixed {n} and {p} commands. + +* hui-mouse.el (hsys-flymake): Move loading of this library here from "hibtypes.el". + hsys-flymake.el (hsys-flymake-issue-at-point, hsys-flymake-issue-at-point:help): + Remove this ibtype and its :help function. Hyperbole uses 'hkey-alist' Smart + Key invocations of functions from this file instead now. + Also, add documentation of all commands and key bindings. + +* test/hyrolo-tests.el: Changed all 'header' to 'heading'. + (hyrolo-tests--generate-heading-contents-for-tests): Generalized to take + a 'heading-prefix-char' argument, to allow for markdown outline generation + as well. + +* hyrolo.el (hyrolo-hdr-move-after-p): Fix and improve to handle point + anywhere within a file header, not just on delim or loc lines. + (hyrolo-outline-next-visible-heading, + hyrolo-outline-previous-visible-heading): Fix to handle file + headers properly when moving more than one entry at a time. + +2024-01-03 Bob Weiner + +* hui-mouse.el (smart-eolp): Change 'hsys-flymake-get-issue-at-point' to + correct 'hsys-flymake-get-issue-at-position' call. + (hkey-alist): If in the flymake linter list of issues buffer, + jump to or show issue at point. + man/hkey-help.txt: + man/hyperbole.texi (Implicit Button Types): Remove + 'hsys-flymake-issue-at-point' ibtype (use {C-c C-l g} command instead. + Document new 'hkey-alist' behavior from above. +* man/hyperbole.texi (Smart Key - Occurrence Matches): Move to proper + priority order. + (Smart Key - Flymake Mode): Add and add table of + Hyperbole key bindings in source buffer 'flymake-mode'. + (Glossary - Flymake): Add. + (Implicit Button Types): Remove hsys-flymake ibtype + since would only apply if no other type applies and this could be + confusing and inconsistent to users. Leave it commented out in the + code so a user can enable it at a higher priority if desired. + +* hypb-ert.el (hypb-ert-run-test-at-definition): Fix to edebug function + when not previously defined. + test/hypb-ert-tests.el (hypb-ert-tests--edebug-is-called): Make edebug + test work. + +* hib-debbugs.el (declare-function): Revert declarations to use + "ext:debbugs-gnu" from "ext:debbugs" since the newer package + does not have many of the functions that Hyperbole presently uses. + +* MANIFEST: + man/hkey-help.txt: + man/hyperbole.texi (Implicit Button Types): + hibtypes.el (hsys-flymake): + Makefile (EL_COMPILE): Add "hsys-flymake.el" to Hyperbole. + +2024-01-02 Bob Weiner + +* hibtypes.el (text-toc): Fix doc on whitespace handling before and after + TOC header and TOC entry lines. + hactypes.el (text-toc): Fix not handling different whitespace in TOC + entry vs. section header. + +* hui.el (hui:hbut-help): Return custom button help function symbol if any; + otherwise, return the function used, 'hbut:report. This is used in + Smart Key help which previously was not displaying the proper action + for the Assist Key when on a Hyperbole button. + hmouse-drv.el (hkey-help): Update to display proper Assist Key help. + +2023-01-02 Mats Lidell + +* test/hyrolo-tests.el (hyrolo-tests--level-number) + (hyrolo-tests--generate-header-contents-for-tests) + (hyrolo-tests--gen-outline): Add helper for constructing org files for + tests. + (hyrolo-tests--outline-next-visible-header) + (hyrolo-tests--tab-through-matches) + (hyrolo-tests--outline-hide-show-heading) + (hyrolo-tests--outline-up-header, hyrolo-tests--edit-entry) + (hyrolo-tests--outline-next-visible-header-two-sections): Add test for + working with hyrolo matches. + (hyrolo-tests--get-file-list-change) + (hyrolo-tests--get-file-list-wrong-suffice): Add hyrolo tests for + get-file-list. + +* test/hypb-ert-tests.el (hypb-ert-tests--def-at-p) + (hypb-ert-tests--edebug-is-called): Add tests for hypb-ert. + +2024-01-01 Bob Weiner + +* hypb-ert.el (hypb-ert-def-at-p): Update doc. Fix grouping ref that was + 1 that should have been 2 since optional "\\(-async\\)" added to the + regexp. + +2023-12-31 Bob Weiner + +* hbut.el (ibut:create, ibut:at-p): Change to call 'smart-eolp' instead of + 'eolp' so can handle flymake issues where an overlay/char-property is + added at the end of a line only and we want an implicit button created + for this. + +* hui-mouse.el (hkey-alist): Add logic for new hsys-flymake library to handle + diag issues at the end of the line where we want an implicit button to + fire rather than typicaly eol handling. + +* hbut.el (ibtype:test-p, ibtype:act): Add these to mirror actype functions. + (ibtype:elisp-symbol): Add alias similar to existing actype one. So + that (ibtype:act ) executes the ibtype action if the + current buffer context supports it. + +* hyrolo.el (hyrolo-file-list): Add 'hyrolo-set-file-list' after loading the hyrolo + library (at the end of the file) if 'hyrolo-file-list' has been set by the + user or the customization system prior to loading HyRolo. + +2023-12-30 Bob Weiner + +* hyrolo.el (hyrolo-show-levels): Add top-level save-excursion so point does + not move. + (hyrolo-outline-next-visible-heading): Rename + 'hyrolo-next-visible-heading' to this. + +* FAST-DEMO (Action Buttons): Update to include ert test definition within + the file so do not have to load all of the test files to run the demo. + +* hbut.el (ebut:label-p): For buttons, allow unlimited length + button labels since might be an entire long sexpression. + +* hib-debbugs.el (debbugs-gnu-query:list): Debbugs support libary has been renamed + from 'debbugs-gnu' to just 'debbugs'. + +2023-12-29 Bob Weiner + +* test/hui-tests.el (hui--link-possible-types): Make use .otl rather than .outl + file suffix which automatically invokes 'outline-mode'. + +* hyrolo.el (hyrolo-to-entry-end): Fix bug where HyRolo fgrep would get stuck + in Org buffers without any outline delimiters due to this function moving + backwards. + +* HY-ANNOUNCE: + README.md: + FAST-DEMO (Introductory Videos): Add 3 EmacsConf 2023 videos on Hyperbole. + +* hui-mouse.el (hkey-alist): Add 'ert-results-mode' support using rsw's new + "ert-results.el" library. Add 'smart-ert-results' and + 'smart-ert-results-assist' support functions. Fix many flycheck warnings. + +* hmouse-tag.el (smart-lisp-find-tag): Fix issue where 'hkey-value' was used + as tag when it was not a string, causing failures on known function lookups. + +2023-12-29 Mats Lidell + +* test/demo-tests.el (fast-demo-markdown-anchor-with-spaces) + (fast-demo-elisp-or-env-vars, fast-demo-elisp-library-in-load-path) + (fast-demo-info-manual-references, fast-demo-grep) + (fast-demo-python-trace-back, fast-demo-man-k) + (fast-demo-action-button-shell, fast-demo-action-button-fill-column) + (fast-demo-display-demo-using-action-buttons) + (fast-demo-display-kotl-starting-from-cell) + (fast-demo-outline-section-anchor-and-relative-line-number) + (fast-demo-markdown-anchor-with-spaces) + (fast-demo-elisp-library-in-load-path) + (fast-demo-elisp-or-env-vars): Add remaining test cases for fast-demo. + +2023-12-28 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode:pre-self-insert-command): Add these kotl-mode + commands: kill-line, kill-region, kill-sentence, kill-or-copy-region, yank, + yank-from-kill-ring, yank-pop, and yank-rectangle. + (kotl-mode:to-valid-position-commands): Make list of commands + modifiable. + +* 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 + +* hmouse-drv.el (hkey-window-link): Invert the meaning of the prefix arg, so without + one, creates implicit buttons and with creates explicit buttons. This is the new + V9 standard as then by default there is no need to prompt for a button name. + hui-window.el (hmouse-alist-add-window-handlers): Invert drag between windows so + without a prefix arg, creates implicit buttons and with, creates explicit ones. + hui.el (hui:ibut-link-directly): + FAST-DEMO (Implicit Buttons): + DEMO (Creation via Dragging, Creation via Ace Window): + man/hyperbole.texi (Keyboard Drags, Smart Mouse Drags between Windows): + man/hkey-help.txt: Update doc on above. + +2023-12-26 Mats Lidell + +* test/hmouse-drv-tests.el: + test/hibtypes-tests.el: + test/hib-kbd-tests.el: + test/demo-tests.el: Set enable-local-variables to nil for test cases + where DEMO and FAST-DEMO is loaded to avoid getting queried. + +2023-12-26 Bob Weiner + +* hpath.el (hpath:to-markup-anchor): If 'referent-regexp' starts with '^', add + "[ \t]*" instead of "[ \t]+" to the expression in case it matches the whole line. + +* hui.el (hui:link-possible-types): Change outline heading line link to trigger only + for outline, org and kotl modes when point is anywhere on the heading line. + Include non-zero column in pathname so returns to the original point. Produce a + 'link-to-string-match' type. + hbut.el (ibut:insert-text): Change 'actypes::link-to-string-match' to use a pathname + format ibut rather than a action button when the occurrence + number is 1. + +* hui-select.el (hui-select-scan-sexps): Don't use 'hui-select-syntax-table' in Lisp + modes as its use of matching angle brackets prevents proper sexp selection when + on the opening parentheses of anything with angle brackets inside, e.g. (< 2 3). + +* hyrolo-logic.el (hyrolo-fgrep-logical): Fix quoting for Lisp read and regexp + operator handling. + hyrolo.el (hyrolo-fgrep): Fix to handle 'r-' regexp logic operators. + man/hyperbole.texi (HyRolo Searching): Add doc for regular expression-based + logic operators. + +* hyrolo-logic.el (hyrolo-map-logic): Update to handle multi-file formats + in 'hyrolo-display-buffer'. + (hyrolo-map-entries, hyrolo-map-kotl): Add doc string. + (hyrolo-fgrep-logical): Rename arg 'whole-buffer-flag' to + 'koutline-flag' to match its purpose. Does not seem to be sent as true + anywhere in the existing code base. + +* hyrolo.el (hyrolo-hdr-in-p): Add to test if in a HyRolo file header. + (hyrolo-hdr-to-first-line-p): Add to move to file header start. + (hyrolo-outline-hide-subtree): If point is on a file header in the + 'hyrolo-display-buffer', then collapse the entire file from the current + end-of-line forward. This makes {h} work within file headers. + (hyrolo-hdr-move-after-p): Handle point on single text line between + header delimiters. + (hyrolo-outline-show-subtree): If point is on a file header in the + 'hyrolo-display-buffer', then show/expand the entire file. This makes {s} + work within file headers. + man/hyperbole.texi (HyRolo Keys): Update to document latest {h} and {s} behavior. + hbut.el (hbut:get-key-src): Call (hyrolo-hdr-move-after-p) so if in a file + hdr, backwards search finds its @loc line rather than going to prior one. + +* hyrolo.el (hyrolo-outline-level): Fix to return level 1 when on a file header + separator or @loc> line. + (hyrolo-outline-up-heading): Rewrite and fix to handle edge cases. + (hyrolo-name-at-p): Fix to store the current line and col in a text + property when possibly hierarchical name is found/used so can jump to the + specific line within an entry when editing. + (hyrolo-to): Fix to jump to stored current line and col after finding + a possibly hierarchical name in HyRolo. + +* man/hyperbole.texi (HyRolo Keys): Update doc for 'hyrolo-edit', {e} key, and + how it handles datestamps. Mention 'hyrolo-date-format'. + +* hactypes.el (link-to-kcell): Fix to use any source location, e.g. in HyRolo + display matches buffer. + +* hsys-org.el (hsys-org-agenda-item-at-p): + hui-mouse.el (smart-org): + man/hyperbole.texi (Smart Key - Org Mode): Update doc to note the context is + an Org agenda item within an Org agenda view, not the item in its source + context. + +* test/hy-test-helpers.el (hy-test-helpers:ensure-link-possible-type): Add. + test/hui-tests.el (hui--link-possible-types): Use above function to ensure + 'hui:link-possible-types' returns one given type only for each test herein. + +2023-12-26 Mats Lidell + +* test/hy-test-helpers.el (hy-delete-dir-and-buffer): Add test helper for + removing buffers for temp folders. + +* test/hui-tests.el (hui--link-possible-types): Add test for + hui:link-possible-types. + +2023-12-26 Bob Weiner + +* test/hyrolo-tests.el: Fix with-simulated-input where prompting for 'y'. + +* hyrolo.el (hyrolo-map-matches, hyrolo-funcall-match): Ensure point ends up + on a visible point so that reveal-mode does not force and unhide of the entry. + Remove the above logic from 'hyrolo-show-levels' since it calls + 'hyrolo-map-matches'. + (hyrolo-mode): For now, stop enabling 'reveal-mode' until can get it + working right with the enabling of 'outline-minor-mode' when switch major modes + in "*HyRolo*", typically using 'hyrolo-funcall-match' or 'hyrolo-map-matches'. + +* test/hyrolo-tests.el (hyrolo-sort-test): Enable this test. + hyrolo.el (hyrolo-add): Fix this function to insert sub-entries in the right + location so 'hyrolo-sort-test' passes. + +2023-12-25 Bob Weiner + +* hyrolo.el (hyrolo-entry-regexp): Rename to 'hyrolo-hdr-and-entry-regexp' and + in 'hyrolo-mode' extend its value to include all multiple trailing whitespace + chars after the entry delimiter. + Add new variable `hyrolo-entry-regexp' which does not match to file headers. + +* hyrolo.el (require 'reveal): Add since overload its functions now. + +* kotl/kotl-mode.el (kotl-mode:reveal-toggle-invisible): Fix by adding + 'get-buffer' call around 'hyrolo-display-buffer'. Otherwise, the buffer + comparison would always fail. + +* hyrolo.el (hyrolo-hdr-move-after-p): Modify to handle when point is not at + the start of but is on a hdr separator or loc line. + (hyrolo-to-entry-beginning): Fix to move past any file hdr. + (hyrolo-map-matches): Fix calls to this that are mode-specific by adding + second arg of t. + (hyrolo-show-levels): Rewrite so handles all behavior for {t} and {o} + key bindings. + (hyrolo-overview, hyrolo-top-level): Simplify for new version of + 'hyrolo-show-levels'. + (outline-mode-hook): Fix to apture only one whitespace char in + 'outline-regexp' so 'hyrolo-outline-level' function works properly. + (hyrolo-grep-file): Require a final blank line so that + 'outline-hide-sublevels' won't hide it and combine with any next file header. + (hyrolo-min-matched-level): Fix to start with max val rather than min val. + +* man/hyperbole.texi (HyRolo Keys): Document [ and ] keys to move to prev and + next buffer/file @loc> line. + +* hyrolo.el (hyrolo-to-entry-end): Don't move back one char if on end of line. + +* hbut.el (hbut:source-prefix): + hmoccur.el (moccur-source-prefix): Clarify doc. + +* hyrolo.el (hyrolo-markdown-suffix-regexp): Add and use in `hyrolo-file-suffix-regexp' + to capture all Markdown suffixes. + (hyrolo-any-file-type-problem-p): Use above regexp here. Separate out + invalid files due to invalid suffixes from files with invalid major modes due + to not being in 'auto-mode-alist'. + (outline-mode-hook): Add to configure outline-mode for use with HyRolo. + (hyrolo-org-mode): Update to set all local hyrolo variables. + +* kotl/kotl-mode.el (kotl-mode): Set 'outline-regexp' to match 'hyrolo-hdr-and-entry-regexp' + to account for file headers in 'hyrolo-mode' (multi-format major-mode). + +2023-12-24 Bob Weiner + +* hyrolo.el (hyrolo-any-file-type-problem-p): Add to handle file suffixes + that HyRolo cannot handle and to install the markdown-mode package as + necessary when a Markdown file is specified in 'hyrolo-file-list'. + (hyrolo-let-file-list, hyrolo-set-file-list): Call above function. + This fixes failures with Markdown files improperly put into fundamental-mode + which means their headings are not recognized properly. + (hyrolo-to-previous-loc, hyrolo-to-next-loc): Add and + bind to [ and ] keys in 'hyrolo-mode-map'. + (hyrolo-hdr-prefix-regexp): Add so do not repeat expression multiple places + and add this to `outline-regexp' in all major-modes supported by HyRolo. + +* hload-path.el (auto-mode-alist): Setup to invoke 'outline-mode' on ".otl" + suffixed files. + +* man/hyperbole.texi (HyRolo Concepts): + hyrolo.el (hyrolo-file-list): Update doc to specify allowable file suffixes + and types. + +2023-12-23 Mats Lidell + +* test/hpath-tests.el (hpath--expand-no-wildcards-existing-path) + (hpath--expand-variations-non-existing-path) + (hpath--expand-elisp-variable, hpath--expand-environment-variable) + (hpath--expand-auto-variable-alist, hpath--resolve-auto-variable-alist) + (hpath--expand-list-return-a-list, hpath--expand-list-match-regexp): + Add tests for hpath:expand and hpath:expand-list. + +2023-12-23 Bob Weiner + +* hypb.el (hypb:major-mode-from-file-name): Add for initial use in "hyrolo.el". + +* hactypes.el (link-to-regexp-match): Fix to use arg 'n' in the regexp search. + +* kotl/kotl-mode.el (kotl-mode): Ensure local vars are set if current buffer + is HyRolo display matches buffer. + +* hypb.el (hypb:remove-from-plist, hypb:do-remove-from-plist): Add for use in + "hywconfig.el". + hywconfig.el (hywconfig-add-by-name, hywconfig-delete-by-name, + hywconfig-restore-by-name): Fix all wconfig by name functions + which were storing only unnamed window configs. Change all to return a + boolean value based on whether the operation succeeds or not. + (hywconfig-set-names): Replace with 'hywconfig-named-set-entries'. + (hywconfig-named-get-entries, hywconfig-named-put, + hywconfig-named-get): Add. + (hywconfig-get-names): Replace with 'hywconfig-named-get-names'. + (hywconfig-set-window-configuration): Add doc. + (require 'set): Remove, no longer used. + +* kotl/kotl-mode.el (kotl-mode): Disable 'change-major-mode-hook' addition of + 'kotl-mode:show-all' if in the HyRolo display buffer. + +* hyrolo.el (hyrolo-hdr-and-entry-regexp): Add 'hyrolo-hdr-regexp' and 'hbut:source-prefix' + so are not skipped during hide/show operations. Also do this in + 'markdown-mode-hook' and 'kotl-mode'. + +* test/hyrolo-tests.el (hyrolo-demo-move-between-entries-on-same-level, + hyrolo-demo-no-following-same-level-heading): Fix + header skipping by using 'hyrolo-hdr-move-after-p'. + (hyrolo-fgrep-find-all-types-of-files): Fix by adding + proper headling structure to each file type. + (hyrolo-fgrep-and-goto-next-visible-md-heading): Fix + by removing one '#' from expected heading level. + +* kotl/kotl-mode.el (kotl-mode:reveal-toggle-invisible): May be in the + 'hyrolo-display-buffer', so wrap a 'hyrolo-funcall-match' call around + 'outline-reveal-toggle-invisible' call to ensure proper match buffer mode + is set for koutline matches. + +* hyrolo.el (hyrolo-grep-file): Remove 'backward-search-limit' as may miss prior + entry starting positions. + (hyrolo-add-match): Remove first arg, 'hyrolo-matches-buffer' and + use global 'hyrolo-display-buffer' instead. + (hyrolo-grep-file): Remove first arg from call to 'hyrolo-add-match'. + Remove unused local 'curr-entry-level-len' which would not work for Markdown + 'outline-regexp' anyway. + +2023-12-21 Bob Weiner + +* hyrolo.el (hyrolo-funcall-match, hyrolo-map-matches): Use (1- (point-max)) + when 'end' is nil, i.e. only a single file has been found and the start of + of the next one used to determine the end of this one has not yet been added. + +* man/hyperbole.texi (Implicit Button Types): Add doc for 'hib-python-traceback' + and 'hyrolo-stuck-msg'. + +* hibtypes.el (Info-node): Tighten match to limit valid chars after closing paren. + (hyrolo-stuck-msg): Add to jump to the position where a HyRolo match + became stuck, if ever happens, when point is on the error. + hyrolo.el (hyrolo-grep-file): Update 'Stuck looping in buffer' msg so can be + used in 'hyrolo-stuck-msg' ibtype. + +* hyperbole.el: The 'describe-package' function fails under Emacs 28 when multiple + maintainers are listed under the 'Maintainer' header but later Emacs versions + support a 'Maintainers' header, so include both. Change to using 'Authors' + instead of 'Author'. + +2023-12-20 Bob Weiner + +* hyrolo.el (hyrolo-edit-entry, hyrolo-locate): Wrap in 'hyrolo-funcall-match' call + to fix these functions to work with multiple modes. + (hyrolo-funcall-match): Ensure 'unwind-protect' end forms are run within + 'hyrolo-display-buffer'. + +* kotl/kview.el (kview:outline-regexp): Add grouping for kcell label matches; used + in `hyrolo-display-buffer'. + kotl/kotl-mode.el (kotl-mode): Add local settings of 'hyrolo-entry-group-number' + and 'hyrolo-entry-trailing-space-group-number'. + +2023-12-18 Bob Weiner + +* hyrolo.el (hyrolo-move-backward, hyrolo-move-forward): If FUNC is a lambda + (not a function symbol), then temporarily narrow to the current match buffer + before applying FUNC. + (hyrolo-to-entry-end): Remove unused arg '_curr-entry-level-len'. + (hyrolo-grep-file): Remove unneeded passing of 'curr-entry-level-len' arg to + (hyrolo-outline-previous-visible-heading, hyrolo-next-visible-heading): Fix + doc strings to mention stops at match buffer headers. + +2023-12-17 Bob Weiner + +* hyrolo.el (hyrolo-move-backward, hyrolo-move-forward): If on a kotl-mode entry, + ensure move to a valid position. + +2023-12-16 Bob Weiner + +* hpath.el (hpath:expand-list): If path comes back nil from 'hpath:expand', then + ignore any potential file wildcards. + +2023-12-15 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode): Fix check of 'kotl-previous-mode' to not set local + vars if prior mode was the same, i.e. kotl-mode. + +* hyrolo.el (hyrolo-hdr-move-after-p): Add to move after any hdr lines in any buffer. + (hyrolo-grep-file, hyrolo-map-level, hyrolo-map-level, hyrolo-show-levels: + Change to call 'hyrolo-hdr-move-after-p'. + (hyrolo-move-forward, hyrolo-move-backward): Rewrite. + (hyrolo-up-heading): Remove, use 'hyrolo-outline-up-heading'. + (hyrolo-map-matches, hyrolo-funcall-match): Add optional 'narrow-flag' to + narrow to the current file of matches. + (hyrolo-outline-previous-heading): Add. + (hyrolo--cache-major-mode): Fix so stored matched buffer major-mode rather + than hyrolo-mode from the display matches buffer. Also, reused cached major-mode-index + values when the major-mode is the same and increment index only when not reused. + (hyrolo-map-matches, hyrolo-funcall-match): Eliminate save-restriction calls. + (hyrolo-cache-get-major-mode-from-pos): Add and use in 'hyrolo-cace-set-major-mode'. + (hyrolo-previous-visible-heading): Remove, use + 'hyrolo-outline-previous-visible-heading'. + +2023-12-14 Bob Weiner + +* hyrolo.el (hyrolo-grep): Remove '(set-buffer display-buf)' since call to + 'hyrolo-display-matches' does this. + (hyrolo-mode-map): Fix bindings of hyrolo-* overloads of + 'outline-mode-prefix-map' (outline-minor-mode). + +2023-12-13 Bob Weiner + +* hyrolo-logic.el (hyrolo-map-logic): Add doc for last arg, + whole-buffer-flag. + (hyrolo-logic): Add calls to 'hyrolo--cache-initialize' and + 'hyrolo--cache-post-display-buffer'. + Also add temporary disabling of 'magit-auto-revert-mode-enable-in-buffers' + in 'after-change-major-mode-hook' to speed file processing. + (hyrolo-map-entries, hyrolo-map-kotl): Add call to + 'hyrolo--cache-major-mode'. + hyrolo.el (hyrolo-grep-file): Change 'delq' to 'remove' so does not + permanently modify the 'after-change-major-mode-hook'. + +* hyrolo.el (hyrolo--cache-initialize, hyrolo--cache-major-mode): Ensure + all settings apply to `hyrolo-display-buffer' local variables. + (hyrolo-find-file): Fix doc string. + (hyrolo-set-file-list, hyrolo-let-file-list): Remove call to + 'hyrolo--cache-initialize'. + +* test/hyrolo-tests.el (hyrolo-demo-move-to-beginning-and-end-of-file): + Move to {,} and {.} tests to sep test, + 'hyrolo-demo-move-to-beginning-and-end-of-entry'. + +2023-12-12 Bob Weiner + +* hyrolo.el (hyrolo-mode): Add trailing space to default `outline-regexp'. + (hyrolo-org-mode): Add quick enable of basic Org mode for use + in HyRolo display match searches and use in 'hyrolo-helm-org-rifle'. + (hyrolo-org-outline-level): Add to not widen the buffer when + computing the Org outline level when in the display match buffer. + +* kotl/kotl-mode.el (kotl-mode): + hyrolo.el (hyrolo-mode): Change 'run-hooks' to 'run-mode-hooks'. + +2023-12-11 Bob Weiner + +* hyrolo.el (hyrolo-mode): Add 'hbut:source-prefix' and 'hyrolo-hdr-regexp' + as level 1 outline entries in outline-heading-alist. + (hyrolo-mode-outline-level): Delete, use default 'hyrolo-outline-level' + or per matched file function in 'outline-level'. + +* test/hibtypes-tests.el (ibtypes::text-toc-test): Regexp-quote * and allow + for preceding whitespace. + +* kotl/kotl-mode.el (require 'hyrolo): Add. + +* hyrolo.el (hyrolo-grep-file): Change 'insert-buffer-substring-no-properties' + to 'insert-buffer-substring' to keep properties, as need Koutline + 'kcell properties to navigate them properly. + +* kotl/kview.el (kcell-view:to-label-end): + kotl/kotl-mode.el (kotl-mode:to-valid-position): Fix to handle file headers + in HyRolo display match buffer when displaying parts of Koutlines. + +* hyrolo.el (hyrolo-cache-set-major-mode): Move to this function the + addition of 'hyrolo-hdr-regexp' to both 'hyrolo-hdr-and-entry-regexp' and + 'outline-regexp' within the *HyRolo* display match buffer. + (hyrolo-markdown-outline-level, hyrolo-cache-set-major-mode): + Fix markdown 'outline-level' function to always return a non-nil level. + +2023-12-10 Bob Weiner + +* hyrolo.el (hyrolo-grep): Remove unused local 'hyrolo-buf'. + (hyrolo-outline-minor-mode): Define and enable in 'hyrolo-mode'. + +* hyrolo-menu.el (hyrolo-menu-common-body): + hyrolo.el (hyrolo-mode-map): Change to 'make-sparse-keymap', name it and inherit + from a copy of 'outline-mode-prefix-map' where its command bindings are overriden + with hyrolo- prefixed ones. + +* hyrolo.el (hyrolo-move-backward): Change 'outline-previous-heading' call to + 'hyrolo-outline-previous-heading'. + 2023-12-09 Mats Lidell * test/hy-test-helpers.el (hy-test-helpers:consume-input-events): Remove not needed recursion-depth check. +2023-12-09 Bob Weiner + +* hyrolo.el (hyrolo-funcall-match, hyrolo-map-matches): Add these functions to + wrap function calls in the HyRolo display matches buffer that require the + original major mode of the location, e.g. outline commands. + +* hyrolo.el (hyrolo-outline-show-subtree): Add to replace usage of + 'outline-show-subtree'. + (hyrolo-outline-hide-subtree): Rename from 'hyrolo-hide-subtree'. + (hyrolo-outline-hide-subtree, hyrolo-overview, + hyrolo-top-level, hyrolo-move-backward, hyrolo-move-forward): + Add a wrapper call to 'hyrolo-funcall-match' or 'hyrolo-map-matches' + which sets appropriate major mode per location in the match buffer. + (hyrolo-outline-*): Add new functions emulating all 'outline-minor-mode' + key bindings with above wrapper calls and add to 'hyrolo-mode-map' keys. +* hyrolo-*.el (outline): Change all (outline-*) calls to (hyrolo-outline-*) calls. + This supports different major modes within the HyRolo match display buffer. + +2023-12-08 Bob Weiner + +* kotl/kotl-mode.el (kotl-mode): Update to be usable in `hyrolo-display-buffer'. + +2023-12-07 Bob Weiner + +* hyrolo.el (hyrolo--cache-*): Add caching of each 'major-mode' to use for the buffer + from which a matching HyRolo record is drawn. + (hyrolo-let-file-list, hyrolo-set-file-list): Add calls to + `hyrolo--cache-initialize'. + (hyrolo-grep): Add calls to 'hyrolo--cache-initialize' and to + 'hyrolo--cache-post-display-buffer' when not 'count-only'. + (hyrolo-grep-file): Add call to 'hyrolo--cache-locals'. + (hyrolo-grep): Remove concatenated 'outline-regexps' and 'hyrolo-entry-regexps'. + They are no longer used. Move header matching in `outline-regexp' and + `hyrolo-hdr-and-entry-regexp' to 'hyrolo--cache-matched-buffer'. + 2023-12-07 Mats Lidell * test/hywconfig-tests.el (hywconfig-tests--remove-ring) @@ -15,6 +973,51 @@ (hywconfig--get-not-existing-config-fails, hywconfig--add-by-name) (hywconfig--delete-by-name): Tests. +2023-12-04 Bob Weiner + +* Makefile (HY-TALK/HYPER*.org): Add Hyperbole talk slides from EmacsConf + presentations. + MANIFEST: Update with org files used in talks. + +* hsys-org.el (org-link): Expand this actype to open Org links that are in + non-Org-mode buffers. + +2023-12-03 Bob Weiner + +* hibtypes.el (annot-bib): Lower priority below 'org-link-outside-org-mode' + as this can be mistaken for an org link outside an org buffer. + +* hactypes.el (link-to-regexp-match): Fix typo. + +* hui.el (hui:link-possible-types): Set no-default when checking if + at a filename; otherwise, will match at any point in a file-based + buffer, which is only supposed to trigger at the end of the possible + matches when 'buffer-file-name' is checked. + +* test/hyrolo-tests.el (hyrolo-sort-test): Temporarily set to known + :failing, as is a known bug. + +2023-12-02 Bob Weiner + +* hyrolo.el (hyrolo-expand-path-list): Eliminate any non-existing + entries after expansion. + (hyrolo-date-format): Allow empty string to disable + date adding/updating in entries. + (hyrolo-set-date): Add optional 'edit-only-flag' + when non-nil, replaces existing dates but does not add new ones; + use as part of an edit command. Do nothing if 'hyrolo-date-format' + is an empty string. These changes support the new file formats + that HyRolo supports where you don't want a date added when jumping + to and editing entries. + (hyrolo-edit-date): Add for use with 'hyrolo-edit-hook'. + (hyrolo-edit-hook): Set to 'hyrolo-edit-date'. + (hyrolo-toggle-datestamps): Use 'hyrolo-edit-date'. + (hyrolo-to): Handle entries of all file types now supported + by HyRolo. If kotl-mode, move to first valid position on the line. + +* kotl/kotl-mode.el (kotl-mode:example): Fix to prompt to save in + home directory, not the current directory. + 2023-12-01 Mats Lidell * hmouse-tag.el (ibtype:def-symbol): Declare function to silence warning. @@ -26,6 +1029,12 @@ 2023-12-01 Bob Weiner +* hyrolo.el (hyrolo-add): Fix that narrow-to-region was narrowing to a + zero-sized region when point was not on an entry start character. + Also fix that when moved to point-max trying optimized insertion + but failing, never moved point back to point-min, so insertion + would occur at the buffer end rather than the proper point. + * hargs.el (hargs:delimited): Remove use of 'bounds-of-thing-at-point' and (require 'thingatpt) since it doesn't use the delimiters given and returns wrong results. This fixes defal tests that were failing. @@ -110,10 +1119,6 @@ which exits and selects the first minibuffer line, not the candidate presently selected. -* hargs.el (hargs:delimited): - (require 'thingatpt): For 'bounds-of-thing-at-point' - used in 'hargs:delimited' on single char matching delims. - * hui-select.el (hui-select-scan-sexps): Add to fix brace handling as a matching pair when selecting things by using previously unused 'hui-select-syntax-table'. @@ -131,7 +1136,7 @@ and 'keymap-sym' locally within the function rather than globally which would affect modes beyond those in 'hui-select-markup-modes'. (hui-select-goto-matching-delimiter): If the key that - invokes this command in hyperbole-minor-mode is also bound in the + invokes this command in hyperbole's minor-mode is also bound in the current major mode map, then interactively invoke that command instead. Typically prevents clashes over {C-c .}. Previously did this only for 'org-mode' but 'kotl-mode' also has a conflict @@ -209,7 +1214,7 @@ (hyrolo-find-file): Improve 'outline-regexp' handling and set 'outline-level' function if an Emacs outline. (hyrolo-add): Compare entry-regexp against default-value of - 'hyrolo-entry-regexp' rather than a literal string. + 'hyrolo-hdr-and-entry-regexp' rather than a literal string. 2023-11-14 Bob Weiner @@ -768,7 +1773,7 @@ * kotl/kotl-mode.el (kotl-mode:self-insert-command): Remove special kotl-mode auto-filling is handled by regular 'self-insert-command'. This fixes improper hanging indent auto- - filling in kcells due to narrowing kcell to text contens only, hiding the cell prefix. + filling in kcells due to narrowing kcell to text contents only, hiding the cell prefix. (kotl-mode:pre-self-insert-command): kotl/kotl-orgtbl.el (kotl-mode:setup-overriding-orgtbl-keymap): Remove reference to 'kotl-mode:self-insert-command'. @@ -2831,7 +3836,7 @@ name with 'name' and 'name-key'. hyrolo-google-contacts-grep, hyrolo-grep-file, hyrolo-display-to-entry-end, hyrolo-name-at): kotl/kimport.el (kimport:star-entries): Don't fold case when searching - for 'hyrolo-entry-regexp'. + for 'hyrolo-hdr-and-entry-regexp'. (hyrolo-isearch-for-regexp): Add 2nd parameter, 'fold-search-flag' used to set 'case-fold-search'. @@ -2890,11 +3895,11 @@ name with 'name' and 'name-key'. * hyrolo.el (hyrolo-grep): Add support for 'outline-regexp' and 'outline-level' variables from multiple file types. This includes - adding 'hyrolo-hdr-regexp' to both 'hyrolo-entry-regexp' and + adding 'hyrolo-hdr-regexp' to both 'hyrolo-hdr-and-entry-regexp' and 'outline-regexp' within the *HyRolo* match buffer. (hyrolo-mode): Set local value of 'outline-level' to 'hyrolo-mode-outline-level' and define that function to support - star outlines and Koutlines. Also, make 'hyrolo-entry-regexp' + star outlines and Koutlines. Also, make 'hyrolo-hdr-and-entry-regexp' local and set it to its default value, after which it may be modified. (hyrolo-previous-match): Change so can be used in a @@ -2902,7 +3907,7 @@ name with 'name' and 'name-key'. (hyrolo-mode-outline-level): Add and use in 'hyrolo-mode'. * kotl/kotl-mode.el (kotl-mode): Add local settings of: - 'hyrolo-entry-regexp', 'outline-level', and 'outline-regexp' + 'hyrolo-hdr-and-entry-regexp', 'outline-level', and 'outline-regexp' specific to Koutlines. kotl/kview.el (kview:outline-regexp): Regexp quote use of 'kview:default-label-separator'. @@ -6097,7 +7102,7 @@ Delete knode.el and integrate functionality into kcell.el. This makes behavior across magit lines consistent and pathnames can still be displayed using the Assist Key (invokes magit {RET} key). -* hyrolo.el (hyrolo-to-entry-end): Default to using entire hyrolo-entry-regexp +* hyrolo.el (hyrolo-to-entry-end): Default to using entire hyrolo-hdr-and-entry-regexp to determine the outline depth when no hyrolo-entry-group-number is included in the expression. Fixes issue that could call (goto-char nil). @@ -7304,7 +8309,7 @@ V7.1.0 test release changes ^^^^: using {q} to quit from the hyrolo match buffer. * hyrolo-logic.el (hyrolo-map-logic): Fixed function call. - Changed: (match-string-no-properties hyrolo-entry-regexp + Changed: (match-string-no-properties hyrolo-hdr-and-entry-regexp To: (match-string-no-properties hyrolo-entry-group-number) * hsys-org.el (inhibit-hsys-org): Added customization to allow disabling all Smart Key support when in an @@ -7336,7 +8341,7 @@ V7.1.0 test release changes ^^^^: (hyrolo-to): (hyrolo-to-entry-end): Fixed bug that caused addition of new entries at the end of the hyrolo file, rather than in sorted order. Also caused hyrolo-logic functions to fail. - The issue was that 'hyrolo-entry-regexp' had been updated to include the whitespace following the entry prefix + The issue was that 'hyrolo-hdr-and-entry-regexp' had been updated to include the whitespace following the entry prefix and this whitespace was improperly included when computing the hierarchy level of the entry. Also, changed 'curr-entry-level' parameter from a string to an integer to reduce length comparisons. (hyrolo-r-not): Fixed typo 'path' should be 'pat'. @@ -7975,11 +8980,13 @@ for expanded Org mode reference handling. * hbut.el (gbut:ibut-key-list): Added. -* hui.el (hui:hbut-term-highlight, hui:hbut-term-unhighlight): Fixed so save-excursion is outermost. +* hui.el (hui:hbut-term-highlight, hui:hbut-term-unhighlight): Fixed so + save-excursion is outermost. 2019-06-29 Bob Weiner -* hbut.el (ebut:get, ebut:at-p, ebut:label-to-key, ibut:at-type-p): Simplified conditionals using 'when'. +* hbut.el (ebut:get, ebut:at-p, ebut:label-to-key, ibut:at-type-p): Simplified + conditionals using 'when'. (ibut:label-start, ibut:label-end, ibut:label-p, ibut:get, ibut:next-occurrence, ibut:label-regexp): Added. (hbut:label-regexp): Added to support labeled implicit buttons too. @@ -7988,8 +8995,9 @@ for expanded Org mode reference handling. 2019-06-23 Bob Weiner -* hsys-org.el: Added many new predicates and code to handle navigation between Org - mode internal links and their targets, as well as radio target definitions and their links. +* hsys-org.el: Added many new predicates and code to handle navigation between + Org mode internal links and their targets, as well as radio target + definitions and their links. (hsys-org-mode-function, hsys-org-mode-p): Added to determine when hsys-org actions are activated. @@ -8041,7 +9049,7 @@ for expanded Org mode reference handling. 2019-06-16 Bob Weiner * hyrolo.el: Replaced buffer-substring-no-properties with match-string-no-properties where possible. - (hyrolo-entry-regexp): Changed to require whitespace following the entry prefix. + (hyrolo-hdr-and-entry-regexp): Changed to require whitespace following the entry prefix. (hyrolo-entry-group-number): Added. 2019-06-12 Bob Weiner diff --git a/DEMO b/DEMO index b7c684fb..48df6e4b 100644 --- a/DEMO +++ b/DEMO @@ -1,5 +1,3 @@ --*- Mode: org; org-cycle-global-at-bob: t; hsys-org-enable-smart-keys: t -*- - * GNU Hyperbole Full Demo/Tutorial by Bob Weiner Send an email or a testimonial if you like Hyperbole to . @@ -542,7 +540,7 @@ the Action Key is pressed. 1. If on an Org todo keyword, cycle through the keywords in that set or if final done keyword, remove it. - 2. If on an Org agenda item, jump to the item for editing. + 2. If on an Org agenda view item, jump to the item for editing. 3. Within a radio or internal target or a link to it, jump between the target and the first link to it, allowing two-way navigation. @@ -828,6 +826,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. + + + + 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. @@ -1176,22 +1181,22 @@ on the *first* line of the button, within the button delimiters: 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. There are two ways to create them: by dragging between windows -with the Action Mouse Key or by using the Hyperbole menus. +with the Assist Mouse Key or by using the Hyperbole menus. *** Creation via Dragging An efficient way to create an explicit button interactively is to use -the Action Mouse Key to drag from a window where you want the button +the Assist Mouse Key to drag from a window where you want the button created (button source window) to a window showing its link referent. The drag must start outside of a draggable item which includes Hyperbole -button, dired items and buffer menu items. +buttons, dired items and buffer menu items. More specifically, 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, -the referent. Depress the Action Mouse Key at the source point for +the referent. 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 +or parentheses). Then 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. @@ -1211,20 +1216,19 @@ the variable with a matching value when the link is later resolved. This allows the sharing of links over wide areas, where links contain variables whose values differ between link creator and link activator. -If you do the same think with the Assist Mouse Key instead of the Action +If you do the same thing with the Action Mouse Key instead of the Assist Mouse Key, Hyperbole will create an implicit link button instead of an explicit one. Such buttons are created without names but you can add -a name preceding such buttons with {C-h h i l} to label them. +a name preceding such buttons by using {C-u C-h h i l} instead. *** Creation via Ace Window -For the fastest link button creation, use the Emacs package -'ace-window' (see "(hyperbole)Keyboard Drags" for setup). Once this -is configured, then {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. Use a C-u prefix argument to create -an unnamed implicit link button instead and a M-1 prefix argument to -create a named implicit link button. +For the fastest link button creation, use the Emacs package 'ace-window' (see +"(hyperbole)Keyboard Drags" for setup). Once this is configured, then {M-o w`j +} may be used to quickly create an unnamed implicit link button in +the selected window that links to any other window chosen via the Ace Window. +Use a M-1 prefix argument to create a named implicit link button. If you +want to create an explicit button instead, use the C-u prefix argument. *** Creation via Menu @@ -1257,10 +1261,14 @@ buffer as the same button. If you create link buttons using the Hyperbole menus, the best technique is to place on screen both the source buffer for the button and the buffer to -which it will link. Mark the region of text to use as your button label, -invoke the button create command from the menu, choose an action type which -begins with `link-to-' and then use the direct selection techniques mentioned -in "(hyperbole)Smart Key Argument Selection", to select the link referent. +which it will link (referent buffer). Leave point where you want to link +to in the referent buffer, switch to the source buffer and put point where + you want to insert the link button. If the button name is already there +in the buffer, mark it as the region to use for your button label. Then +press {C-h h e l} and that will figure out the proper link type, prompt for +any needed arguments and then insert the button. You can use the direct +selection techniques mentioned in "(hyperbole)Smart Key Argument Selection", +to select any arguments. See "(hyperbole)Utilizing Explicit Buttons" for much more detail on how to work with explicit buttons. diff --git a/DEMO-ROLO.otl b/DEMO-ROLO.otl index 05e401d1..95ca2aa4 100644 --- a/DEMO-ROLO.otl +++ b/DEMO-ROLO.otl @@ -3,14 +3,14 @@ ================================================================== * HiHo Industries ** Strong, Hugo W708-555-9821 - Manager + Manager of Buttons 04/12/2017 *** Smith, John W708-555-2001 Chief Ether Maintainer 05/24/2017 * Work Industries ** Hansen, Dan W218-555-2311 - Manager + Manager of Clasps 02/18/2017 *** Dunn, John W218-555-3233 Media Maker diff --git a/FAST-DEMO b/FAST-DEMO index 04000b0b..1e032c4f 100644 --- a/FAST-DEMO +++ b/FAST-DEMO @@ -1,12 +1,12 @@ --*- Mode: org; org-cycle-global-at-bob: t; hsys-org-enable-smart-keys: t -*- * GNU Hyperbole Fast Demo by Bob Weiner Send an email or a testimonial if you like Hyperbole to . - This demo is the fast way to get started with Hyperbole after installation. - The prior, lengthier Hyperbole demo/tutorial can be found in this file: "DEMO". - For a non-interactive introduction to Hyperbole concepts, see "HY-CONCEPTS.kotl". + This interactive demo is the fast way to get started with Hyperbole after + installation. The prior, lengthier Hyperbole demo/tutorial can be found + in this file: "DEMO". For a non-interactive introduction to Hyperbole + concepts, see "HY-CONCEPTS.kotl". * Introductory Videos @@ -53,10 +53,12 @@ |-----------------------------------------------------+------------------------------| |-----------------------------------------------------+------------------------------| | <[Overview and Demo]> | https://youtu.be/WKwZHSbHmPg | - | Sections broken out in the prior table | | + | Sections broken out in the prior table | | |-----------------------------------------------------+------------------------------| | <[Quick Introduction]> | https://youtu.be/K1MNUctggwI | |-----------------------------------------------------+------------------------------| + | <[Top 10 ways Hyperbole amps up Emacs]> | https://youtu.be/BysjfL25Nlc | + |-----------------------------------------------------+------------------------------| | <[Introduction to Buttons]> | https://youtu.be/zoEht66N2PI | |-----------------------------------------------------+------------------------------| | <[Linking Personal Info with Implicit Buttons]> | https://youtu.be/TQ_fG7b1iHI | @@ -65,10 +67,14 @@ |-----------------------------------------------------+------------------------------| | <[HyRolo, fast contact/hierarchical record viewer]> | https://youtu.be/xdJGFdgKPFY | |-----------------------------------------------------+------------------------------| + | <[Using Koutline for stream of thought journaling]> | https://youtu.be/dO-gv898Vmg | + |-----------------------------------------------------+------------------------------| | <[Build a Zettelkasten with HyRolo]> | https://youtu.be/HdlCK9w-LyQ | |-----------------------------------------------------+------------------------------| | <[HyControl, fast Emacs frame and window manager]> | https://youtu.be/M3-aMh1ccJk | |-----------------------------------------------------+------------------------------| + | <[Writing test cases for GNU Hyperbole]> | https:/youtu.be/maNQSKxXIzI | + |-----------------------------------------------------+------------------------------| | <[Find/Web Search]> | https://youtu.be/8lMlJed0-OM | |-----------------------------------------------------+------------------------------| @@ -104,45 +110,50 @@ These patterns are called `implicit buttons' and are activated by pressing {M-RET} (ESC RETURN, ALT-RETURN, or CMD-RETURN) or SHIFT-MIDDLE-MOUSE anywhere within them (this is known as the Action Key). Hyperbole - recognizes these buttons using its predefined implicit button types that - specify how to recognize each type of button and what action it performs. - (For example, the web links in the table above are implicit buttons that - display web pages). You can also add your own button and action types. + recognizes these buttons using its many predefined implicit button types + that specify how to recognize each type of button and what action it + performs. (For example, the web links in the table above are implicit + buttons that display web pages. So are the series of key presses + surrounded by braces throughout this document). You can also add your own + button and action types. Try pressing {M-RET} or SHIFT-MIDDLE-MOUSE on some of the implicit buttons in double quotes below to activate them and see how they behave. Press - {C-h A} (the A must be capitalized) on any Hyperbole button to see exactly - what it does prior to activating it. + {C-h A} (the A must be capitalized) on any Hyperbole button or highlighted + Emacs push-button to see exactly what it does prior to activating it. + + +** Implicit Link Buttons You can simply type implicit buttons into a buffer or you can use {C-h h i - c} to create them and give them names. To create an implicit link button - from a buffer in one window to another, simply depress the Assist Mouse - Key (not the Action Mouse Key) where you want the new button (but not - within a draggable item), drag to a point in another Emacs window and - release. An implicit link button of an appropriate type for the release - context will be inserted at the original depress point. - - If you have exactly two Emacs windows in your current frame or exactly two - windows visible across two Emacs frames, there is an even simpler way to - create implicit links. Use the Link menu item, {C-h h i l}, to create a - new unnamed implicit link button or to edit the one at point. {C-u 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 + c} to create them and give them names. When you have exactly two windows + in an Emacs frame, you can instantly create an unnamed implicit link + button from the selected window to point in the other window by using {C-h + h i l}. {M-1 C-h h i l} creates or renames a named implicit button that + looks like <[name]>. + + You can create the same button by depressing the Action Mouse Key in the + text of one window and dragging to the text of the other and releasing it. + An implicit link button of an appropriate type for the release context + will be inserted at the original depress 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. ** Pathname Implicit Buttons - "HY-NEWS#ORG MODE:2:6" - outline section anchor & relative line number + "HY-NEWS#ORG MODE:3:6" - outline section anchor & relative line number Display the file, "HY-NEWS", go to the star-outline section 'ORG - MODE', move 2 lines into that section and then move 6 characters - forward. + MODE', move 3 lines into that section and then move 6 characters + forward. "HY-NEWS#ORG MODE:L3:C6" with the line and column numbers + labeled works as well. - Existing files and pathnames are recognized without double quotes as - well. + Existing files and pathnames without spaces are also recognized without + double quotes. The variable, , determines where Hyperbole displays all button referents, whether in another window or frame. @@ -329,6 +340,21 @@ pspell-config(1) - prints information about a libpspell installation Display a Hyperbole Koutline starting from cell 3b10 with lines per cell clipped to 2. + + + + + Tests defined with the Emacs Regression Test framework using + `ert-deftest' can be run via action buttons as well. Press {M-RET} + on the first line of each of the two above action buttons, within + the <> delimiters. Start with the first one which defines an ERT + test case; the second one runs it, displaying the result which should + be successful. + ** Many More Implicit Button Types to Learn Across Time @@ -356,8 +382,10 @@ pspell-config(1) - prints information about a libpspell installation |----------------------------------------------------------------------------| Implicit button types are stored in their own namespace, 'ibtypes::', so to -see the doc on the 'pathname' ibtype, use {C-h f ibtypes::pathname RET}. To -learn how to create new kinds of implicit button and action types, see: +see the doc on the 'pathname' ibtype, use {C-h f ibtypes::pathname RET}. + +See "DEMO#Implicit Buttons" or "(hyperbole)Implicit Buttons" for more detail. +To learn how to create new kinds of implicit button and action types, see "(hyperbole)Creating Types". @@ -366,31 +394,32 @@ learn how to create new kinds of implicit button and action types, see: You have learned the basics of Hyperbole implicit button types. Hyperbole has two other categories of buttons: - `Explicit buttons' are manually created and embedded within buffers and - explicitly assigned any of many action types that Hyperbole and Emacs - include. These contrast with implicit buttons which Hyperbole generates - automatically by recognizing text patterns in buffers. Explicit buttons - look like this: <(fake button)>. They are quickly recognizable, yet - relatively non-distracting as one scans the text in which they are - embedded. Explicit buttons can link to local and remote files or to a - section within a document; they can calculate things or query databases - or show different views of bodies of information. Unlike HTML - hyperbuttons, there is no markup language to learn nor specific document - format required. You can create explicit buttons with simple keyboard - presses or mouse drags from one window to another (when not on a draggable - item). See the {C-h h e} menu for explicit button commands. - {C-h h e c} creates an explicit button and {C-h h e l} creates an explicit - link button between two windows, just like their counterparts for implicit - butons. See "DEMO#Explicit Buttons" or "(hyperbole)Explicit Buttons" for - more detail. - - `Global buttons' are labeled Hyperbole buttons in your personal button - file, {C-h h b p}. All global buttons are activated by name with - completion provided, independent of which buffers are on-screen, {C-h h g - a}. Global buttons may be <(explicit buttons)> or <[labeled/named]> - implicit buttons in the personal button file. See the {C-h h g} menu for - global button commands. See "DEMO#Global Buttons" or "(hyperbole)Global - Buttons" for more detail. + `Explicit buttons' are manually created and embedded within buffers and + explicitly assigned any of the many action types that Hyperbole includes. + These contrast with implicit buttons which Hyperbole generates + automatically by recognizing text patterns in buffers. Explicit buttons + look like this: <(fake button)>. They are quickly recognizable, yet + relatively non-distracting as one scans the text in which they are + embedded. Explicit buttons can link to local and remote files or to a + section within a document; they can calculate things or query databases or + show different views of bodies of information. + + Unlike HTML hyperbuttons, there is no markup language to learn nor + specific document format required. You can create explicit buttons with + simple keyboard presses or mouse drags from one window to another (when + not on a draggable item). See the {C-h h e} menu for explicit button + commands. {C-h h e c} creates an explicit button and {C-h h e l} creates + an explicit link button between two windows, just like their counterparts + for implicit butons. See "DEMO#Explicit Buttons" or "(hyperbole)Explicit + Buttons" for more detail. + + `Global buttons' are explicit or named implicit Hyperbole buttons that are + stored in your personal button file edited with {C-h h b p}. Any such + button in there becomes global and is accessible by name without the need + to have the that file on screen. Simply press {C-h h g a} to activate a + global button and you will be prompted with completion for the button + name. See the {C-h h g} menu for the rest of the global button commands. + See "DEMO#Global Buttons" or "(hyperbole)Global Buttons" for more detail. * Hyperbole Subsystems @@ -424,17 +453,17 @@ learn how to create new kinds of implicit button and action types, see: use within hyperlink references to the cell. A demonstration of the Koutliner is found on the Hyperbole Kotl/Example - menu entry. {C-h h k e}, gives you an editable copy of Hyperbole's example - Koutliner file. This explains the Koutliner commands and lets you try them - out as you learn. Additional documentation can be found in - "(hyperbole)Koutliner". "(hyperbole)Koutliner Keys" summarizes, in + menu entry, {C-h h k e}. This gives you an editable copy of Hyperbole's + example Koutliner file. This file explains the Koutliner commands and + lets you try them out as you learn. Additional documentation can be found + in "(hyperbole)Koutliner". "(hyperbole)Koutliner Keys" summarizes, in alphabetical order, the Koutliner commands which are bound to keys. * Reference Documentation As noted at the start, "DEMO" provides a more extensive, interactive look - into Hyperbole, {C-h h d d}. + into Hyperbole, {C-h h d d}, if you have more time. For a quick, non-interactive introduction to Hyperbole concepts, use "HY-CONCEPTS.kotl" available with {C-h h d c}. @@ -445,9 +474,11 @@ learn how to create new kinds of implicit button and action types, see: and action types and much more. See "(hyperbole)" or use {C-h h d i}. It is included in the "${hyperb:dir}/man/" subdirectory of Hyperbole in - four forms: + four forms, accessible as the links below: "man/hyperbole.info" - online Info browser version "man/hyperbole.html" - web HTML version "man/hyperbole.pdf" - printable version "man/hyperbole.texi" - source form + +-- The End -- diff --git a/HY-ABOUT b/HY-ABOUT index b2edea76..f6d3a08c 100644 --- a/HY-ABOUT +++ b/HY-ABOUT @@ -3,7 +3,7 @@ Designed and Written by Bob Weiner Maintained by Mats Lidell and Bob Weiner https://www.gnu.org/software/hyperbole/ - Version 8.0.1pre + Version 9.0.0 Say thanks or send a testimonial if you like Hyperbole: Email: diff --git a/HY-ANNOUNCE b/HY-ANNOUNCE index 82c99bca..16cccc15 100644 --- a/HY-ANNOUNCE +++ b/HY-ANNOUNCE @@ -38,6 +38,8 @@ skip to the next section. |--------------------------------------------------+------------------------------| | Quick Introduction | https://youtu.be/K1MNUctggwI | |--------------------------------------------------+------------------------------| + | Top 10 ways Hyperbole amps up Emacs | https://youtu.be/BysjfL25Nlc | + |--------------------------------------------------+------------------------------| | Introduction to Buttons | https://youtu.be/zoEht66N2PI | |--------------------------------------------------+------------------------------| | Linking Personal Info with Implicit Buttons | https://youtu.be/TQ_fG7b1iHI | @@ -46,10 +48,14 @@ skip to the next section. |--------------------------------------------------+------------------------------| | HyRolo, fast contact/hierarchical record viewer | https://youtu.be/xdJGFdgKPFY | |--------------------------------------------------+------------------------------| + | Using Koutline for stream of thought journaling | https://youtu.be/dO-gv898Vmg | + |--------------------------------------------------+------------------------------| | Build a Zettelkasten with HyRolo | https://youtu.be/HdlCK9w-LyQ | |--------------------------------------------------+------------------------------| | HyControl, fast Emacs frame and window manager | https://youtu.be/M3-aMh1ccJk | |--------------------------------------------------+------------------------------| + | Writing test cases for GNU Hyperbole | https:/youtu.be/maNQSKxXIzI | + |--------------------------------------------------+------------------------------| | Find/Web Search | https://youtu.be/8lMlJed0-OM | |--------------------------------------------------+------------------------------| diff --git a/HY-COPY b/HY-COPY index a9335e04..abd302f6 100644 --- a/HY-COPY +++ b/HY-COPY @@ -4,7 +4,7 @@ The following copyright applies to the GNU Hyperbole software. -Copyright (C) 1989-2022 Free Software Foundation, Inc. +Copyright (C) 1989-2024 Free Software Foundation, Inc. Originally developed with support from Motorola Inc., who donated all such work to the Free Software Foundation, Inc. in the 1990s. diff --git a/HY-NEWS b/HY-NEWS index be894f4c..bc544534 100644 --- a/HY-NEWS +++ b/HY-NEWS @@ -1,10 +1,8 @@ --*- Mode: org; org-cycle-global-at-bob: t; hsys-org-enable-smart-keys: t -*- - * What's New in GNU Hyperbole by Bob Weiner =========================================================================== -* V8.0.1pre +* V9.0.0 =========================================================================== ** ACE WINDOW PACKAGE INTEGRATION - fast window and buffer switching @@ -486,7 +484,7 @@ (hyrolo-mode): Set the local value of `outline-level' to `hyrolo-mode-outline-level' and define that function to support star - outlines and Koutlines. Also, made `hyrolo-entry-regexp' local and set + outlines and Koutlines. Also, made `hyrolo-hdr-and-entry-regexp' local and set it to its default value, after which it may be modified. *** (hyrolo-fgrep-file, hyrolo-grep-file, hyrolo-fgrep, hyrolo-grep, diff --git a/HY-TALK/.hypb b/HY-TALK/.hypb index 044b0667..ed8c113b 100644 --- a/HY-TALK/.hypb +++ b/HY-TALK/.hypb @@ -1,5 +1,8 @@ -"Hyperbole-and-Org-Mode.org" +"HYPERAMP.org" +("ERT_test" nil nil link-to-file ("../test/hbut-tests.el#hypb:program-create-ebut-in-buffer") "rsw@gnu.org" "20231203:01:48:10" nil nil) + +"HYPERORG.org" ("Bring_Your_Text_to_Life" nil nil life (1) "rsw@gnu.org" "20221204:08:36:54" nil nil) "HY-TALK.org" diff --git a/HY-TALK/HYPB b/HY-TALK/HYPB index 4e3b14bb..f171c4f9 100644 --- a/HY-TALK/HYPB +++ b/HY-TALK/HYPB @@ -9,6 +9,8 @@ ;; org-present-startup-folded nil org-hide-emphasis-markers nil) + (setq org-present-text-scale 3) + ;; Show only top-level headlines (org-overview) @@ -20,6 +22,15 @@ (add-hook 'org-present-after-navigate-functions 'rsw-org-present-setup) +(add-hook 'org-present-mode-hook + (lambda () + (org-present-big) + (org-display-inline-images))) + +(add-hook 'org-present-mode-quit-hook + (lambda () + (org-present-small) + (org-remove-inline-images))) * Enable all Hyperbole keys including {M-RET} in Org mode @@ -47,7 +58,7 @@ or interactively after loading Hyperbole: Deactivate: ** ALTERNATIVE: Keypression - overlaying parts of buffer (shows trail of keys) - Used for EmacsNYC talk + Used for EmacsNYC talk Install: Activate: @@ -71,9 +82,9 @@ or interactively after loading Hyperbole: "!${PATH}/date" - execute 'date' shell command - "&Preview.app ${hyperb:dir}/man/hyperbole.pdf" + "&open ${hyperb:dir}/man/hyperbole.pdf" - "-subr.elc" - load an Elisp library + "-subr" - load an Elisp library * Programming Buttons @@ -93,7 +104,7 @@ Emacs Yank Bug: bug#5320 "${hyperb:dir}/DEMO" -"${hyperb:dir}/README.md#Programmer Quick Reference" +"${hyperb:dir}/README.md#Programmer Quick Reference:4:2" "${hyperb:dir}/README.md#programmer-quick-reference:4:2" diff --git a/HY-TALK/HYPERAMP.org b/HY-TALK/HYPERAMP.org new file mode 100644 index 00000000..0eafce3b --- /dev/null +++ b/HY-TALK/HYPERAMP.org @@ -0,0 +1,178 @@ +-*- Mode: org; org-cycle-global-at-bob: t; hsys-org-enable-smart-keys: t -*- + +#+TITLE: Top 10 Ways Hyperbole Amps Up Emacs +#+AUTHOR: Robert Weiner + +`GNU Hyperbole' (pronounced Ga-new Hi-per-bo-lee), or just `Hyperbole', is +like Markdown for hypertext. Hyperbole automatically recognizes dozens of +common, pre-existing patterns in any buffer regardless of mode and can +instantly activate them as hyperbuttons with a single key: email addresses, +URLs, grep -n outputs, programming backtraces, sequences of Emacs keys, +programming identifiers, Texinfo and Info cross-references, Org links, +Markdown links and on and on. All you do is load Hyperbole and then your +text comes to life with no extra effort or complex formatting. + +Install Hyperbole: (progn (require 'package) + (add-to-list 'package-archives + '("elpa-devel" . "https://elpa.gnu.org/devel/")) + (package-install 'hyperbole)) + +Activate Hyperbole: {C-h h} - displays minibuffer menu +Reference Manual: "(hyperbole)Top" + +Hyperbole Demo: {C-h h d d} - interactive demo/tutorial as introduction + +Display Keys: +Hide Keys: +Erase Key Log: + +Let's countdown the top 10 ways Hyperbole can help you. We'll move +fast as we have a lot to cover in a short time. We'll answer +questions after the talk. + +* 10. Key Series - in-buffer automation for everything + +** Key series are curly brace, {}, delimited hyperbuttons that are an + in-buffer substitute for keyboard macros. + + Place them in any file (in comment lines for programming files). + + Then press {M-RET} within one to activate it. + + {M-x shell RET M-> (export HYPERBOLE_DIR=${hyperb:dir} && + cd $HYPERBOLE_DIR && grep -n gbut:label-list *.el) RET} + + Use both a Hyperbole resolved variable, ${hyperb:dir}, and a + shell-resolved environment variable, $HYPERBOLE_DIR, to grep through + Lisp files. + + {C-h h h} will restore your windows after invoking the above key series. + +** FYI, Hyperbole offers a simpler way to recursively grep your current directory + for just Elisp files. Use 'hypb:rgrep' when in an Elisp buffer and it will + match to only Elisp files. + + {C-x 1 C-x 3 C-x o C-x C-f hibtypes.el RET C-x o C-n C-n} + + {C-x o M-x hypb:rgrep RET gbut:label-list RET C-x o C-x 1 C-x 3 C-x b HYPERAMP RET} + +* 9. Existing pathnames with Environment or Lisp variables are hyperbuttons too + + ${PATH}/rgrep + + "${hyperb:dir}/README.md#Programmer Quick Reference:5:5" + "${hyperb:dir}/README.md#programmer-quick-reference:4:2" + + ~/.bashrc#Alias + + "${hyperb:dir}/kotl/EXAMPLE.kotl#3c" + "${hyperb:dir}/kotl/EXAMPLE.kotl#3c|c2ben" + +* 8. File prefixes for special handling + + "-subr" - load an Elisp library + + "!${PATH}/date" - execute 'date' shell command + + "&xdg-open ${hyperb:dir}/man/hyperbole.pdf" - run a graphical PDF viewer + +* 7. Bookmarks on Steroids + + {C-x 2 C-x o C-h h b p} - Your personal home page of buttons and bookmarks + + {C-h h g a} - Activate by name + +* 6. Instant test case running and debugging + + {M-RET} on the first line of an <(ERT test)> runs it. + + {C-u M-RET} steps through it with the edebugger. + +* 5. Instant 2-window typed hyperlink creation + + Place 2 windows on screen; place point where you want to link to in one + window and then move to the window where you want the hyperlink placed. + + {C-h h i l} will create a typed implicit link at point. + {C-h h e l} will create an explicit link instead. + {C-h h g l} will create a global named implicit link that works like a bookmark. + +* 4. Koutliner - Instant collapsible outlines on the web + + {C-x 1 C-x 2} + {C-h h k e} + + {C-x o C-h h k} - Koutliner menu + + {f d} - Format menu, then display in browser + +* 3. HyControl - Zoom font size across all faces, windows and frames at once + + {C-x 1 C-x 3 M-x list-faces-display RET C-x o} + + {C-h h s f} - {z} zoom out all frames; {Z} zoom in all frames + + {C-h h s w} - {z} zoom out all frames; {Z} zoom in all frames + +* 2. HyRolo - Simple, fast, flexible hierarchical record management + +** Search across Org, Emacs outline, Markdown and Koutline files and multiple dirs + + + + {C-h h r s button RET} + +** Dynamic line-level filtering with Consult + + {C-x 1 C-x 3 C-x o} + + + +* 1. Custom Implicit Button Types - solve your own problems + + +** defal - Create new button types with no programming knowledge + + (defal ddg "https://duckduckgo.com/?q=\"%s\"") + + + +** defil - Control the way your link buttons look + + Here is a sample use case. Create a button type whose buttons + perform a grep-like function over a current repository’s git + log entries. The buttons use this format: []. + + The following defines the button type called search-git-log which + calls hypb:fgrep-git-log with the text of the button as an argument: + + (defil search-git-log "[<" ">]" ".*" #'hypb:fgrep-git-log) + + [] + +** defib - Use full Emacs Lisp to define button types (see "hibtypes.el") + + (progn + (require 'thingatpt) + (defib dow () + "Display a message with DATE's (YYYY-MM-DD) day of the week." + (let ((date (thing-at-point 'sexp))) + (when (and (stringp date) + (string-match-p "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" + date)) + (cl-destructuring-bind (_ignore _ignore _ignore day month year _ignore _ignore _ignore) (parse-time-string date) + (hact #'message "%s falls on %s" date + (calendar-day-name (list month day year)))))))) + + 2023-12-03 + 2023-12-05 + +* Thanks + + - To my co-maintainer Mats Lidell + + - To all the hard-working volunteers and speakers at EmacsConf + +-- The End -- + diff --git a/HY-TALK/Hyperbole-and-Org-Mode.org b/HY-TALK/HYPERORG.org similarity index 100% rename from HY-TALK/Hyperbole-and-Org-Mode.org rename to HY-TALK/HYPERORG.org diff --git a/MANIFEST b/MANIFEST index 218c47f5..94948cea 100644 --- a/MANIFEST +++ b/MANIFEST @@ -26,6 +26,9 @@ man/hyperbole.info - The GNU Hyperbole Manual (GNU Info version) man/hyperbole.pdf - The GNU Hyperbole Manual (printable version) man/hyperbole.texi - The GNU Hyperbole Manual (GNU Texinfo source form) man/hkey-help.txt - Summarizes Smart Key behaviors in different contexts +HY-TALK/HY-TALK.org - EmacsNYC Talk: Make Your Text Come Alive +HY-TALK/HYPERAMP.org - EmacsConf 2023 Talk: Top 10 Ways Hyperbole Amps Up Emacs +HY-TALK/HYPERORG.org - EmacsConf 2022 Talk: Powerful Productivity with Hyperbole and Org Mode * --- USER INTERFACE --- hmouse-info.el - Walks through Info networks using one key @@ -96,9 +99,11 @@ topwin.py - Python script to find the topmost macOS app window at a s .hypb & _hypb - Button data files used by the GNU Hyperbole DEMO file * --- EXTERNAL SYSTEM ENCAPSULATIONS --- +hsys-flymake.el - Add missing source buffer keymap to flymake linter hsys-org.el - GNU Hyperbole support functions for Org mode hsys-org-roam.el - GNU Hyperbole support functions for Org Roam hsys-www.el - GNU Hyperbole support for Emacs W3 World-Wide Web (WWW) browsing +hsys-xref.el - GNU Hyperbole support functions for "xref.el" hsys-youtube.el - Action buttons to play timestamped segments of Youtube videos * --- HYPERBOLE TEST CASES --- diff --git a/Makefile b/Makefile index 320b362b..f1707476 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Author: Bob Weiner # # Orig-Date: 15-Jun-94 at 03:42:38 -# Last-Mod: 19-Nov-23 at 14:18:10 by Bob Weiner +# Last-Mod: 20-Jan-24 at 10:07:54 by Mats Lidell # # Copyright (C) 1994-2023 Free Software Foundation, Inc. # See the file HY-COPY for license information. @@ -70,8 +70,9 @@ # * Developer targets # # To run unit tests: -# make test - run not interactive tests in batch mode -# make test-all - run all tests startin an emacs in windowed mode +# make test - run non-interactive tests in batch mode +# make test-all - run all tests starting an interactive Emacs +# make test test= - run a single test or tests matching the name # # Verify hyperbole installation using different sources: # make install- @@ -85,7 +86,7 @@ # This ver setup won't work under any make except GNU make, so set it manually. #HYPB_VERSION = "`head -3 hversion.el | tail -1 | sed -e 's/.*|\(.*\)|.*/\1/'`" -HYPB_VERSION = 8.0.1pre +HYPB_VERSION = 9.0.0 # Emacs executable used to byte-compile .el files into .elc's. # To override which executable is used from the commandline, do something like this: @@ -182,8 +183,8 @@ EL_COMPILE = hact.el hactypes.el hargs.el hbdata.el hbmap.el hbut.el \ hib-social.el hibtypes.el \ hinit.el hload-path.el hmail.el hmh.el hmoccur.el hmouse-info.el \ hmouse-drv.el hmouse-key.el hmouse-mod.el hmouse-sh.el hmouse-tag.el \ - hpath.el hrmail.el hsettings.el hsmail.el hsys-org.el hsys-org-roam.el \ - hsys-www.el hsys-youtube.el htz.el \ + hpath.el hrmail.el hsettings.el hsmail.el hsys-flymake.el hsys-org.el \ + hsys-org-roam.el hsys-www.el hsys-xref.el hsys-youtube.el htz.el \ hycontrol.el hui-jmenu.el hui-menu.el hui-mini.el hui-mouse.el hui-select.el \ hui-treemacs.el hui-window.el hui.el hvar.el hversion.el hypb.el hyperbole.el \ hyrolo-demo.el hyrolo-logic.el hyrolo-menu.el hyrolo.el hywconfig.el set.el hypb-ert.el \ @@ -199,10 +200,10 @@ ELC_COMPILE = $(EL_COMPILE:.el=.elc) ELC_KOTL = $(EL_KOTL:.el=.elc) -HY-TALK = HY-TALK/.hypb HY-TALK/HYPB HY-TALK/HY-TALK.org +HY-TALK = HY-TALK/.hypb HY-TALK/HYPB HY-TALK/HY-TALK.org HY-TALK/HYPERAMP.org HY-TALK/HYPERORG.org HYPERBOLE_FILES = dir info html $(EL_SRC) $(EL_KOTL) \ - $(ELC_COMPILE) $(HY-TALK) ChangeLog COPYING Makefile HY-ABOUT HY-ANNOUNCE \ + $(HY-TALK) ChangeLog COPYING Makefile HY-ABOUT HY-ANNOUNCE \ HY-CONCEPTS.kotl HY-NEWS \ HY-WHY.kotl INSTALL DEMO DEMO-ROLO.otl FAST-DEMO MANIFEST README README.md TAGS _hypb \ .hypb smart-clib-sym topwin.py hyperbole-banner.png $(man_dir)/hkey-help.txt \ @@ -259,7 +260,10 @@ help: all: help echo: - which emacs; echo $(TERM); echo "$(DISPLAY)" + @echo "Emacs: $(shell which ${EMACS})" + @echo "Version: $(shell ${EMACS} --version)" + @echo "TERM: $(TERM)" + @echo "DISPLAY: $(DISPLAY)" install: elc install-info install-html $(data_dir)/hkey-help.txt @@ -324,7 +328,7 @@ remove-elc: bin: src remove-elc new-bin # Native compilation (Requires Emacs built with native compilation support.) -eln: src +eln: echo src HYPB_NATIVE_COMP=yes make new-bin tags: TAGS @@ -459,19 +463,38 @@ packageclean: cd $(pkg_hyperbole)/man/im && $(RM) -r .DS_Store core .place* ._* .*~ *~ \ *.ps *\# *- *.orig *.rej .nfs* CVS .cvsignore; fi -# Ert test +# ERT test .PHONY: tests test test-ert all-tests test-all tests: test test: test-ert -# enable-local-variables setting needed so local-variables set in files like +# enable-local-variables setting needed so local variables set in files like # FAST-DEMO are automatically obeyed without prompting when testing. LET_VARIABLES = (auto-save-default) (enable-local-variables :all) LOAD_TEST_ERT_FILES=$(patsubst %,(load-file \"%\"),${TEST_ERT_FILES}) +# Run make test test= to limit batch test to +# tests specified by the selector. See "(ert)test selectors" +ifeq ($(origin test), command line) +HYPB_ERT_BATCH = (ert-run-tests-batch-and-exit \"${test}\") +else +HYPB_ERT_BATCH = (ert-run-tests-batch-and-exit) +endif + +# For full backtrace run make test FULL_BT= +ifeq ($(origin FULL_BT), command line) +HYPB_ERT_BATCH_BT = (ert-batch-backtrace-line-length nil) +else +HYPB_ERT_BATCH_BT = (ert-batch-backtrace-line-length 256) +endif + test-ert: @echo "# Tests: $(TEST_ERT_FILES)" - $(EMACS_BATCH) --eval "(load-file \"test/hy-test-dependencies.el\")" --eval "(let ((auto-save-default)) $(LOAD_TEST_ERT_FILES) (ert-run-tests-batch-and-exit))" + $(EMACS_BATCH) --eval "(load-file \"test/hy-test-dependencies.el\")" \ + --eval "(let ((auto-save-default) (ert-batch-print-level 10) \ + (ert-batch-print-length nil) (backtrace-line-length 5000) \ + $(HYPB_ERT_BATCH_BT) (ert-batch-backtrace-right-margin 2048)) \ + $(LOAD_TEST_ERT_FILES) $(HYPB_ERT_BATCH))" all-tests: test-all test-all: @@ -491,7 +514,7 @@ endif batch-tests: test-all-output test-all-output: - $(EMACS) --quick $(PRELOADS) --eval "(load-file \"test/hy-test-dependencies.el\")" --eval "(let ($(LET_VARIABLES) (ert-quiet t)) $(LOAD_TEST_ERT_FILES) (ert-run-tests-interactively t) (with-current-buffer \"*ert*\" (append-to-file (point-min) (point-max) \"ERT-OUTPUT\")) (kill-emacs))" + $(EMACS) --quick $(PRELOADS) --eval "(load-file \"test/hy-test-dependencies.el\")" --eval "(let ($(LET_VARIABLES) (ert-quiet t)) $(LOAD_TEST_ERT_FILES) (ert-run-tests-batch t) (with-current-buffer \"*Messages*\" (append-to-file (point-min) (point-max) \"ERT-OUTPUT\")) (kill-emacs))" @echo "# Results written to file: ERT-OUTPUT" # Hyperbole install tests - Verify that hyperbole can be installed @@ -512,5 +535,7 @@ package-lint: $(EMACS_BATCH) \ --eval "(setq package-lint-main-file \"hyperbole.el\")" \ --eval "(load-file \"test/hy-test-dependencies.el\")" \ + --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))" \ + --eval "(hy-test-ensure-package-installed 'package-lint)" \ -l package-lint.el -f package-lint-batch-and-exit \ $(EL_KOTL) $(EL_SRC) diff --git a/README.md b/README.md index 2a3d7794..9af6b2bc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GNU Hyperbole 8.0.1pre - The Everyday Hypertextual Information Manager +# GNU Hyperbole 9.0.0 - The Everyday Hypertextual Information Manager [We work on Hyperbole as a gift to the Emacs community and request you send us a thank you or a testimonial describing your usage if you like @@ -19,6 +19,8 @@ otherwise, skip to the next section. - [Quick Introduction](https://youtu.be/K1MNUctggwI) + - [Top 10 ways Hyperbole amps up Emacs](https://emacsconf.org/2023/talks/hyperamp/) + - [Introduction to Buttons](https://youtu.be/zoEht66N2PI) - [Linking Personal Info with Implicit Buttons](https://emacsconf.org/2022/talks/buttons/) @@ -27,10 +29,14 @@ otherwise, skip to the next section. - [HyRolo, fast contact/hierarchical record viewer](https://youtu.be/xdJGFdgKPFY) + - [Using Koutline for stream of thought journaling](https://emacsconf.org/2023/talks/koutline/) + - [Build a Zettelkasten with HyRolo](https://emacsconf.org/2022/talks/rolodex/) - [HyControl, fast Emacs frame and window manager](https://youtu.be/M3-aMh1ccJk) + - [Writing test cases for GNU Hyperbole](https://emacsconf.org/2023/talks/test/) + - [Find/Web Search](https://youtu.be/8lMlJed0-OM) - [Linking personal info with implicit buttons](https://youtu.be/TQ_fG7b1iHI) diff --git a/hact.el b/hact.el index 75ff81dc..2abd61c5 100644 --- a/hact.el +++ b/hact.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 18-Sep-91 at 02:57:09 -;; Last-Mod: 7-Nov-23 at 21:38:28 by Bob Weiner +;; Last-Mod: 9-Jan-24 at 03:31:53 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2022 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -25,10 +25,10 @@ ;;; Public declarations ;;; ************************************************************************ -(declare-function hattr:get "hypb") -(declare-function hattr:list "hypb") -(declare-function hattr:set "hypb") -(declare-function hbut:is-p "hypb") +(declare-function hattr:get "hbut") +(declare-function hattr:list "hbut") +(declare-function hattr:set "hbut") +(declare-function hbut:is-p "hbut") (declare-function hpath:absolute-arguments "hpath") (declare-function hypb:indirect-function "hypb") @@ -126,7 +126,8 @@ with the `ibtypes::' prefix and one without. The value for both keys is the Elisp symbol for the type, which includes the prefix.") (defsubst symtable:actype-p (symbol-or-name) - "Return SYMBOL-OR-NAME if a Hyperbole action type or Elisp function, else nil." + "Return Elisp symbol for SYMBOL-OR-NAME if a Hyperbole action type. +May also be an Elisp function. Otherwise, return nil." (when (or (symbolp symbol-or-name) (stringp symbol-or-name)) (or (symtable:get symbol-or-name symtable:actypes) (and (stringp symbol-or-name) (fboundp (intern-soft symbol-or-name)) @@ -134,14 +135,14 @@ keys is the Elisp symbol for the type, which includes the prefix.") (and (functionp symbol-or-name) symbol-or-name)))) (defsubst symtable:hyperbole-actype-p (symbol-or-name) - "Return SYMBOL-OR-NAME if a Hyperbole action type, else nil. + "Return Elisp symbol for SYMBOL-OR-NAME if a Hyperbole action type, else nil. This excludes Emacs Lisp functions which may be used as action types. Use `actype:elisp-symbol' to include these." (when (or (symbolp symbol-or-name) (stringp symbol-or-name)) (or (symtable:get symbol-or-name symtable:actypes)))) (defsubst symtable:ibtype-p (symbol-or-name) - "Return SYMBOL-OR-NAME if it is a Hyperbole implicit button type, else nil." + "Return Elisp symbol for SYMBOL-OR-NAME if it is a Hyperbole ibtype, else nil." (when (or (symbolp symbol-or-name) (stringp symbol-or-name)) (symtable:get symbol-or-name symtable:ibtypes))) @@ -154,8 +155,9 @@ Caller must ensure SYMBOL-OR-NAME is a symbol or string." (defalias 'symtable:delete #'symtable:remove) (defun symtable:get (symbol-or-name symtable) - "Return Hyperbole SYMBOL-OR-NAME if it is in SYMTABLE, else nil. -Caller must ensure SYMBOL-OR-NAME is a symbol or string." + "Return Elisp symbol for Hyperbole SYMBOL-OR-NAME if it is in SYMTABLE. +Otherwise, return nil. Caller must ensure SYMBOL-OR-NAME is a symbol +or string." (symtable:operate #'gethash symbol-or-name symtable)) (defun symtable:remove (symbol-or-name symtable) @@ -253,7 +255,7 @@ given as a string or a symbol." type (symbol-name type)))) (when (string-match "\\`\\(ib\\|ac\\)types::" name) - (make-symbol (substring name (match-end 0)))))) + (intern (substring name (match-end 0)))))) (defun htype:delete (type type-category) "Delete a Hyperbole TYPE derived from TYPE-CATEGORY (both symbols). @@ -275,13 +277,13 @@ Return the Hyperbole symbol for the TYPE if it existed, else nil." "Return a list of current definition names for TYPE-CATEGORY in priority order. Definition names do not contain the category prefix. TYPE-CATEGORY should be `actypes', `ibtypes' or nil for all. -When optional SYM is given, returns the name for that symbol only, if any." +When optional SYM is given, return the name for that symbol only, if any." (let ((types (symset:get type-category 'symbols)) (sym-name (when sym (symbol-name sym)))) (if sym-name ;; Strip category from sym-name before looking for a match. (progn (when (string-match "::" sym-name) - (setq sym (make-symbol (substring sym-name (match-end 0))))) + (setq sym (intern (substring sym-name (match-end 0))))) (when (symtable:get sym (symtable:select type-category)) (symbol-name sym))) (mapcar #'symbol-name types)))) @@ -419,9 +421,6 @@ performing ACTION." t) (hhist:add hist-elt)))))) -;; Return the full Elisp symbol for ACTYPE, which may be a string or symbol. -(defalias 'actype:elisp-symbol #'symtable:actype-p) - (defun actype:def-symbol (actype) "Return the abbreviated symbol for ACTYPE used in its `defact'. ACTYPE must be a symbol or string that begins with `actype::' or nil @@ -430,7 +429,10 @@ is returned." actype (symbol-name actype)))) (when (string-match "\\`actypes::" name) - (make-symbol (substring name (match-end 0)))))) + (intern (substring name (match-end 0)))))) + +;; Return the full Elisp symbol for ACTYPE, which may be a string or symbol. +(defalias 'actype:elisp-symbol #'symtable:actype-p) (defun actype:eval (actype &rest args) "Perform action formed from ACTYPE and rest of ARGS and return value. diff --git a/hactypes.el b/hactypes.el index db37b5fa..20070a1e 100644 --- a/hactypes.el +++ b/hactypes.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 23-Sep-91 at 20:34:36 -;; Last-Mod: 25-Nov-23 at 16:36:26 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 15:36:54 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2022 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -562,7 +562,7 @@ on the implicit button to which to link." "Display FILE with kcell given by CELL-REF at window top. See documentation for `kcell:ref-to-id' for valid cell-ref formats. -If FILE is nil, use the current buffer. +If FILE is nil, use any source location or the current buffer. If CELL-REF is nil, show the first cell in the view." (interactive (hargs:iform-read '(interactive "fKotl file to link to: \n+KKcell to link to: "))) (require 'kfile) @@ -581,9 +581,12 @@ If CELL-REF is nil, show the first cell in the view." (string-empty-p file) (equal (file-name-nondirectory file) (file-name-nondirectory buffer-file-name)))) + (when (or (null file) (string-empty-p file)) + (setq file (hbut:get-key-src t))) (if (stringp file) (hpath:find file) - (hpath:display-buffer (current-buffer)))) + ;; file can be a buffer from get-key-src call + (hpath:display-buffer (or file (current-buffer))))) (kotl-mode:goto-cell-ref cell-ref)) (defact link-to-mail (mail-msg-id &optional mail-file) @@ -742,14 +745,22 @@ 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)) - (while (and (= (forward-line -1) 0) - (looking-at "[ \t]*[-=][-=]"))) - (forward-line 1) - (recenter 0)) + (setq section (string-trim section)) + (if (string-match "\\`\\(\\*+\\)[ \t]*" section) + (actypes::link-to-regexp-match + (concat "^[ \t]*" (regexp-quote (match-string 1 section)) + "[ \t]*" (regexp-quote (substring section (match-end 0)))) + 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) + (recenter 0))) (provide 'hactypes) diff --git a/hargs.el b/hargs.el index fb58c616..e5367f00 100644 --- a/hargs.el +++ b/hargs.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 31-Oct-91 at 23:17:35 -;; Last-Mod: 1-Dec-23 at 11:23:52 by Bob Weiner +;; Last-Mod: 20-Jan-24 at 19:43:53 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2022 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -508,23 +508,25 @@ If point follows an sexpression end character, the preceding sexpression is returned. If point precedes an sexpression start character, the following sexpression is returned. Otherwise, the innermost sexpression that point is within is returned or nil if none." - (save-excursion - (ignore-errors - (let ((not-quoted - '(not (and (eq (char-syntax (char-after (- (point) 2))) ?\\) - (not (eq (char-syntax (char-after (- (point) 3))) ?\\)))))) - (cond ((and (eq (char-syntax (preceding-char)) ?\)) - ;; Ignore quoted end chars. - (eval not-quoted)) - (buffer-substring (point) - (progn (forward-sexp -1) (point)))) - ((and (eq (char-syntax (following-char)) ?\() - ;; Ignore quoted begin chars. - (eval not-quoted)) - (buffer-substring (point) - (progn (forward-sexp) (point)))) - (no-recurse nil) - (t (save-excursion (up-list 1) (hargs:sexpression-p t)))))))) + (let ((not-quoted + '(condition-case () + (not (and (eq (char-syntax (char-after (- (point) 2))) ?\\) + (not (eq (char-syntax (char-after (- (point) 3))) ?\\)))) + (error t)))) + (save-excursion + (ignore-errors + (cond ((and (eq (char-syntax (preceding-char)) ?\)) + ;; Ignore quoted end chars. + (eval not-quoted)) + (buffer-substring (point) + (progn (forward-sexp -1) (point)))) + ((and (eq (char-syntax (following-char)) ?\() + ;; Ignore quoted begin chars. + (eval not-quoted)) + (buffer-substring (point) + (progn (forward-sexp) (point)))) + (no-recurse nil) + (t (save-excursion (up-list 1) (hargs:sexpression-p t)))))))) ;;; ************************************************************************ ;;; Public functions @@ -658,9 +660,9 @@ Handles all of the interactive argument types that `hargs:iform-read' does." ((hpath:at-p 'file)) ;; Unquoted remote file name. ((hpath:is-p (hpath:remote-at-p) 'file)) - ;; Possibly non-existent file name - ((when no-default (hpath:at-p 'file 'non-exist))) (no-default nil) + ;; Possibly non-existent file name + ((hpath:at-p 'file 'non-exist)) ((buffer-file-name)))) ((eq hargs:reading-type 'directory) (cond ((derived-mode-p 'dired-mode) @@ -672,9 +674,9 @@ Handles all of the interactive argument types that `hargs:iform-read' does." ((hpath:at-p 'directory)) ;; Unquoted remote directory name. ((hpath:is-p (hpath:remote-at-p) 'directory)) - ;; Possibly non-existent directory name - ((when no-default (hpath:at-p 'directory 'non-exist))) (no-default nil) + ;; Possibly non-existent directory name + ((hpath:at-p 'directory 'non-exist)) (default-directory))) ((eq hargs:reading-type 'string) (or (hargs:delimited "\"" "\"") (hargs:delimited "'" "'") diff --git a/hbdata.el b/hbdata.el index 884ba825..ed8cb11f 100644 --- a/hbdata.el +++ b/hbdata.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 2-Apr-91 -;; Last-Mod: 22-Oct-23 at 14:42:47 by Mats Lidell +;; Last-Mod: 17-Jan-24 at 23:07:53 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2021 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -76,9 +76,9 @@ (declare-function ebut:label-to-key "hbut") ;; Functions from abstract mail and news interface. See "hmail.el" -(declare-function lmail:to nil) -(declare-function rmail:to nil) -(declare-function rmail:summ-msg-to nil) +(declare-function lmail:to "hmail") +(declare-function rmail:to "hmail") +(declare-function rmail:summ-msg-to "hmail") ;;; ************************************************************************ ;;; Public functions @@ -88,7 +88,7 @@ ;;; Button data accessor functions ;;; ------------------------------------------------------------------------ (defun hbdata:action (hbdata) - "[Hyp V2] Return action overriding button's action type or nil." + "[Hyp V2] Return action overriding button's action type or nil from HBDATA." (nth 1 hbdata)) (defun hbdata:actype (hbdata) diff --git a/hbut.el b/hbut.el index 0833e348..8107abd9 100644 --- a/hbut.el +++ b/hbut.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 18-Sep-91 at 02:57:09 -;; Last-Mod: 30-Nov-23 at 23:23:53 by Bob Weiner +;; Last-Mod: 20-Jan-24 at 00:21:10 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2023 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -15,6 +15,7 @@ ;;; Commentary: ;;; Code: + ;;; ************************************************************************ ;;; Other required Elisp libraries ;;; ************************************************************************ @@ -66,6 +67,9 @@ Use the function, (hbut:max-len), to read the proper value.") (declare-function hpath:file-position-to-line-and-column "hpath") +(declare-function hyrolo-hdr-move-after-p "hyrolo") +(declare-function smart-eolp "hui-mouse") + ;;; ************************************************************************ ;;; Private variables ;;; ************************************************************************ @@ -95,15 +99,16 @@ others who use a different value!") (defvar ibut:label-separator " - " "Default separator string inserted between implicit button name and its text. -This separates it from the implicit button text. See also -`ibut:label-separator-regexp' for all valid characters that may be -manually inserted to separate an implicit button label from its -text.") +See also `ibut:label-separator-regexp' for all valid characters that may be +inserted manually to separate an implicit button label from its text.") (defconst hbut:source-prefix moccur-source-prefix - "String found at start of a buffer containing only a hyper-button menu. -This expression should be followed immediately by a file-name indicating the -source file for the buttons in the menu, if any.") + "String prefix for lines indicating the source of the matches. + +It should not contain any characters needing regular expression quoting. + +This expression should be followed immediately by a buffer or file name +indicating the source of any of its Hyperbole buttons.") ;;; ************************************************************************ ;;; Public definitions @@ -191,7 +196,9 @@ Do not save button data buffer." (defun ebut:get (&optional lbl-key buffer key-src start-delim end-delim) "Return explicit Hyperbole button symbol given by LBL-KEY and BUFFER. -KEY-SRC is given when retrieving global buttons and is the full source pathname. +KEY-SRC is given when retrieving global buttons and is the full +source pathname. START-DELIM and END-DELIM are strings that +override default button delimiters. Retrieve button data, convert into a button object and return a symbol which references the button. @@ -296,7 +303,15 @@ delimiters. With TWO-LINES-FLAG non-nil, constrain label search to two lines." (let ((opoint (point)) (quoted "\\(^\\|[^\\{$]\\)") - (hbut:max-len hbut:max-len) + ;; For <> delimited action buttons which can be long + ;; sexpressions, don't enforce the normal, short button length + ;; limit. Setting this to 0 means unlimited length, assuming + ;; the TWO-LINES-FLAG is nil. + (hbut:max-len + (if (and (string-equal start-delim "<") + (string-equal end-delim ">")) + 0 + hbut:max-len)) npoint start lbl-key end but-start but-end start-regexp end-regexp) (unless start-delim (setq start-delim ebut:label-start)) (unless end-delim (setq end-delim ebut:label-end)) @@ -963,7 +978,7 @@ Ignore nil valued attributes. Return t unless no attributes are printed." val (prin1-to-string val))) (string-match "\\`actypes::" str)) - (make-symbol (substring str (match-end 0)))) + (intern (substring str (match-end 0)))) (t val))))))) has-attr))) @@ -974,7 +989,7 @@ Suitable for use as part of `write-file-functions'." (buf (and (stringp default-directory) (get-file-buffer bd-file)))) (if (and ebut:hattr-save buf (not (eq buf (current-buffer)))) - (let ((ebut:hattr-save));; Prevents `write-file-functions' from looping. + (let ((ebut:hattr-save)) ;; Prevents `write-file-functions' from looping. (and (buffer-modified-p buf) (with-current-buffer buf (save-buffer) ;; Unlock button attribute file; kill buffer so user is @@ -1068,6 +1083,11 @@ Default is the symbol hbut:current." atype (or action (actype:action atype))))) +(defun hbut:actype (hbut) + "Return action type for Hyperbole button symbol HBUT." + (when (hbut:is-p hbut) + (hattr:get hbut 'actype))) + (defun hbut:at-p () "Return symbol for explicit or implicit Hyperbole button at point or nil. Then use (hbut:act) to activate the button. @@ -1246,10 +1266,11 @@ is given." (file-name-nondirectory buffer-file-name))) ;; Handle any preceding @loc hyp-source implicit button location references. ;; This is used in report buffers of explicit buttons, i.e. hui:hbut-report - ;; and the *HyRolo* abd *HyNote* output buffers. + ;; as well as the *HyRolo* display matches buffer. ((save-excursion (save-restriction (widen) + (hyrolo-hdr-move-after-p) (end-of-visible-line) (when (and (search-backward hbut:source-prefix nil t) (or (memq (preceding-char) '(?\n ?\r)) @@ -1699,8 +1720,9 @@ Any named implicit button must contain at least two characters, excluding delimiters, not just one." ;; Since the Smart Keys handle end-of-line separately from whether ;; point is within an implicit button, always report not within one - ;; when point is at the end of a line. -- RSW, 02-16-2020 - (unless (eolp) + ;; when point is at the end of a line unless `flymake-mode' has added + ;; an issue annotation there. -- RSW 02-16-2020, 12-31-2023 + (unless (smart-eolp) ;; Check for an implicit button at current point, record its ;; attributes in memory and return a button symbol for it. (when (ibut:create) @@ -1710,17 +1732,21 @@ excluding delimiters, not just one." (defun ibut:at-type-p (ibut-type-symbol) "Return non-nil if point is on a button of type IBUT-TYPE-SYMBOL. -Point must be on the button itself and not its name, if any. +Point may be on the button text or its preceding name. The return value is a list of the type's action type symbol and associated arguments from the button." - (when (and ibut-type-symbol (symbolp ibut-type-symbol)) - (let ((type-name (symbol-name ibut-type-symbol))) - (unless (string-match "::" type-name) - (setq ibut-type-symbol (intern-soft (concat "ibtypes::" type-name)))) - (when ibut-type-symbol - (let ((hrule:action #'actype:identity)) - (funcall ibut-type-symbol)))))) + (and (setq ibut-type-symbol (ibtype:elisp-symbol ibut-type-symbol)) + (let ((ibut (ibut:at-p))) + (and ibut (eq (ibut:type ibut) ibut-type-symbol))))) + +(defun ibut:is-type-p (ibut ibut-type-symbol) + "Return non-nil if IBUT is a button of type IBUT-TYPE-SYMBOL. +Use `ibut:at-type-p' to test the type of the implicit button at point." + (when (setq ibut-type-symbol (ibtype:elisp-symbol ibut-type-symbol)) + (unless (ibut:is-p ibut) + (setq ibut nil)) + (and ibut (eq (ibut:type ibut) ibut-type-symbol)))) (defun ibut:set-name-and-label-key-p (&optional start-delim end-delim) "Set ibut name, lbl-key, lbl-start/end attributes in \\='hbut:current. @@ -1771,7 +1797,10 @@ excluding delimiters, not just one." (setq lbl-start-end (if (and start-delim end-delim) (ibut:label-p nil start-delim end-delim t t) (or (ibut:label-p nil "\"" "\"" t t) - (ibut:label-p nil "<" ">" t t) + ;; buttons can be longer + ;; than two lines, so don't limit + ;; the length. + (ibut:label-p nil "<" ">" t) (ibut:label-p nil "{" "}" t t) (ibut:label-p nil "[" "]" t t)))) (when lbl-start-end @@ -1862,9 +1891,10 @@ If a new button is created, store its attributes in the symbol, (setq name-and-lbl-key-flag nil)) ;; Since the Smart Keys handle end-of-line and end-of-buffer ;; separately from whether point is within an implicit button, - ;; always report not within one when point is at the end of a line. - ;; -- RSW, 02-16-2020 and 07-17-2022 - (unless (or is-type (eolp) (eobp)) + ;; always report not within one when point is at the end of a line + ;; except when there is a `flymake-mode' issue annotation there. + ;; -- RSW 02-16-2020, 07-17-2022 and 12-31-2023 + (unless (or is-type (smart-eolp) (eobp)) (unwind-protect (progn (when (or but-sym-flag name-and-lbl-key-flag) (setq text-start (or (hattr:get 'hbut:current 'lbl-start) @@ -2303,26 +2333,31 @@ move to the first occurrence of the button." (defun ibut:operate (&optional new-name edit-flag) "Insert/modify an ibutton based on `hbut:current' in current buffer. -IMPORTANT: -Caller must either call `hbut:at-p' or manually set the attributes of -`hbut:current' prior to invoking this function, i.e. there must be an -ibutton stored in memory in `hbut:current prior to invocation. If point -is on an existing Hyperbole button, `edit-flag' must be set to t; otherwise, -this may create a new ibutton inserted within the prior one, making the -prior one unusable. +This is for internal Hyperbole use only. Use `ibut:program' and +`ibut:create' (an alias of `defib'), if programming applications +with Hyperbole. -Optional non-nil NEW-NAME is new name to give button. With optional -EDIT-FLAG non-nil, modify an existing in-buffer ibutton rather -than creating a new one. +IMPORTANT: Caller must either call `hbut:at-p' or manually set +the attributes of `hbut:current' prior to invoking this function, +i.e. there must be an ibutton stored in memory in `hbut:current +prior to invocation. If point is on an existing Hyperbole +button, `edit-flag' must be set to t; otherwise, this may create +a new ibutton inserted within the prior one, making the prior one +unusable. -If NEW-NAME is nil, use the active region text as the button name, if any; -if no such region, then create/modify an unnamed implicit button. +Optional non-nil NEW-NAME is new name to give button. With +optional EDIT-FLAG non-nil, modify an existing in-buffer ibutton +rather than creating a new one. -Return instance string appended to name to form a per-buffer unique -name; nil if name is already unique or no name. Signal an error when no -such button is found in the current buffer. +If NEW-NAME is nil, use the active region text as the button +name, if any; if no such region, then create/modify an unnamed +implicit button. -Summary of operations based on inputs (name arg comes from \\='hbut:current attrs): +Return instance string appended to name to form a per-buffer +unique name; nil if name is already unique or no name. Signal an +error when no such button is found in the current buffer. + +Summary of operations based on inputs (name arg from \\='hbut:current attrs): |----+------+----------+--------+------+-----------------------------------------------| | # | name | new-name | region | edit | operation | |----+------+----------+--------+------+-----------------------------------------------| @@ -2483,11 +2518,6 @@ Summary of operations based on inputs (name arg comes from \\='hbut:current attr (ibut:at-p) (let ((lbl-key (hattr:get 'hbut:current 'lbl-key))) - ;; (unless lbl-key - ;; (when (or (and (ibut:set-name-and-label-key-p) - ;; (hattr:get 'hbut:current 'lbl-key)) - ;; (ibut:at-p)) ;; Sets lbl-key for non-delimited ibtypes - ;; (setq lbl-key (hattr:get 'hbut:current 'lbl-key)))) (unless (and (stringp lbl-key) (not (string-empty-p lbl-key))) (hypb:error "(ibut:operate): hbut:current lbl-key must be non-nil"))) @@ -2577,10 +2607,12 @@ Summary of operations based on inputs (name arg comes from \\='hbut:current attr ;; includes buffer pos that we translate to line:col (hpath:file-position-to-line-and-column arg1 arg2))))) ('actypes::link-to-string-match - (insert (format "<%s \"%s\" %d \"%s\">" (actype:def-symbol actype) arg1 arg2 - (hpath:shorten arg3)))) + (if (= arg2 1) + (insert (format "\"%s#%s\"" (hpath:shorten arg3) arg1)) + (insert (format "<%s \"%s\" %d \"%s\">" (actype:def-symbol actype) arg1 arg2 + (hpath:shorten arg3))))) ('nil (error "(ibut:insert-text): actype must be a Hyperbole actype or Lisp function symbol, not '%s'" orig-actype)) - ;; Generic action button type + ;; Generic action button type (_ (insert (format "<%s%s%s>" (actype:def-symbol actype) (if args " " "") (if args (hypb:format-args args) ""))))) (unless (looking-at "\\s-\\|\\'") @@ -2665,7 +2697,7 @@ the existing point." (save-excursion (insert new-lbl ibut:label-end)) (hattr:clear 'hbut:current) t)) - (t (error "(ibut:rename): Button '%s' not found in visible portion of buffer." old-lbl)))) + (t (error "(ibut:rename): Button '%s' not found in visible portion of buffer" old-lbl)))) (defalias 'ibut:summarize #'hbut:report) @@ -2824,6 +2856,11 @@ Return the symbol for the button if found, else nil." name-key (current-buffer)))) +(defun ibut:type (ibut) + "Return full implicit type name for IBUT, else nil." + (when (ibut:is-p ibut) + (hattr:get ibut 'categ))) + ;;; ------------------------------------------------------------------------ (defconst ibut:label-start "<[" "String matching the start of a Hyperbole implicit button label.") @@ -2879,6 +2916,12 @@ type for ibtype is presently undefined." [&optional ["&optional" arg &rest arg]] &optional ["&rest" arg]))) +(defun ibtype:act (ibtype) + "Execute IBTYPE's action in contexts where `ibtype:test-p' is true." + (let ((elisp-sym (ibtype:elisp-symbol ibtype))) + (when elisp-sym + (funcall elisp-sym)))) + (defalias 'ibtype:create #'defib) (defun ibtype:activate-link (referent) @@ -3057,7 +3100,7 @@ is returned." ibtype (symbol-name ibtype)))) (when (string-match "\\`ibtypes::" name) - (make-symbol (substring name (match-end 0)))))) + (intern (substring name (match-end 0)))))) (defun ibtype:delete (type) "Delete an implicit button TYPE (a symbol). @@ -3065,6 +3108,14 @@ Return TYPE's symbol if it existed, else nil." (symtable:delete type symtable:ibtypes) (htype:delete type 'ibtypes)) -(provide 'hbut) +;; Return the full Elisp symbol for IBTYPE, which may be a string or symbol. +(defalias 'ibtype:elisp-symbol #'symtable:ibtype-p) + +(defun ibtype:test-p (ibtype) + "Return t if IBTYPE would activate in the current buffer context, else nil." + (let ((elisp-sym (ibtype:elisp-symbol ibtype)) + (hrule:action #'actype:identity)) + (and elisp-sym (funcall elisp-sym) t))) +(provide 'hbut) ;;; hbut.el ends here diff --git a/hib-debbugs.el b/hib-debbugs.el index d3951795..ca5ea6df 100644 --- a/hib-debbugs.el +++ b/hib-debbugs.el @@ -3,15 +3,15 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 21-Jun-16 at 14:24:53 -;; Last-Mod: 3-Oct-23 at 23:23:16 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:15:21 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 2016, 2021 Free Software Foundation, Inc. +;; Copyright (C) 2016-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of Hyperbole. It requires the Emacs package -;; Debbugs 0.9.7 or higher; there were bugs in earlier versions +;; debbugs-gnu 0.9.7 or higher; there were bugs in earlier versions ;; that made it incompatible with the queries Hyperbole issues. ;; ;;; Commentary: @@ -77,11 +77,11 @@ ;;; Public declarations ;;; ************************************************************************ -(declare-function debbugs-get-status "ext:debbugs") -(declare-function debbugs-gnu-bugs "ext:debbugs") -(declare-function debbugs-gnu-current-id "ext:debbugs") -(declare-function debbugs-gnu-select-report "ext:debbugs") -(declare-function debbugs-gnu-show-reports "ext:debbugs") +(declare-function debbugs-get-status "ext:debbugs-gnu") +(declare-function debbugs-gnu-bugs "ext:debbugs-gnu") +(declare-function debbugs-gnu-current-id "ext:debbugs-gnu") +(declare-function debbugs-gnu-select-report "ext:debbugs-gnu") +(declare-function debbugs-gnu-show-reports "ext:debbugs-gnu") (defvar debbugs-gnu-current-query) (defvar debbugs-port) @@ -154,9 +154,9 @@ Ignore other types of GNU debbugs query strings." ;;; ************************************************************************ (defun debbugs-gnu-show-discussion () + "Display the 2nd message which is the initial bug report. +This may be in Gnus or Rmail summary mode." (debbugs-gnu-select-report) - ;; Display the 2nd message which is the initial bug report. This - ;; may be in Gnus or Rmail summary mode. (goto-char (point-min)) (forward-line 1) (call-interactively (key-binding "\C-m"))) @@ -189,7 +189,7 @@ used as well in place of `bug'." Each element of the list should be of the form (attribute . attribute-value). Attribute may be a symbol or a string. Common attributes include: status, severity, and package." - (require 'debbugs-gnu) + (require 'debbugs) (setq debbugs-gnu-current-query nil) (dolist (attr query-attribute-list) (add-to-list 'debbugs-gnu-current-query @@ -219,7 +219,7 @@ When the Action Key is pressed on a Gnu Debbugs listing entry." "Return t if point appears to be within a debbugs id. Id number is (match-string 2). If this is a query with attributes, then (match-string 3) = \"?\" and (match-string 4) is the query -attributes." +attributes." ;; Point must be before one of the bug#222 characters to match. (let ((case-fold-search t)) (when (string-match "[bugise#0-9]" (char-to-string (following-char))) @@ -263,7 +263,7 @@ Return t unless no attributes are printed." "Return t iff debbugs version is sufficient for use with Hyperbole. Must be greater than equal to 0.9.7." (save-excursion - (let* ((debbugs-src (locate-file "debbugs" load-path '(".el"))) + (let* ((debbugs-src (locate-file "debbugs-gnu" load-path '(".el"))) (visiting-debbugs-src (when debbugs-src (get-file-buffer debbugs-src))) debbugs-src-buffer version) diff --git a/hib-doc-id.el b/hib-doc-id.el index 3f321d74..55043eab 100644 --- a/hib-doc-id.el +++ b/hib-doc-id.el @@ -134,7 +134,7 @@ an error." (delim-doc-id (concat doc-id-start doc-id doc-id-end))) (cond ((null doc-id-indices) (error "(doc-id-index-entry): You must set the `doc-id-indices' variable first")) - ((let ((hyrolo-entry-regexp doc-id-index-entry-regexp)) + ((let ((hyrolo-hdr-and-entry-regexp doc-id-index-entry-regexp)) (zerop (hyrolo-grep (funcall doc-id-match doc-id) 1 doc-id-indices nil nil 'no-display))) (error "(doc-id-index-entry): %s not found in document index" @@ -175,7 +175,7 @@ match the function stored in `doc-id-p'." (defun doc-id:help (but) "Display site-specific document index entry given by doc-id BUT. Also display standard Hyperbole help for implicit button BUT." - (let ((hyrolo-entry-regexp doc-id-index-entry-regexp) + (let ((hyrolo-hdr-and-entry-regexp doc-id-index-entry-regexp) (hyrolo-display-buffer (hypb:help-buf-name "Doc ID")) (doc-id (hbut:key-to-label (hattr:get but 'lbl-key)))) (cond ((null doc-id-indices) diff --git a/hib-kbd.el b/hib-kbd.el index f9fd5e67..e55542ac 100644 --- a/hib-kbd.el +++ b/hib-kbd.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 22-Nov-91 at 01:37:57 -;; Last-Mod: 23-Nov-23 at 01:51:41 by Bob Weiner +;; Last-Mod: 17-Jan-24 at 23:47:04 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -77,10 +77,10 @@ the unmodified key.") (defconst kbd-key:extended-command-prefix "\\_" "Normalized prefix regular expression that invokes an extended command. -Default is M-x.") +Default is \\`M-x'.") (defconst kbd-key:extended-command-binding-list '(execute-extended-command helm-M-x counsel-M-x) - "List of commands that may be bound to M-x to invoke extended/named commands.") + "List of commands that may be bound to \\`M-x' to invoke extended/named commands.") (defvar kbd-key:mini-menu-key nil "The key sequence that invokes the Hyperbole minibuffer menu.") @@ -189,7 +189,7 @@ Return t if KEY-SERIES is a valid key series that is executed, else nil." (hact #'kbd-key:act key-series))) (defun kbd-key:execute-special-series (key-series) - "Execute key series." + "Execute KEY-SERIES." (if (memq (key-binding [?\M-x]) '(execute-extended-command counsel-M-x)) (kbd-key:key-series-to-events key-series) ;; Disable helm while processing M-x commands; helm @@ -208,12 +208,12 @@ Return t if KEY-SERIES is a valid key series that is executed, else nil." (defun kbd-key:maybe-enable-helm (helm-flag orig-M-x-binding) "Enable helm-mode if HELM-FLAG is non-nil. -Restore M-x binding to ORIG-M-X-BINDING." +Restore \\`M-x' binding to ORIG-M-X-BINDING." (when helm-flag (helm-mode 1)) (global-set-key [?\M-x] orig-M-x-binding)) (defun kbd-key:key-series-to-events (key-series) - "Insert the key-series as a series of keyboard events. + "Insert the KEY-SERIES as a series of keyboard events. The events are inserted into Emacs unread input stream. Emacs then executes them when its command-loop regains control." (setq unread-command-events (nconc unread-command-events @@ -259,7 +259,7 @@ With optional prefix arg FULL, display full documentation for command." "Return the non-delimited, normalized form, of a delimited key series, STR. When STR is a curly-brace {} delimited key series, a non-delimited, normalized form is returned, else nil. Key -sequences should be in human readable form, e.g. {C-x C-b}, or +sequences should be in human readable form, e.g. {\\`C-x' \\`C-b'}, or what `key-description' returns. Forms such as {\C-b}, {\^b}, and {^M} will not be recognized. @@ -380,6 +380,7 @@ For an approximate inverse of this, see `key-description'." ;; try to parse strings nor does it have optional second ;; parameter, need-vector. (defun kbd-key:parse (string) + "Parse STRING for keys." (let ((case-fold-search nil) (len (length string)) ; We won't alter string in the loop below. (pos 0) @@ -535,7 +536,7 @@ KEY-SERIES can have following interactive arguments." "Return non-nil if normalized KEY-SERIES string is one of the following: a Hyperbole minibuffer menu item key sequence, a HyControl key sequence, -a M-x extended command, +a \\`M-x' extended command, or a valid key sequence together with its interactive arguments." (or (kbd-key:hyperbole-mini-menu-key-p key-series) (kbd-key:hyperbole-hycontrol-key-p key-series) diff --git a/hib-social.el b/hib-social.el index 39823150..670f0e1f 100644 --- a/hib-social.el +++ b/hib-social.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 20-Jul-16 at 22:41:34 -;; Last-Mod: 28-Oct-23 at 12:27:26 by Bob Weiner +;; Last-Mod: 17-Jan-24 at 23:48:46 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -645,6 +645,7 @@ Then an Action Key displays the associated changeset." "Filename of cache of local git repository directories found by `locate-command'.") (defun hibtypes-git-get-locate-command () + "Get the locate command." (require 'locate) (let ((cmd (if (string-match "locate" locate-command) locate-command "locate"))) (if (executable-find cmd) diff --git a/hibtypes.el b/hibtypes.el index eb174fda..63a147bc 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 19-Sep-91 at 20:45:31 -;; Last-Mod: 25-Nov-23 at 17:18:25 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:15:45 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2023 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -76,6 +76,7 @@ (declare-function symtable:add "hact") (declare-function hyrolo-get-file-list "hyrolo") +(declare-function ert-test-boundp "ert") ;;; ************************************************************************ ;;; Public implicit button types @@ -87,6 +88,10 @@ ;; them. Use load instead to ensure are reloaded when resetting ;; ibtype priorities. +;;; ======================================================================== +;;; Jumps to source line from Python traceback lines +;;; ======================================================================== + (defib python-tb-previous-line () "Move to prior line with potential Python line ref. In Python, tracebacks may be on a line just below the source @@ -337,30 +342,6 @@ in all buffers." (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 -;;; ======================================================================== - -;; Org links in Org mode are handled at the highest priority; see the last -;; section at the end of this file. - -(defib org-link-outside-org-mode () - "Follow an Org link in a non-Org mode buffer. -This should be a very low priority so other Hyperbole types -handle any links they recognize first." - (when (and (eq hsys-org-enable-smart-keys t) - (not (funcall hsys-org-mode-function)) - ;; Prevent infinite recursion, e.g. if called via - ;; `org-metareturn-hook' from `org-meta-return' invocation. - (not (hyperb:stack-frame '(ibtypes::debugger-source org-meta-return)))) - (require 'hsys-org) - (declare-function hsys-org-link-at-p "hsys-org" ()) - (declare-function hsys-org-set-ibut-label "hsys-org" (start-end)) - (let ((start-end (hsys-org-link-at-p))) - (when start-end - (hsys-org-set-ibut-label start-end) - (hact #'org-open-at-point-global))))) - ;;; ======================================================================== ;;; Handles internal references within an annotated bibliography, delimiters=[] ;;; ======================================================================== @@ -370,7 +351,7 @@ handle any links they recognize first." References must be delimited by square brackets, must begin with a word constituent character, not contain @ or # characters, must not be in buffers whose names begin with a space or asterisk character, must -not be in a programming mode, Markdown or Org buffers and must have an +not be in a programming mode, Markdown or Org buffer and must have an attached file." (and (not (bolp)) buffer-file-name @@ -388,6 +369,30 @@ attached file." (ibut:label-p t "[" "]" t)) (hact 'annot-bib ref))))) +;;; ======================================================================== +;;; Follows Org links that are in non-Org mode buffers +;;; ======================================================================== + +;; Org links in Org mode are handled at the highest priority; see the last +;; section at the end of this file. + +(defib org-link-outside-org-mode () + "Follow an Org link in a non-Org mode buffer. +This should be a very low priority so other Hyperbole types +handle any links they recognize first." + (when (and (eq hsys-org-enable-smart-keys t) + (not (funcall hsys-org-mode-function)) + ;; Prevent infinite recursion, e.g. if called via + ;; `org-metareturn-hook' from `org-meta-return' invocation. + (not (hyperb:stack-frame '(ibtypes::debugger-source org-meta-return)))) + (require 'hsys-org) + (declare-function hsys-org-link-at-p "hsys-org" ()) + (declare-function hsys-org-set-ibut-label "hsys-org" (start-end)) + (let ((start-end (hsys-org-link-at-p))) + (when start-end + (hsys-org-set-ibut-label start-end) + (hact #'org-open-at-point-global))))) + ;;; ======================================================================== ;;; Displays in-file Markdown link referents. ;;; ======================================================================== @@ -623,11 +628,12 @@ anything." "Jump to the text file section referenced by a table of contents entry at point. Buffer must be in a text mode or must contain DEMO, README or TUTORIAL and there must be a `Table of Contents' or `Contents' -label on a line by itself (it may begin with an asterisk), -preceding the table of contents. Each toc entry must begin with -some whitespace followed by one or more asterisk characters. -Each section header linked to by the toc must start with one or -more asterisk characters at the very beginning of the line." +label on a line by itself (it optionally may begin with an +asterisk), preceding the table of contents. Each toc entry must +begin with optional whitespace followed by one or more asterisks. +Each section header linked to by the toc must start with optional +whitespace and then one or more asterisks at the beginning of the +line." (let (section) (when (and (or (derived-mode-p 'text-mode) (string-match "DEMO\\|README\\|TUTORIAL" (buffer-name))) @@ -637,7 +643,7 @@ more asterisk characters at the very beginning of the line." (save-excursion (beginning-of-line) ;; Entry line within a TOC - (when (and (or + (when (and (or ;; Next line is typically in RFCs, ;; e.g. "1.1. Scope ..... 1" (looking-at "^[ \t]*\\([0-9.]+\\([ \t]+[^ \t\n\r]+\\)+\\) \\.+") @@ -869,7 +875,7 @@ See `hpath:find' function documentation for special file display options." ;;; ======================================================================== ;;; Jumps to source line associated with ipython, ripgrep, grep or -;;; compilation errors. +;;; compilation errors or HyRolo stuck position error messages. ;;; ======================================================================== (defib ipython-stack-frame () @@ -960,6 +966,23 @@ than a helm completion buffer)." (ibut:label-set but-label) (hact 'link-to-file-line file line-num))))))))) +(defib hyrolo-stuck-msg () + "Jump to the position where a HyRolo search has become stuck from the error. +Such errors are recognized in any buffer (other than a helm completion +buffer)." + (unless (derived-mode-p 'helm-major-mode) + (save-excursion + (beginning-of-line) + ;; HyRolo stuck error + (when (looking-at ".*(hyrolo-grep-file): Stuck looping in buffer \\\\?\"\\([^\\\t\n\r\f\"'`]+\\)\\\\?\" at position \\([0-9]+\\)") + (let* ((buffer-name (match-string-no-properties 1)) + (pos (or (match-string-no-properties 2) "1")) + (but-label (concat buffer-name ":P" pos))) + (when (buffer-live-p (get-buffer buffer-name)) + (setq pos (string-to-number pos)) + (ibut:label-set but-label) + (hact 'link-to-buffer-tmp buffer-name pos))))))) + (defib grep-msg () "Jump to the line associated with line numbered grep or compilation error msgs. Messages are recognized in any buffer (other than a helm completion @@ -971,6 +994,8 @@ in grep and shell buffers." (save-excursion (beginning-of-line) (when (or + ;; HyRolo stuck error + (looking-at ".*(hyrolo-grep-file): Stuck looping in \\(buffer\\) \\\\?\"\\([^\\\t\n\r\f\"'`]+\\)\\\\?\" at position \\([0-9]+\\)") ;; Emacs native compiler file lines (looking-at "Compiling \\(\\S-+\\)\\.\\.\\.$") (looking-at "Loading \\(\\S-+\\) (\\S-+)\\.\\.\\.$") @@ -1025,7 +1050,7 @@ in grep and shell buffers." ;;; ======================================================================== ;;; Jumps to source line associated with debugger stack frame or breakpoint -;;; lines. Supports gdb, dbx, and xdb. +;;; lines. Supports pdb, gdb, dbx, and xdb. ;;; ======================================================================== (defun hib-python-traceback () @@ -1374,7 +1399,8 @@ Activates only if point is within the first line of the Info-node name." (hbut:label-p t "`" "'" t t))) (ref (car node-ref-and-pos)) (node-ref (and (stringp ref) - (string-match-p "\\`([^\): \t\n\r\f]+)" ref) + (or (string-match-p "\\`([^\): \t\n\r\f]+)\\'" ref) + (string-match-p "\\`([^\): \t\n\r\f]+)[^ :;\"'`]" ref)) (hpath:is-p ref nil t)))) (and node-ref (ibut:label-set node-ref-and-pos) @@ -1445,14 +1471,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, ." +action type, function symbol to call or test to execute, i.e. +'<'actype-or-elisp-symbol arg1 ... argN '>'. For example, +." (let ((hbut:max-len 0) (lbl-key (hattr:get 'hbut:current 'lbl-key)) (start-pos (hattr:get 'hbut:current 'lbl-start)) @@ -1490,7 +1518,8 @@ arg1 ... argN '>'. For example, ." 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 buttons, need to double quote each argument so @@ -1519,6 +1548,10 @@ arg1 ... argN '>'. For example, ." ;; 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/hload-path.el b/hload-path.el index 0a9830f6..b306fc29 100644 --- a/hload-path.el +++ b/hload-path.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 29-Jun-16 at 14:39:33 -;; Last-Mod: 19-Nov-23 at 23:18:02 by Bob Weiner +;; Last-Mod: 24-Dec-23 at 00:41:54 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -57,16 +57,20 @@ directory separator character.") (add-to-list 'load-path (directory-file-name hyperb:dir)) ;;; ************************************************************************ -;;; Koutliner mode and file suffix importation settings +;;; Koutliner mode and file suffix settings ;;; ************************************************************************ -;; Perform Koutliner initializations. - (add-to-list 'load-path (expand-file-name "kotl" hyperb:dir)) ;; Invoke kotl-mode for files ending in ".kotl". ;; Also allow ".kot" for DOS and Windows users. (add-to-list 'auto-mode-alist '("\\.kotl?\\'" . kotl-mode)) +;;; ************************************************************************ +;;; Emacs Outline settings for .otl files +;;; ************************************************************************ + +(add-to-list 'auto-mode-alist '("\\.otl\\'" . outline-mode)) + ;;; ************************************************************************ ;;; Hyperbole test importation settings ;;; ************************************************************************ diff --git a/hmail.el b/hmail.el index cce7a37d..b0a4180a 100644 --- a/hmail.el +++ b/hmail.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 9-Oct-91 at 18:38:05 -;; Last-Mod: 3-Oct-23 at 23:30:56 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 15:38:10 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2022 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the HY-COPY (Hyperbole) or BR-COPY (OO-Browser) file for license ;; information. ;; @@ -35,7 +35,7 @@ ;;; Public declarations ;;; ************************************************************************ -(declare-function rmail:msg-widen nil) +(declare-function rmail:msg-widen "hmail") (declare-function hypb:insert-region "hypb") ;;; ************************************************************************ diff --git a/hmoccur.el b/hmoccur.el index dd91e692..11893a0c 100644 --- a/hmoccur.el +++ b/hmoccur.el @@ -3,7 +3,7 @@ ;; Author: Markus Freericks / Bob Weiner ;; ;; Orig-Date: 1-Aug-91 -;; Last-Mod: 3-Oct-23 at 23:28:17 by Mats Lidell +;; Last-Mod: 17-Jan-24 at 23:57:46 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -59,7 +59,12 @@ ;;; ************************************************************************ (defconst moccur-source-prefix "@loc> " - "Prefix for lines indicating source of matches.") + "String prefix for lines indicating the source of the matches. + +It should not contain any characters needing regular expression quoting. + +This expression should be followed immediately by a buffer or file name +indicating the source of any of its Hyperbole buttons.") ;;; ************************************************************************ ;;; Public functions @@ -71,6 +76,7 @@ With optional FILE-REGEXP (a pattern which matches to files in a single directory), search matching files rather than current buffers. The lines are shown in a buffer named *Moccur* which serves as a menu to find any of the occurrences in this buffer. +With optional NO-FOLD-SEARCH non-nil do case sensitive search. \\{moccur-mode-map}" (interactive "sRegexp to find occurrences of: \nsFiles to search (default current file buffers): ") diff --git a/hmouse-drv.el b/hmouse-drv.el index 42a5996c..b0e4bcdf 100644 --- a/hmouse-drv.el +++ b/hmouse-drv.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 04-Feb-90 -;; Last-Mod: 4-Oct-23 at 20:04:08 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:15:55 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1989-2021 Free Software Foundation, Inc. +;; Copyright (C) 1989-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -59,7 +59,7 @@ (defvar action-key-default-function) ; defcustom hui-mouse (defvar assist-key-default-function) ; defcustom hui-mouse -(declare-function mouse-drag-frame nil) ;; Obsolete from Emacs 28 +(declare-function mouse-drag-frame "mouse") ;; Obsolete from Emacs 28 (declare-function hkey-quit-window "hmouse-drv") ; Alias defined in this file. @@ -88,8 +88,8 @@ that the release point was in its frame. See function `hmouse-window-at-absolute-pixel-position' for more details.") -(defvar action-key-depressed-flag nil "t while Action Key is depressed.") -(defvar assist-key-depressed-flag nil "t while Assist Key is depressed.") +(defvar action-key-depressed-flag nil "Non-nil means Action Key is depressed.") +(defvar assist-key-depressed-flag nil "Non-nil means Assist Key is depressed.") (defvar action-key-depress-args nil "List of event args from most recent depress of the Action Mouse Key.") (defvar assist-key-depress-args nil @@ -151,12 +151,12 @@ Note that this may be a buffer different than where the release occurs.") "When non-nil, cancels last Assist Key depress.") (defvar action-key-help-flag nil - "When non-nil, forces display of help for next Action Key release.") + "Non-nil means it forces display of help for next Action Key release.") (defvar assist-key-help-flag nil - "When non-nil, forces display of help for next Assist Key release.") + "Non-nil means it forces display of help for next Assist Key release.") (defvar assist-flag nil - "Non-nil when Hyperbole's Assist Key is in use rather than the Action Key. + "Non-nil means Hyperbole's Assist Key is in use rather than the Action Key. Never set directly. Bound as a parameter when `hkey-execute' is called and then used as a free variable.") @@ -246,12 +246,12 @@ This permits the Smart Keys to behave as paste keys.") (run-hooks 'assist-key-depress-hook)) (defun action-key-depress-emacs (event) - "Handle depress event of the Hyperbole Action Mouse Key." + "Handle depress EVENT of the Hyperbole Action Mouse Key." (interactive "e") (action-key-depress event)) (defun assist-key-depress-emacs (event) - "Handle depress event of the Hyperbole Assist Mouse Key." + "Handle depress EVENT of the Hyperbole Assist Mouse Key." (interactive "e") (assist-key-depress event)) @@ -359,6 +359,7 @@ a valid function." (setq action-key-depressed-flag nil))) (defun action-key-internal () + "Action key internal." (setq action-key-depressed-flag t) (when action-key-cancelled (setq action-key-cancelled nil @@ -382,6 +383,7 @@ bound to a valid function." (setq assist-key-depressed-flag nil))) (defun assist-key-internal () + "Assist key internal." (setq assist-key-depressed-flag t) (when assist-key-cancelled (setq assist-key-cancelled nil @@ -420,7 +422,7 @@ The ace-window package, (see \"https://elpa.gnu.org/packages/ace-window.html\"), assigns short ids to each Emacs window and lets you jump to or operate upon a specific window by giving its letter. Hyperbole can insert an operation into ace-window that allows you to -display items such as dired or buffer menu items in a specific +display items such as Dired or buffer menu items in a specific window. To enable this feature, in your Emacs initialization file after @@ -429,13 +431,13 @@ ace-window, then call: (hkey-ace-window-setup) -otherwise, choose a binding like {M-o} and send it to the same +otherwise, choose a binding like {\\`M-o'} and send it to the same function to bind it: (hkey-ace-window-setup \"\M-o\") Then whenever point is on an item you want displayed in another -window, use {M-o i } and watch the +window, use {\\`M-o' i } and watch the magic happen." (require 'ace-window) (when key (hkey-set-key key 'ace-window)) @@ -651,9 +653,9 @@ The selected window does not change." RELEASE-WINDOW is interactively selected via the `ace-window' command. The selected window does not change. -With no prefix argument, create an explicit button. -With a C-u \\='(4) prefix argument, create an unnamed implicit button. -With a M-1 prefix argument, create an named implicit button." +With no prefix argument, create an unnamed implicit button. +With a single \\`C-u' \\='(4) prefix argument, create an explicit button. +With any other prefix argument, like M-1, create an named implicit button." (interactive (list (let ((mode-line-text (concat " Ace - Hyperbole: " (nth 2 (assq ?w aw-dispatch-alist))))) (aw-select mode-line-text)))) @@ -662,9 +664,9 @@ With a M-1 prefix argument, create an named implicit button." (let ((start-window (selected-window))) (unwind-protect (progn - (funcall (if current-prefix-arg - #'hui:ibut-link-directly - #'hui:ebut-link-directly) + (funcall (if (equal current-prefix-arg '(4)) + #'hui:ebut-link-directly + #'hui:ibut-link-directly) start-window release-window) release-window) ;; Leave start-window selected @@ -753,7 +755,7 @@ The selected window does not change." ;;;###autoload (defun hmouse-click-to-drag-item () "Mouse click on start and end windows for use with `hkey-drag-item'. -Emulate {M-o i} from start window to end window. +Emulate {\\`M-o' i} from start window to end window. After the drag, the end window is the selected window." (interactive) (hmouse-choose-windows #'hkey-drag-item)) @@ -861,7 +863,7 @@ hkey-replace, hkey-swap and hkey-throw." (defun hmouse-keyboard-choose-windows (func) "Press Return in start and end windows which are then applied to FUNC. With the start window temporarily selected, run FUNC with the end -window as an argument. +window as an argument. Appropriate FUNCs include: hkey-drag, hkey-drag-to, hkey-link, hkey-replace, hkey-swap and hkey-throw." @@ -984,6 +986,7 @@ frame instead." (mouse-drag-frame start-event 'move)))))) (defun hkey-debug (pred pred-value hkey-action) + "Display a message with the context and values from Smart Key activation." (message (concat "(HyDebug) %sContext: %s; %s: %s; Buf: %s; Mode: %s; MinibufDepth: %s\n" " action-depress: %s; action-release: %s\n" " assist-depress: %s; assist-release: %s") @@ -1146,7 +1149,8 @@ documentation is found." (if (eq categ 'explicit) actype categ)) (if (eq categ 'explicit) "EXPLICIT" "IMPLICIT"))) (hattr:report attributes) - (unless (or (eq categ 'explicit) + (unless (or assisting + (eq categ 'explicit) (null categ) (not (fboundp categ)) (null (documentation categ))) @@ -1154,13 +1158,23 @@ documentation is found." (princ (format "\n%s\n" (replace-regexp-in-string "^" " " (documentation categ) nil t)))) - (when (and (symbolp actype) - (fboundp actype) - (documentation actype)) - (princ (format "\n%s ACTION SPECIFICS:\n%s\n" - (or (actype:def-symbol actype) actype) - (replace-regexp-in-string "^" " " (documentation actype) - nil t)))))) + (if assisting + (let ((type-help-func (or (intern-soft + (concat (htype:names 'ibtypes categ) + ":help")) + 'hbut:report))) + (princ (format "\n%s ASSIST SPECIFICS:\n%s\n" + type-help-func + (replace-regexp-in-string + "^" " " (documentation type-help-func) + nil t)))) + (when (and (symbolp actype) + (fboundp actype) + (documentation actype)) + (princ (format "\n%s ACTION SPECIFICS:\n%s\n" + (or (actype:def-symbol actype) actype) + (replace-regexp-in-string "^" " " (documentation actype) + nil t))))))) ;; Print Emacs push-button attributes (when (memq cmd-sym '(smart-push-button smart-push-button-help)) @@ -1229,7 +1243,7 @@ the current window. By default, it is displayed according to the setting of `hpath:display-where'." (if (bufferp buffer) (setq buffer (buffer-name buffer))) (if (null buffer) (setq buffer (buffer-name (current-buffer)))) - (let ((org-help (and (stringp buffer) (string-match "\\`\\*Org Help\\*" buffer))) + (let ((hkey-org-help (and (stringp buffer) (string-match "\\`\\*Org Help\\*" buffer))) (owind (selected-window))) (and (stringp buffer) (string-match "^\\*Help\\|Help\\*$" buffer) @@ -1251,7 +1265,7 @@ the current window. By default, it is displayed according to the setting of (selected-window)) (t (hpath:display-buffer buf))))) ;; Ignore org-mode's temp help buffers which it handles on its own. - (when (and wind (not org-help)) + (when (and wind (not hkey-org-help)) (setq minibuffer-scroll-window wind) ;; Don't use help-mode in buffers already set up with a ;; quit-key to bury the buffer, e.g. minibuffer completions, @@ -1264,7 +1278,7 @@ the current window. By default, it is displayed according to the setting of (when (derived-mode-p 'help-mode) (local-set-key "q" #'hkey-help-hide))))) ;; If in an *Org Help* buffer, reselect the Org buffer. - (when org-help + (when hkey-org-help (select-window owind)) ;; If in a *Completions* buffer, re-select the window that ;; generated the completions. @@ -1377,7 +1391,7 @@ the current window. By default, it is displayed in another window." (defun hkey-toggle-debug (&optional arg) "Toggle whether Hyperbole logs Smart Key events. -Key events can be used later for analysis/submission using {C-h h m c}. +Key events can be used later for analysis/submission using {\\`C-h' h m c}. With optional ARG, enable iff ARG is positive." (interactive "P") (if (or (and arg (<= (prefix-numeric-value arg) 0)) @@ -1401,7 +1415,7 @@ and it was inactive, return its window, else nil." ;; Based on code from subr.el. (defun hmouse-vertical-line-spacing (frame) - "Return any extra vertical spacing in pixels between text lines or 0 if none." + "Return FRAME extra vertical spacing in pixels between text lines or 0 if none." (let ((spacing (when (display-graphic-p frame) (or (with-current-buffer (window-buffer (frame-selected-window frame)) line-spacing) diff --git a/hmouse-info.el b/hmouse-info.el index f74c6f69..c607ff89 100644 --- a/hmouse-info.el +++ b/hmouse-info.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 04-Apr-89 -;; Last-Mod: 3-Oct-23 at 17:48:46 by Mats Lidell +;; Last-Mod: 18-Jan-24 at 19:08:48 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -163,9 +163,9 @@ or a Menu; otherwise returns nil." ;;; ************************************************************************ (defun Info-handle-in-node-hdr () - "If within an Info node header, move to Top, , , or - node, depending on which label point is on, and return t. -Otherwise, return nil." + "If within an Info node header on a label move to the corresponding node. +Move to Top, , , or node, depending on +which label point is on, and return t. Otherwise, return nil." ;; ;; Test if on 1st line of node, i.e. node header ;; @@ -193,10 +193,11 @@ Otherwise, return nil." t))) (defun Info-handle-in-node-hdr-assist () - "If within an Info node header when the `smart-info-assist' command is -executed, when within the header go to the DIR `top-level node'. When -within any other header (, , or ) go to last node from -history list. Return t if in Info node header. Otherwise return nil." + "When `smart-info-assist' command is executed on an Info node header, go to node. +When within the header go to the DIR `top-level node'. +When within any other header (, , or ) go to +last node from history list. Return t if in Info node header. +Otherwise return nil." ;; ;; Test if on 1st line of node, i.e. node header ;; diff --git a/hmouse-key.el b/hmouse-key.el index 8934c9f3..1286b338 100644 --- a/hmouse-key.el +++ b/hmouse-key.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 30-May-94 at 00:11:57 -;; Last-Mod: 3-Oct-23 at 17:10:05 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:16:44 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1994-2022 Free Software Foundation, Inc. +;; Copyright (C) 1994-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -37,7 +37,7 @@ (defvar hyperbole-mode-map) ; "hyperbole.el" -(declare-function hkey-initialize "hbut") +(declare-function hkey-initialize "hyperbole") (declare-function hmouse-get-bindings "hmouse-sh") (declare-function hmouse-unshifted-setup "hmouse-sh") (declare-function hmouse-shifted-setup "hmouse-sh") @@ -51,7 +51,7 @@ "List of (key . binding) pairs for Hyperbole mouse keys.") (defvar hmouse-bindings-flag nil - "True if Hyperbole mouse bindings are in use, else nil.") + "Non-nil means Hyperbole mouse bindings are in use, else nil.") (defvar hmouse-previous-bindings nil "List of prior (key . binding) pairs for mouse keys rebound by Hyperbole.") @@ -120,7 +120,7 @@ Assist Key = shift-right mouse key." "{Shift-Mouse-2} invokes")))) (defun hmouse-add-unshifted-smart-keys () - "Bind mouse-2 to the Action Key and mouse-3 to the Assist Key." + "Bind \\`mouse-2' to the Action Key and \\`mouse-3' to the Assist Key." (interactive) (require 'hyperbole) (hmouse-unshifted-setup)) @@ -164,19 +164,6 @@ Use after any programmatic change is made." (mapc #'require ftrs) (message "Hyperbole Smart Keys and menus have been updated"))) -;;; ************************************************************************ -;;; Private variables -;;; ************************************************************************ - -(defvar hmouse-bindings nil - "List of (key . binding) pairs for Hyperbole mouse keys.") - -(defvar hmouse-bindings-flag nil - "True if Hyperbole mouse bindings are in use, else nil.") - -(defvar hmouse-previous-bindings nil - "List of prior (key . binding) pairs for mouse keys rebound by Hyperbole.") - (provide 'hmouse-key) ;;; hmouse-key.el ends here diff --git a/hmouse-mod.el b/hmouse-mod.el index 05868a79..0e702632 100644 --- a/hmouse-mod.el +++ b/hmouse-mod.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 8-Oct-92 at 19:08:31 -;; Last-Mod: 26-Jul-22 at 23:56:52 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:16:52 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1992-2022 Free Software Foundation, Inc. +;; Copyright (C) 1992-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -117,7 +117,7 @@ mode, if no other key is pressed while a Smart Key is depressed." ;;; ************************************************************************ (defun hmouse-mod-disable () - "Restore the global keymap to its state prior to enabling of `hmouse-mod-mode'. + "Restore the global keymap to its state prior to enabling `hmouse-mod-mode'. This stops the Smart Keys from acting as modifier keys." (use-global-map (if (keymapp hmouse-mod--prior-global-map) hmouse-mod--prior-global-map @@ -138,7 +138,7 @@ It accounts for modifier Smart Keys." (use-global-map hmouse-mod--global-map)) (defun hmouse-mod-execute-command (key count) - "Execute command associated with keyboard KEY or if KEY is a prefix, record it. + "Execute command on keyboard KEY or if KEY is a prefix, record it. Second argument COUNT is used as a prefix argument to the command." (if (stringp key) (setq key (concat hmouse-mod--prefix key))) (let ((binding (key-binding key)) @@ -168,7 +168,9 @@ Second argument COUNT is used as a prefix argument to the command." (message "(HyDebug): hmouse-mod-execute-command - `%s' invalid key" key))))) (defun hmouse-mod-insert-command (count) - "Surrogate function for `self-insert-command'. Accounts for modifier Smart Keys." + "Surrogate function for `self-insert-command'. +Accounts for modifier Smart Keys. COUNT is used as a prefix +argument to the command." (interactive "p") (if (and (boundp 'action-key-depressed-flag) (boundp 'assist-key-depressed-flag)) @@ -204,7 +206,8 @@ Second argument COUNT is used as a prefix argument to the command." (keyboard-quit)) (defun hmouse-mod-last-char () - (when (characterp last-command-event) + "When last command was a character return the event." +(when (characterp last-command-event) last-command-event)) (provide 'hmouse-mod) diff --git a/hmouse-sh.el b/hmouse-sh.el index 15fef7d4..359833e9 100644 --- a/hmouse-sh.el +++ b/hmouse-sh.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 3-Sep-91 at 21:40:58 -;; Last-Mod: 3-Oct-23 at 22:50:40 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:52:12 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -69,7 +69,7 @@ (defun hmouse-bind-key-emacs (mouse-key-number depress-cmd release-cmd) "Ensure MOUSE-KEY-NUMBER (1-5) is bound to DEPRESS-CMD and RELEASE-CMD. -This includes depresses and drags. Mouse key 1 is [mouse-1], etc. +This includes depresses and drags. Mouse key 1 is [\\`mouse-1'], etc. Use nil as cmd value to unbind a key." (hmouse-set-key-list depress-cmd @@ -434,7 +434,7 @@ This must be bound to a button-down mouse event. In Transient Mark mode, the highlighting remains as long as the mark remains active. Otherwise, it remains until the next input event. -When the region already exists and `mouse-drag-and-drop-region' +When the region already exists and variable `mouse-drag-and-drop-region' is non-nil, this moves the entire region of text to where mouse is dragged over to." (interactive "e") @@ -487,15 +487,15 @@ point determined by `mouse-select-region-move-to-beginning'." (error (when (window-valid-p end-w-or-f) (select-frame (window-frame end-w-or-f)))))))))) -(defun hmouse-move-point-eterm (arg-list) - (apply 'mouse-move-point arg-list)) - (defun hmouse-set-key-list (binding key-list) + "Define a Hyperbole global minor mode key from KEY-LIST bound to BINDING." (mapc (lambda (key) (hkey-set-key key binding)) key-list) nil) (defun hmouse-shifted-setup (middle-flag) - "Call `hmouse-install' instead of this and see its documentation." + "Call `hmouse-install' instead of this and see its documentation. +When non-nil MIDDLE-FLAG bind the middle and right mouse keys as +Action and Assist Keys, respectively." (interactive) ;; Do nothing when running in batch mode. (unless noninteractive diff --git a/hmouse-tag.el b/hmouse-tag.el index dbd039e5..97876a24 100644 --- a/hmouse-tag.el +++ b/hmouse-tag.el @@ -3,11 +3,11 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 24-Aug-91 -;; Last-Mod: 1-Dec-23 at 23:32:23 by Mats Lidell +;; Last-Mod: 20-Jan-24 at 20:21:57 by Mats Lidell ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; -;; Copyright (C) 1991-2022 Free Software Foundation, Inc. +;; Copyright (C) 1991-2024 Free Software Foundation, Inc. ;; See the "HY-COPY" file for license information. ;; ;; This file is part of GNU Hyperbole. @@ -27,27 +27,7 @@ ;; command. (load "etags.elc" t nil t))) -;; If etags utilizes the new xref.el library, define some helper -;; functions to simplify programming and fix one existing function. -(when (require 'xref nil t) - ;; Fix next xref function to handle when called at beginning of buffer - (defun xref--item-at-point () - (get-text-property - (max (point-min) (if (eolp) (1- (point)) (point))) - 'xref-item)) - (when (not (fboundp 'xref-definition)) - (defun xref-definition (identifier) - "Return the first definition of string IDENTIFIER." - (car (xref-backend-definitions (xref-find-backend) identifier))) - (defun xref-definitions (identifier) - "Return a list of all definitions of string IDENTIFIER." - (xref-backend-definitions (xref-find-backend) identifier)) - (defun xref-item-buffer (item) - "Return the buffer in which xref ITEM is defined." - (marker-buffer (save-excursion (xref-location-marker (xref-item-location item))))) - (defun xref-item-position (item) - "Return the buffer position where xref ITEM is defined." - (marker-position (save-excursion (xref-location-marker (xref-item-location item))))))) +(require 'hsys-xref) ;;; ************************************************************************ ;;; Public declarations @@ -82,12 +62,6 @@ (declare-function org-in-src-block-p "org") (declare-function ibtype:def-symbol "hbut") -;; Forward declare needed? Because of optional defined above? Can we -;; skip checking if xref is available since it has been at least since -;; 26.1 or even earlier? Then we should not need these declares. -(declare-function xref-item-position "hmouse-tag") -(declare-function xref-item-buffer "hmouse-tag") - ;;; ************************************************************************ ;;; Public variables ;;; ************************************************************************ @@ -207,7 +181,7 @@ Keyword matched is grouping 1. Referent is grouping 2.") ;;; ************************************************************************ (defun smart-asm (&optional identifier next) - "Jumps to the definition of optional assembly IDENTIFIER or the one at point. + "Jump to the definition of optional assembly IDENTIFIER or the one at point. Optional second arg NEXT means jump to next matching assembly tag. It assumes that its caller has already checked that the key was pressed in an @@ -233,7 +207,8 @@ If: ;;;###autoload (defun smart-asm-at-tag-p (&optional no-flash) - "Return assembly tag name that point is within, else nil." + "Return assembly tag name that point is within, else nil. +When optional NO-FLASH, do not flash." (let* ((identifier-chars "_.$a-zA-Z0-9") (identifier (concat "[_.$a-zA-Z][" identifier-chars "]*"))) (save-excursion @@ -247,7 +222,7 @@ If: ;;;###autoload (defun smart-c++ (&optional identifier next) - "Jumps to the definition of optional C++ IDENTIFIER or the one at point. + "Jump to the definition of optional C++ IDENTIFIER or the one at point. Optional second arg NEXT means jump to next matching C++ tag. It assumes that its caller has already checked that the key was pressed in an @@ -275,6 +250,8 @@ Otherwise: ;;;###autoload (defun smart-c++-tag (&optional identifier next) + "Jump to the definition of optional C++ IDENTIFIER or the one at point. +Optional second arg NEXT means jump to next matching C++ tag." (let ((tag (or identifier (smart-c++-at-tag-p)))) (message "Looking for `%s'..." tag) (condition-case () @@ -398,7 +375,8 @@ If: ;;;###autoload (defun smart-c-at-tag-p (&optional no-flash) - "Return C tag name that point is within, else nil." + "Return C tag name that point is within, else nil. +When optional NO-FLASH, do not flash." (let* ((identifier-chars "_a-zA-Z0-9") (identifier (concat "[_a-zA-Z][" identifier-chars "]*"))) (save-excursion @@ -418,11 +396,12 @@ If: nil) (defun smart-emacs-lisp-mode-p () - "Return non-nil if in a mode which uses Emacs Lisp symbols." + "Return non-nil if in a mode using Emacs Lisp symbols." ;; Beyond Lisp files, Emacs Lisp symbols appear frequently in Byte-Compiled ;; buffers, debugger buffers, program ChangeLog buffers, Help buffers, ;; *Warnings*, *Flymake log* and *Flymake diagnostics... buffers. - (or (memq major-mode #'(emacs-lisp-mode lisp-interaction-mode debugger-mode)) + (or (memq major-mode #'(emacs-lisp-mode lisp-interaction-mode + debugger-mode ert-results-mode)) (string-match-p (concat "\\`\\*\\(Warnings\\|Flymake log\\|Compile-Log\\(-Show\\)?\\)\\*" "\\|\\`\\*Flymake diagnostics") (buffer-name)) @@ -431,7 +410,7 @@ If: (smart-lisp-at-known-identifier-p)))) (defun smart-fortran (&optional identifier next) - "Jumps to the definition of optional Fortran IDENTIFIER or the one at point. + "Jump to the definition of optional Fortran IDENTIFIER or the one at point. Optional second arg NEXT means jump to next matching Fortran tag. It assumes that its caller has already checked that the key was pressed in an @@ -472,7 +451,8 @@ in the current directory or any of its ancestor directories." ;;;###autoload (defun smart-fortran-at-tag-p (&optional no-flash) - "Return Fortran tag name that point is within, else nil." + "Return Fortran tag name that point is within, else nil. +When optional NO-FLASH, do not flash." (let* ((identifier-chars "_a-zA-Z0-9") (identifier (concat "[_a-zA-Z][" identifier-chars "]*"))) (save-excursion @@ -486,7 +466,7 @@ in the current directory or any of its ancestor directories." ;;;###autoload (defun smart-java (&optional identifier next) - "Jumps to the definition of optional Java IDENTIFIER or the one at point. + "Jump to the definition of optional Java IDENTIFIER or the one at point. Optional second arg NEXT means jump to next matching Java tag. It assumes that its caller has already checked that the key was pressed in an @@ -511,6 +491,8 @@ Otherwise: ;;;###autoload (defun smart-java-tag (&optional identifier next) + "Jump to the definition of optional Java IDENTIFIER or the one at point. +Optional second arg NEXT means jump to next matching Java tag." (let ((tag (or identifier (smart-java-at-tag-p t)))) (message "Looking for `%s'..." tag) (condition-case () @@ -522,7 +504,7 @@ Otherwise: ;;; The following should be called only if the OO-Browser is available. (defun smart-java-oo-browser (&optional _junk) - "Jumps to the definition of selected Java construct via OO-Browser support. + "Jump to the definition of selected Java construct via OO-Browser support. Optional JUNK is ignored. Does nothing if the OO-Browser is not available. It assumes that its caller has already checked that the key was pressed in an @@ -553,7 +535,8 @@ If key is pressed: ;;;###autoload (defun smart-java-at-tag-p (&optional no-flash) - "Return Java tag name that point is within, else nil." + "Return Java tag name that point is within, else nil. +When optional NO-FLASH, do not flash." (let* ((identifier-chars "_$.a-zA-Z0-9") (identifier (concat "[_$a-zA-Z][" identifier-chars "]*"))) @@ -599,7 +582,8 @@ in the current directory or any of its ancestor directories." ;;;###autoload (defun smart-javascript-at-tag-p (&optional no-flash) - "Return JavaScript tag name that point is within, else nil." + "Return JavaScript tag name that point is within, else nil. +When optional NO-FLASH, do not flash." (if (if (memq major-mode '(html-mode web-mode)) ;; Must be within a