Note for Emacs users

Emacs users that want to use Joplin (desktop) “Edit in external editor” feature may run into the situation that, when the note is saved in Emacs, it is not updated in Joplin.
This will happen when you use the emacsclient program with a running emacs server, and Emacs is configured to create backup files (files with the same name as the original but with a ~ appended), which is enabled by default.
In this case, Emacs will rename the original file to the new name, and create a new file. Since Joplin is watching the original file for modifications, it will not detect the changes.
Only when Joplin is restarted it will pick up the modified contents.

A solution to this is to either permanently disable creating backup files (not advised) or to force backup files being made by copying their contents in a new file, while Emacs continues editing the original file.

The most elegant solution is to enforce this behaviour only when editing via the emacs server. You can do this by adding the following lines to your .emacs:

      '((lambda nil
         (let (server-buf)
           (setq backup-by-copying t)

For more information, please see

Disclaimer: You shouldn't edit individual Joplin files without Joplin.

But when you do, the following Emacs mode may be useful :slight_smile: .

It takes care of keeping the metadata intact and updates timestamps.

;;++ Joplin mode (on top of Markdown).
(autoload 'joplin-mode "joplin-mode"
   "Major mode for editing Joplin files" t)
; Note that joplin-mode will step down if it is not joplin data.
(add-to-list 'auto-mode-alist '("/[a-f0-9]\\{32\\}\\.md\\'" . joplin-mode))

joplin-mode.el (2.1 KB)