Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get hyperbole action key to recognize org =verbatim= text? #503

Closed
matogoro opened this issue Mar 31, 2024 · 4 comments
Closed

Get hyperbole action key to recognize org =verbatim= text? #503

matogoro opened this issue Mar 31, 2024 · 4 comments

Comments

@matogoro
Copy link

Hi,

I often use org-mode's =verbatim= markdown when mentioning filenames in org files, which is useful for text highlighting purposes when I read these files later. I was also able to get hyperbole to recognize these file paths with the action key (M-RET) by defining custom delimiters using the defil macro as follows:

(defil hy-verbatim-find-file "=" "=" ".*" "\\&")

However, this doesn't seem to be working anymore---when I try pressing an action key on a verbatim filename (e.g., =~/test.txt=), I get an error (debug below):

Debugger entered--Lisp error: (error "(ibut:to-text): ’lbl-key’ arg must be a string, not: nil")
  error("(ibut:to-text): 'lbl-key' arg must be a string, not: %S" nil)
  (if (stringp lbl-key) nil (error "(ibut:to-text): 'lbl-key' arg must be a string, not: %S" lbl-key))
  ibut:to-text(nil)
  hui:hbut-operate(hbut:act "Activate Hyperbole button: " hbut:current)
  hui:hbut-act(hbut:current)
  hkey-execute(nil)
  action-key-internal()
  action-key()
  hkey-either(nil)
  funcall-interactively(hkey-either nil)
  command-execute(hkey-either)

Notably, when trying to use the action key (M-RET) on filenames without delimiters, the action key works correctly. Moreover, when I use different custom delimiters (e.g., (defil hy-verbatim-find-file "{{" "}}" ".*" "\\&") --> {{~/test.txt}}), the action key also works correctly---so maybe it's something intrinsically wrong with using = as a delimiter?

It there some way to reconcile this? Any help would be greatly appreciated!

@rswgnu
Copy link
Owner

rswgnu commented Mar 31, 2024 via email

@rswgnu
Copy link
Owner

rswgnu commented Mar 31, 2024 via email

@matogoro
Copy link
Author

matogoro commented Apr 2, 2024

Just tested it—works perfectly! Thank you for your amazingly fast response and your help.

@matogoro matogoro closed this as completed Apr 2, 2024
@rswgnu
Copy link
Owner

rswgnu commented Apr 2, 2024

Great, emjoy and keep building implicit button types to simplify your work.

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

No branches or pull requests

2 participants