Howm: Personal Wiki for Emacs
github.com
github.com
After giving it a try, I now feel that I prefer it’s simplicity over newer systems like Org Roam and Denote, while having some similarities to e.g. Deft (like fulltext as-you-type search).
It also offers some unique features of its own, like “comefrom links” as opposed to conventional “goto links”, and that most Howm links are actually just syntactic sugar for searches.
The submitted link [2] is to a third-party documentation of the project, which I found more useful than the official documentation to get started :)
The whole design is well thought out, consistent and not created with the aim of marketing, but because it has served the creator well with his way of working (and surprisingly the philosophy applies to many of us). Japanese “engineering” at its best, so to speak.
As Howm has become such an important part of my everyday digital life, I will certainly write my own blog article about it one day. Until then, I can recommend the blog entry by Leah Neukirchen in addition to the manual linked here: https://leahneukirchen.org/blog/archive/2022/03/note-taking-...
I liked this one: https://baty.blog/2024/03/the-emacs-howm-package-for-notes
the reason I'm asking is I've been trying to make org-mode automatically work in howm preview buffer howmC, but it still displays as plain text until I hit RET on the note...
was wondering if you maybe found a way around it via prop-line somehow? I've seen your github, where you mention the "# -- mode: org --", but whether I use that or not in .org files - makes no difference to preview buffer
Indeed. I read that the Howm author, Prof. Kazuyuki Hiraoka, disliked the tediousness of manually organizing notes (folders, tags, etc.), and wanted to make a somewhat “self-organizing” system where we can work lazily yet remain organized. He called it lazy, I call it efficient :)
> As Howm has become such an important part of my everyday digital life, I will certainly write my own blog article about it one day.
I would love to read more about other people’s Howm workflows. Currently, there’s still very few sources about this in English.
I don't emacs, but the usual problem with that is that searches are very fragile and hard to analyze. How does this deal with searches that, over time, can change to return 0 or 2+ results?
The search triggered by a link is sorted such that it shows first “comefrom links” (if any file has said explicitly said that “these keywords should lead here”), then headline results (files where your phrase is in the note title), then siblings (other notes that link to the same keywords), then fulltext search matches (any file that just contains those words). So if you have 0 results with those keywords in the title after renaming a note, you might still find the note again via full-text search hits below. If you have 2+ results, just navigate between them with the arrow keys while previewing their contents, and open the one you want.
This design is intentional: The author advocates to “write fragmentarily, read collectively”; so instead of refinding an old note and adding to it, you can make a new note with a similar title where you capture new info, and then links will point to both notes from now on. (In most cases, if their titles are similar, the contents are likely relevant in the same situations as well.)
With that said, Howm supports exact links as well: You can link to a file path instead of a title. Since Howm defaults to putting just the creation datetime in the note filename, the filename is by default like an immutable-ish UUID, and such links should remain exact as long as you don’t manually move or remove a file. By default, Howm creates such links in one context: If you create a note (C-c , c) while inside another note, it saves an exact back link to where you came from so you can remember your “inspiration”. But you are of course free to use such links everywhere instead of the “fuzzy links” above if you prefer.
You can put more than one search link in currently edited note, than test all of them and at one point you will learn how to formulate search query so that you would recite yourself exactly as in that note that you want to see just now.
Also you would find more suitable titles while being in this process, but it wouldn't be for long.
Or you can use “comefrom links”, where you in some other file type “<<< foo bar”, and every time you mention “foo bar” in another note it becomes a magic link back to this spot. That serves kinda the same need as tags, but you don’t have to explicitly tag future notes or think about a system of tags, you just wrote normally and automatically get relevant links when you use consistent language. As a user, I feel this is much simpler to use, even though you’re right that Denote itself is implemented in a simple way.
Regarding the GTD system, I’ve also just ignored it ;). If I want a digital GTD I have had a great experience using Org, but these days I prefer a physical bullet journal as it seems to help me ignore unimportant tasks (I’ve always struggled with deleting unimportant tasks - not for technical reasons but for irrational reasons). And since it’s always in front of me on the desk, it’s harder to ignore than the agenda buffer.
(use-package howm
:after org
:init
;; Org-compatible filenames and syntax.
(setq howm-file-name-format "%Y-%m-%d-%H%M%S.org")
(setq howm-view-title-header "*")
(setq howm-dtime-format (format "<%s>" (cdr org-timestamp-formats)))
;; Use ripgrep for fast searching.
(setq howm-view-use-grep t)
(setq howm-view-grep-command "rg")
(setq howm-view-grep-option "-nH --no-heading --color never")
(setq howm-view-grep-extended-option nil)
(setq howm-view-grep-fixed-option "-F")
(setq howm-view-grep-expr-option nil)
(setq howm-view-grep-file-stdin-option nil)
;; Make the "comefrom links" case-insensitive.
(setq howm-keyword-case-fold-search t)
;; Get rid of the old-fashioned separators.
(setq howm-view-summary-sep "\t")
:bind
;; Keybindings to list or create notes.
("<f12>" . howm-list-all)
("<C-f12>" . howm-create)
:config
;; Where to store data.
(setq howm-directory "~/Documents/wiki")
(setq howm-home-directory howm-directory)))
The way I use it is that Ctrl+F12 captures a new note. Once you have a few notes, press F12 to browse them – in that mode, you can press n/p/RET to preview and open notes, s to search through headings, g to (rip)grep through the full text of notes, S to sort the hits, or c to create another new note from that mode. (I largely ignore Howm's default "menu buffer" in favor of the "list all" buffer.)Note that you can make the titles and dates even more Org-compatible:
(setq howm-view-title-header "#+title: ")
(setq howm-dtime-format (format "#+date: <%s>" (cdr org-timestamp-formats)))
After trying both, I prefer the system above, since Howm supports multiple titles in a single file which maps better to Org headings. Plus, this makes the F12 menu quite a bit cleaner... (You can still manually add titles and dates in the Org format before exporting the note, Howm doesn't mind that.)(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:
(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: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.
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.
I used to use Org-Roam in Emacs, but fell in love with Logseq [0], primarily because
1. it has a "daily journal" default workflow (though individual pages are supported)
2. the support of datalog queries
3. templates
This basically allows me to make templates for things I need (e.g. meeting notes, etc) and to write a few key queries (that are also templated for reuse) to do things like get the most overdue tasks, upcoming, things I promised to others, things I'm waiting on, etc. I can even drill down and get that stuff for an individual "page", e.g. "Emacs" or "C++".
The lack of a "lab journal" format + flexible queries makes going back to other solutions not as enticing, as the "perfect artifact" of wiki-esque editing (and not being able to easily see backlinks) is not as easy. I can open my Logseq folder, make a "meeting" template, then #tag the people and topics discussed, and be able to go back later and make a query to see when I discussed #topic with #person.
I would love to move this back into Emacs, as I hate having a separate tool for PKM, so if anyone has a similar workflow (or at least flexible queries on "tags" and task status, backlinks, etc, even without the daily journal thing), I'd be grateful for any tips.
for querying: https://github.com/alphapapa/org-ql
for templates, see org-roam-capture and its templating system (https://www.orgroam.com/manual.html#The-Templating-System), which extends the capture templating system of vanilla org. for nicer capture templates, see https://github.com/progfolio/doct
Currently, I’m using Howm, and am quite happy with that. Its motto is “write fragmentarily and read collectively”, which summarizes well what I liked about Logseq.
It’s however a slightly different workflow: I launch “howm-list-all” (I bind it to F12) to see a list of all notes, which I use similarly to Logseq’s journal. To read recent entries, use arrow keys or n/p to move between recent notes (which I use like top-level bullets in the Logseq journal), which are instantly previewed in a pane below. Or press “c” (create) to create a new note, which is automatically date stamped. Whenever I in Logseq would create a new top-level journal bullet, I in Howm create a new datestamped Org file. For sub-bullets I use Org outlining. But it largely has the same feel to me as Logseq’s journal system although it maps to different files on disk.
Instead of Logseq hashtags, I use Howm’s comefrom links. So say I am working on a project called “Foo Bar”. In Logseq, I’d type [[Foo Bar]] in my journal every time I think about that project. In Howm, I’d make a new note that contains a Howm link of the form “<<< Foo Bar”. Now, whenever I write the exact phrase “Foo Bar” (without any link syntax!) in another note, it automatically becomes a clickable link pointing to my Foo Bar page! I find this more efficient actually than Logseq’s approach since “typing the backlink instead of the link” feels like less cognitive overhead and less work. (Logseq has “unlinked mentions” but it somehow felt less reliable.)
Note that Howm supports any text format (it’s a minor mode), and thus doesn’t mind if you import your existing Logseq Markdown files but write new content in Org-mode, for example. It also supports searching multiple folders, so that you can link from new Howm notes to old Logseq notes without “importing” them.
I hope this helps, and would encourage you to give Howm a try. It doesn’t help with templates and queries, but as the sibling post touched upon you could try using org-capture for templates and either org-ql or org-super-agenda for queries. Howm and Org work well together, so there’s no reason you can’t use different packages to replace different parts of Logseq in Emacs. (Logseq itself is a great product, but I prefer Org-mode for the keybindings and export.)
I write down my uni's lectures in howm using org as markup, so maybe yes, probably.
howm has two types of links, both are search for all your data it howm actually, but the second type (<<< links) work as a tag, that would be highlighted everywhere.
I thing creating templates can be done with one or another emacs snippets packages. Or just by your own elisp.
I'm trying howm on emacs 29.4
I try (with my config and also with emacs -Q)
(use-package howm)
I enter `C-c , ,`
I see the howm-memu pop up, but it's all plaintext with no font highlighting/decoration/"links" or anything, and I get in the Messages log: font-lock-fontify-keywords-region: Symbol’s function definition is void: nil
Error during redisplay: (jit-lock-function 5328) signaled (void-function nil)
Is this familiar to anyone?Personally I don't use its main menu though (which C-c , , runs), but rather "M-x howm-create" to capture new notes and then afterwards "M-x howm-list-all" as a keyboard-driven interface to read/browse/search existing notes.
Perhaps those commands work even if that menu doesn't?
Simplify!
— Joel Spolsky, Painless Bug Tracking, 2000: <https://www.joelonsoftware.com/2000/11/08/painless-bug-track...>
> If you don’t organize notes, it’s wearisome to read them.
> If you try to organize notes, it’s wearisome to write them.
> The need of trade-off is worrisome. “Wearisome” is an important keyword. There is a big difference between “I can do it” and “I can do it easily.”
> The point of compromise may vary from person to person, but I prioritize the ease of writing. I have designed a memo tool to create an environment where one can freely jot down notes without feeling pressure to “organize” them and still maintain coherence.
Back then, howm wasn't really being maintained, and it was a bit of a hassle because it sometime broke when I updated Emacs. So, I'm surprised and happy to see it's being maintained again these days!
(although I use Xeft[1] which is spiritually the same but I find the UI cleaner and snappier because it uses Xapian rather than elisp for full-text search).
Xeft is indeed great, and I still keep it around for more involved searches (like “+key1 -key2” and “key1 NEAR key2”). But most of my searches now go through Howm, which supports fulltext as-you-type searching (can be invoked by pressing “g” for “grep” from its note list), and it can shell out to Ripgrep to speed it up.
I don’t think the TUI supports drag-and-drop, but you can still copy-and-paste using org-download (bound to a separate keybinding). Unfortunately, last I checked the built-in yank-media function doesn’t work in the TUI, although I don’t see a technical reason why it couldn’t be implemented.
If anyone figured out a better way to collaborate on a bunch of org files in a team, I'd love to hear about it!
What about it isn't working? Git scales to huge numbers of contributors easily.
Presumably, this can be integrated with Gitlab CI to regenerate the website on push.
I guess one question though is how this will scale as the company grows, assuming that more non-Emacs users might join the team after a while?
Is Howm meant to be used alongside or as an alternative to Texinfo?
Whether it’s useful to combine them is another question, I guess it depends on whether you use TeXinfo for notes or documents?
I thought TeXinfo is mostly used for documentation, in which case I’d find it more natural to bundle it with the software project it documents.
You can however place the date above the title if you want:
(setq howm-view-title-header "*")
(setq howm-template "%date %file\n* %title%cursor")
By adjusting the new file template, you can type the title and then just press enter and keep typing the content from there. Howm still understands where the title of the note is, since it looks for the first title header.(If you like the default equal signs, you can skip the first setq above and replace "*" with "=" in the template.)