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

doc .authinfo; open-page-hook; cache page list; add completion at point; in-browser #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

WillForan
Copy link

@WillForan WillForan commented Feb 4, 2023

Pushing my and @vincowl's changes your way. I find the package super useful and am excited share back!
Apologies for not providing more atomic commits -- it's a lot of new code written without a lot of expertise. Feel free to reject ruthlessly, change everything without my input, or anything in between.

  1. The only change that was on the todo list is maybe dokuwiki-in-browser -- opens the current dokuwiki page in a browser
  2. dokuwiki-open-page-hook is run at the end of open-page as a good place to set eg. flyspell-mode or toggling line numbering
  3. dokuwiki-cached-page-list holds a list of all pages. list-pages checks for universal argument so e.g. C-u C-c l will refresh the list.
  4. with caching menus are a lot faster and completion at point (dokuwiki--capf) is feasible. But setup is a little awkward. dokuwiki-setup sets up the hook for that: (add-hook 'completion-at-point-functions 'dokuwiki--capf nil 'local)
  5. dokuwiki-setup also establishes some default keybindings
  6. dokuwiki-launch is a convenience function for wrapping setq and open-page
  7. dokuwiki-ffap (find "file" at point) provides a way to open a page from a link. (C-c o in default setup)
  8. dokuwiki-font-lock-link is incomplete. I wanted to make links clickable (run ffap) but I couldn't figure adding the new pattern

on the documentation readme side, I add

  1. more about using .authinfo b/c it was totally new to me (and knowing auth-source-forget-all-cached sooner would have save me a lot of debugging).
  2. quelpa-use-package notes -- also new to me. seems like the easiest way to quickly install without managing the repo or waiting for melpa updates
  3. screencast! Though it could use a lot of pacing edits

WillForan and others added 10 commits June 29, 2018 16:45
also added some default keybindings (`setup-dokuwiki`),
`dokuwiki-in-browser`, and `dokuwiki-launch` to wrap xmlrpc url and user

documented that and setting up .authinfo password storage
hook on page load for great per-user customization
remove redundant `(dokuwiki-mode)`, but it should probably be in hook anyway

screencast could use heavy editing
switching to local-set-key for dokuwiki-setup to not disturb
zim-wiki-mode which also inherits dokuwiki-mode-map

use-package readme hint for dokuwiki-mode is missing
emacs- in path and  ' in require
@accidentalrebel
Copy link
Owner

I appreciate the pull request! I don't use DokuWiki anymore so it'll take a bit of time for me to set it up so I could test these.

@flexibeast
Copy link

i've just started using DokuWiki, and will probably be continuing to do so in the near future, so this package is Relevant To My Interests. 🙂

i actually wrote some code to support enabling dokuwiki-mode upon opening a page, before realising i should check if anyone else had done so. 🤪 i've now started running this PR locally, and will test out its changes.

The only thing i've tested so far is whether dokuwiki-mode is enabled on page open, which it does. However, i prefer the approach i took in this regard: it doesn't introduce a dependency on dokuwiki-mode, so users won't be forced to install it even if they're not going to use it.

use flexibeast's hook name:
  now `dokuwiki-page-opened` instead of prev `dokuwiki-open-page`

adds `dokuwiki-use-dokiwki-mode` custom rather than forcing
`dokuwiki-mode` dependency

this is `dokuwiki` for handling xml/rpc, `dokuwiki-mode` handles wiki syntax

also refactored `dokuwiki--inert-top-heading` to avoid the
`(if .. (prog ...))` and make the page-filling code a little easier to follow
@flexibeast
Copy link

i've just merged this PR to the master branch on my fork, and also modified the dokuwiki--credentials function to support specifying a port (which i need for my own use-case). Will probably continue adding functionality / making changes there as-needed.

Repository owner deleted a comment from roneyfraga Jan 24, 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.

None yet

4 participants