Compare commits

...

2 Commits

Author SHA1 Message Date
1ccd44ba3e Improve "Reading PDF files" section 2024-04-17 10:25:27 +02:00
d3f50dde54 Improve `dired' section 2024-04-17 10:24:28 +02:00

View File

@ -893,11 +893,11 @@ deleting, opening, renaming, and viewing files and directories, but the
integration of [[info:emacs#Dired][dired (info)]] in Emacs is obviously much better than the integration of [[info:emacs#Dired][dired (info)]] in Emacs is obviously much better than the
integration of [[https://github.com/ranger/ranger#readme][ranger]] in Emacs. integration of [[https://github.com/ranger/ranger#readme][ranger]] in Emacs.
For instance, this setup allows to insert an =org-mode= link to an poorly For instance, this setup allows to insert an =org-mode= link to a file
identified file containing a specific image into an =org-mode= buffer by means containing a specific image into an =org-mode= buffer by means of the facilities
of the facilities of [[info:emacs#Dired][dired (info)]] as follows: of [[info:emacs#Dired][dired (info)]] as follows:
1. Type {{{kbd(C-x d)}}} to open the directory containing the pooly identified 1. Type {{{kbd(C-x d)}}} to open the directory containing the file with the
file with the specific image in a =dired-mode= buffer. specific image in a =dired-mode= buffer.
2. Start searching for the specific image by navigating to the name of any image 2. Start searching for the specific image by navigating to the name of any image
file. file.
3. Type {{{kbd(v)}}} to switch to view the file in an =image-mode= buffer. 3. Type {{{kbd(v)}}} to switch to view the file in an =image-mode= buffer.
@ -2032,8 +2032,9 @@ files produced with LaTeX to the original LaTeX sources. In order to use
[[https://github.com/vedang/pdf-tools][pdf-tools]], you have to type {{{kbd(M-x pdf-tools-install)}}} after installation [[https://github.com/vedang/pdf-tools][pdf-tools]], you have to type {{{kbd(M-x pdf-tools-install)}}} after installation
of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/][MELPA]] or after each update of [[https://github.com/freedesktop/poppler][poppler]] to build or rebuild the of [[https://github.com/vedang/pdf-tools][pdf-tools]] from [[https://melpa.org/][MELPA]] or after each update of [[https://github.com/freedesktop/poppler][poppler]] to build or rebuild the
=epdfinfo= executable that serves the [[https://en.wikipedia.org/wiki/PDF][PDF]] files to Emacs. Table =epdfinfo= executable that serves the [[https://en.wikipedia.org/wiki/PDF][PDF]] files to Emacs. Table
[[tab:pdf-tools-commands-and-bindings]] lists important local map ~pdf-tools~ key [[tab:pdf-view-mode-commands-and-bindings]] lists important local map key bindings
bindings. in ~pdf-view-mode~. Note: ~image-save~ saves the page under point to a ~png~
file.
#+caption[Setup =pdf-tools=]: #+caption[Setup =pdf-tools=]:
#+caption: Setup =pdf-tools=. #+caption: Setup =pdf-tools=.
@ -2041,14 +2042,9 @@ bindings.
#+begin_src emacs-lisp -n :results silent #+begin_src emacs-lisp -n :results silent
(when (and (ensure-package-installation 'pdf-tools) (when (and (ensure-package-installation 'pdf-tools)
(fboundp 'pdf-loader-install)) (fboundp 'pdf-loader-install))
;; `pdf-loader-install' is the lazy equivalent of `pdf-tools-install': ;; Use `pdf-loader-install' for faster startup than with `pdf-tools-install'.
;; see the README file.
(pdf-loader-install) (pdf-loader-install)
(with-eval-after-load 'pdf-outline
;; The `image-save' key binding is now "i o".
(keymap-set pdf-outline-minor-mode-map "O" #'pdf-outline))
(with-eval-after-load 'pdf-view (with-eval-after-load 'pdf-view
(setopt pdf-view-display-size 'fit-page (setopt pdf-view-display-size 'fit-page
pdf-view-use-scaling (eq system-type 'darwin)))) pdf-view-use-scaling (eq system-type 'darwin))))
@ -2056,17 +2052,17 @@ bindings.
#+attr_latex: :booktabs yes :float table #+attr_latex: :booktabs yes :float table
#+caption[Pdf-tools commands with key bindings]: #+caption[Commands with local key bindings in ~pdf-view-mode~]:
#+caption: Pdf-tools commands with key bindings. #+caption: Commands with local key bindings in ~pdf-view-mode~.
#+name: tab:pdf-tools-commands-and-bindings #+name: tab:pdf-view-mode-commands-and-bindings
|---------------------------------+--------------| |---------------------------------+----------------|
| command | key binding | | command | key binding |
|---------------------------------+--------------| |---------------------------------+----------------|
| *pdf-outline* | {{{kbd(o)}}} | | *image-save* | {{{kbd(i o)}}} |
| *pdf-outline* | {{{kbd(O)}}} | | *pdf-outline* | {{{kbd(o)}}} |
| *pdf-view-fit-height-to-window* | {{{kbd(H)}}} | | *pdf-view-fit-height-to-window* | {{{kbd(H)}}} |
| *pdf-view-fit-width-to-window* | {{{kbd(W)}}} | | *pdf-view-fit-width-to-window* | {{{kbd(W)}}} |
|---------------------------------+--------------| |---------------------------------+----------------|
* Writing * Writing
:PROPERTIES: :PROPERTIES: