Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
2026-02-22 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-format-reference): Rename to 'hywiki-format-grep-to-reference';
remove autoload.
(hywiki-format-reference-to-grep): Add.
(hywiki-completion-at-point): Rewrite and simplify.
(hywiki-word-highlight-in-buffers): Add call to
'hywiki-word-add-completion-at-point' to ensure has completion hook independent
of whether the buffer's major mode changes.
(hywiki-word-remove-completion-at-point): Add and call in
'hywiki-word-dehighlight-in-buffers'.
(hywiki-display-referent): Interactively, call 'hywiki-word-read'
rather than 'hwyiki-page-read-reference'.
(hywiki-read-page-reference): Rename to 'hywiki-page-read-reference'
and return a HyWiki completion alist of pages when completing to pages only.
(hywiki-format-reference-to-consult-grep): Add.

2026-02-21 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-consult-page-and-line): Change output from a list to the
unparsed string returned as the selection by 'consult-grep'.
(hywiki-consult-page-and-line): Rename to
'hywiki-consult-page-and-headline)'.
(hywiki-format-reference): Change arg 'page-and-line' to be
an unparsed string returned from the above function.
(hywiki-consult-page-and-headline, hywiki-read-page-reference,
hywiki-word-read, hywiki-word-read-new, hywiki-page-read,
hywiki-page-read-new): Add 'prompt' and 'initial' input arguments.

2026-02-19 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-insert-link): Add optional prefix arg to link to a
an existing wikiword only.
(hywiki-insert-reference): Remove and merge capability into
above function when called with a prefix arg.

* hui.el (hui:link-possible-types): Fix to include link-to-wikiword only if
an existing referent is found.

Expand Down Expand Up @@ -1336,7 +1370,7 @@
hyrolo.el (hyrolo-match-regexp)
hhist.el (*hhist*): Use defvar for const variables that are set later
than at their definition.

2025-08-10 Bob Weiner <rsw@gnu.org>

* test/hywiki-tests.el (hywiki-tests--with-face-test): Make default value be
Expand Down
36 changes: 35 additions & 1 deletion hsys-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 2-Jul-16 at 14:54:14
;; Last-Mod: 14-Feb-26 at 23:40:17 by Bob Weiner
;; Last-Mod: 22-Feb-26 at 23:14:50 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -314,6 +314,40 @@ Return t if Org is reloaded, else nil."
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
t)))))

;;; Derived from `org-get-heading' in "org.el"
;;;###autoload
(defun hsys-org-format-heading (heading &optional no-tags no-todo no-priority no-comment)
"Return HEADING, without the leading asterisks.
When NO-TAGS is non-nil, don't include tags.
When NO-TODO is non-nil, don't include TODO keywords.
When NO-PRIORITY is non-nil, don't include priority cookie.
When NO-COMMENT is non-nil, don't include COMMENT string."
(when (stringp heading)
(let ((case-fold-search nil)
(org-complex-heading-regexp
"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ ]*$"))
(when (string-match org-complex-heading-regexp heading)
;; When using `org-fold-core--optimise-for-huge-buffers',
;; returned text will be invisible. Clear it up.
(save-match-data
(org-fold-core-remove-optimisation (match-beginning 0) (match-end 0)))
(let ((todo (and (not no-todo) (match-string 2 heading)))
(priority (and (not no-priority) (match-string 3 heading)))
(headline (pcase (match-string 4 heading)
(`nil "")
((and (guard no-comment) h)
(replace-regexp-in-string
(eval-when-compile
(format "\\`%s[ \t]+" org-comment-string))
"" h))
(h h)))
(tags (and (not no-tags) (match-string 5))))
;; Restore cleared optimization.
(org-fold-core-update-optimisation (match-beginning 0) (match-end 0))
(mapconcat #'identity
(delq nil (list todo priority headline tags))
" "))))))

(defun hsys-org-get-libraries-to-reload ()
"Return all org libraries that need to be reloaded to avoid mixed versions."
(interactive)
Expand Down
5 changes: 3 additions & 2 deletions hui-mini.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 15-Oct-91 at 20:13:17
;; Last-Mod: 19-Feb-26 at 00:16:53 by Bob Weiner
;; Last-Mod: 19-Feb-26 at 22:59:55 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1070,7 +1070,8 @@ support underlined faces as well."
'("Info" (id-info "(hyperbole)HyWiki")
"Display Hyperbole manual section on HyWiki.")
'("Link" hywiki-insert-link
"Prompt for and insert at point a HyWikiWord#section reference.")
"Prompt for and insert at point a HyWiki page#section reference.
With a prefix arg, insert a HyWikiWord instead.")
'("ModeSet/" (menu . cust-hywiki-mode)
"Set hywiki-mode state to determine where HyWikiWord references are recognized.")
'("Org-M-RET/" (menu . cust-org)
Expand Down
Loading
Loading