-
Notifications
You must be signed in to change notification settings - Fork 11
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
Verify creating a file for WikiWord highlights WikiWord #744
Conversation
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.
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.) |
d6c1091
to
b6e8ef4
Compare
Yes, hywiki-add-page is the way to go. |
(insert "Ho") | ||
(save-buffer) | ||
(setq wikiHo (cdr (hywiki-add-page "Ho"))) | ||
(goto-char 2) |
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.
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.
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.
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.
Let me know if you are updating this and want to get it approved or going another way. |
b6e8ef4
to
71febb0
Compare
@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. |
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.