Skip to content

First stab at register support#272

Merged
matsl merged 13 commits intomasterfrom
add-register-support
Oct 4, 2022
Merged

First stab at register support#272
matsl merged 13 commits intomasterfrom
add-register-support

Conversation

@matsl
Copy link
Copy Markdown
Collaborator

@matsl matsl commented Aug 20, 2022

What

First stab at register support

Why

Sharing the first stab at implementing register support of buttons for ideas and comments.

@matsl matsl force-pushed the add-register-support branch 2 times, most recently from d8965dd to 61b4aa3 Compare August 20, 2022 21:52
@matsl matsl requested a review from rswgnu August 20, 2022 21:54
@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Aug 27, 2022

@rswgnu Added support for link-to-ibut

@matsl matsl force-pushed the add-register-support branch from 3a2dccc to 4930072 Compare September 11, 2022 15:32
@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Sep 11, 2022

@rswgnu Added test cases to the PR. The test hypb-register-test--register-val-insert fails due to what it seems a problem with link-to-ibut. The setup is in the test. I will try to debug it further but maybe you can have a look?

(hypb:error "Point must be at a Hyperbole button"))
(make-hypb-register-but
:label label
:file (buffer-file-name)
Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Collaborator Author

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?

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Collaborator Author

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?

@matsl matsl force-pushed the add-register-support branch from c23d59b to 38646bf Compare September 14, 2022 20:25
@matsl matsl requested a review from rswgnu September 19, 2022 21:06
@matsl matsl force-pushed the add-register-support branch from d412803 to 8cdcccf Compare October 2, 2022 08:43
Comment out hui-register-test--register-val-insert-ibut for now.
@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Oct 2, 2022

Added a test case for inserting an ebut and commented out the similar test case for ibut. The later test case looks like it breaks due to problem with link-to-ibut and having a red build seems contra productive at this stage.

@matsl matsl marked this pull request as ready for review October 3, 2022 17:10
@matsl matsl merged commit caa137f into master Oct 4, 2022
@matsl matsl deleted the add-register-support branch October 4, 2022 21:37
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.

2 participants