Skip to content

hui:link-possible-types - Fix ilink creation to HyWiki and Org bufs#907

Open
rswgnu wants to merge 7 commits intomasterfrom
rsw
Open

hui:link-possible-types - Fix ilink creation to HyWiki and Org bufs#907
rswgnu wants to merge 7 commits intomasterfrom
rsw

Conversation

@rswgnu
Copy link
Owner

@rswgnu rswgnu commented Mar 15, 2026

  • hui:link-possible-types - Fix ilink creation to HyWiki and Org bufs
    hui:link-possible-types - For Org/Org-Roam ids, send 2nd arg of current heading
    string to 'link-to-org-id' call.
    hui:link-possible-types - If in a HyWiki page but not on a heading line, use a
    'link-to-wikiword' with the page name and line number.
    hui:link-possible-types - For HyWiki links, wrap a call of 'hpath:org-normalize-title'
    around 'hywiki-org-format-heading' to ensure everything but the title is removed.

  • org-id, org-id:help - Fix to remove "id:" prefix so that uuid check predicates
    succeed properly.

  • hpath:suffixes - Add ".org" suffix to expand HyWiki page references that have
    only instance, line, or column references and are handled by
    'pathname-line-and-column'.

  • ibut:insert-text - For 'actypes::link-to-org-id', change from a double-quoted
    link to a double square bracketed Org link. This allows including the title
    from the Org heading linked to which is stored in the current Hyperbole button
    attribute, 'lbl-key'.

  • hywiki-org-get-heading-match-regexp - Handle both HyWiki dir custom todo
    keywords when in a page and Org standard todo keywords, otherwise.

  • pathname-line-and-column, hib-link-to-file-line - Expand HyWiki page name using
    'hywiki-get-page-file' before try to expand in current directory.

  • hpath:at-p, hpath:find-line - Handle pathname expansion of HyWiki page names.

  • hpath:call - (file-exists-p "") returns t, so fix to check for empty string
    before calling that.

  • hpath:normalize - Handle directory paths and avoid reading in the
    file to handle it.

  • hpath:validate - Fix to strip #suffix before validation and add it back
    on return.

  • hywiki-existing-word - Simplify pathname check without calling other ibtypes.

  • hpath:suffixes - Remove ".org" as it triggers pathname ibtype when it
    shouldn't and overrides `hywiki-existing-word'.
    hywiki-word-regexp - Add optional .org suffix so "WikiWord.org#section"
    works.

  • hywiki-add-org-id - Remove (hmouse-choose-link-and-referent-windows)
    as this is not what inserts a link but just creates the wikiword referent.

  • hywiki-referent-menu - Change from inserting a string link to an Org link
    that includes the associated Org heading title. Change format from "ID: uuid"
    to [[id:uuid][title]].

  • hui:link-possible-types - Update id handling in all of these.

  • hpath:is-p - Unless 'non-exist' arg is sent or path is a remote file, return
    path only if it exists.

  • hsys-org-uuid-is-p - Add and use in "hibtypes.el" and "hui.el".

  • link-to-org-id - Add optional heading 'title' arg for use in 'hbut:insert-text'
    where ibut links are created.

  • hsys-org-link-at-p - Don't shrink label region down to just the description
    part of the Org link, leave it as the entire space inside the Org open and
    close brackets. This makes link activation work better.

  • hibtypes.el (action): Ensure if action name is bound only as a variable
    that there are no arguments within the angle brackets. If there are,
    then it is not an action button.

  • hywiki-tests--save-referent-org-id - Fix to mock 'org-id-get' instead of
    'org-id-get-create' and add call to `hywiki-get-referent' to ensure
    referent is created and read back properly.

  • hywiki-get-page-file - The page file may have previously been resolved and
    sent as input here. If it exists, simply use it.

  • hpath:is-p - Remove 'file-exists-p' call because 'hpath:normalize' handles
    that while accounting for path #suffixes which the 'file-exists-p'
    call mistakenly nullifies.

  • hpath:validate - Fix so if a file named "myfile#name", validate
    accepts it without treating the #name as a suffic/section to be stripped.
    Fix that 'suffix' was set to the whole path string when suffix-start' was
    null. Now it is set properly to nil.

rswgnu added 7 commits March 15, 2026 02:06
hui:link-possible-types - For Org/Org-Roam ids, send 2nd arg of current heading
string to 'link-to-org-id' call.
hui:link-possible-types - If in a HyWiki page but not on a heading line, use a
'link-to-wikiword' with the page name and line number.
hui:link-possible-types - For HyWiki links, wrap a call of 'hpath:org-normalize-title'
around 'hywiki-org-format-heading' to ensure    everything but the title is removed.

org-id, org-id:help - Fix to remove "id:" prefix so that uuid check predicates
succeed properly.

hpath:suffixes - Add ".org" suffix to expand HyWiki page references that have
only instance, line, or column references and are handled by
'pathname-line-and-column'.

ibut:insert-text - For 'actypes::link-to-org-id', change from a double-quoted
link to a double square bracketed Org link.  This allows including the title
from the Org heading linked to which is stored in the current Hyperbole button
attribute, 'lbl-key'.

hywiki-org-get-heading-match-regexp - Handle both HyWiki dir custom todo
keywords when in a page and Org standard todo keywords, otherwise.

pathname-line-and-column, hib-link-to-file-line - Expand HyWiki page name using
'hywiki-get-page-file' before try to expand in current directory.

hpath:at-p, hpath:find-line - Handle pathname expansion of HyWiki page names.

hpath:call - (file-exists-p "") returns t, so fix to check for empty string
before calling that.

hpath:is-p - Unless 'non-exist' arg is sent or path is a remote file, return
path only if it exists.

hsys-org-uuid-is-p - Add and use in "hibtypes.el" and "hui.el".

link-to-org-id - Add optional heading 'title' arg for use in 'hbut:insert-text'
where ibut links are created.

hsys-org-link-at-p - Don't shrink label region down to just the description
part of the Org link, leave it as the entire space inside the Org open and
close brackets.  This makes link activation work better.
hpath:normalize - Handle directory paths and avoid reading in the
file to handle it.

hpath:validate - Fix to strip #suffix before validation and add it back
on return.

hywiki-existing-word - Simplify pathname check without calling other ibtypes.

hpath:suffixes - Remove ".org" as it triggers pathname ibtype when it
shouldn't and overrides `hywiki-existing-word'.
hywiki-word-regexp - Add optional .org suffix so "WikiWord.org#section"
works.

hywiki-add-org-id - Remove (hmouse-choose-link-and-referent-windows)
as this is not what inserts a link but just creates the wikiword referent.

hywiki-referent-menu - Change from inserting a string link to an Org link
that includes the associated Org heading title.  Change format from "ID: uuid"
to [[id:uuid][title]].

hui:link-possible-types - Update id handling in all of these.
hibtypes.el (action): Ensure if action name is bound only as a variable
that there are no arguments within the angle brackets.  If there are,
then it is not an action button.

hywiki-tests--save-referent-org-id - Fix to mock 'org-id-get' instead of
'org-id-get-create' and add call to `hywiki-get-referent' to ensure
referent is created and read back properly.

hywiki-get-page-file - The page file may have previously been resolved and
sent as input here.  If it exists, simply use it.

hpath:is-p - Remove 'file-exists-p' call because 'hpath:normalize' handles
that while accounting for path #suffixes which the 'file-exists-p'
call mistakenly nullifies.

hpath:validate - Fix so if a file named "myfile#name", validate
accepts it without treating the #name as a suffic/section to be stripped.
Fix that 'suffix' was set to the whole path string  when suffix-start' was
null.  Now it is set properly to nil.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant