The package dired-quick-sort gives you a pop-up menu with lots of useful options to sort your dired view by name, time, size and extension, and optionally group all of the directories together at the top of the listing. This can be a bit fiddly and
dired-quick-sort makes it really easy.
Install the package with
and then hit
S in a dired buffer to bring up the sorting menu. Your sorting choice is then remembered for new dired buffers.
I was recently managing a set of interviews and I had my notes on all of the candidates in a single org file, with each candidate under their own top-level headline:
* J Kepler
- Nice work on orbits
* I Newton
- Hard to work with
* C Sagan
- Good communication skills
However, I wanted to generate a separate pdf file for each candidate that I could circulate to interviewers (since each interviewer was only interviewing a subset of applicants).
I came across this stackexchange answer that demonstrated how to build a function to export top level headlines to separate files. There are a few variations on that page, and I put together the slightly tweaked version below. All of the credit goes to stackexchange user
itsjeyd for a very detailed answer. In my version I hard code it to export to pdf, save the file first, and apply the export options from the parent file to each of the new files that are created. The new files have a name taken from the headline, with spaces replaced by underscores, unless the
:EXPORT_FILE_NAME: property is set for a headline.
;; export headlines to separate files
(defun org-export-headlines-to-pdf ()
"Export all subtrees that are *not* tagged with :noexport: to
Subtrees that do not have the :EXPORT_FILE_NAME: property set
are exported to a filename derived from the headline text."
(let ((modifiedp (buffer-modified-p)))
(goto-char (re-search-forward "^*"))
(let ((export-file (org-entry-get (point) "EXPORT_FILE_NAME")))
(replace-regexp-in-string " " "_" (nth 4 (org-heading-components)))))
(org-latex-export-to-pdf nil t)
(unless export-file (org-delete-property "EXPORT_FILE_NAME"))
I’ve written before about the wonderful multiple-cursors package. Usually I use it by hitting
M-. (defined using the setup below) to fire off multiple cursors on successive lines or on successive occurrences of the current string (if some text is selected). I also use
M-, if I want to remove some of those cursors. This covers 99% of my use of multiple cursors.
However, occasionally, the best way to get the cursors where you want them is with the mouse. With the following code,
C-S-<left mouse click> adds a new cursor.
:bind (("M-." . mc/mark-next-like-this)
("M-," . mc/unmark-next-like-this)
("C-S-<mouse-1>" . mc/add-cursor-on-click)))