From 6f9a3eb5369fe95499f27d0c08e28bb57b93fdd9 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 29 Oct 2022 12:14:28 -0700 Subject: [PATCH] Document that editors must be blocking processes (#1624) * Describe blocking processes in External Editors page * Add documentation about how the editor must be a blocking process * Add contextual link to external editor site * Point to micro editor as an example since it's likely less intimidating than vim --- docs/external-editors.md | 6 ++++-- docs/reference-config-file.md | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/external-editors.md b/docs/external-editors.md index be321bab..4e8f70b7 100644 --- a/docs/external-editors.md +++ b/docs/external-editors.md @@ -8,11 +8,13 @@ License: https://www.gnu.org/licenses/gpl-3.0.html Configure your preferred external editor by updating the `editor` option in your [configuration file](./reference-config-file.md#editor) +If your editor is not in your operating system's `PATH` environment variable, +then you will have to enter in the full path of your editor. + !!! note To save and log any entry edits, save and close the file. -If your editor is not in your operating system's `PATH` environment variable, -then you will have to enter in the full path of your editor. +All editors must be [blocking processes](https://en.wikipedia.org/wiki/Blocking_(computing)) to work with jrnl. Some editors, such as [micro](https://micro-editor.github.io/), are blocking by default, though others can be made to block with additional arguments, such as many of those documented below. If jrnl opens your editor but finishes running immediately, then your editor is not a blocking process, and you may be able to correct that with one of the suggestions below. ## Sublime Text diff --git a/docs/reference-config-file.md b/docs/reference-config-file.md index 3a057cdb..1c58a3a2 100644 --- a/docs/reference-config-file.md +++ b/docs/reference-config-file.md @@ -47,10 +47,11 @@ key will be used instead. If set, executes this command to launch an external editor for writing and editing your entries. The path to a temporary file is passed after it, and `jrnl` processes the file once -the editor is closed. +the editor returns control to `jrnl`. -Some editors require special options to work properly. See -[External Editors](external-editors.md) for details. +Some editors require special options to work properly, since they must be +blocking processes to work with `jrnl`. See [External Editors](external-editors.md) +for details. ### encrypt If `true`, encrypts your journal using AES. Do not change this