Use dired as a file manager in combination with org-link

This commit is contained in:
Gerard Vermeulen 2022-02-05 14:04:41 +01:00
parent 2a60ff0e98
commit 5ea766e3d7

View File

@ -337,6 +337,37 @@ background.
"My face to show a here-document.")
#+end_src
** [[info:emacs#Dired][Dired: directory editor as file manager (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:file-manager
:END:
Listing [[lst:customize-dired]] makes the directory editor sort entries
alphabetically after grouping the directories before grouping the files by
extension.
#+caption[Customize =dired=]:
#+caption: Customize =dired=.
#+name: lst:customize-dired
#+begin_src emacs-lisp
(with-eval-after-load 'dired
(custom-set-variables
;; | switch | action |
;; |--------+----------------------------------------|
;; | -a | also list hidden entries |
;; | -l | use a long listing format |
;; | -X | sort alphabetically by entry extension |
;; | -G | skip long listing format group names |
;; | -1 | list one entry per line |
'(dired-listing-switches "-alGX1 --group-directories-first")))
(with-eval-after-load 'files
(custom-set-variables
;; Ensure the use of `GNU-ls' from `coreutils' on darwin.
'(insert-directory-program (or (executable-find "gls")
(executable-find "ls")))))
#+end_src
* [[info:emacs#Package Installation][Install the selected packages (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:install-selected-packages
@ -1217,6 +1248,18 @@ and =org=.
:CUSTOM_ID: sec:making-org-hyperlink-types
:END:
Listing [[lst:customize-org-link]] configures =org-link= to use relative file path
links.
#+caption[Customize =org-link=]:
#+caption: Customize =org-link=.
#+name: lst:customize-org-link
#+begin_src emacs-lisp
(with-eval-after-load 'ol
(custom-set-variables
'(org-link-file-path-type 'relative)))
#+end_src
Listing [[lst:org-ref-like-org-link-types]] defines =org-link= types for backwards
compatibility with [[https://github.com/jkitchin/org-ref][org-ref]]. Listing [[lst:define-org-pdfview-link-type]] uses ideas
from the definition of =docview-org-link= and =doi-org-link= types to define an