Closed rhstanton closed 1 month ago
Thank you for the report, but I couldn't reproduce the issue. If possible, here's what works best for me:
sample/dot.emacs
if needed.make test
(or emacs -Q -l sample/dot.emacs
).M-x howm-bug-shot RET
and share the output.If the app works correctly, the part between How to remember:
and = <<< %Editing Menu%
should be displayed in the default menu. (The part below = <<< %Editing Menu%
is another menu and it is not displayed.)
That works. So I assume it's an interaction with my other settings. I'll investigate.
Here's the culprit, from my init.el (actually it's just the second line):
(setq howm-view-title-header "*")
(setq howm-view-title-regexp "^[*=]\\( +\\(.*\\)\\|\\)$")
This allows me to use * instead of =, for better org-mode compatibility (but worse howm compatibility...)
Changing the list below "How to remember:" to start with - instead of * gets things working again.
(setq howm-view-title-header "*") (setq howm-view-title-regexp "^[*=]\\( +\\(.*\\)\\|\\)$")
This allows me to use * instead of =, for better org-mode compatibility (but worse howm compatibility...)
On my end, I have been satisfied with the Org compatibility setting howm-view-title-header
without manually setting howm-view-title-regexp
. (The latter should be updated automatically by Howm based on the former.)
Based on the format of the regexp: Is the point that you have existing notes in both Org and Howm formats, and want Howm to show titles from both?
(setq howm-view-title-header "*") (setq howm-view-title-regexp "^[*=]\\( +\\(.*\\)\\|\\)$")
This allows me to use * instead of =, for better org-mode compatibility (but worse howm compatibility...)
On my end, I have been satisfied with the Org compatibility setting
howm-view-title-header
without manually settinghowm-view-title-regexp
. (The latter should be updated automatically by Howm based on the former.)Based on the format of the regexp: Is the point that you have existing notes in both Org and Howm formats, and want Howm to show titles from both?
I think it dates back to when I was first testing howm when yes, that was the situation. Now all my notes are in org files, so it seems that indeed the regexp setting is no longer needed.
By the way, here's something that might be helpful for other howm/org org users. I don't want to have to add #+title:
lines to my howm files, so I wrote a little function to use the first section header as the document header when exporting from org mode if there's no explicit title line:
; Use first section header as document title if one does not exist
(defun my-org-set-title-from-first-heading (backend)
(unless (org-element-map (org-element-parse-buffer) 'keyword
(lambda (kw)
(string-equal (org-element-property :key kw) "TITLE"))
nil t)
(save-excursion
(goto-char (point-min))
(when (re-search-forward "^\\* \\(.+\\)" nil t)
(let ((title (match-string 1)))
(goto-char (point-min))
(insert (format "#+TITLE: %s\n" title)))))))
(add-hook 'org-export-before-processing-hook #'my-org-set-title-from-first-heading)
On my end, I have been satisfied with the Org compatibility setting
howm-view-title-header
without manually settinghowm-view-title-regexp
.
By the way, the menu problem above still occurs if I only set howm-view-title-header
You can just edit the "0000-00-00-000000.txt" file to change the stars to dashes, or just remove those lines entirely. It's nice to customize it anyway, especially if you've already become familiar with the hints that it provides.
By the way, I wrote a couple of functions for changing the titles while preserving the files' mtimes, so that sorting doesn't change. Especially useful for transitioning between different title formats. (Which I might do yet again, since @kaorahi posted a link to the old "Howmm" Android app, which uses the default "=" title format.)
I'll post them in the thread about including titles in filenames, in case you're interested.
Thanks! Yes, changing all the stars to dashes (and the equals signs to stars) helps a lot.
I've merged some related commits. I'll close this issue soon if they seem OK. Thanks again for your comments.
Please let me know if there's anything else.
When I press C-c , , to show the howm menu, the contents of the file 0000-00-00-00000.txt are interpreted and displayed in a menu buffer.
But not the whole file, I've just realized. The bottom of the menu buffer looks like this:
The file on disk contains quite a lot after the "How to remember" line that doesn't get displayed. I think the file has the default contents, but just to be sure, here's what's in my file 0000-00-00-00000.txt after that line: