Although I am the one who use it with org-mode too.
I've done it using prop-line feature of emacs and my own interactive, for today it is only interactive, function howm-insert-prop-line:
(defun howm-insert-prop-line ()
"Activate major mode and modify the file so that this mode is activated
automatically the next time it is opened"
(interactive)
(howm-mode)
(let*
((modes (mapcar #'cdr auto-mode-alist))
(mode-name (completing-read "Choose major mode: " modes))
(mode (intern-soft mode-name)))
(unless (or (null mode)
(eq mode major-mode))
(funcall mode)
(howm-mode)
(add-file-local-variable-prop-line
'mode (intern (string-trim-right mode-name "-mode\\'"))))))
It is in github repo, too although it is not yet finished:
I guess one alternative approach would be to defadvice “howm-create” to prompt for a major mode, e.g. by let-binding the “howm-template” variable to contain “-- mode: … --“ on top and prompt the user for a mode?
Maybe, I would think about implementing it in this way.
Actually I don't really want to create a separate emacs package, but rather merge my code with main howm repo at some point, when it would be good enough.
Creating your own package would be acceptable alternative to this, though.
I also should add, that I can add enabling external grep part to my short howm config,
but it seems to slow down howm, rather speed it up, when using it on windows.
(use-package howm)
Although I am the one who use it with org-mode too.
I've done it using prop-line feature of emacs and my own interactive, for today it is only interactive, function howm-insert-prop-line:
It is in github repo, too although it is not yet finished:https://github.com/artsi0m/howm-use-any-markup
My problem is that I can't combine well nested interactive+let or let+interactive, so it is only as interactive function for now.