-
Notifications
You must be signed in to change notification settings - Fork 10
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
First stab at register support #272
Conversation
d8965dd
to
61b4aa3
Compare
@rswgnu Added support for link-to-ibut |
3a2dccc
to
4930072
Compare
@rswgnu Added test cases to the PR. The test |
hypb-register.el
Outdated
(hypb:error "Point must be at a Hyperbole button")) | ||
(make-hypb-register-but | ||
:label label | ||
:file (buffer-file-name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there are explicit and implicit buttons where the button source buffer does not have an attached file, so you'll need to handle those appropriately, i.e. links to them work only within the current Emacs session, which may be okay for use with registers which typically are not stored across sessions either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not link-to-ebut
require a file name?
How should we support the case for origin buffer with no filename? Shall we jump to button source and execute the action key instead of using link-to-ebut
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, jump to the button source buffer and move point to the button text (label) and activate the button there. If the source buffer is no longer live, then raise an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since insert-register
inserts an ebut
that the user acts on would we not need a new action type then for that behavior or let link-to-ebut
and link-to-ibut
also handle the buffer only case?
c23d59b
to
38646bf
Compare
Co-authored-by: Robert Weiner <rsw@gnu.org>
Proof of concept. If on a button prefer to copy that to thing at point.
d412803
to
8cdcccf
Compare
Comment out hui-register-test--register-val-insert-ibut for now.
Added a test case for inserting an |
What
First stab at register support
Why
Sharing the first stab at implementing register support of buttons for ideas and comments.