Logseq

The logseq preset converts between Logseq md and Logseq org. Set on one side only, it converts between a Logseq dialect and Vanilla (below).

Page properties

A page's first block of key:: value lines ↔ leading #+key: value lines.

Flat frontmatter entries whose keys are lower case, digits, _ and - become such keywords too; other keys would not come back as written. A sequence is written as Logseq writes it (tags: [a, b] → #+tags: a, b). So YAML comes back as a key:: block after one round trip.

These stay in the frontmatter block:

The list is a denylist: other third-party exporters' keys and export metadata such as title or author do map. tags maps too: it holds Logseq's page tags.

A key:: block maps whole, acting keys included, since that is how an org page's own #+startup: travels through Markdown (ADR 0005). Its acting keys act in the org page: include:: x becomes #+include: x.

Outline

A page converts block by block, each block's content as one fragment, as Logseq parses it.

Block titles

A code block, table or rule that starts on the headline line converts as a whole. Otherwise a block's title is inline text: a title that looks like org line syntax (: a, ** a, - a, 1. a, # a) stays text, escaped in Markdown (\*\* a, 1\. a) as mldoc reads it. A block that starts with a comment has it below an empty title (* then # …), where it stays a comment.

Known limitation: Logseq reads an org title : a (or :a: b) as an empty title and a fixed-width line. morg reads it as text, as Emacs does.

Drawers and planning

Org blocks

An org block in a Markdown block (#+BEGIN_SRC…#+END_SRC, which Logseq reads there too) goes to org as written, as org → md writes them. Exceptions:

A block's begin and end lines are written in upper case on either side (#+BEGIN_SRC sh), as Logseq writes them; Vanilla org keeps Emacs's lower case (#+begin_src).

Logseq on one side only

--input-preset / --output-preset set logseq on one side only; the other side is Vanilla (ADR 0006).

Vanilla org

Vanilla org is read and written as Logseq org, which it nearly is: Logseq md ↔ Vanilla org converts as Logseq md ↔ Logseq org does, but for what Emacs reads otherwise than Logseq:

Translated within org (Logseq org ↔ Vanilla org), only these change. Other lines stay as written, line endings become LF and an empty page stays empty. A Vanilla headline whose title starts a list running on below it (* 3. Why? with its body indented three spaces) stays as it is on the way to Logseq org, but comes back with the title below empty stars.

What Logseq reads otherwise than Emacs stays as written, with a warning per kind; org blocks are skipped:

Converted to Logseq md, a [[*heading]] link (labeled or not) becomes a page ref, with that warning; the other kinds are Markdown links or text there.

Vanilla md

Vanilla md has a shape of its own. Logseq org ↔ Vanilla md:

Logseq org Vanilla md
block, nested by level list item, nested two spaces (1. three) further
:heading: N block, no list above it #×N heading; its children start a new list
:heading: N block in a list - ## …
logseq.order-list-type: number ordered list (1., 2., …)
TODO / DONE - [ ] / - [x]
NOW LATER DOING IN-PROGRESS WAIT[ING] - [ ] MARKER … (Logseq shows them unchecked)
CANCELED text (Logseq shows no checkbox)
SCHEDULED: / DEADLINE: scheduled:: / deadline:: lines in the item (orgismKeys names), one planning line back
property drawer key:: value lines in the item
collapsed, drawers (:LOGBOOK:) dropped, with a warning
#+BEGIN_QUERY ```query code block
page properties (lower-case #+key:) plain frontmatter keys; acting ones stay morg_keywords
page and block refs, macros, #tag, [#A], hiccup, ^^…^^ as Logseq md writes them, as text

A block's title is inline text here too, but for a table or a rule on the headline line (Block titles).

Vanilla md is read as Logseq reads a file it did not write:

With Obsidian on the other side, a page ref and a wikilink map onto each other ([[Page][label]] ↔ [[Page|label]]).

Within Markdown

Translated within Markdown (Logseq md ↔ Vanilla md), the outline maps as in the table. A block's content stays as written, but for its org blocks: a source or example block is fenced, a quote quoted, a query a query code block (and back: a query code block is a query block); others stay.

Known limitation: underline and scripts in their Markdown spelling (\_x\_, ^{x}) stay as written under "html" too, where a conversion writes <u>, <sup>, <sub>: they are org text inside Markdown text, which a user's own escapes look like.