Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Org-mode basics

:ID: E67BF8C6-A54C-4E71-A9B3-F2FE1D14632A

This is a dump of notes on basic org-mode stuff. I recently switched from Boostnote to org-mode.

See also Org-roam stuff

# Headings

# Rotate heading type

(eg, TODO, DONE, etc) with:

  • S-RIGHT S-LEFT
  • C-c C-t
  • SPC m T T (spacemacs)

# Expand and Collapse

  • Tab for a single heading
  • S-Tab for all of them

# To change the collapse state ellipsis

set variable: (set-q org-ellipsis " ▼")

# To remove the underline face on the ellipsis

you can use a hook:

(add-hook 'org-mode-hook (lambda () (set-face-underline 'org-ellipsis nil)))

# Tags

  • Puts tags on headings org-set-tags-command
  • Add multiple tags with : separator (eg, :tag1:tag2:)

# Properties

# Displaying images

  • org-toggle-inline-images
  • Set image size. Place an HTML attribute above the link:

    #+attr_html: :width 500

    Make sure to have variable: org-image-actual-width nil. This will use the attribute size and fallback to actual.

# webp

At the time of writing this, emacs doesn’t have native support for displaying webp images. We can tell emacs to use a converter and make sure the system has imagemagick. (setq image-use-external-converter t)

# Displaying boundaries

Common use case is an 80 character column indicator. See Displaying boundaries docs

  • To change the column color set the face foreground:

    (set-face-foreground 'fill-column-indicator "pink")
    

# Source code

  • Eval with C-c C-c
  • Edit in another buffer (optional): C-c ' This is useful when writing code in source blocks. Indention will actually work properly. Editing-Source-Code docs
    • Save without closing it: C-x C-s

# Evaluate code against docker container

With docker-tramp (already with spacemacs), you can add the :dir header argument that points to a running docker container

  1. Build the docker image. docker build -t my-image .
  2. Run the docker container. It can be helpful to give the container a name.

    docker run -it --rm -v "$PWD":/app --name my-container --env-file .env my-image
    
  3. Add the :dir header argument

    #+begin_src ruby :dir /docker:root@my-container:/app

    • root is the user
    • my-container is the container name or ID

See also https://orgmode.org/manual/Evaluating-Code-Blocks.html

# Capture templates

# Export Settings

See the following for more on this topic.

# Lists

# Ordered Lists

C-c ^ (org-sort): while cursor is somewhere on the list to sort lists by number, alpha, etc. (do not need to select a range)

# Checkboxes

See also https://orgmode.org/manual/Checkboxes.html

  • Same syntax as markdown.
  • Toggle with org-toggle-checkbox
  • They are hierarchical Add [/] to the parent to get a ’n out of m’.

# Superscripts

  • Add #+OPTIONS: ^:{} to your org-mode file
  • Superscript syntax: word^{superscript}
  • Subscript syntax: word_{subscript}

See example in Raised vegetable gardening

Search Results