Emacs Elements ๋Š” ์˜ฌํ•ด ๋‚˜์—๊ฒŒ ๊ฐ€์žฅ ๋„์›€์ด ๋งŽ์ด ๋œ Emacs ์œ ํŠœ๋ธŒ ์ฑ„๋„์ด๋‹ค. ๊ทธ ์ค‘์—์„œ๋„ "Changes in Emacs 29" ๊ณผ PDF ํ™œ์šฉ๋ฒ•, Emacs ์„ค์น˜ ๋ฐฉ๋ฒ• ๋“ฑ์€ ์•„์ฃผ ์œ ์šฉํ•œ ์ตœ์‹  ํŒ์ด๋‹ค.

๋‹ค์Œ์€ Emacs Elements ์˜ ๊ธ€๊ณผ ์˜์ƒ์„ ๋ฒˆ์—ญํ•œ ๊ฒƒ์ด๋‹ค.

Emacs Elements ์†Œ๊ฐœ

Emacs Elements is a channel that focuses on getting Vanilla Emacs to work powerfully for you. How can I get things done in Emacs? Emacs is the world's most powerful text editor, and can be overwhelming for beginners. I show you how you can be up and running in a moment without too much difficulty.

Emacs Elements Youtube ๋ฅผ ๊ฐ€๋ณด๋ฉด ๋งŽ์€ ์˜์ƒ์ด ์žˆ๋‹คย ^fn:1. ์ด ๋ถ„์€ ์˜ฌํ•ด ์ดˆ๋ถ€ํ„ฐ Emacs ๊ด€๋ จ ์˜์ƒ์„ ์˜ฌ๋ฆฌ๋Š” ๋ถ„์ด์‹ ๋ฐ ์ด๋งฅ์Šค๋ฅผ ์•„์ฃผ ์˜ค๋žซ๋™์•ˆ ์‚ฌ์šฉํ•ด ์˜ค์‹  ํŒŒ์›Œ ์œ ์ €๋‹ค. ๋‚ด๊ฐ€ ํŒŒ์•…ํ•œ ๋ฐ”๋กœ๋Š” ํ• ์•„๋ฒ„์ง€๋‹ค. ์–ผ๋งˆ ์ „์— ๊ตฌ๋…์ž 1000 ๋ช… ๋ŒํŒŒ ๊ธฐ๋…์œผ๋กœ ์ง‘์—์„œ ์ฟตํ‘ธ๋ฅผ ์‹œ์—ฐํ•˜์…จ๋Š”๋ฐ "์•„๋ตค์•„๋ตค~~" ํ•˜๋ฉด์„œ ๋ฐœ์ฐจ๊ธฐ์™€ ์ •๊ถŒ ์ง€๋ฅด๊ธฐ๋ฅผ ๋ดค๋˜ ๊ธฐ์–ต์ด ์žˆ๋‹ค. ์ง€๊ธˆ ๋ณด๋‹ˆ ์ˆจ๊น€ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜์‹  ๊ฒƒ ๊ฐ™๋‹ค.

์ด ๋ถ„์€ Emacs ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ํ…์ŠคํŠธ ์—๋””ํ„ฐ ์—ญ์‚ฌ๋ฅผ ํ•จ๊ป˜ ํ•˜์‹  ๋ถ„์ด๋‹ค. Teco ์™€ ๊ฐ™์€ ๊ณ ์ „ ์—๋””ํ„ฐ ์ด์•ผ๊ธฐ๋„ ํ•˜์‹œ๋Š” ๊ฒƒ์„ ๋ณด๋‹ˆ ์‚ฐ์ฆ์ธ์ด ์•„๋‹๊นŒ ์‹ถ๋‹ค. ์ด ๋ถ„์€ Spacemacs, Doom ์ด๋Ÿฐ ๋ฐฐํฌํŒ์€ ์•„์˜ˆ ์‚ฌ์šฉํ•œ ์ ๋„ ์—†์œผ์‹ค ๊ฑฐ๋‹ค. ๊ทธ๋ƒฅ Emacs ๋‹ค์šด ๋ฐ›์•„์„œ ์„ค์ • ํŒŒ์ผ ์—ด๊ณ  "์˜ค๋Š˜์€ Hydra ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณผ๊ฒŒ์š”!" ํ•˜๊ณ  ํ‚ค๋ณด๋“œ ๋‘๋“œ๋ฆฐ๋‹ค. Holy-mode ์‚ฌ์šฉ์ž๋กœ์„œ Evil-mode (Vim ๋ฐ”์ธ๋”ฉ)์€ ์ด์•ผ๊ธฐ๋Š” ๊ธฐ๋Œ€ ํ•˜๋ฉด ์•ˆ ๋œ๋‹ค.

์™œ ๊ตฌ๋…ํ•ด์•ผ ํ•˜๋Š”๊ฐ€? ์ด๋Ÿฐ ๋ถ„๋“ค์„ ๊ตฌ๋…ํ•˜๋‹ค ๋ณด๋ฉด ์œ ํŠœ๋ธŒ์— ์˜จํ†ต ํ…์ŠคํŠธ ์—๋””ํ„ฐ ๊ด€๋ จ ์˜์ƒ๋งŒ ๋‚˜์˜จ๋‹ค. ์œ ํŠœ๋ธŒ๋ฅผ ์•ˆ ํ•˜๊ฒŒ ๋˜๊ฑฐ๋‚˜ ์ผ์ทจ ์›”์žฅ์„ ํ•˜๊ฒŒ ๋  ๊ฒƒ์ด๋‹ค. ๋†๋‹ด์ด๋‹ค. ์ด๋Ÿฐ ๋ถ„๋“ค์„ ๋ณด๋ฉด์„œ ์ด๋งฅ์Šค๊ฐ€ ์ง€๋‹Œ ๋ผ์ดํ”„ ํ•ดํ‚น ๋„๊ตฌ์˜ ๊ฐ€์น˜๋ฅผ ๋ณด๊ฒŒ ๋œ๋‹ค. ์ด๋ ‡๊ฒŒ ๋Š™๊ณ  ์‹ถ๋‹ค. ๋‚ด๊ฐ€ ์ฃผ๋ชฉํ•˜๋Š” ์ ์€ ์ฟตํ‘ธ ์‹œ์—ฐ์ด๋‹ค. ํ‚ค๋ณด๋“œ ์—ฐ์†๊ธฐ๋ฅผ ๋งค์ผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒŒ์ž„ํˆด์„ ๊ณ„์† ์‚ฌ์šฉํ•˜๋‹ค ๋ณด๋ฉด ์œ ํƒœ๋ณด์กด ์ด ์ž์—ฐ์Šค๋Ÿฝ๋‹ค. ์œ ์พŒํ•œ ์‚ถ์ด๋กœ๋‹ค!

caption="<span class="figure-number">Figure 1: modus-vivendi-tinted themes with org-clock (tab-bar)" width="80%" >

Changes in Emacs 29.1

================================ https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.29 Enhanced Image Features in Emacs 29 - YouTube

5000 line document

Ahead-of-time native compilation can now be requested using '--with-native-compilation=aot' during configuration. This option requests ahead-of-time (AOT) native compilation, which means that all the Lisp files in the Emacs tree will be compiled to native code during the build and installation process.

Support for the WebP image format has been added.

Emacs can be built with pure GTK, allowing it to work on any window system supported by GDK.

Emacs now supports Unicode Standard version 15.0.

New command to change the font size globally. To increase the font size, type 'C-x C-M-+' or 'C-x C-M-='; to decrease it, type 'C-x C-M--'; to restore the font size, type 'C-x C-M-0'.

New command 'find-sibling-file'. This command jumps to a file considered a "sibling file", which is determined according to the new user option 'find-sibling-rules'.

New command 'rename-visited-file'. This command renames the file visited by the current buffer by moving it to a new name or location, and also makes the buffer visit this new file.

'delete-process' is now a command.

'restart-emacs'

'count-words' will now report buffer totals if given a prefix. Without a prefix, it will only report the word count for the narrowed part of the buffer.

'count-words' will now report sentence count when used interactively.

'write-file' will now copy some file mode bits. If the current buffer is visiting a file that is executable, the 'C-x C-w' command will now make the new file executable, too.

Emacs now has several new methods for inserting Emoji.๐Ÿ˜€ The Emoji commands are under the new 'C-x 8 e' prefix. New command 'emoji-insert' (bound to 'C-x 8 e e' and 'C-x 8 e i'). New command 'emoji-recent' (bound to 'C-x 8 e r').

New command-line option '-r'/'--reuse-frame' for emacsclient. With this command-line option, Emacs reuses an existing graphical client frame if one exists; otherwise it creates a new frame.

'M-SPC' is now bound to 'cycle-spacing'. Formerly it invoked 'just-one-space'. The actions performed by 'cycle-spacing' and their order can now be customised via the user option 'cycle-spacing-actions'.

New user option 'copy-region-blink-predicate'. By default, when copying a region with 'kill-ring-save', Emacs only blinks point and mark when the region is not denoted visually, that is, when either the region is inactive, or the 'region' face is indistinguishable from the 'default' face.

New user option 'dired-free-space'. Dired will now, by default, include the free space in the first line instead of having it on a separate line.

doc-view can now generate SVG images when viewing PDF files. If Emacs is built with SVG support, doc-view can generate SVG files when using MuPDF as the converter for PDF files, which generally leads to sharper images.

New command 'package-update'. This command allows you to upgrade packages without using 'M-x list-packages'.

New command 'package-update-all'. This command allows updating all packages without any queries.

New commands 'package-recompile' and 'package-recompile-all'. These commands can be useful if the ".elc" files are out of date (invalid byte code and macros).

New command 'package-vc-install'. Packages can now be installed directly from source by cloning from their repository.

New command 'scratch-buffer'. This command switches to the "scratch" buffer. If "scratch" doesn't exist, the command creates it first. You can use this command if you inadvertently delete the "scratch" buffer. (global-set-key (kbd "<f8>") 'scratch-buffer)

New commands for navigating completions from the minibuffer. When the minibuffer is the current buffer, typing 'M-<up>' or 'M-<down>' selects a previous/next completion candidate from the "Completions" buffer and inserts it to the minibuffer.

'recentf-mode' now uses abbreviated file names by default. This means that e.g. "/home/foo/bar" is now displayed as "~/bar".

New command 'recentf-open'. This command prompts for a recently opened file in the minibuffer, and visits it.

use-package: Declarative package configuration. use-package is now shipped with Emacs.

New commands 'image-crop' and 'image-cut'.

New theme 'leuven-dark'.

Enhanced Image Features in Emacs 29

================================= New commands 'image-crop' and 'image-cut'

i c i x

image-dired-slideshow-start

'S'

Image-Dired now displays thumbnails for PDF files

The command 'bookmark-set' (bound to 'C-x r m') is now supported in the thumbnail view

'image-dired-thumb-size' increased to 128

Navigation and marking commands now work in image display buffer.

The following new bindings have been added:

  • 'n', 'SPC' => 'image-dired-display-next'
  • 'p', 'DEL' => 'image-dired-display-previous'
  • 'm' => 'image-dired-mark-thumb-original-file'
  • 'd' => 'image-dired-flag-thumb-original-file'
  • 'u' => 'image-dired-unmark-thumb-original-file'

New command 'image-dired-unmark-all-marks'.

It removes all marks from all files in the thumbnail and the associated Dired buffer, and is bound to 'U' in the thumbnail and display buffer.

New command 'image-dired-do-flagged-delete'.

It deletes all flagged files, and is bound to 'x' in the thumbnail buffer. It replaces the command 'image-dired-delete-marked', which is now an obsolete alias.

PDF support.

Image-Dired now displays thumbnails for PDF files. Type 'RET' on a PDF file in the thumbnail buffer to visit the corresponding PDF.

PDF Software in Linux

https://youtu.be/C7HWTLXD9L4

  • This video is only partly about Emacs

  • Review and a rant

  • PDF viewers aplenty: evince, okular, Google Chrome

  • Okular helpful for filling out forms and inserting signatures

    • (Create your signature in Gimp and make it transparent)
    • gimp ๋ฅผ ์„ค์น˜ํ•˜๋ผ.
  • Okular also is able to read text aloud easily.

  • Another excellent option is xournal++, which also allows one to reorder pages in a pdf, something you cannot do in okular or evince.

  • OCR tesseract. Command line tool.

  • This script will convert all pdfs in a given folder to txt

  • gImageReader also does this through a graphic user interface, and allows good control.

  • pdfarranger - rearranges pages

  • The Emacs package pdf-tools can help view, annotate, and bookmark PDFs and teh built in image-dired can sort through PDFs. Its pdf editing capabilities are lacking.

  • But there is a problem: some pdfs are not readable in ANY Linux application e.g.my IRP-5 file One has to use Adobe Acrobat to view the file The only other PDF viewer that will show the file is Master PDF Editor ๋‹ค์šด๋กœ๋“œ https://code-industry.net/free-pdf-editor/#get

  • Installing a working version of Adobe Reader on Linux is near impossible. Much of the functionality has been removed. You cannot print an abnormal pdf to pdf.

  • Adobe Acrobat will not install on Linux and that is by design of Adobe. It is not because wine cannot handle it.

  • It is only available through a Virtual Machine

  sudo apt install okular okular-extra-backends -y
  sudo apt install xournalpp -y
  sudo apt install -y tesseract-ocr tesseract-ocr-kor tesseract-ocr-eng
  sudo apt install -y tesseract-ocr-kor-vert tesseract-ocr-script-hang tesseract-ocr-script-hang-vert
 
  sudo apt install -y poppler-utils
  sudo apt install -y pdfarranger
 
  # GIMP
  sudo apt install -y gimp gimp-data-extras gimp-help-ko gimp-help-en
 
  # Inkscape
  sudo apt install -y inkscape
 
  # pip install pdf2image
In the poppler-utils packages there is the utility pdftoppm capable of converting pages from a pdf file to ppm, png or jpeg format:
 
pdftoppm -png file.pdf prefix
will produce prefix-01.png etc. for each page. By default the resolution is 150dpi. Increase the resolution (for higher quality output) as follows:
 
pdftoppm -rx 300 -ry 300 -png file.pdf prefix
 
To print only one page, use
 
pdftoppm -f N -singlefile -png file.pdf prefix
where N is the page number, beginning with 1.

SHELL

# sudo apt install okular okular-extra-backends -y
# sudo apt install xournalpp -y
# sudo apt install -y tesseract-ocr tesseract-ocr-kor tesseract-ocr-eng
# sudo apt install -y tesseract-ocr-kor-vert tesseract-ocr-script-hang tesseract-ocr-script-hang-vert
# sudo apt install -y poppler-utils
 
if [ ! -d "$1" ]; then
        echo -e "$1 is not a valid directory"
        exit 1
fi
 
PWD=$(pwd)
 
# Set the default directory
# default_dir="/home/red/Desktop/pdfs"
# default_dir="~/Documents/pdf/"
default_dir=$(cd "$1" ; pwd)
echo -e "DIR-PATH $src"
 
# Navigate to the default directory
cd "$default_dir"
 
# List all PDF files (both lowercase and uppercase) in the directory
pdf_files=( $(find . -maxdepth 1 -iname "*.pdf") )
 
# Prompt the user to choose a PDF file, or select "All" to convert all files
echo "Select a PDF file or choose 'All' to convert all files:"
select pdf_choice in "${pdf_files[@]}" "All"; do
        break
done
 
if [[ "$pdf_choice" == "All" ]]; then
        files_to_convert=("${pdf_files[@]}")
else
        files_to_convert=("$pdf_choice")
fi
 
for pdf_file in "${files_to_convert[@]}"; do
        # Extract the name of the PDF file without the extension
        pdf_name=$(basename "$pdf_file" .pdf)
 
        # Convert the PDF to TIFF images
        /usr/bin/pdftoppm -tiff "$pdf_file" "${pdf_name}_output_"
 
        # Use Tesseract OCR to convert TIFF images to text and save it in a text file
        for file in "${pdf_name}_output_"*.tif; do
                /usr/bin/tesseract "$file" "${file%.*}" -l eng
        done
 
        # Concatenate all text files into a single file with the same name as the PDF
        cat "${pdf_name}_output_"*.txt > "${pdf_name}_raw.txt"
 
        # Post-process the text file to replace "|" with "I"
        sed 's/|/I/g' "${pdf_name}_raw.txt" > "${pdf_name}.txt"
 
        # Remove temporary text files
        # rm "${pdf_name}_output_"*.txt
        # rm "${pdf_name}_raw.txt"
 
        # Remove temporary TIFF files
        # rm "${pdf_name}_output_"*.tif
 
        echo "The text from the PDF '$pdf_name' has been saved to '${pdf_name}.txt'"
done
 
cd "$PWD"

How to insert pairs quickly without fancy packages

For this solution to work you must ensure that delete-selection-mode is enabled.

SPC v expand-region ์œผ๋กœ ์„ ํƒํ•œ๋‹ค. evil ์ด ๋ณ„๋กœ ์ธ๊ฐ€? ์ ๋‹นํ•œ ์ปค๋งจ๋“œ๋ฅผ ๋ชจ๋ฅด๋Š” ๊ฒƒ์ผ ๋ฟ์ด๋‹ค. ๋‹ค์Œ ๋ผ์ธ์— ๋ณต์‚ฌํ•˜๋‹ˆ๊นŒ ๋ฌธ์žฅ์„ ๋ณต๋ถํ•˜๊ณ  ๋ณผ๋“œ๋กœ ๋ฐ”๊พธ๋Š”๊ฒŒ ์‰ฝ์ง€ ์•Š๋‹ค. ์•„๋‹ˆ๋ฉด ๊ทธ๋ƒฅ org ์ปค๋งจ๋“œ๋กœ ํ•˜๋ฉด ๋œ๋‹ค. ์ด๊ฒŒ ํŽธํ•˜๋‹ค.

๊ธฐ๋ณธ M-w kill-ring-save ์ด๋‹ค. ๋ณต์‚ฌํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๊ฒŒ ๊ธฐ๋ณธ ํ‚ค ํ•˜๋‚˜๋ฅผ ์žก๊ณ  ์žˆ๋Š” ๊ฒƒ์€ ์—„์ฒญ๋‚œ ์ผ์ด๋‹ค. ๊ท€ํ•œ ํ‚ค๋ฐฐ์—ด์„ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋งŒํผ ์ค‘์š”ํ•˜๋‹ค๋Š” ๋ง์ผ๊ฑฐ๋‹ค.

kill-sentence kill- ์‹œ๋ฆฌ์ฆˆ๊ฐ€ ๋งŽ์ด ์žˆ๋‹ค. ๋‹ค์Œ์— ํ•จ์ˆ˜๋ฅผ ๊ธฐ์กด ๊ฒƒ์„ ๊ต์ฒดํ•˜๋ผ๋Š” ๊ฒƒ์ด๋‹ค. ์ข‹์€ ๊ฒƒ์ธ๊ฐ€?! ์•„์˜ˆ kill ์‹œ๋ฆฌ์ฆˆ๋ฅผ ๋ญ‰ํƒฑ์ด๋กœ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์€ ์–ด๋–ค๊ฐ€ ์‹ถ๋‹ค. ์—ฌํŠผ ๊ธฐ์กด ์„ธํŒ… ๋ณด๋‹ค๋Š” ํŽธํ•˜๋‹ค. ๊ทผ๋ฐ ์–ผ๋งˆ๋‚˜ ์“ธ ์ง€ ๋ชจ๋ฅด๋Š” ์ผ.

(defun my-kill-ring-save-keep-selection ()
  (interactive)
  (when (use-region-p)
    (let ((beg (region-beginning))
          (end (region-end)))
      (kill-ring-save beg end)
      (setq deactivate-mark nil))))
 
(global-set-key (kbd "M-w") 'my-kill-ring-save-keep-selection)

Integer placerat tristique nisl. BOLD

Integer placerat tristique nisl. ITALICS

"Integer placerat tristique nisl." QUOTES

(global-set-key (kbd "M-w") 'my-kill-ring-save-keep-selection) MARK AS CODE

Related-Notes

References