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

Verify creation of pages and movement to pages #635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matsl
Copy link
Collaborator

@matsl matsl commented Dec 28, 2024

What

Added or modified basic tests for creating pages and moving to pages
with sections. Misc new tests and refactoring of old tests. Update
hywiki to use sections.

Why

Moving to pages and section in pages is basic HyWiki functionality so
we need to cover that in our tests.

Note

Hywiki was missing using the sections with hpath:find. Added that in
order to write the test cases. Feel free to modify.

Rebased to use the update on the master branch.

@matsl matsl requested a review from rswgnu December 28, 2024 23:47
hywiki.el Outdated Show resolved Hide resolved
test/hywiki-tests.el Show resolved Hide resolved
@@ -132,6 +183,15 @@
(goto-char 6)
(should (string= "WikiWord" (hywiki-word-at)))))

;; Does not match as a WikiWord
(dolist (v '("WikiWord#"))
Copy link
Owner

Choose a reason for hiding this comment

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

An Action Key press on a WikiWord with just a trailing # should probably either go to the first Org doc section or trigger an error. What do you prefer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An Action Key press on a WikiWord with just a trailing # should probably either go to the first Org doc section or trigger an error. What do you prefer?

I think it currently raises an error. (Hyperbole Action Key): No action defined for this context; try another location That is OK. Maybe just handle it as WikiWord would cause less questions from a user but will think about it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thinking more on this I think WikiWord# should be treated just like WikiWord#non-existing-section.

Currently we just move to the WikiWord-page if the section does not exists, There is an error message that the section can't be found. With an empty section we should do something similar. We could even strip of the hash mark and treat it as a normal WikiWord.

Copy link
Owner

Choose a reason for hiding this comment

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

I think a wikiword that links to a page will display an existing buffer page with point wherever it was before the button was activated. We need a way to say, display the beginning or first section of the page, so this is as good a way as any.

@matsl matsl force-pushed the verify-creation-of-and-movement-to-pages branch from 09f9ce4 to 1083ddf Compare December 29, 2024 21:47
@matsl matsl requested a review from rswgnu December 29, 2024 22:42
@rswgnu rswgnu assigned rswgnu and unassigned rswgnu Dec 29, 2024
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