Commit fixes a bug where block references (i.e. `:block/refs` association in the db) are lost when the page containing the referenced block is re-loaded due to an update of its underlying file. Description of Bug: The bug occurs because when a file is re-loaded to the DB from disk, all existing blocks belonging to the file are deleted via `retractEntity`, and then blocks from the parsed file are added. If the file had only had small changes, the new block set will be very similar to the previous one, although with different db/ids. However, while new blocks with "id:: " properties will assume the UUID value of the previous version of the block, any references to that block via UUID will *not* be restored in the DB; they are deleted with the retractEntity command. This results in an inconsistent DB state, where references that should exist do not. Description of Fix: The 'delete-blocks-fn' passed to the graph_parser has been modified as such: - It now accepts a list of block uuids to *retain*; graph parser will pass the blocks parsed from the new file content. - For any blocks which match a UUID in the retain list, instead of deleting via retractEntity, the individual attributes are deleted via retractAttribute (the `retract-attributes` from schema.cljs is used for this purpose).
Logseq
A local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base.
Use it to organize your todo list, to write your journals, or to record your unique life.
Download our free Desktop app
Sponsor our contributors on Open Collective, Logseq will move to Stripe later!
Why Logseq?
Logseq is a platform for knowledge management and collaboration. It focuses on privacy, longevity, and user control.
The server will never store or analyze your private notes. Your data are plain text files and we currently support both Markdown and Emacs Org mode (more to be added soon).
In the unlikely event that the website is down or cannot be maintained, your data is, and will always be yours.
Sponsors
Our top sponsors are shown below! [Become a sponsor]
Plugins documentation (Draft)
The plugins documentation is at https://logseq.github.io/plugins. Any feedback would be greatly appreciated!
Feature requests
Please go to https://discuss.logseq.com/c/feature-requests/7.
How can I use it?
- Download the desktop app at https://github.com/logseq/logseq/releases.
- Start writing and have fun!
FAQ
Please go to https://docs.logseq.com/#/page/faq.
Credits
Logseq is hugely inspired by Roam Research, Org Mode, Tiddlywiki, Workflowy and Cuekeeper, hats off to all of them!
Logseq is also made possible by the following projects:
- Clojure & ClojureScript - A dynamic, functional, general-purpose programming language
- DataScript - Immutable database and Datalog query-engine for Clojure, ClojureScript and JS
- OCaml & Angstrom, for the document parser
- isomorphic-git - A pure JavaScript implementation of Git for node and browsers
- sci - Small Clojure Interpreter
Learn more
- Our blog: https://logseq.com/blog - Please be sure to visit our About page for the latest updates of the app
- Twitter: https://twitter.com/logseq
- Forum: https://discuss.logseq.com - Where we answer questions, discuss workflows and share tips
- Discord: https://discord.gg/KpN4eHY
- 中文 Discord:https://discord.gg/xYqcrXWymg
- Github: https://github.com/logseq/logseq - everyone is encouraged to report issues!
The following is for developers and designers who want to build and run Logseq locally and contribute to this project.
We have a dedicated overview page for Logseq's codebase overview and a development practices page.
Set up development environment
-
For setting up web app / desktop app development environment on macOS / Linux, please refer to Develop Logseq.
-
For Windows users, please refer to Develop LogSeq on Windows in addition.
There are more guides in docs/, e.g. the Guide for contributing to translations and the Docker web app guide

