Toddling on
Since I posted about baby steps and counting org mode lines I’ve used emacs some more, found more stumbling blocks.
- My Colours Changed Again! (Just Pick a Theme)
- Why does the modeline say “fly/–” ..?
- ..and how do I change the dictionary?
- How do I insert a timestamp in org? A real timestamp, not a datestamp!
- What’s the subscript/superscript syntax in org mode?
- How do I wrap search?
- How do I put a quote in an org file?
- How do I quickly export from org to PDF?
- There’s boxes around the links! How do I customise LaTeX exports?
My Colours Changed Again! (Just Pick a Theme)
m-x customize-themes
. In the last post I mentioned that colours were different between tmux-ified emacs and regular terminal emacs. Well, after a forced shutdown, a system update, and/or a reboot the non-tmux colours also looked off!
Fortunately, there’s a way to customise what theme you’re using: m-x customize-themes
:
Others can be installed. Before / after:
I’m not 100% on it, but it’s an improvement.
Why does the modeline say “fly/–” ..?
After some digging in the minor mode help (C-h m
) lead me to the flyspell code- in particular, flyspell-mode-line-string
:
:lighter (flyspell-mode-line-string ;; If `flyspell-mode-line-string' is nil, then nothing of ;; the following is displayed in the mode line. ((:propertize flyspell-mode-line-string) (:propertize (:eval (concat "/" (substring (or ispell-local-dictionary ispell-dictionary "--") 0 2))) help-echo "mouse-1: Change dictionary" local-map (keymap (mode-line keymap (mouse-1 . ispell-change-dictionary))))))
..and how do I change the dictionary?
M-x ispell-change-dictionary
— continued from above! Having the actual code available to read as part of the documentation system is pretty handy- something I’d like to think comes from RMS’ involvement.
How do I insert a timestamp in org? A real timestamp, not a datestamp!
Add a prefix: C-u C-c C-.
I’m not sure why it’s that way round; probably because specifying a time changes how things are presented in agenda view, by default.
On a related note:
What’s the subscript/superscript syntax in org mode?
superscript: ^{}
subscript: _{}
ref: melioratus’ gist
How do I wrap search?
Press C-s
again after first search, this will cause search to wrap back to the start.
There is also a QA on making search automatically wrap, which I haven’t implemented in my own .emacs yet.
How do I put a quote in an org file?
#+BEGIN_QUOTE
#+END_QUOTE
It is one of the structure templates. it can apparently be inserted with C-c C-,
(for org-insert-structure-template
), but for some reason that combo didn’t work for me- I suspect terminal issues again.
Regardless, something faster is better- because I was working on an org file for something in particular which used several quotes, I went ahead and enabled org-tempo in my .emacs:
;; org-tempo
;; quickly add blocks to org files
;; https://orgmode.org/manual/Structure-Templates.html
;; make it org-specific
;; see https://www.spacemacs.org/doc/FAQ.html#orgheadline13
(with-eval-after-load 'org
(require 'org-tempo)
)
and could then on a new line enter <q
followed by TAB
to quickly get a quote block. Neat!
How do I quickly export from org to PDF?
C-c C-e l p
(export to Latex → PDF). You could instead use C-c C-e l o
to open the PDF after export. Also, the export was much quicker than a LaTeX compilation usually is, somehow!
Read more in exporting or the export dispatcher (which kinda sounds like a Jason Statham movie set in Hong Kong).
There’s boxes around the links! How do I customise LaTeX exports?
#+LATEX_HEADER
. See LaTeX-specific export settings.
You can add specific options for links if you don’t like the red-boxed table of contents internal links and the green-boxed external URLs:
Pingback: Yet More Toddler Steps With Emacs / org-mode – Rob's Blog