nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
926 stars 47 forks source link
emacs org-mode org-roam transclude transclusion writing

+title: README – Org-transclusion

+author: Noboru Ota

+email: me@nobiot.com

+options: toc:t creator:nil author:nil broken-links:t

+html: GNU Emacs

+html: GNU ELPA

+html: GNU-devel ELPA

+html: GPLv3

Org-transclusion lets you insert a copy of text content via a file link or ID link within an Org file. It lets you have the same content present in different buffers at the same time without copy-and-pasting it. Edit the source of the content, and you can refresh the transcluded copies to the up-to-date state. Org-transclusion keeps your files clear of the transcluded copies, leaving only the links to the original content.<>

A complete user manual is available [[https://nobiot.github.io/org-transclusion/][online]] or Emacs in-system as an Info node `(org-transclusion)': (~C-h i~ and find the =Org-transclusion= node).

For installation and minimum configuration, refer to [[#installation][Installation]] below or the user manual: [[https://nobiot.github.io/org-transclusion/#Installation][online]] or Info node `(org-transclusion)Installation'

Getting Started in the user manual will get you started in 5 minutes: [[https://nobiot.github.io/org-transclusion/#Getting-Started][online]] or Info node `(org-transclusion)Getting Started'.

For customization, refer to the customization group org-transclusion' or user manual: [[https://nobiot.github.io/org-transclusion/#Customizing][online]] or Info node(org-transclusion)Customizing'.

Below are images and videos demonstrating some of the key features of Org-transclusion.

+attr_html: :max-width 80%

+html:

Figure 1. Animation to show creation of a transclusion from an ID link

+attr_html: :max-width 80%

+html:

Figure 2. Animation to show live sync from transclusion to source

+attr_html: :max-width 80%

+html:

Figure 3. [[https://youtu.be/ueaPiA622wA][Video demo on v0.2.1 on YouTube]] demonstrating new features to transclude a source file into a src-block and function to specify a range of text/source line

Here are some real use cases that users have shared with the author, including his own.

Main Features:

This package is available on:

GNU ELPA should be already set up in your Emacs by default. If you wish to add GNU-devel ELPA, simply add its URL to ~package-archives~ like this:

+BEGIN_SRC elisp

(add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/") :append)

+END_SRC

Refresh the archive with ~M-x package-refresh-contents RET~ and you can do ~M-x package-install RET org-transclusion~ to install it. Alternatively, you can use ~package-list-packages~.

After installation, you can start using Org-transclusion with no additional configuration. Below are some example keybindings that can be put into your Emacs configuration.

+BEGIN_SRC elisp

(define-key global-map (kbd "") #'org-transclusion-add) (define-key global-map (kbd "C-n t") #'org-transclusion-mode)

+END_SRC

For Doom users, you would need to do something like this below to install the package and configure the keybindings.

+BEGIN_SRC elisp

;; ~/.doom.d/package.el (package! org-transclusion)

+END_SRC

+BEGIN_SRC elisp

;; ~/.doom.d/config.el (use-package! org-transclusion :after org :init (map! :map global-map "" #'org-transclusion-add :leader :prefix "n" :desc "Org Transclusion Mode" "t" #'org-transclusion-mode))

+END_SRC

Org-transclusion is part of GNU ELPA and thus copyrighted by the [[http://fsf.org][Free Software Foundation]] (FSF). This means that anyone who is making a substantive code contribution will need to "assign the copyright for your contributions to the FSF so that they can be included in GNU Emacs" ([[https://orgmode.org/contribute.html#copyright][Org Mode website]]).

Thank you.

Org-transclusion is licensed under a GPLv3 license. For a full copy of the license, refer to [[./LICENSE][LICENSE]].