Skip to content
Merged
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
33 changes: 33 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
2026-03-18 Mats Lidell <matsl@gnu.org>

* hactypes.el (link-to-org-id): Fix quote in docstring.

* hibtypes.el (hywiki-get-existing-page-file):
(hywiki-word-from-reference): Declare functions.

* hpath.el (hywiki-get-existing-page-file):
(hywiki-get-referent):
(hywiki-org-to-heading-instance):
(org-element-property): Declare functions.
(hywiki-directory): Defvar.
(hpath:org-normalize-title):
(hpath:org-normalize-titles): Rephrase long docstrings to fit in 80 chars.

* hsys-org.el (org-uuid-regexp): Defvar.
(hsys-org-link-at-p): Remove unused var: label.

* hui.el (hywiki-mode): Defvar
(hywiki-get-buffer-page-name):
(hywiki-in-page-p):
(hywiki-org-format-heading):
(hywiki-org-get-heading-match-regexp): Declare functions.

* hypb.el (hypb:in-string-p): Remove unused var: close-match-string. Mark
close-regexp as unused.

* hywiki.el (hywiki-org-format-heading):
(org-fold-core-remove-optimisation):
(org-fold-core-update-optimisation):
(org-fold-show-entry): Declare functions.
(hywiki-add-org-id): Fix quote in docstring.

2026-03-17 Bob Weiner <rsw@gnu.org>

* hpath.el (hpath:validate): 'suffix-start' can be nil, so replace
Expand Down
2 changes: 1 addition & 1 deletion hactypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ information on how to specify a mail reader to use."

(defact link-to-org-id (id &optional title)
"Display the Org entry, if any, for ID with optional TITLE.
ID is a uuid without any 'id:' prefix."
ID is a uuid without any \\='id:' prefix."
(when (stringp id)
(let* ((inhibit-message t) ;; Inhibit org-id-find status msgs
(m (or (and (featurep 'org-roam) (org-roam-id-find id 'marker))
Expand Down
2 changes: 2 additions & 0 deletions hibtypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
(declare-function hyperb:stack-frame "hversion")
(declare-function hyrolo-get-file-list "hyrolo")
(declare-function hywiki-active-in-current-buffer-p "hywiki")
(declare-function hywiki-get-existing-page-file "hywiki")
(declare-function hywiki-get-singular-wikiword "hywiki")
(declare-function hywiki-highlight-word-get-range "hywiki")
(declare-function hywiki-referent-exists-p "hywiki")
(declare-function hywiki-word-from-reference "hywiki")
(declare-function markdown-footnote-goto-text "ext:markdown")
(declare-function markdown-footnote-marker-positions "ext:markdown")
(declare-function markdown-footnote-return "ext:markdown")
Expand Down
12 changes: 10 additions & 2 deletions hpath.el
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ The format is ${variable}. Match grouping 1 is the name of the variable.")
;;; Public Declarations
;;; ************************************************************************

(defvar hywiki-directory)

(declare-function Info-find-node "info")
(declare-function br-in-browser "ext:br")
(declare-function br-quit "ext:br")
Expand All @@ -143,10 +145,14 @@ The format is ${variable}. Match grouping 1 is the name of the variable.")
(declare-function hmail:editor-p "hmail")
(declare-function hypb:decode-url "hypb")
(declare-function hypb:object-p "hypb")
(declare-function hywiki-get-existing-page-file "hywiki")
(declare-function hywiki-get-referent "hywiki")
(declare-function hywiki-org-to-heading-instance "hywiki")
(declare-function kbd-key:key-series-to-events "hib-kbd")
(declare-function kcell-view:indent "kcell-view")
(declare-function klink:act "klink")
(declare-function mm-mailcap-command "mm-decode")
(declare-function org-element-property "org-element-ast")

;;; ************************************************************************
;;; MS WINDOWS PATH CONVERSIONS
Expand Down Expand Up @@ -1948,7 +1954,8 @@ form is what is returned for PATH."
path))))

(defun hpath:org-normalize-title (title)
"Strip all priority, leading ':' or '-' separators, and stats from TITLE and return."
"Return title in normalized form.
Strip all priority, leading ':' or '-' separators, and stats from TITLE."
(when title
(let ((clean (copy-sequence title)))
;; Strip leading priority: [#B] or [#2} followed by ':' or '-' surrounded by any whitespace
Expand All @@ -1960,7 +1967,8 @@ form is what is returned for PATH."
(setq clean (replace-regexp-in-string "\\(?: +\\[[0-9%+/]+\\]\\)+\\'" "" clean)))))

(defun hpath:org-normalize-titles ()
"Get all buffer Org titles, stripping priorities, stats and leading ':' or '-' separators."
"Get all buffer Org titles in normalized form.
Titles are stripped from priorities, stats and leading ':' or '-' separators."
(let (title
titles)
(org-with-wide-buffer
Expand Down
4 changes: 2 additions & 2 deletions hsys-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
(defvar org--inhibit-version-check) ; "org-macs.el"
(defvar hywiki-org-link-type-required) ; "hywiki.el"
(defvar org-agenda-buffer-tmp-name) ; "org-agenda.el"
(defvar org-uuid-regexp) ; "org-macs.el"

(declare-function hycontrol-windows-grid "hycontrol")
(declare-function hyrolo-tags-view "hyrolo")
Expand Down Expand Up @@ -538,8 +539,7 @@ Assume caller has already checked that the current buffer is in
(when (and (not (and (fboundp 'hywiki-word-at) (hywiki-word-at)))
(setq label-start-end (hargs:delimited "[[" "]]" nil nil t)))
(let* ((start (nth 1 label-start-end))
(end (nth 2 label-start-end))
(label (buffer-substring-no-properties start end)))
(end (nth 2 label-start-end)))
(cons start end))))))))

(defun hsys-org-link-label-start-end ()
Expand Down
5 changes: 5 additions & 0 deletions hui.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@
(defvar cmpl-original-string) ; "completion.el"
(defvar completion-to-accept) ; "completion.el"
(defvar hyperbole-mode-map) ; "hyperbole.el"
(defvar hywiki-mode) ; "hywiki.el"

(declare-function actypes::link-to-wikiword "hywiki")
(declare-function bookmark-bmenu-bookmark "bookmark")
(declare-function hui:menu-choose "hui-mini")
(declare-function hywiki-get-buffer-page-name "hywiki")
(declare-function hywiki-in-page-p "hywiki")
(declare-function hywiki-org-format-heading "hywiki")
(declare-function hywiki-org-get-heading-match-regexp "hywiki")
(declare-function hywiki-referent-exists-p "hywiki")
(declare-function kcell-view:absolute-reference "kotl/kview")
(declare-function kcell-view:idstamp "kotl/kview")
Expand Down
6 changes: 2 additions & 4 deletions hypb.el
Original file line number Diff line number Diff line change
Expand Up @@ -766,12 +766,11 @@ Quoting conventions recognized are:
;; double quote characters in strings and doesn't work in
;; `change-log-mode' due to its syntax-table.
(let ((open-match-string "")
(close-match-string "")
possible-delim
str
str-start
str-end)
(cl-destructuring-bind (orig-open-regexp orig-close-regexp open-regexp close-regexp)
(cl-destructuring-bind (orig-open-regexp orig-close-regexp open-regexp _close-regexp)
open-close-regexps
(save-match-data
(if (and (setq possible-delim
Expand Down Expand Up @@ -838,8 +837,7 @@ Quoting conventions recognized are:
(progn (while (and (setq possible-delim (search-forward open-match-string nil t))
(= (or (char-before (match-beginning 0)) 0) ?\\)))
possible-delim)
(setq str-end (match-beginning 0)
close-match-string (match-string 0))
(setq str-end (match-beginning 0))
(setq str (buffer-substring-no-properties str-start str-end))))

;; Ignore if more than `max-lines' matched
Expand Down
6 changes: 5 additions & 1 deletion hywiki.el
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@
(declare-function consult--lookup-member "ext:consult")
(declare-function consult--read "ext:consult")
(declare-function hsys-org-at-tags-p "hsys-org")
(declare-function hywiki-org-format-heading "hywiki")
(declare-function ibtypes::pathname "hpath")
(declare-function ibtypes::pathname-line-and-column "hpath")
(declare-function org-fold-core-remove-optimisation "org-fold-core")
(declare-function org-fold-core-update-optimisation "org-fold-core")
(declare-function org-fold-show-entry "org-fold")
(declare-function org-link-store-props "ol" (&rest plist))
(declare-function org-publish-property "ox-publish" (property project &optional default))
(declare-function org-roam-node-from-title-or-alias "org-roam-node" (s &optional nocase))
Expand Down Expand Up @@ -1366,7 +1370,7 @@ calling this function."
(defun hywiki-add-org-id (wikiword)
"Make WIKIWORD display an Org file or headline with an Org id.
Point must be in the buffer with the id. If no id exists, it is created.
Return the referent created with the form: '(org-id . <id-string>).
Return the referent created with the form: \\='(org-id . <id-string>).

If WIKIWORD is invalid, trigger a `user-error' if called interactively
or return nil if not.
Expand Down
Loading