Skip to content

Latest commit

 

History

History
1833 lines (1221 loc) · 65 KB

scimax.org

File metadata and controls

1833 lines (1221 loc) · 65 KB

Scimax - The manual

\maketitle

Scimax is an Emacs starterkit designed for people interested in reproducible research and publishing. Scimax is just Emacs that has been configured extensively to make it act like we need it to for research documentation and publication. The notes below document some features we have built into scimax.

Note: The org-mode version of this manual is the preferred version for reading; it is the most functional version, and the most up to date. The info:scimax version is also useful though, and you might prefer that one.

Org-mode

scimax provides a lot of customization of org-mode. Here are some of the more important ones.

Markup shortcuts

scimax defines some shortcuts for org-mode markup. You can select text and type the shortcut to wrap the region in the markup, or if on a word, type the shortcut to wrap the word, or type the short cut to create the markup with the cursor inside it to keep typing.

Note these modifier keys:

Sshift
Malt/meta
CCtrl
ssuper
Hhyper

Notation like s-b means press super and b together.

super and Hyper aren’t common on all keyboards, and using them is platform dependent. One good resource for configuring them is http://ergoemacs.org/emacs/emacs_hyper_super_keys.html.

For Mac, I use:

(setq mac-right-command-modifier 'hyper)
(setq mac-right-option-modifier 'super)

For Windows you can use:

(setq w32-pass-lwindow-to-system nil)
(setq w32-lwindow-modifier 'super) ; Left Windows key

(setq w32-pass-rwindow-to-system nil)
(setq w32-rwindow-modifier 'super) ; Right Windows key

(setq w32-pass-apps-to-system nil)
(setq w32-apps-modifier 'hyper) ; Menu/App key

It was suggested here that you can also make some seldom used keys like <pause> and <scroll> act like these extra modifiers. Here is a snippet that will do that.

(define-key function-key-map (kbd "<pause>") 'event-apply-super-modifier)
(define-key function-key-map (kbd "<scroll>") 'event-apply-hyper-modifier)

This does not work for all key combination with the Windows key because Windows intercepts some keys. The intercepted keys depend on the Windows version:

KeyWindows 7Windows 10
A+w
Bww
C
Dww
Eww
Fww
G+w
Hw
I+w
J+
K+w
Lww
Mww
N++
O+
Pww
Q+w
Rww
S+w
Tww
Uww
V
W+w
X+w
Y++
Z+
0 … 9ww
+ww
-++
_++
.+
,+
#+
*++
+
Key is available for Emacs
w
Key is intercepted by Windows
empty
No reaction from Emacs or Windows

The following keyboard shortcuts are defined:

markup keyshortcut emacs-command
Bold s-b `org-bold-region-or-point’
italics s-i `org-italics-region-or-point’
verbatim s-v `org-verbatim-region-or-point’
code s-c `org-code-region-or-point’
underline s-u `org-underline-region-or-point’
strike s-+ `org-strikethrough-region-or-point’
subscript s– `org-subscript-region-or-point’
superscript s-= `org-superscript-region-or-point’
\(equation\) s-4 `org-latex-math-region-or-point’
$inline eqn$ C-u s-4
@@latex:snippet@@ C-u C-u 4
° s-e `ivy-insert-org-entity’
s-” `org-double-quote-region-or-point’
s-’ `org-single-quote-region-or-point’

These commands try to do what you mean:

  1. If your cursor is on a space, insert balanced markers with cursor between them
  2. If you have highlighted a region, add markers around it
  3. If you are on a word, add markers around the word, unless you are sub/superscripting, and then do that on the character at point
  4. If the cursor is right after the end of a markup, you can press the key again to slurp the next word into the markup.

Use `ivy-insert-org-entity’ (s-e) for all accented characters.

Template expansions in org-mode

The following examples show some of the shortcuts defined in scimax for expansion. Put your cursor after the shortcut and press tab to expand them. These are done with yasnippets (defined in ./snippets/).

<jp 


<ip


<p


<el


<sh


ti
#+title:

ok   org-keywords with completions
#+ARCHIVE:

lh
#+latex_header:

lhp   latex header with completion on usepackage
#+latex_header: \usepackage{12many}


lc
#+latex_class:

lco
#+latex_class_options:

ao
#+attr_org: :width 300

al
#+attr_latex: :placement [H] :width 300

ca
#+caption:

ncf
#+name: ${1:name}
#+caption: ${2:caption}
[[${3:}]]

$0
#+name: name
#+caption: caption
[[...]]

nct
#+name: name
#+caption: caption
|  |

n
#+name:

o
#+options:

oo (org-mode options with completion, use in an #+options line)
toc:

nw    noweb with completion
<<nil>>

Here are some convenient table expansions.

t
|  |

tt
|  |  |

ttt
|  |  |  |


tttt
|  |  |  |  |

tn (enter number of columns)
|  |  |  |  |  |  |  |  |


There are some specific snippets to

and in org-mode:

Latex

For numbered LaTeX equations, scimax will make sure that the overlays have correct numbers on them. If you run `org-latex-preview’ you should see (1) and (2) on these overlays.

\begin{equation} f(x) = e^x \end{equation}

\begin{equation} f(x) = 2 e^x \end{equation}

Latex classes that scimax knows about

Here is a list of installed latex classes.

(mapcar 'car org-latex-classes)
cmu-memogMOS2enatureelsarticlesvjour3revtex4-1achemsoarticle-nodefaultsarticle-no-defaultsarticle-1articlereportbook

Better image scaling

Image rescaling in org-mode/Emacs used to require an Emacs with imagemagick support compiled in. This is a problem on Windows. Scimax support image rescaling with an external imagemagick program called mogrify. You can rescale the appearance of an image in org-mode by adding an attribute like this above the figure.

where resize-option is one of:

N%to scale the image by a percentage.
Nto set the width, keeping the aspect ratio constant.
xNto set the height, keeping the aspect ratio constant.
NxM!to set the width and height, ignoring the aspect ratio.

Note that you have to have a line like this in your init file for this to work. This is the default in scimax, and if you set it to t, then scaling will not work (since this variable when set to t says to use the actual image width).

(setq org-image-actual-width nil)

Here are some examples.

./org-show/taskbar.png

./org-show/taskbar.png

./org-show/taskbar.png

./org-show/taskbar.png

./org-show/taskbar.png

./org-show/taskbar.png

new speed commands

scimax defines these new speed commands that are active when the cursor is on the first character of a headline.

mMark the subtree
Swiden
kkill the subtree
qjump to a headline with avy
Torg-teleport (move headline)

The best way to see other speed commands is to put your cursor at the beginning of a headline and press ?. You can also run `org-speed-command-help’ to see a full list of speed commands.

Formatted copy and paste

`ox-clip-formatted-copy’ provides a way to copy org-mode with formatting so it can be pasted into other programs like MS Word and web browsers. It does this by copying the selected text to the HTML clipboard.

Better src block tools

scimax provides a lot of features on top of org-mode to work with src blocks. The usual stuff should work fine, e.g. C-c C-c to run a block.

Customized keymaps by language inside src-blocks

`scimax-ob-src-keymap-mode’ adds minor mode keymaps to your src blocks. See `scimax-ob-src-block-keymaps’ for a way to add your own custom maps.

Better Execution

  • C-<return> is an alternative to C-c C-c to run a block
  • S-<return> will run a block and move to the next block or create one if needed
  • M-<return> will run a block and insert a new block after it
  • M-S-<return> runs all the blocks to the current point

Insert new blocks

See `scimax-ob-insert-src-block’.

Split src block

See `scimax-ob-split-src-block’ which splits a block at the point with cursor in the upper block. Use a prefix arg to put cursor in the lower block.

Navigate to src blocks

`scimax-ob-jump-to-visible-block’
use avy to jump to a visible block.
`scimax-ob-jump-to-block’
use ivy to jump to a block in the buffer
`scimax-ob-jump-to-inline-src’
use ivy to jump to an inline src
`scimax-ob-jump-to-header’
move cursor to the header
`scimax-ob-jump-to-end’
jump to the end

Editing blocks

You can clone, copy, kill and merge blocks now.

`scimax-ob-clone-block’ `scimax-ob-copy-block-and-results’ `scimax-ob-kill-block-and-results’ `scimax-ob-merge-blocks’

It is also possible to move blocks up and down.

`scimax-ob-move-src-block-up’ `scimax-ob-move-src-block-down’

Jump to or edit headers

`scimax-ob-edit-header’ `scimax-ob-avy-jump-to-header’ `scimax-ob-replace-header-item-with-completion’

visualizing blocks

`scimax-ob-toggle-line-numbers’
show line numbers in a block

Miscellaneous utilities

`scimax-ob-clear-all-results’

A hydra to bind them all

It is hard to remember all those commands and/or keybindings. Use this convenient hydra instead!

This should be bound to something convenient `scimax-ob/body’.

Writing tools

Spell-checking

scimax is configured with flyspell and flycheck on. When you misspell a word it will be underlined in red, and you will see a message in the minibuffer that tells you how to fix it (C-;). Type that, and you will be able to fix the word spelling without losing your place! Not only that, but the correction will be saved as an abbreviation so it will auto correct every time you make the mistake again! Note this only works for single word corrections (i.e. the correction cannot be a two word correction).

If the word is correct, you can type M-o s to save the word in your dictionary so you will not see it as misspelled again.

Note: you need to have hunspell installed for this to work. On Windows, this should get installed into the scimax root directory in the emacs-win directory. For Mac and Linux, you need to install it using your package manager.

Autoformat

Scimax will auto-format several things for you.

  1. Ordinal numbers, e.g. 1st to 1st.
  2. Fractions: 1/4 to ¼
  3. Some superscripts, e.g. cm2 to cm2
  4. Transposed cAps, e.g. tHe to The

These are controlled by the following variables you can customize (they default to t):

  • `scimax-autoformat-ordinals’
  • `scimax-autoformat-fractions’
  • `scimax-autoformat-sentence-capitalization’
  • `scimax-autoformat-superscripts’
  • `scimax-autoformat-transposed-caps’

To get the autoformatting you have to enable `scimax-autoformat-mode’. If you want it on all the time, add something like this to your init files:

(add-hook 'org-mode-hook 'scimax-autoformat-mode)

scimax also defines some abbreviations that you can toggle on and off. The abbreviations are defined in these variables:

  1. Auto-capitalization of weekdays and months, e.g. Monday and June.
    1. `scimax-month-abbreviations’
    2. `scimax-weekday-abbreviations’
  2. Contraction expansion: cant to can not and can’t to can not
    1. `scimax-contraction-abbreviations’
  3. Commonly transposed letters in words: the to the
    1. `scimax-transposition-abbreviations’
  4. Some common chemicals like co2 to CO2
    1. `scimax-chemical-formula-abbreviations’
  5. Some convenience symbols like degC to °C and Ang to Å, and some names like norskov to Nørskov.
    1. `scimax-misc-abbreviations’

You should be able to undo any expansion with C-/. Alternatively you can prevent the expansion by typing C-q after the abbreviation before the next character is typed.

These are not on by default. You have to enable them with commands like the one below in your init file. Use +1 to enable the abbrevs, and -1 to disable the abbrevs that are defined in the variable.

(scimax-toggle-abbrevs 'scimax-month-abbreviations +1)

`scimax-toggle-abbrevs’ is an interactive command you can use to toggle the abbreviations on and off. If you run that command it will toggle the state of the abbrevs. With a single prefix arg it will turn them on, and with a double prefix arg turn them off.

You can see the abbreviations defined with this command elisp:edit-abbrevs.

Track changes

Scimax provides some support for track changes and edit marks in org-mode through the new ./scimax-editmarks.org project.

{>+Add this text.+<}{>-Delete this-<} {>~ @jk Here is a comment~<}

This is a {>$tpyo$<}

There are persistent highlights also.

{g>Green highlight<g} {b>blue highlight<b} {y>yellow<y} {p>pink<p}

There is a hydra menu bound to H-m that provides access to easily insert these markups.

There is limited support to convert these editmarks to LaTeX and html, and to generate these editmarks from git diffs or diffs with the copy on disk.

There is also an experimental feature for track-change mode.

Note: This library replaces several older attempts at this which are no longer maintained by me (you can find them still in ./deprecated/.

  1. ov-highlight
  2. org-editmarks.el
  3. cm-mods.el

org-ref

org-ref is the answer to citations and bibliographies in scientific writing. Run `org-ref-help’ and read it.

Publishing (ox-manuscript)

The key-binding C-c C-e j should enter the ox-manuscript export menu. This process differs from the regular export process in a number of ways. It will detect if bibtex, makeindex, or makeglossary, and if minted is used, -shell-escape will automatically be used with pdflatex. The function `ox-manuscript-latex-pdf-process’ handles all of that.

Additionally, you can generate different outputs of an org-file:

`ox-manuscript-build-submission-manuscript-and-open’
creates a standalone tex file with embedded bibliography, and image extensions stripped, and the pdf file.
`ox-manuscript-make-submission-archive’
creates a directory containing all the files you normally need for submission.
`ox-manuscript-toggle-interactive-build’
if you are having trouble building a PDF, this will show you what happens at each step.
  • `ox-manuscript-nobibliography’
`ox-manuscript-texcount’
Estimate how many words are in your manuscript. For when you are limited to a fixed number of words.

Manuscript templates

We have templates prepared for the following manuscripts, proposals and documents.

(mapcar (lambda (x) (list (plist-get x :template))) (ox-manuscript-candidates))
ACS Applied Materials and Interfaces
ACS Catalysis
ACS -Industrial & Engineering Chemistry Research
ACS - Journal of Physical Chemistry C
ACS J. Physical Chemistry Letters
AIP - J. Chemical Physics
Annual student review
Physical Review B
Physical Review Letters
CMU ChemE Written Proposal
CMU ChemE Written Qualifier
CMU ChemE Written Qualifier
Int. J. Greenhouse Gas Control - Elsevier
Cover letter for manuscript submission
Nature
NSF Proposal - Biographical sketch
NSF Proposal - Checklist
NSF Proposal - Current and pending
NSF Proposal - data management plan
NSF Proposal - Facilities, Equipment, and other Resources
NSF Proposal - postdoctoral mentoring plan
NSF Proposal - Project description
NSF Proposal - Project summary
NSF Proposal - Statement of work
Response to reviewers
Surface Science - Elsevier
Taylor & Francis Molecular Simulation
Weekly progress report
Wiley - Int. J. Quantum Chemistry
  • `ox-manuscript-new-ivy’

Bibliography management

Bibliographies in scimax are stored in bibtex files. A bibtex file is a plain text file containing bibtex entries. Each entry describes an item. Here is a typical example.

@article{kitchin-2015-examp,f
  author =	 {Kitchin, John R.},
  title =	 {Examples of Effective Data Sharing in Scientific Publishing},
  journal =	 {ACS Catalysis},
  volume =	 {5},
  number =	 {6},
  pages =	 {3894-3899},
  year =	 2015,
  doi =		 {10.1021/acscatal.5b00538},
  url =		 { http://dx.doi.org/10.1021/acscatal.5b00538 },
  keywords =	 {DESC0004031, early-career, orgmode, Data sharing },
  eprint =	 { http://dx.doi.org/10.1021/acscatal.5b00538 },
}

This entry identifies the item as an article, labels it with a key (kitchin-2015-examp), and describes the details of the item in a series of key = {value} lines. You can learn more about bibtex here http://www.bibtex.org.

If you know the DOI I recommend you use `doi-add-bibtex-entry’ as much as possible to add bibtex entries to your bibliography files. This will add properly formatted and cleaned entries and download the pdf if it knows how. You may also find `crossref-add-bibtex-entry’ useful if you have a freeform citation and want to search for it.

In a bibtex file, `org-ref-bibtex-hydra/body’ will give you a menu of options to do things on an entry including:

  1. Search pubmed, WebOfScience (wos), wos-citing, wos-related, crossref, and google scholar using the DOI or title of the entry.
  2. Clean the entry, replace non-ascii characters, sort the entry fields, or change the case of the title.
  3. Update the entry or fields using the doi.
  4. Open the notes, pdf, or url associated with the entry.
  5. Email the entry to someone
  6. Copy or cut the entry to paste somewhere
  7. Copy a formatted bibliography entry
  8. Add tags to an entry
  9. Add a new entry

`org-ref-bibtex-file/body’ provides menu access to bibtex file functions:

  1. `bibtex-validate’ - Checks if the file is syntactically valid, and for duplicate keys.
  2. `bibtex-sort-buffer’
  3. `bibtex-reformat’
  4. `bibtex-count-entries’
  5. `org-ref-build-full-bibliography’

Searching your bibliography files

See `org-ref-help’ for information on using org-ref to insert citations.

Bibtex entries

Here are the bibtex entry types and fields you should use. You can add extra fields like keywords, doi, url, notes, etc… to each entry. Usually they will be ignored by bibtex, but they are useful for you. Note that biblatex is considered a more powerful bibliography formatting tool, but we use bibtex because that is what most of the publishers we use support.

(loop for (type doc required crossref optional) in bibtex-BibTeX-entry-alist
      do
      (princ (format "\n*** %s (%s)\n" type doc))
      (princ "\n**** Required fields\n\n")
      (loop for field in required
	    do
	    (princ (format "- %s" (car field)))
	    (message "%s" field)
	    (if (>= (length field) 2)
		(princ (format " :: %s\n" (nth 1 field)))
	      (princ "\n")))

      (princ "\n**** Optional if Crossref present but otherwise required fields\n\n")
      (loop for field in crossref
	    do
	    (princ (format "- %s" (car field)))
	    (if (>= (length field) 2)
		(princ (format " :: %s\n" (nth 1 field)))
	      (princ "\n")))
      (princ "\n**** Optional fields\n\n")
      (loop for field in optional
	    do
	    (princ (format "- %s" (car field)))
	    (if (>= (length field) 2)
		(princ (format " :: %s\n" (nth 1 field)))
	      (princ "\n"))))

Article (Article in Journal)

Required fields

  • author
title
Title of the article (BibTeX converts it to lowercase)

Optional if Crossref present but otherwise required fields

  • journal
  • year

Optional fields

volume
Volume of the journal
number
Number of the journal (only allowed if entry contains volume)
pages
Pages in the journal
  • month
  • note

InProceedings (Article in Conference Proceedings)

Required fields

  • author
title
Title of the article in proceedings (BibTeX converts it to lowercase)

Optional if Crossref present but otherwise required fields

booktitle
Name of the conference proceedings
  • year

Optional fields

  • editor
volume
Volume of the conference proceedings in the series
number
Number of the conference proceedings in a small series (overwritten by volume)
series
Series in which the conference proceedings appeared
pages
Pages in the conference proceedings
  • month
  • address
organization
Sponsoring organization of the conference
publisher
Publishing company, its location
  • note

InCollection (Article in a Collection)

Required fields

  • author
title
Title of the article in book (BibTeX converts it to lowercase)
booktitle
Name of the book

Optional if Crossref present but otherwise required fields

  • publisher
  • year

Optional fields

  • editor
volume
Volume of the book in the series
number
Number of the book in a small series (overwritten by volume)
series
Series in which the book appeared
type
Word to use instead of “chapter”
chapter
Chapter in the book
pages
Pages in the book
edition
Edition of the book as a capitalized English word
  • month
  • address
  • note

InBook (Chapter or Pages in a Book)

Required fields

author
nil
editor
nil
title
Title of the book
chapter
Chapter in the book

Optional if Crossref present but otherwise required fields

  • publisher
  • year

Optional fields

volume
Volume of the book in the series
number
Number of the book in a small series (overwritten by volume)
series
Series in which the book appeared
type
Word to use instead of “chapter”
  • address
edition
Edition of the book as a capitalized English word
  • month
pages
Pages in the book
  • note

Proceedings (Conference Proceedings)

Required fields

title
Title of the conference proceedings
  • year

Optional if Crossref present but otherwise required fields

Optional fields

booktitle
Title of the proceedings for cross references
  • editor
volume
Volume of the conference proceedings in the series
number
Number of the conference proceedings in a small series (overwritten by volume)
series
Series in which the conference proceedings appeared
  • address
  • month
organization
Sponsoring organization of the conference
publisher
Publishing company, its location
  • note

Book (Book)

Required fields

author
nil
editor
nil
title
Title of the book

Optional if Crossref present but otherwise required fields

  • publisher
  • year

Optional fields

volume
Volume of the book in the series
number
Number of the book in a small series (overwritten by volume)
series
Series in which the book appeared
  • address
edition
Edition of the book as a capitalized English word
  • month
  • note

Booklet (Booklet (Bound, but no Publisher))

Required fields

title
Title of the booklet (BibTeX converts it to lowercase)

Optional if Crossref present but otherwise required fields

Optional fields

  • author
howpublished
The way in which the booklet was published
  • address
  • month
  • year
  • note

PhdThesis (PhD. Thesis)

Required fields

  • author
title
Title of the PhD. thesis
school
School where the PhD. thesis was written
  • year

Optional if Crossref present but otherwise required fields

Optional fields

type
Type of the PhD. thesis
address
Address of the school (if not part of field “school”) or country
  • month
  • note

MastersThesis (Master’s Thesis)

Required fields

  • author
title
Title of the master’s thesis (BibTeX converts it to lowercase)
school
School where the master’s thesis was written
  • year

Optional if Crossref present but otherwise required fields

Optional fields

type
Type of the master’s thesis (if other than “Master’s thesis”)
address
Address of the school (if not part of field “school”) or country
  • month
  • note

TechReport (Technical Report)

Required fields

  • author
title
Title of the technical report (BibTeX converts it to lowercase)
institution
Sponsoring institution of the report
  • year

Optional if Crossref present but otherwise required fields

Optional fields

type
Type of the report (if other than “technical report”)
number
Number of the technical report
  • address
  • month
  • note

Manual (Technical Manual)

Required fields

title
Title of the manual

Optional if Crossref present but otherwise required fields

Optional fields

  • author
organization
Publishing organization of the manual
  • address
edition
Edition of the manual as a capitalized English word
  • month
  • year
  • note

Unpublished (Unpublished)

Required fields

  • author
title
Title of the unpublished work (BibTeX converts it to lowercase)
  • note

Optional if Crossref present but otherwise required fields

Optional fields

  • month
  • year

Misc (Miscellaneous)

Required fields

Optional if Crossref present but otherwise required fields

Optional fields

  • author
title
Title of the work (BibTeX converts it to lowercase)
howpublished
The way in which the work was published
  • month
  • year
  • note

Bibtex hotkeys

Scimax provides hotkeys for when your cursor is on the @ at the beginning of an entry. Here are the currently defined hotkeys.

(require 'bibtex-hotkeys)
(cl-loop for (key . desc) in bibtex-hotkeys collect (list key desc))
yPaste last entry
UUpdate entry
wMove entry down
TTitle-case article
SSentence-case title
sMove entry up
qJump to field with avy
?Show hotkeys
pJump to previous entry
nJump to next entry
IInspect
lClean entry
kKill the entry
fCopy formatted
eEmail entry
cCopy entry
bOpen in browser

Email utilities

`email-buffer’
email the whole buffer
`email-region’
emails selected region
`email-heading’
email the current heading, including properties, deadlines, etc…
`email-heading-body’
email just the body of the current heading
`email-bibtex-entry’
email the bibtex entry at point

html mail

You can send html email from org-mode.

From an org-file run `org-mime’. You will be prompted for the scope to send, which is either the whole buffer, the heading you are in, or the selected region. Then you will select how to make the email: html will export the text to html and put it in an email, and htmlize will use the htmlize library to generate the html.

Alternatively, you may want to type org-mode directly in an email buffer. Use `org-mime-compose-mail’ to do that.

mail merge

scimax provides some tools to do a mail merge in org-mode. The idea is to run `mail-merge-make-headings’ with a template and data-source to generate a series of org-mode headings that are the messages. You can inspect these, edit them if needed, and then run `mail-merge’ to actually send them. Each heading will be tagged as sent, and marked DONE.

Contacts

scimax defines its own contact management in org-mode. It is compatible with org-contacts, in the sense that it defines a contact as a headline with an :EMAIL: property. It also defines a contact link that integrates with `org-db’.

The principle idea is that `org-db’ has all your contact information in it, where you put it. The contacts can be distributed. You use the command `scimax-contacts’ to search them, and choose what to do with the one you select. The default action is to insert “name” <email> at point. You can also do these actions:

  • open the contact heading
  • insert a contact link
  • assign the contact to a heading task
  • Email a contact

you can mark multiple entries with C-spc, and some commands support acting on the marked entries. Type C-s to see which candidates are marked. Press Enter to select an action on the marked candidates.

contact links

You can insert functional contact links. They use an email as the path, although you can also use an org-id for backward compatibility.

Here is an example contact link: Kitchin, John Robert

If you click on a link you get a menu of options. On opening, if there is only one heading with that email it will open. If there are many candidates you will be prompted to choose which one to open.

You can also enter a contact link with completion, e.g. type C-x C-l and select contact.

contact speed commands

We also define several org heading speed commands for contacts.

(cl-loop for (key . cmd) in scimax-contacts-speed-commands
	 collect (list key (documentation cmd)))
bIf contact has a URL open it in a browser.
cCopy the email address to the clipboard.
eSend an email to the contact.
lStore and copy a link to the contact.
mCopy “name<email>”
?Print contacts speed key help.

Capturing contacts

It can be tedious to enter contacts by hand. You can use `scimax-message-get-emails’ to extract contacts into a user file defined in `scimax-message-org-contacts-file’.

integration with mu4e

If you have mu4e installed, the capture function will automatically capture emails when you reply to them. Also in a message you can type C-c-] to insert a contact.

Google

google-this is installed in scimax. You can use these commands to search for things from Emacs:

C-c / SPC `google-this-region’ C-c / a `google-this-ray’ C-c / c `google-this-translate-query-or-region’ C-c / e `google-this-error’ C-c / f `google-this-forecast’ C-c / g `google-this-lucky-search’ C-c / i `google-this-lucky-and-insert-url’ C-c / l `google-this-line’ C-c / m `google-maps’ C-c / n `google-this-noconfirm’ C-c / r `google-this-cpp-reference’ C-c / s `google-this-symbol’ C-c / t `google-this’ C-c / w `google-this-word’ C-c / <return> `google-this-search’

Magit

Magit is a front-end for git version control. There is a good manual here: info:magit#Top

Basic magit

Create a git repo

info:magit#Repository setup You can create a git repo with M-x magit-init. This will create a git-repo in the current directory.

(magit-init)

help:magit-init

Clone a repo

info:magit#Repository setup

M-x magit-clone

This will prompt you for a repo, which is either a url, or a path, and a path to clone it to.

help:magit-clone

Check the status of your repo

info:magit#Status buffer

Run M-x magit-status to see the status of your repo.

Press “g” in the window to refresh it.

press “n” (next) or “p” (previous) to navigate in this window.

help:magit-status

Stage a file

info:magit#Staging and unstaging

In the magit-status window, put your cursor on an unstaged file and press “s”.

If you press TAB on the file, it will expand to show the changes that are unstaged. Deletions show in red, and additions in green. The changes are in “hunks”.

You can unstage a file with “u”

Commit a file

info:magit#Initiating a commit

info:magit#Editing commit messages

In the magit-status window with some files that are staged, press “c”, review the options, and probably press “c” again. Enter a commit message and type “C-c C-c” to commit it, or “C-c C-k” to cancel it.

Diffs

info:magit#Diffing

From the magit-status window, press “d” then “d” to see what has changed.

See the log

info:magit#Logging

In the magit-status window press “l”, review the options, and press “l” again.

If you want to see only the commits that affected a file, in the magit-status window press “l” then “=f”, enter the filename, and then press “l” again.

Push

info:magit#Pushing

In the magit-status window press “P” then “p”.

Note that tags don’t normally get pushed, but there are options (“T” to push a tag, and “t” to push all tags).

Pull

info:magit#Pulling In the magit-status window press “F” then “p”.

Run a command-line git command manually

info:magit#Running Git manually In the magit-status window, type “!” to get the popup and choose what you want to do (e.g. where to run the command, etc… You do not need to type “git” in the command. Note you can also run a shell command from this interface.

Check the output of the git command

Press “$”

Keybindings

info:magit#Keystroke Index

Intermediate concepts

Checkout an older version of a file

Use M-x magit-checkout-file select the branch, or enter a revision, and then choose a file.

help:magit-checkout-file

help:magit-find-file help:magit-find-file-other-window

Search the commit messages for a pattern

In a magit-status window press “l =g” enter a pattern to grep for, and then press “l”.

Revert a commit

info:magit#Reverting

Got to the log, select the commit and type “V” then “V”.

Tag a version

info:magit#Tagging

press “t” in the magit-status window. You can then create a tag, annotate it, delete tags, and prune them.

Checkout an existing branch.

info:magit#The branch popup

In the magit-status window press “b” then “b” and choose the branch.

To checkout a new branch, in the magit-status window press “b” then “c”. Choose the branch to start from then a name for the new branch.

Merge two branches

info:magit#Merging

In the magit-status window press “m”, then “m” and select the branch to merge into the current one.

Resolving conflicts

info:magit#Resolving conflicts

You will probably also want to get familiar with info:ediff#Top.

On a file in a magit-status window, press “e” to enter the 3-window ediff view. The A window is the version at HEAD, the B window is what is in the index, and the C window is the current version.

Fetching

info:magit#Fetching

In the magit-status window press “f”.

Add a remote

info:magit#Remotes

M-x magit-remote-add then enter an alias, and the url.

Stashing

info:magit#Stashing

Press “z” in the magit-status window

Git blame

In an open file run M-x git-blame, then press b to see commits that add lines. You press q to exit the blame mode.

Advanced concepts

Resetting

info:magit#Resetting

Rebasing

info:magit#Rebasing

Interactive rebasing

Open the log, select the oldest commit you want to rebase on then press “r” and then “i”. Use M-p and M-n to move commits around. Press “s” on any commits you want to squash into the commit above it. C-c C-c will start the commands.

From the magit-status on unpushed commits, you can also press “r” to get the rebase popup.

Reword a commit message

“r w” allows you to reword the commit message.

Create patches

info:magit#Creating and sending patches

In magit-status window, press “W”

“W p” creates patches “W r” makes a pull request. This just creates an email with information in it. It is not a GitHUB request, and it is only useful if there is a public, external copy of the repo.

Cherry-picking

info:magit#Cherry picking

Press “A”

Apply patches

info:magit#Applying patches

Notes about commits

info:magit#Notes

Press “T” to attach a note.

A typical use of notes is to supplement a commit message without changing the commit itself. Notes can be shown by git log along with the original commit message. To distinguish these notes from the message stored in the commit object, the notes are indented like the message, after an unindented line saying “Notes (<refname>):” (or “Notes:” for refs/notes/commits).

Cherry-picking

info:magit#Cherry picking

Project management - projectile

https://github.com/bbatsov/projectile for project management. A project is basically a directory under version control, e.g. git.

Projectile makes it easy to jump to projects, find files in projects, search projects, etc…

Scimax uses `counsel-projectile’ integration as much as possible.

keybindingaction
C-c p pSwitch to a project
C-c p nSwitch project by name
C-c p bSwitch to project buffer
C-c p kKill project buffers
C-c p fSwitch to project file
C-c p dSwitch to project dir
C-c p aSearch project with ag
C-c p gSearch project with grep
C-c p rSearch project with ripgrep

You can see all the key bindings with C-c p C-h.

While in a project, you may want to try:

`counsel-git-grep’ to search all project files for a phrase.

Programming

scimax no longer supports ob-ipython. The old scimax enhancements are now in ./deprecated/. You should be able to use whatever org-mode provides. We have transitioned to emacs-jupyter now.

Jupyter

See ./scimax-jupyter.org for things you can do with emacs-jupyter in scimax.

Emacs-lisp

  • `lispy-mode’ is just amazing.
  • `scimax-org-eldoc’ will generate documentation on elisp libraries in an org-mode format. It is a library you have to require.

RSS feeds

It is a major challenge to keep up with the scientific literature. `elfeed’ is the package we use in scimax for that. It aggregates RSS feeds and provides a pretty easy way to consume them, capture them in to org-mode, search them, and do things with them. scimax preconfigures elfeed with some python, and emacs feeds, and you can easily add new feeds:

The scimax customizations of elfeed are not loaded by default. If you want them, you have to add this to your init files.:

(require 'scimax-elfeed)
(add-to-list 'elfeed-feeds "http://feeds.feedburner.com/acs/accacs")

or if you want entries from a feed to be automatically tagged, e.g. anything from Nature magazine could be tagged with nature:

(add-to-list 'elfeed-feeds '("http://feeds.nature.com/nchem/rss/current" nature))

Elfeed is configured to run every half hour after Emacs is started.

On an entry you can type:

eemail entry to someone
ccapture the entry to org-mode
dadd bibtex entry

In the list of entries you can type:

f,jmarks entry as read
oopen the entry
bopen browser to entry url
sstart a search query (see https://github.com/skeeto/elfeed#filter-syntax)

Miscellaneous scimax utilities

Open a bash window

`bash’ will open an external bash terminal in the current working directory.

Open Finder/Explorer

`explorer’ and `finder’ will open a Windows Explorer or Mac Finder window in the current working directory.

words

Try out `words-hydra/body’ on a selection or word. I bound it to \[words-hydra/body].

ore

This command: `ore’ tells you about the org-element your point is on. It gives some hints on commands you can use on the element, and provides a way for you to write your own notes.

org-show

This is a simple library to make simple presentations in org-mode. See `org-show-help’ for an example use.

External Packages

These are external packages that are included in scimax and might be useful for you.

avy

avy lets you jump to things in Emacs. See https://github.com/abo-abo/avy

There are a lot of avy commands. Click this to see them: elisp:(apropos-command “^avy”)

We use a lot of them in Navigation - navy.

counsel

This is for completing stuff. See http://oremacs.com/2015/04/09/counsel-completion/

In particular, scimax sets these keybindings:

(“M-x” . counsel-M-x) (“C-x b” . ivy-switch-buffer) (“C-x C-f” . counsel-find-file) (“C-h f” . counsel-describe-function) (“C-h v” . counsel-describe-variable) (“C-h i” . counsel-info-lookup-symbol) (“H-c r” . ivy-resume) (“H-c l” . counsel-load-library) (“H-c g” . counsel-git-grep) (“H-c a” . counsel-ag) (“H-c p” . counsel-pt)

swiper

This is a powerful search tool in Emacs. See https://github.com/abo-abo/swiper

C-s is bound to `counsel-grep-or-swiper’ for searching. Try H-s to run `swiper-all’.

undo-tree

There are a few undo features:

C-/undo the last action
C-x uuse the undo-tree (q to quit)
C-?redo

Scientific notebook

scimax provides a scientific notebook capability. Each “notebook” is actually collection of org-files in a “project”. A project is the set of files in a directory that is under git version control. Each project should have a master file (the default is README.org, but you can customize `nb-master-file’ to change this). The master file contains what ever you want, but typically it links to other documents in the project and provides an overview of the project.

You are basically free to structure the notebook however you want. You have all the freedom of org-mode at your fingers to document your work.

We leverage projectile for project management in the notebook. We use magit for version control.

Use `nb-new’ to create a new project. You will be prompted for a name, which must be a valid directory name. The directory will be created in `nb-notebook-directory’. Note that all git repos will be considered projects, so it is not necessary to use `nb-new’ to make a new notebook. It just automates a few things for you.

Use `nb-open’ to open a project. This will open the project to your master file. Previously visited projects are remembered by projectile and should be shown in an ivy completion minibuffer for selection.

Probably you will keep your projects separate from your agenda files, but you still would like to see what tasks the project has? Use `nb-agenda’ while in your project, and it will show you all the tasks in the org-files associated with the project.

Here are some other interesting commands you may want to use.

`counsel-git-grep’
grep for a string in the project
`projectile-find-file’
jump to a file in the project
`projectile-switch-to-buffer’
switch to a project buffer
`projectile-kill-buffers’
kill all the buffers associated with the project

These commands help you navigate to a headline at different scopes (e.g. file, directory or project).

`ivy-org-jump-to-heading’
in the current file
`ivy-org-jump-to-heading-in-directory’
in the current directory
`ivy-org-jump-to-project-headline’
in the project
`counsel-org-tag’
add/remove tags on a headline

You can manage the version control with Magit. There are also keyboard shortcuts for version control. Type C-x v C-h to see them.

  • `vc-next-action’ will do the next logical thing for vc, e.g. add or commit.
  • `vc-diff’ will show you what has changed in the buffer since the last commit.
  • `vc-print-log’ will show you the vc log.

scimax defines these additional key bindings:

C-x v pgit push
C-x v Pgit pull

Archive the notebook with git

Sometimes you may want a zip file of your notebook. You can use the `nb-archive’ command to create a zip file of the current state of your notebook. This can be useful to back up versions of your project, send copies to collaborators who don’t use git, or to create archives for data sharing and supporting information.

Note that only files under version control are archived, and only the current committed state is archived. So, uncommitted files and changes will not be included.

ivy/counsel

scimax currently uses ivy extensively for completion, and enables `ivy-mode’ and `counsel-mode’. The default matching behavior is `ivy–regex-ignore-order’.

When you get an ivy minibuffer, start typing to select what you want, and when it is highlighted, press enter.

There are a couple of nuances though.

  1. To eliminate matches use ! pattern, but you can only use one of these, and it comes last.

I have extended the `ivy-minibuffer-map’ to enable the following:

  1. M-spc will show the actions, and spc to resume the selection process.
  2. C-RET to perform the action and move to the next candidate, and C-u C-RET to perform the action and move to the previous candidate.
  3. M-RET will perform the default action on every candidate from the current selection to the end of the candidates. C-u M-RET does that from the current candidate to the beginning.
  4. s-RET quits the selection buffer with no action.
  5. ? shows you the keymap.

In the ivy selection buffer you can use these commands:

keybindingaction
M-spcShow the actions
spcresume
RETDefault action and exit
C-RETDefault action and move to next line
C-u C-RETDefault action and move to previous line
M-RETDefault action on each candidate from current to end
C-u M-RETDefault action on each candidate from current to beginning
C-u C-u M-RETDefault action on all candidates
s-RETquit with no action
?show keymap help

I use Hyper-c as a prefix map for these commands.

keybindingaction
H-c r`ivy-resume’
H-c l`counsel-load-library’
H-c a`counsel-ag’

counsel-find-file

Here are some additional actions we define for `counsel-find-file’.

keybindingaction
aattach to email
ccopy relative path
4Open in new window
5/fOpen in new frame
CCopy absolute path
dopen in dired
DDelete file
eopen in external app
pinsert relative path
Pinsert absolute path
lrelative org link
Labsolute org link
rrename file
bopen in bash
Fopen in Finder

scimax-hydras

Scimax uses a central hydra to launch a key-driven menu of commonly used commands.

(describe-function 'scimax/body)
scimax/body is an interactive autoloaded Lisp closure in `scimax-hydra.el'.

It is bound to <f12>.

(scimax/body)

For more information check the manuals.

Call the body in the "scimax" hydra.

The heads for the associated hydra are:

"a":    ‘(scimax-open-hydra scimax-applications/body)’,
"b":    ‘(scimax-open-hydra scimax-buffers/body)’,
"e":    ‘(scimax-open-hydra scimax-errors/body)’,
"f":    ‘(scimax-open-hydra scimax-files/body)’,
"g":    ‘(scimax-open-hydra scimax-google/body)’,
"h":    ‘(scimax-open-hydra scimax-help/body)’,
"i":    ‘(scimax-open-hydra scimax-insert/body)’,
"j":    ‘(scimax-open-hydra scimax-jump/body)’,
"k":    ‘(scimax-open-hydra scimax-bookmarks/body)’,
"l":    ‘(scimax-open-hydra scimax-lisp/body)’,
"m":    ‘(scimax-open-hydra scimax-minor-modes/body)’,
"M":    ‘(scimax-open-hydra scimax-smerge/body)’,
"s-m":    ‘scimax-dispatch-mode-hydra’,
"n":    ‘(scimax-open-hydra scimax-navigation/body)’,
"o":    ‘(scimax-open-hydra scimax-org/body)’,
"p":    ‘(scimax-open-hydra hydra-projectile/body)’,
"r":    ‘(scimax-open-hydra scimax-registers/body)’,
"s":    ‘(scimax-open-hydra scimax-search/body)’,
"t":    ‘(scimax-open-hydra scimax-text/body)’,
"v":    ‘(scimax-open-hydra scimax-version-control/body)’,
"w":    ‘(scimax-open-hydra scimax-windows/body)’,
"z":    ‘(scimax-open-hydra scimax-customize/body)’,
",":    ‘scimax-hydra-pop’,
"x":    ‘counsel-M-x’,
"C-s":    ‘save-buffer’,
"/":    ‘undo-tree-undo’,
"\":    ‘undo-tree-redo’,
"8":    ‘(switch-to-buffer "*scratch*")’,
"?":    ‘scimax-hydra-help’,
".":    ‘scimax-dispatch-mode-hydra’,
"u":    ‘(hydra--universal-argument current-prefix-arg)’,
"q":    ‘nil’

The body can be accessed via ‘scimax/body’.

So, instead of C-x C-f to open a file (which still works by the way) you can simply type: f12 ff. Or instead of C-x C-s to save the file, type f12 RET. Each hydra will show you a hint in the minibuffer on which keys do what.

Searching in scimax

Search is a complicated thing because you often have to balance speed, completeness and accuracy. For example, for completeness you would search your whole hard drive, but that would be slow. Scimax offers several ways to search with different scopes.

You also have to consider what to do with the results you find. This is somewhat related to navigation, with the subtle difference being you use a search criteria before you jump to that location.

You are not likely to remember all these. You can access a lot of them from `scimax-search/body’.

Search the current buffer

Use `counsel-grep-or-swiper’ to search the current buffer. You start typing the pattern you are looking for, and when you see it, press enter to jump to that position.

Search all open buffers

Use `swiper-all’ to search all open buffers. You start typing the pattern you are looking for, and when you see it, press enter to jump to that position.

Searching for headings in org buffers or files

These functions provide ivy search interfaces to find headings in org-files with different scopes.

`ivy-org-jump-to-heading’
Jump to heading in the current buffer
`ivy-org-jump-to-heading-in-directory’
Search headings of org-files in current directory
`ivy-org-jump-to-recent-headline’
Jump to org heading in recently opened files
`ivy-org-jump-to-agenda-heading’
Jump to a heading in your agenda files
`ivy-org-jump-to-project-headline’
Jump to a heading in your current project

Searching files that contain patterns

We use a variety of tools to search files for a pattern. These are full text searches of files

`ag’
Use ag to search
`lgrep’
Search for pattern in matching files in dir
`rgrep’
Recursive search for pattern in matching files in dir
`counsel-git-grep’
search for a string in the current git repo
`counsel-pt’
Search current directory using pt
`counsel-ag’
Search current directory using ag
`counsel-rg’
Search current directory using ripgrep

Searching files that are in a project

`counsel-projectile-pt’
Search current project using pt
`counsel-projectile-ag’
Search current project using ag
`counsel-projectile-rg’
Search current project using ripgrep
`projectile-grep’
Run rgrep in a project
`projectile-ripgrep’
Run ripgrep in a project
`projectile-ag’
Run ag in a project

scimax-notebook provides some additional search tools. It is not super clear these are better than the options above.

`nb-search’
like grep, search for pattern in files matching a pattern
`nb-search-all’
search all notebook files
`nb-search-title’
Search org-files by title, author, date or filename

searching journal entries

`scimax-journal’ provides some ways to limit the search of journal entries by date. There are `swiper’ commands. These will open the journal entries and use swiper to search them. The implied range here is the last week, month or year from today.

  • `scimax-journal-swiper-range’
  • `scimax-journal-swiper-last-week’
  • `scimax-journal-swiper-last-month’
  • `scimax-journal-swiper-last-year’

There are also grep based commands

  • `scimax-journal-grep’
  • `scimax-journal-find-regexp-last-week’
  • `scimax-journal-find-regexp-last-month’
  • `scimax-journal-find-regexp-last-year’

search org-files anywhere

`org-db’ is an org-mode database. When it is active every org-mode file you visit will be indexed into a sqlite database. In each file, each headline with its title, tags and properties are stored, and every link in each file is stored.

`org-db’ should be loaded by default in scimax.

This becomes useful because you can then search all of your org-files and jump to different locations.

`org-db-headings’
Jump to a heading
`org-db-contacts’
jump to a heading with an email property
`org-db-files’
open a file in the db
`org-db-recent-files’
open a list of recent files from the db
`org-db-locations’
open a heading with an address property
`org-db-hashtags’
open a hashtag.
`org-db-properties’
search for entries with a property that matches a pattern
`org-db-editmarks’
Search editmarks in your org-files

You can add a lot of files with `org-db-index’.

When active, every time you save an org-file it will be added to a queue to be indexed during idle time.

Structured queries of org-files

If you need sophisticated structured searches, check out `org-ql-select’ and `org-ql-query’ from https://github.com/alphapapa/org-ql.

For example, this searches the current buffer for a heading matching “queries”, and it returns a data structure.

(org-ql-select (current-buffer) '(heading "queries"))
headline(:raw-value Structured queries of org-files :begin 57974 :end 58008 :pre-blank 0 :contents-begin 58009 :contents-end 58009 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 57974 :title (Structured queries of org-files))

Or from a file

(org-ql-select "scimax.org" '(heading "queries"))
headline(:raw-value Structured queries of org-files :begin 57974 :end 58008 :pre-blank 0 :contents-begin 58009 :contents-end 58009 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 57974 :title (Structured queries of org-files))

Or from a list of files.

(org-ql-select '("scimax.org" "README.org") '(or (heading "queries") (heading "users")))
headline(:raw-value Structured queries of org-files :begin 57974 :end 58008 :pre-blank 0 :contents-begin 58009 :contents-end 58009 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 57974 :title (Structured queries of org-files))
headline(:raw-value Windows users :begin 1310 :end 1326 :pre-blank 0 :contents-begin 1327 :contents-end 1327 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1310 :title (Windows users))
headline(:raw-value Mac users :begin 1682 :end 1694 :pre-blank 0 :contents-begin 1695 :contents-end 1695 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1682 :title (Mac users))
headline(:raw-value Alternative manual installation of scimax for Mac users :begin 2268 :end 2327 :pre-blank 0 :contents-begin 2328 :contents-end 2328 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 2268 :title (Alternative manual installation of scimax for Mac users))
headline(:raw-value Linux users :begin 3249 :end 3263 :pre-blank 0 :contents-begin 3264 :contents-end 3264 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 3249 :title (Linux users))

I don’t use this library enough.

Navigation in scimax

Navigation is almost as complex as searching, and it means moving your cursor to the place you want it to be. Yes, you can use a mouse or arrow keys. There are often faster ways to get what you want though. In scimax see `scimax-navigation/body’ which provides ways to navigate by:

  • character
  • word
  • sentence
  • paragraph
  • line
  • buffer

See also `scimax-jump/body’ which provides ways to jump to all kinds of things like:

  • chars
  • words
  • sentences
  • paragraphs
  • org headings
  • links
  • recent files
  • windows
  • buffers and buffer positions
  • lines
  • symbols

Many of those open hydra menus that further refine where those things are, e.g. below or above the current position.

Appendix

`scimax-help’ will open this document.

Emacs

Emacs is described as “self-documenting”, and it provides a lot of introspective ways to access documentation. A classic way to access help is via “info” pages. These are hyperlinked documents containing a lot of detail about Emacs and its libraries.

Emacs-manual: info:Emacs

ngoto next page
uup a node
dMain directory
?list of keys and commands
qquit

Emacs libraries: info:dir Emacs-lisp manual: info:elisp

org-mode manual: info:org

Getting help on Emacs functions

To get help on functions use: `counsel-describe-function’ and on variables use `counsel-describe-variable’.

If you do not know exactly what you are looking for try: `counsel-apropos’. This covers commands, functions, variables, faces, classes, and some other things.

Getting help on system commands

If you have man pages installed (Linux/Mac for sure, maybe on windows) you can access them easily via Emacs. I like to read man pages in Emacs with `woman’ although `man’ is also good.

Note while on a man page you can use these keys:

m Prompt to retrieve a new manpage. r Retrieve reference in SEE ALSO section. M-n Jump to next manpage in circular list. M-p Jump to previous manpage in circular list. n Jump to next manpage section. p Jump to previous manpage section. g Go to a manpage section. s Jumps to the SEE ALSO manpage section. q Deletes the manpage window, bury its buffer. k Deletes the manpage window, kill its buffer. ? Prints this help text.

scimax also defines a link for man pages.

Manpage for BSDTAR(1)

What happens if I press a key?

The `describe-key’ function will prompt you for a key sequence or you can click on a menu item to see what it does.

The `describe-mode’ function will provide a full list of all the keybindings in the current buffer.

In org-mode the `ore’ command will give you information about the org-element under your cursor, including some commands that you can use at the point. You can also customize this by adding your own notes (click on User documentation in the help buffer).

How do I learn shortcuts?

If you use the menus, they will often have the shortcut in the menu.

The help functions usually show you if a shortcut is defined for a command.

If you really want to define your own keys, see `define-key’ and `global-set-key’.

Make yourself some notes in org-mode using `emacs-keybinding-command-tooltip-mode’.

Using only parts of scimax

Suppose you have your own Emacs setup already and only want to use a few parts of scimax without loading the whole thing. No problem. Just add the scimax dir to your load-path, and require as you like.

For example, to just use the scimax ipython enhancements (#191 (comment)), this might work:

(add-to-list 'load-path "path/to/scimax-dir")
(require 'ob-ipython)
(require 'scimax-org-babel-ipython-upstream)

Note that a lot of packages are installed in ./packages.el and you may have to inspect the source of the packages you are requiring to make sure all the dependencies get installed.

Archive

Navigation - navy

`navy’ opens a hydra for navigation. The following keys are bound to commands that do something in the following senses

jleft
lright
iup
kdown

The default mode is character mode, and you can change the mode with single characters, include a word mode (w), sentence (s), paragraph (p), page (g), line (n) and sexp (x) mode. These modes allow you navigate forward and backward by those elements. They also define binding

I have tried to make the following keys consistent:

;avy-goto-char-2
avy-goto-line
<goto point-min
>goto point-max

There are some useful bindings in `navy’ also.

rcounsel-git-grep
aswiper-all

Export the info manual

(require 'ox-texinfo)
(org-texinfo-export-to-info)

Local Variables