Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Howm: Personal Wiki for Emacs (github.com/emacs101)
166 points by setopt on Sept 3, 2024 | hide | past | favorite | 51 comments


I recently discovered “Howm” [1] (the “Handy Own Wiki Mode”), which is a personal wiki system for Emacs. Surprisingly, it is slightly older than Org-mode – although it now works great with Org files – and is still actively maintained by the author.

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 :)

[1]: https://kaorahi.github.io/howm/

[2]: https://github.com/Emacs101/howm-manual


I switched to Howm about a year ago (after trying and actively using dozens of other PKM systems), and it's by far the best I've come across.

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-...


> 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.

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.


The Neukirchen link would be a much better HN submission than OP.


Nope, it suggest to use howm with markdown only, while when using emacs prop-line feature, you can use it with any markup.


artsi0m, is there a reason to use prop-line, when howm already supports org by adding a hook to it?

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


So, because you disagree with one nitpicky detail, you believe a blog post laying out the history and features and uses of howm is inferior to a landing page which contains nothing but 2 links, which themselves contain nothing useful except perhaps 3 or 4 links deep there might finally be something which explains to a HNer what howm is and why they might ever care about it? Nope.


Sorry, of course no. But there is much better introduction blog posts on this topic in my opinion.

I liked this one: https://baty.blog/2024/03/the-emacs-howm-package-for-notes


In case this is useful to others, this is the config I myself use to couple Howm to Org-mode:

    (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.)


Mine is much simpler

(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.


Interesting idea.

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?


Thanks, this sound reasonable actually.

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.


> links are actually just syntactic sugar for searches.

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?


Howm has a simple solution for this: Links like “>>> this thing” searches for “this thing” and opens a search buffer. The top hit is already marked, shown in a preview window below, and can be opened by clicking enter. But if you want a different result, you just navigate that search buffer to find the hit you want.

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.


> How does this deal with searches that, over time, can change to return 0 or 2+ results?

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.


I've skimmed through the manual - it seems to be quite more complex than Denote. Denote is very simple, I've had basically to configure my own fuzzy search with consult-notes-search to make it work. Howm has all that out of the box. The appeal is lack of configuration, I guess, but I can already see that there are things I would never touch - a skinny org-agenda replacement is not very appealing these days. I guess it really predates the existence of org.


I feel that it’s a different type of simplicity: Denote is simple and well-designed, but I personally found it a hassle to actually organize things in it. For instance, to actually find again my content when I need it, I find that it’s important to design a good set of tags and actively apply them. Howm is more designed around making it as hassle-free as possible to input notes, and then let the notes surface in a “self-organizing” way. For instance, it’s easy to discover “sibling notes” that link to the same thing as this one (just click any link in the current note and all siblings pop up in a search buffer, below the note that you’re actually linking to).

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.


You are absolutely right - I thought about adding that Denote is a true successor to Notational Velocity[1], not to Zettelkasten systems like org-roam, Logseq and Obsidian. For me personally notes are "cold" storage - I sometimes link to them in Org tasks but mostly I interact with them by using consult-ripgrep.

1: https://notational.net/


Does anyone have a "lab notebook" style of PKM in Emacs?

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.

[0] https://logseq.com/


org-roam has a daily journal feature, which i use extensively: https://www.orgroam.com/manual.html#org_002droam_002ddailies

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


> lab notebook

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 also used Logseq for a couple of years during my PostDoc and it is an excellent product. I also got into the habit of writing everything in the daily journal (with things like [[emacs]] in each top-level bullet so that I could read it under the Emacs page). I tried replicating this workflow in other system, including Obsidian and Org Roam and Denote which all support back links and journals – it works but it wasn’t as smooth as Logseq’s transclusion.

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 know this probably isn't the best place for a bug report/help request, but this seems cool, and the alternative to asking here, now, realistically is that I just forget about this

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?


Strange. I'm using it on Emacs 30.0.90 (nightly builds), and haven't had that issue.

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?


This happened for me too. I don't know why but after I tried it a few times it started working.


One thing I learned about PKMs is that it is not how many feature it has that dictates its usefulness, it is about how many features you are not encumbered by. Simplify so it doesn't get in your way. If your organization is too rigid (decimal system, complex organization) it will add a tax everytime you want to do something, and you will end up just maintaining the system not its content. Most of those pseudo experts that sell books, trainings, videos and what not are just luring you with a complex system and selling you extras because you just "don't get it yet" or just feed your FOMO with useless perks.

Simplify!


Avoid the temptation to add new fields to the bug database. Every month or so, somebody will come up with a great idea for a new field to put in the database. You get all kinds of clever ideas, for example, keeping track of the file where the bug was found; keeping track of what % of the time the bug is reproducible; keeping track of how many times the bug occurred; keeping track of which exact versions of which DLLs were installed on the machine where the bug happened. It’s very important not to give in to these ideas. If you do, your new bug entry screen will end up with a thousand fields that you need to supply, and nobody will want to input bug reports any more. For the bug database to work, everybody needs to use it, and if entering bugs “formally” is too much work, people will go around the bug database.

— Joel Spolsky, Painless Bug Tracking, 2000: <https://www.joelonsoftware.com/2000/11/08/painless-bug-track...>


That is indeed the principle around which Howm is designed. To quote its author:

> 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.


Wow, it's been a while since I've seen the word "howm" — brings back memories! I used to use howm all the time before switching over to org-mode, which was over 10 years ago. For a while after moving to org, I was still managing my org files with howm.

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!


The best similar thing for Emacs I've ever used was Deft inside my Dropbox (or whatever is your server of choice). Simple, Markdown, has link navigation.


Similar feeling here. I found that simple full-text search goes a long way to scale without needing to impose structures (and things like backlinks). It will probably not be enough for prolific note takers but I think it's enough for people with say <1000 files.

(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).

[1] https://github.com/casouri/xeft


I actually switched from Deft -> Xeft -> Howm as my main UI for searching and creating notes :).

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.


Dear Lazyweb, what I miss the most is the ability to drag/drop pictures into my notes. Is that possible ?


Yes. If you use Org-mode or Markdown-mode in GUI Emacs, I believe this works by default in the development version (since “yank-media” was introduced). If you use other versions of Emacs, or just want more control over where the files go and how they are linked, you can use this package: https://github.com/abo-abo/org-download

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.


Dang, I thought this could cover my use case. At my (small but slowly growing) company, we use a git repository with a bunch of org files as our wiki. It works OK, but I can't see that grow very much. Also not particularly excited about moving to another tool though, org-mode is neat.

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!


I think the web interface for the gollum wiki (which used to power GitHub wikis, but I think they have diverged) supports org mode files.

https://github.com/gollum/gollum


That looks pretty spot on, thank you!


Git (or a verson control system) actually sounds pretty ideal. That is their main use case: collaborating on a bunch of files in a team.

What about it isn't working? Git scales to huge numbers of contributors easily.


Well, for one, it's a bit of a hassle. Constantly thinking of commit messages and stuff, but maybe I'm overly dramatic there. On top of that, it would be nice to at least navigate the contents read-only without Emacs. We use GitLab, it does render org files, but not even links to other files work.


For read-only access, I’ve heard that Hugo can be used with Org. It’s perhaps more used for blogs than wikis, but it should give you a clean and lightweight website of linked HTML files generated from the Org files, which might be sufficient.

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?


Yeah exactly, it's a bit like chasing a local maximum. The sibling suggestion, gollum, looks very promising for this, a git backed web based wiki with org support.


Recently I've become interesting in Texinfo, the official documentation format of the GNU project[0].

Is Howm meant to be used alongside or as an alternative to Texinfo?

[0] https://www.gnu.org/software/texinfo/


Howm is a minor mode, and can be used with any text format that Emacs supports.

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.


I use this and it is fantastic for my use case as well; I use Syncthing to sync it (just a directory with other directories and files) across multiple systems so I always have the latest notes/todos wherever I am.


I used this like 20 years ago. Kind of shocked, but glad that it is still a thing. I was looking for something similar in VS code but none has been satisfying.


Thanks for posting this. I downloaded and was playing with it. But I'm puzzled about new note creation. When I type in the title next to the equal sign, I need to move the cursor below the date line to compose the note. Shouldn't the date line be on top?


What I personally do is to first type the title, then press either M-> or END to jump to the end of the buffer, and then just keep typing from there.

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.)


Thanks, this was helpful.


Date line could be put everywhere you want or entirely deleted. You are absolutely free in this aspect of usage of howm.


How does Howm compare to org brain? especially in terms of scalability.


I haven’t really stress-tested it, but I would imagine that it scales well since (I) it can be configured to use Ripgrep to resolve searches and “goto links”, and (II) the “comefrom links” are cached on save. I haven’t used org-brain though, so it’s hard to compare :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: