Hacker News new | ask | show | jobs
by TomDavey 2819 days ago
A hyperlinked knowledge-management system for personal use, on all my computers, is essential. To achieve it, I use Emacs and Org-Mode and Dropbox.

An additional benefit of using Emacs: the personal wiki can be integrated with my task-management system, which Org-Mode handles as well. Plus I can draft and edit at warp speed, having customized the native Emacs keybindings to suit me better.

Were I going to publish my wiki to the Web for others to use, I'd export the wiki to HTML with Org. But for now it's all personal.

7 comments

How do you handle images/screenshots/handwritten notes?

I am also using Org-Mode and Dropbox for the majority of my notes. I really like it. In particular, Orgzly for Android works great with this system, so check it out if you want mobile notes as well.

The problem is that I also like to take paper notes, and take videos/pictures of stuff, and scan documents, and download webpages. Org-mode kinda stinks for embedding external content that isn't text? As far as I can tell.

I can link to external content, and if I export to HTML it'll show up. But... I never export to HTML, because, as you probably already know, it's way easier to read notes in an editable format. I can turn on picture rending in Org-mode, but it's not responsive, and I can't crop the pictures or annotate them with a stylus, or do any of a dozen different things that I want to do.

What I've thought about is that I really just want the ability to render HTML/CSS inside of an Org-mode buffer, and ideally to be able to set up custom CSS classes that would be applied to every snippet. Just set up a quick region, write some helper functions to compile/render the HTML, etc...

I've been thinking for a while about taking some time off of work to just try and solve the problem. Is it already solved? I know that at one point people were looking into getting webkit embedded into buffers. Did that go anywhere? I guess you can build GTK widgets for Org-mode as well? But then you lose the ability to define custom styles on the fly.

You can make some tweaks to org to get images to display nicely: https://lepisma.github.io/2017/10/28/ricing-org-mode/
A) That is beautiful, thank you for sharing

B) Does it actually address the image problem? The config appears to be using the built in inline-images, which don't support responsive widths.

Even getting rid of responsive widths, simply embedding the image into the buffer isn't really good enough for handwritten notes -- you need at least the ability to crop/zoom.

I'm not sure whether it solves the problem you mention. But it might be a good starting point. If you can roll your own solution, I'd be very interested in hearing about it, and probably most org users! I keep my scanned notes in separate files, though.
For screenshots I use this little snippet:

  ;; Paste image to orgmode https://stackoverflow.com/questions/17435995/paste-an-image-on-clipboard-to-emacs-org-mode-file-without-saving-it
  (defun my-org-screenshot ()
    "Take a screenshot into a time stamped unique-named file in the
  same directory as the org-buffer and insert a link to this file."
    (interactive)
    (org-display-inline-images)
    (setq filename
          (concat
           (make-temp-name
            (concat (file-name-nondirectory (buffer-file-name))
                    "_imgs/"
                    (format-time-string "%Y%m%d_%H%M%S_")) ) ".png"))
    (unless (file-exists-p (file-name-directory filename))
      (make-directory (file-name-directory filename)))
    ; take screenshot
    (if (eq system-type 'darwin)
        (call-process "screencapture" nil nil nil "-i" filename))
    (if (eq system-type 'gnu/linux)
        (call-process "import" nil nil nil filename))
    ; insert into file if correctly taken
    (if (file-exists-p filename)
      (insert (concat "[[file:" filename "]]"))))
https://github.com/abo-abo/org-download does "Drag and drop images to Emacs org-mode". I suppose you could use https://www.emacswiki.org/emacs/EmacsImageManipulation =P

There's also https://github.com/alphapapa/org-web-tools/ for web snippets.

I also use org-mode as a personal wiki, combined with git version control and ripgrep search. Furthermore, my task/time management is also within the wiki, as a kanban page and as an events page. Org has tons of useful features. Especially for time management and export. But it's also quite simple.

I started implementing a personal wiki using MediaWiki long time ago, trying to replicate the concept of Zettelkasten. But MediaWiki is a bit too heavy and complex, even if you use a SQLite backend. Furthermore, it doesn't compose with my editor and version control system of choice.

I think having a wiki is essential, as the deliverable of many tasks is just a knowledge bit you really want to record. It's interesting to see personal wikis are starting to show up in GitHub and GitLab. I wish both platforms improved their org-mode support to capitalize on this trend. We can all collectively benefit from open-sourced wikis in the same way we benefit from open code.

For a decade or so, Dokuwiki has been my "go to" application for a personal wiki. Simple syntax, quick and easy to get up and running, and doesn't even need SQLite -- your pages are just plain text files in a directory and, yes, you can edit them in the browser or $EDITOR.
I also have the Emacs + Org-mode + Dropbox setup.

In addition, I have an AWS lambda endpoint which listens to a SES email hook. I send emails to the SES address which the hook then appends and schedules to org files on dropbox based on email content.

Can you do a small write-up on that lambda function? I know nothing about those, but I know that Netlify kind of? supports them? If possible I'd like to set up an end point on my Netlify deployed site and do what you are doing. Thanks! :)
I'm curious, are you (or anyone else using Org Mode) using a single org file for your entire personal wiki, or one file per major topic? In the past, I've used Markdown files with one file per language/topic for my personal developer wiki, but am looking at moving it to Org Mode now. One file for everything (developer knowledge + other subjects) seems nice, but it seems like trying to manage and navigate around a single large file would get messy.
I use separate files for separate topics. Org mode is pretty good at linking between files. I've even done coding projects where a TODO list links to lines of code inside of a source file (by grep, not by line number, otherwise they'd go outdated every time I committed).

Getting into Org-mode, I would occasionally run into people who would say, "there's one right way to do this. You should be using Org-agenda view for all of your TODOs, you should be setting up tags with this specific system..." Over time, I have learned to ignore those people.

The main benefit of Org-mode is that it is really, really, stinking flexible. You should use whatever system you're most comfortable with (probably whatever you were using before with Markdown) and then slowly adapt features like auto-archiving TODOs, time-tracking, tags, Org-capture, as you need them.

You should look into them, because sometimes you see something cool like Org-capture and you're like, "woah, I could just hit one keypress, type in a sentence, and it'll get auto-filed for me based on the content." But let that "coolness" factor be the thing that guides you. Org-mode is really big and really adaptable, so if you try to grab everything in one go, you'll end up turning your notes into a chore again.

I started using Org-mode specifically because I hated having to adapt a very personal notetaking style to more rigid commercial apps. And my notetaking style evolves based on what I'm going through in life anyway. Org-mode allows it to be more rigid or more flexible based on life circumstances.

A single Org file holds my wiki. Yes, it's big, but Org's features make it easily manageable.

Org has fine hyperlinking, and equally fine searching -- including searches on headline tags and properties -- using regexps if desired. Underneath is the logical outline structure -- just like a website -- and the hierarchical inheritance of tags and properties.

Plus -- here's where Org is superior to a Web-based wiki IMO -- it's so easily refactored. When I started I had only a few top-level entries. Over time, I have accumulated hundreds of headlines and their accompanying body text. Multi-level structure emerged naturally, and continues to evolve.

Here are my top-level categories today:

1. Arts and Entertainment 2. Diet and Health 3. Household 4. Restaurant and Bars 5. Petronius.me (my household LAN) 6. Subscriptions 7. People and Me 8. Travel 9. Commonplace Book (quotes, links, and reading I've saved)

Org makes it easy to move things around and re-organize as needed: just cut a subtree and paste it to a new location in the hierarchy.

Org's linking make cross-references a cinch. Who was that person I met on this trip? Oh, here's a link to their personal entry in "People and Me". And that entry will link back to the trip in "Travel."

A headline's unique ID property guarantees that a link will never break, no matter how frequently or drastically you move things around.

I use multiple files, one per topic all in one folder. There is a file called main.org that contains the following embedded code, which creates an index of all of my org files

  * Org-files
  #+BEGIN_SRC sh
      for file in $(ls *.org)
      do 
      echo "[[~/org/$file][$file]]"
      done
  #+END_SRC
That's a clever use of org-babel!
I'm jealous of the emacs masters as I like the idea of having this 'one tool for life' but I'm honest enough to admit I'm just too lazy to learn it!
If you know how to use Notepad/TextEdit, you know how to use (GUI)Emacs. Even easier than nano.
I think he talks about configuration and scripting (elisp).
Same .. but Keybase has replaced Dropbox for me for these purposes. The encrypted git repositories are awesome!
How are you using Org-mode on Android?

I'm using Orgzly, but it only supports a subset of real Org-mode.

I don't synch between instances of Org, but you can install a full-blown Emacs (and many other apps) on Android within the Termux terminal emulator:

http://endlessparentheses.com/running-emacs-on-android.html

It runs Org fine, I've even used Spacemacs on Emacs runnning in Termux.

I haven't integrated Org with either my email or my phone (I'm on iOS actually), at least not yet. It's on the road map!
beorg is great if you use a single directory for files. Unfortunately it’s proprietary and missing a few features.

But it’s pretty slick. It’s now the app I turn to (not my calendar) when I’m wondering what I’m supposed to be doing today.