8000 Verify creating a file for WikiWord highlights WikiWord by matsl · Pull Request #744 · rswgnu/hyperbole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Verify creating a file for WikiWord highlights WikiWord #744

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

Merged

Conversation

matsl
Copy link
Collaborator
@matsl matsl commented Jun 7, 2025

What

Verify creating a file for WikiWord highlights the instances of the WikiWord
already present in another WikiWord file.

Why

WikiWords inserted before the WikiWord file is created should be
highlighted at the time the WikiWord file is created.

@matsl matsl requested a review from rswgnu June 7, 2025 22:16
Copy link
Owner
@rswgnu rswgnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is to check whether creating a wikipage and saving it highlights existing instances of the associated wikiword already displayed in another window and buffer prior to the wikipage creation. All buffers displayed with the wikiword should update and highlight at that point.

@matsl
Copy link
Collaborator Author
matsl commented Jun 8, 2025

The test is to check whether creating a wikipage and saving it highlights existing instances of the associated wikiword already displayed in another window and buffer prior to the wikipage creation. All buffers displayed with the wikiword should update and highlight at that point.

I understand. The question I'm posing is whether using hywiki-add-page is OK or not. hywiki-add-page creates a wikipage that is saved to disk. I'm just wondering if some more decoupled way to create and save the file is wanted. (Using hywiki-add-page is a convenient way to create a wikipage.)

@matsl matsl force-pushed the verify_highlight_of_wikiword_after_creation_of_wikiword_file branch from d6c1091 to b6e8ef4 Compare June 8, 2025 08:14
@rswgnu
Copy link
Owner
rswgnu commented Jun 10, 2025

Yes, hywiki-add-page is the way to go.

(insert "Ho")
(save-buffer)
(setq wikiHo (cdr (hywiki-add-page "Ho")))
(goto-char 2)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to have a wikiword reference in a window first, before creating the page for the wikiword. Then add the wikiword page with any arbitrary content and save it. The wikiword in the other window should highlight. You may also want to have a reference to the wikiword in another frame to demonstrate that windows in multiple frames highlight as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe find-file opens the file in a new window that is selected. Then the file is saved. At that time we have the wikiword in window as requested. hywiki-add-page then creates the wikiword. It should not matter that it is run with the current "Hi"-buffer active, or should it? (I have tested with a more verbose version of this test that switches to the scratch buffer for running the hywiki-add-page and that does not seem to matter.)

At this state the wikiword is not highlighted so seems to trigger the error as we want. The expected outcome we want to verify is that the wikiword is highlighted after hywiki-add-page, right?

Why the test still works has been discussed in a separate email thread but boils down to that the check if the wikiword is highlighted uses code that as a side effect highlights it before the check if it is highlighted is performed.

@rswgnu
Copy link
Owner
rswgnu commented Jun 17, 2025

Let me know if you are updating this and want to get it approved or going another way.

@matsl matsl force-pushed the verify_highlight_of_wikiword_after_creation_of_wikiword_file branch from b6e8ef4 to 71febb0 Compare June 24, 2025 08:38
@matsl
Copy link
Collaborator Author
matsl commented Jun 24, 2025

Let me know if you are updating this and want to get it approved or going another way.

@rswgnu Minor cleanups and rebased this PR is ready for review again. Since the important change, not fixing the highlighting when checking for a wikiword at point, was removed on the master branch, this PR is mostly the same as before.

@matsl matsl requested a review from rswgnu June 24, 2025 08:54
@matsl matsl merged commit 6b93a58 into master Jun 24, 2025
4 checks passed
@matsl matsl deleted the verify_highlight_of_wikiword_after_creation_of_wikiword_file branch June 24, 2025 12:48
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
0