Emacs. Desire. Конфигурация

Конфигурация для пакета desire.

Содержание

1 Каталоги конфигурации

2 Установка переменных

3 Конфигурационные файлы

3.1 Заголовок

  • В файле rc.packages.el находится список используемых пакетов.
  • Заголовок файла:
 1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; origami-fold-style: triple-braces; -*-
 2;;; rc.packages.el
 3
 4;;; Commentary:
 5
 6;;
 7;;  File id
 8;;
 9;;      Copyright (C)  2002-2024 Dmitry S. Kulyabov
10;;      Keywords:      rc.packages
11;;      Author:        Dmitry S. Kulyabov <yamadharma@gmail.com>
12;;      Maintainer:    Dmitry S. Kulyabov <yamadharma@gmail.com>
13;;
14;;      This code is free software in terms of GNU Gen. pub. Lic. v3 or later
15;;
16;;  Description
17;;
18;;
19
20;;; Change Log:
Распечатка 1: rc.packages.el
  • Файл:
 1
 2;;; Code:
 3
 4;; (desire-conf 'tiny)
 5(desire-conf 'personal)
 6;;
 7;; Mule
 8;;
 9(desire-conf 'mule)
10;;(desire-conf 'mule-fontset)
11;; ----------------------------------------------------------------------
12;;
13;;{{{ Xemacs
14
15(if (string-match "XEmacs" emacs-version)
16    (desired 'xemacs))
17
18;;}}}
19;;; Package {{{
20
21;;; Packaging
22(desire 'package)
23
24;;; Build and install your Emacs Lisp packages on-the-fly and directly from source
25(desire 'quelpa)
26
27;;; A declarative package management system with a command line interface
28;; (desire 'straight)
29
30;;; Auto update packages
31(desire 'auto-package-update)
32
33;;;}}}

3.2 Компиляция файлов

3.2.1 compile-angel

  • Подключим пакет:
    1;;; compile-angel.el
    2(desire 'compile-angel)
    
    Распечатка 2: rc.packages.el
  • Настроим начальную конфигурацию:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Compile Emacs Lisp libraries automatically.
    3;;; https://github.com/jamescherti/compile-angel.el
    4
    5;; (require 'compile-angel)
    6
    7;;;
    
    Распечатка 3: packages/compile-angel/loaddefs.ecf
  • Настроим основные параметры:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Compile Emacs Lisp libraries automatically.
     3;;; https://github.com/jamescherti/compile-angel.el
     4
     5;;; Ensure Emacs loads the most recent byte-compiled files.
     6(setq load-prefer-newer t)
     7
     8;;; Ensure JIT compilation is enabled for improved performance by
     9;;; native-compiling loaded .elc files asynchronously
    10(setq native-comp-jit-compilation t)
    11(setq native-comp-deferred-compilation t) ; Deprecated in Emacs > 29.1
    12
    13;;; Enable/Disable byte compilation and native compilation
    14(setq compile-angel-enable-byte-compile t)
    15(setq compile-angel-enable-native-compile t)
    16
    17;;; Enable verbose (Set it to t while debugging)
    18(setq compile-angel-verbose nil)
    19
    20';; Display the *Compile-Log* buffer (Set it to t while writing elisp)
    21(setq compile-angel-display-buffer nil)
    22
    23;;; Perform byte/native compilation of .el files only once during initial loading
    24;;; (Setting this to nil will try to compile each time an .el file is loaded)
    25(setq compile-angel-on-load-mode-compile-once t)
    26
    27;;; Ignore certain files, for example, for users of the `dir-config` package:
    28(setq compile-angel-excluded-files-regexps '("/\\.dir-config\\.el$"))
    29
    30;;; Function that determines if an .el file should be compiled. It takes one
    31;;; argument (an EL file) and returns t if the file should be compiled,
    32;;; (By default, `compile-angel-predicate-function` is set to nil, which
    33;;; means that the predicate function is not called.)
    34(setq compile-angel-predicate-function
    35      #'(lambda(el-file)
    36       ;; Show a message
    37       (message "PREDICATE: %s" el-file)
    38       ;; Return t (Compile all)
    39       t))
    40
    41;; Ensure that quitting only occurs once Emacs finishes native compiling,
    42;; preventing incomplete or leftover compilation files in `/tmp`.
    43(setq native-comp-async-query-on-exit t)
    44(setq confirm-kill-processes t)
    45
    46;;; Show buffer when there is a warning.
    47;;; (NOT RECOMMENDED, except during development).
    48;; (setq warning-minimum-level :warning)
    49;; (setq byte-compile-verbose t)
    50;; (setq byte-compile-warnings t)
    51;; (setq native-comp-async-report-warnings-errors t)
    52;; (setq native-comp-warning-on-missing-source t)
    53
    54;;; Non-nil means to natively compile packages as part of their installation.
    55(setq package-native-compile t)
    56
    57(add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode)
    58
    59(compile-angel-on-save-mode)
    60(compile-angel-on-load-mode)
    61
    62;;;
    
    Распечатка 4: packages/compile-angel/desire.ecf

3.3 Системные настройки

 1
 2;; (desire 'esup)
 3
 4(desire-conf 'site-stuff)
 5
 6;;{{{ Window System
 7
 8(if (null window-system)
 9    ()
10  (progn
11    (desire-conf 'window-system)
12                                      ;    (desire-conf  'faces)
13                                      ;    (desire-conf  'multi-frame)
14    )
15  )
16
17
18;; (if (null window-system)
19;;  ()
20;;  (desire-conf 'window-system)
21;; )
22
23;; (desire-conf 'window-system)
24;; (desire-conf 'test)
25
26;; (if (eq window-system 'w32)
27;;  (progn
28;;    (desired 'window-system)
29;;    (desired 'window-system-w32)
30;;  )
31;; )
32
33;; (if (and window-system
34;;	 (member window-system '(x gtk))
35;;	 (x-display-color-p)
36;;    )
37;;    (progn
38;;      (desired 'window-system)
39;;      (desire-conf  'faces)
40;;      (desire-conf  'multi-frame)
41;;    )
42;; )
43
44;;}}}
45;;{{{ Serve
46
47;;; Gnuserv
48;;(desire-conf 'gnuserv nil "gnuserv")
49;; Rely on dtemacs to do this, otherwise a race condition can cause
50;; dtemacs to fail.
51;; (gnuserv-start)
52
53;;; Emacs daemon
54;; (desire-conf 'emacs-daemon)
55
56;;; Emacs server
57(desire 'server)
58
59;;}}}
60
61(desire 'general)
62
63(desire 'exec-path-from-shell)
64(desire 'compat)
65
66(desire 'async)
67;; (desire 'gcmh)
68
69;; ----------------------------------------------------------------------
70
71;;{{{ Session Management
72
73(desire 'savehist)
74
75;;}}}
76
77(desire 'uniquify)
78
79(desire-conf 'keys)
80(desire-conf 'dialog)
81(desire-conf 'mouse)
82
83;; (desire 'xclip)
84
85(desire 'which-key)
86;; (desire 'keycast)
87
88;; ----------------------------------------------------------------------
89
90(desire 'pcache)
91(desire 'persistent-soft)
92
93(desire 'alert)
94
95(desire 'rg :precondition-system-executable "rg")
  • В файле используется фолдинг по тройной скобке.

3.4 Оформление интерфейса

  • Файл rc.packages.el:
1;;; UI {{{
Распечатка 5: rc.packages.el

3.4.1 Наборы иконок

1;;; Icons
Распечатка 6: rc.packages.el
  1. all-the-icons

    1;; (desire 'all-the-icons)
    
  1. nerd-icons

    • Загрузка пакета:
      1(desire 'nerd-icons)
      
      Распечатка 7: rc.packages.el
    1. tab-line

      • Emacs. Пакет tab-line
      • Поддержка nerd-icons в tab-line:
      • Пакет применяет иконки из nerd-icons к вкладкам tab-line.
      • Минорный режим tab-line-nerd-icons-global-mode добавляет к функции по умолчанию tab-line-tab-name-format-default иконки для форматирования имён вкладок.
       1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
       2;;; Emacs package that uses the nerd-icons package to apply appropriate icons to tab-line tabs
       3;;; https://github.com/lucius-martius/tab-line-nerd-icons
       4
       5(desire 'tab-line-nerd-icons)
       6(require 'tab-line-nerd-icons)
       7
       8;;; Enable
       9(tab-line-nerd-icons-global-mode)
      10
      11;;;
      
      Распечатка 8: packages/tab-line/nerd-icons.ecf

3.4.2 Шрифты

 1;; (desire 'mixed-pitch)
 2
 3(desire-conf 'fontset)
 4(desire-conf 'font-lock)
 5(desire-conf 'font-lock-jit)
 6;; (desire-conf 'font-lock-lazy)
 7;; (desire-conf 'font-lock-fast)
 8;; (desire-conf 'faces)
 9;; (desire-conf 'color-theme nil "color-theme")
10;; (desire-conf 'fira-code-mode nil "fira-code-mode" t) ;; Simple minor mode for Fira Code ligatures
11
12(desire 'unicode-fonts)
13
14;; (desire 'ligature)
15
16;; (desire-conf 'theme)
17
18;; (desire 'zoom)

3.4.3 Табы

1;;; Tabs
Распечатка 9: rc.packages.el
  1. centaur-tabs

  1. tab-bar

    • Подключение:
      1(desire 'tab-bar)
      
      Распечатка 11: rc.packages.el
  1. tab-line

    • Emacs. Пакет tab-line
    • Подключение:
      1(desire 'tab-line)
      
      Распечатка 12: rc.packages.el
    • Загрузка:
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Emacs Tab Bar
      3
      4(require 'tab-line)
      5
      6;;;
      
      Распечатка 13: packages/tab-line/loaddefs.ecf
    • Настройка:
       1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
       2;;; Emacs Tab Line
       3
       4;;; Show the tabline in the top of the frame
       5(global-tab-line-mode t)
       6
       7;;; Do not show add-new button
       8;; (setq tab-line-new-button-show nil)
       9
      10;;; Do not show close button
      11;; (setq tab-line-close-button-show nil)
      12
      13;;; Change the separator between tabs
      14;; (setq tab-line-separator "")
      15
      16;;;
      
      Распечатка 14: packages/tab-line/desire.ecf

3.4.4 Нумерация строк

  1. display-line-numbers

    • Подключаем моду:
      1(desire 'display-line-numbers)
      
      Распечатка 15: rc.packages.el
    • Файл настройки:
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Interface for display-line-numbers
      
      Распечатка 16: packages/display-line-numbers.ecf
    • Глобальная настройка:
      1;;; Global
      2;; (global-display-line-numbers-mode 1)
      
      Распечатка 17: packages/display-line-numbers.ecf
    • Глобальная настройка:
      1;;; Per mode
      2(add-hook 'prog-mode-hook #'display-line-numbers-mode)
      3(add-hook 'text-mode-hook #'display-line-numbers-mode)
      
      Распечатка 18: packages/display-line-numbers.ecf
    • Завершение:
      1;;;
      
      Распечатка 19: packages/display-line-numbers.ecf
  1. nlinum

    • Подключаем моду:
      1;; (desire 'nlinum)
      
      Распечатка 20: rc.packages.el
    • Загрузка пакета:
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Show line numbers in the margin
      3;;; https://elpa.gnu.org/packages/nlinum.html
      4
      5(require 'nlinum)
      
      Распечатка 21: packages/nlinum.ecf
    • Глобальная настройка:
      1;;; Global settings
      2;; (global-nlinum-mode 1)
      
      Распечатка 22: packages/nlinum.ecf
    • Настройка по модам:
      1;;; Per mode configuration
      2(add-hook 'prog-mode-hook #'nlinum-mode)
      3(add-hook 'text-mode-hook #'nlinum-mode)
      
      Распечатка 23: packages/nlinum.ecf
    • Завершение:
      1;;;
      
      Распечатка 24: packages/nlinum.ecf

3.4.5 Завершение

1;;;}}}
Распечатка 25: rc.packages.el

3.5 Автодополнение

  • Файл rc.packages.el:
    1;;; Completion {{{
    2
    3;; (desire 'company)
    4(desire 'corfu)
    5
    6;;;}}}
    

3.6 Автодополнение в минибуфере

3.6.1 Начало

  • Файл rc.packages.el:
    1;;; Minibuffer completion {{{
    

3.6.2 Ido

  • Файл rc.packages.el:
    1;; (desire 'ido)
    

3.6.3 Helm

  • Файл rc.packages.el:
    1;; (desire 'helm-posframe)
    2;; (desire 'helm)
    

3.6.4 Ivy

  • Файл rc.packages.el:
    1;; (desire 'ivy)
    

3.6.5 Selectrum

  • Файл rc.packages.el:
    1;; (desire 'selectrum)
    

3.6.6 Vertico

  • Файл rc.packages.el:
    1(desire 'vertico)
    

3.6.7 Конец

  • Файл rc.packages.el:
    1
    2;;;}}}
    

3.7 Навигация по окнам

3.7.1 Начало

  • Файл rc.packages.el:
    1;;; Window navigation {{{
    
    Распечатка 26: rc.packages.el

3.7.2 Windmove

  • Emacs. Окна. Windmove

  • Файл rc.packages.el:

    1(desire 'windmove)
    
    Распечатка 27: rc.packages.el
  • Настройка пакета:

    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Directional window-selection routinesdirectional window-selection routines
    3;;; https://www.emacswiki.org/emacs/WindMove
    
    Распечатка 28: packages/windmove.ecf
  • По умолчанию используется комбинация Shift + стрелки. Но это конфликтует с org-mode:

    1;;; Shifted arrow keys
    2;; (windmove-default-keybindings)
    
    Распечатка 29: packages/windmove.ecf
  • Будем использовать Ctrl + стрелки:

    1;;; Ctrl + arrow keys
    2(windmove-default-keybindings 'ctrl)
    
    Распечатка 30: packages/windmove.ecf
  • Что-то делает:

    1;;; Wrap around at edges
    2(setq windmove-wrap-around t)
    
    Распечатка 31: packages/windmove.ecf
  • Завершим файл:

    1;;;
    
    Распечатка 32: packages/windmove.ecf

3.7.3 Конец

  • Файл rc.packages.el:
    1;;;}}}
    
    Распечатка 33: rc.packages.el

3.8 Общие настройки мод

3.9 Поддержка LSP

3.9.1 Начало

  • Файл rc.packages.el:

    1;;; LSP mode {{{
    
    Распечатка 34: rc.packages.el
  • Включаем поддержку emacs-lsp-booster:

    1(desired 'emacs-lsp-booster :precondition-system-executable "emacs-lsp-booster")
    
    Распечатка 35: rc.packages.el

3.9.2 Eglog

  • Файл rc.packages.el:
    1(desire 'eglot)
    
    Распечатка 36: rc.packages.el
  • Начальная загрузка:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; A client for Language Server Protocol servers
    3;;; https://github.com/joaotavora/eglot
    4
    5;;;
    
    Распечатка 37: packages/eglot/loaddefs.ecf
  • Загрузка самого пакета:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; A client for Language Server Protocol servers
     3;;; https://github.com/joaotavora/eglot
     4
     5(require 'eglot)
     6
     7;;; Control blocking of LSP connection attempts
     8(setq eglot-sync-connect nil)
     9
    10(setq eglot-connect-timeout 10)
    11(setq eglot-autoshutdown t)
    12(setq eglot-send-changes-idle-time 0.5)
    13
    14;;; Disable `eglot-auto-display-help-buffer` because :select t in its popup rule causes eglot to steal focus too often.
    15(setq eglot-auto-display-help-buffer nil)
    16
    17;;; Disable any debug logging and may speed things up
    18(setq eglot-events-buffer-size 0)
    19
    20;;;
    
    Распечатка 38: packages/eglot/desire.ecf
  • Загрузка emacs-lsp-booster:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Boost eglot using lsp-booster
    3;;; https://github.com/jdtsmith/eglot-booster
    4
    5(desire 'eglot-booster :recipe '(:fetcher github :repo "jdtsmith/eglot-booster" :branch "main" :files ("*.el")))
    6(require 'eglot-booster)
    7(eglot-booster-mode)
    8
    9;;;
    
    Распечатка 39: packages/eglot/emacs-lsp-booster.ecf

3.9.3 Lsp-mode

  • Файл rc.packages.el:
    1;; (desire 'lsp-mode)
    

3.9.4 Конец

  • Файл rc.packages.el:
    1
    2;;; }}}
    

3.10 Casual Suite

3.10.1 Начало

  • Файл rc.packages.el:
    1;;; Casual Suite
    2(desire 'casual)
    
    Распечатка 40: rc.packages.el

3.10.2 Основная библиотека

  • Файл packages/casual/loaddefs.ecf:
    1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes
    3;;; https://github.com/kickingvegas/casual
    4
    5(require 'casual)
    6
    7;;;
    
    Распечатка 41: packages/casual/loaddefs.ecf
  • Файл packages/casual/desire.ecf:
     1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes
     3;;; https://github.com/kickingvegas/casual
     4
     5(require 'casual-calc)
     6(require 'casual-dired)
     7(require 'casual-isearch)
     8(require 'casual-ibuffer)
     9(require 'casual-info)
    10(require 'casual-re-builder)
    11(require 'casual-bookmarks)
    12(require 'casual-editkit)
    13
    14(keymap-set calc-mode-map "C-o" #'casual-calc-tmenu)
    15(keymap-set dired-mode-map "C-o" #'casual-dired-tmenu)
    16(keymap-set isearch-mode-map "C-o" #'casual-isearch-tmenu)
    17(keymap-set ibuffer-mode-map "C-o" #'casual-ibuffer-tmenu)
    18(keymap-set ibuffer-mode-map "F" #'casual-ibuffer-filter-tmenu)
    19(keymap-set ibuffer-mode-map "s" #'casual-ibuffer-sortby-tmenu)
    20(keymap-set Info-mode-map "C-o" #'casual-info-tmenu)
    21(keymap-set reb-mode-map "C-o" #'casual-re-builder-tmenu)
    22(keymap-set reb-lisp-mode-map "C-o" #'casual-re-builder-tmenu)
    23(keymap-set bookmark-bmenu-mode-map "C-o" #'casual-bookmarks-tmenu)
    24(keymap-global-set "C-o" #'casual-editkit-main-tmenu)
    25
    26;;;
    
    Распечатка 42: packages/casual/desire.ecf
  • Файл сделан под все элементы пакета.
  • Необходимо будет разделить всё это по разным пакетам.

3.10.3 Поддержка Avy

  • Файл packages/casual/avy.ecf:
     1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; An opinionated Transient menu for Avy.
     3;;; https://github.com/kickingvegas/casual-avy
     4
     5(desire 'casual-avy)
     6(require 'casual-avy)
     7
     8(keymap-global-set "M-g" #'casual-avy-tmenu)
     9
    10;;; Imenu (index) Support
    11(add-hook 'markdown-mode-hook #'imenu-add-menubar-index)
    12(add-hook 'makefile-mode-hook #'imenu-add-menubar-index)
    13(add-hook 'prog-mode-hook #'imenu-add-menubar-index)
    14(add-hook 'org-mode-hook #'imenu-add-menubar-index)
    15
    16;;;
    
    Распечатка 43: packages/casual/avy.ecf

3.10.4 Поддержка Symbol Overlay

  • Файл packages/casual/symbol-overlay.ecf:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; An opinionated Transient user interface for the Emacs package Symbol Overlay.
     3;;; https://github.com/kickingvegas/casual-symbol-overlay
     4
     5(desire 'casual-symbol-overlay)
     6(require 'casual-symbol-overlay)
     7
     8(keymap-set symbol-overlay-map "C-o" #'casual-symbol-overlay-tmenu)
     9
    10;;;
    
    Распечатка 44: packages/casual/symbol-overlay.ecf

3.10.5 Поддержка Org-agenda

  • Файл packages/org/casual.ecf:
     1;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; A collection of opinionated keyboard-driven user interfaces for various built-in Emacs modes
     3;;; https://github.com/kickingvegas/casual
     4
     5(require 'casual-agenda)
     6
     7(keymap-set org-agenda-mode-map "C-o" #'casual-agenda-tmenu)
     8(keymap-set org-agenda-mode-map "M-j" #'org-agenda-clock-goto) ; optional
     9(keymap-set org-agenda-mode-map "J" #'bookmark-jump) ; optional
    10
    11;;;
    
    Распечатка 45: packages/org/casual.ecf

3.11 Разное

  • Файл rc.packages.el:
 1;;
 2
 3(desire 'tree-sitter)
 4
 5(desire 'hydra)
 6
 7(desire 'bicycle)
 8(desire 'hideshow)
 9
10(desire-conf 'show-paren)
11;; (desire-conf 'folding)
12;; (desire-conf 'outline)
13
14
15(desire 'origami)
16
17;;
18
19(desire 'imenu)
20
21(desire 'ace-window)
22
23
24;; (desire-conf 'toolbar)
25
26;; Parentesis
27(desire 'smartparens)
28
29;;; Spell {{{
30
31;; (desire-conf 'spell)
32(desire 'ispell)
33(desire 'flyspell)
34;;(desire-conf 'speck)
35;;(desire-conf 'wcheck)
36
37;; (desire 'flycheck-languagetool)
38;; (desire 'langtool)
39
40;; (desire 'lsp-ltex :recipe '(:fetcher github :repo "emacs-languagetool/lsp-ltex" :branch "master" :files ("*.el")))
41;; (desire 'eglot-ltex :recipe '(:fetcher github :repo "emacs-languagetool/eglot-ltex" :branch "master" :files ("*.el")))
42
43;;;}}}
44;;; Adress book {{{
45
46(desired 'vcard)
47(desire 'khardel :precondition-system-executable "khard")
48(desire 'khalel :precondition-system-executable "khal")
49;; (desire 'org-vcard)
50;; (desire 'vdirel)
51;; (desire 'bbdb)
52
53;;;}}}
54;;; Bibliography {{{
55
56(desire 'biblio)
57(desire 'bibtex)
58
59;;;}}}

3.12 Проекты

3.12.1 Начало

1;;; Projects {{{

3.12.2 Project

1(desire 'project)

3.12.3 Projectile

1;; (desire 'projectile)

3.12.4 Завершение

1;;;}}}

3.13 Сниппеты

1
2;;(desire-conf 'yasnippet)

3.14 Отображение текста

 1;;; Text {{{
 2
 3(desire 'texfrag)
 4
 5;; (desire 'adaptive-wrap)
 6(desired 'visual-line-mode)
 7
 8;; (desired 'prettify-symbols-mode)
 9;; (desire 'pretty-mode)
10;; (desire 'prettify-math)
11;; (desire 'math-preview)

3.15 Текстовые режимы

 1(desire 'pandoc-mode)
 2
 3(desire' mermaid-mode :precondition-system-executable "mmdc")
 4
 5(desire-conf 'text)
 6(desire-conf 'markdown-mode nil "markdown-mode" t)
 7
 8(desire 'plantuml-mode)
 9
10(desire 'pdf-tools)
11(desire 'nov)
12(desire 'fb2-reader)
13
14;; (desire 'valign)
15
16;;;}}}

3.16 Управление временем

1;;; Time management {{{
2
3(desire 'pomm)
4(desire 'org-pomodoro)
5;; (desire 'hammy)
6
7;;;}}}

3.17 LaTeX

 1;;; LaTeX {{{
 2
 3(desire 'xenops)
 4;; (desire 'lsp-latex :precondition-system-executable "texlab")
 5
 6(desire 'cdlatex)
 7
 8(desire-conf 'xdvi nil "xdvi-search")
 9(desired 'reftex)
10;; (desire-conf 'tex)
11(desired 'preview-latex)
12(desire 'auctex)
13;; (desire 'auctex :initname "latex")
14;; (desire 'auctex :initname "latex" :precondition-lisp-library "tex-site")
15
16;;;}}}

3.18 Org-mode

  • Org-mode
  • Конфигурация для org-mode:
    1;;; Org-mode {{{
    
    Распечатка 46: rc.packages.el

3.18.1 Babel

  • Emacs. Org Babel
  • Общие настройки babel:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Org-Babel
    
    Распечатка 47: packages/org/desire.ecd/babel.ecf
  • Отключим подтверждение запутывания:
    1;;; Org-babel confirm before evaluation
    2(setq org-confirm-babel-evaluate nil)
    
    Распечатка 48: packages/org/desire.ecd/babel.ecf
  1. org-auto-tangle

    • Репозиторий: https://github.com/yilkalargaw/org-auto-tangle/
    • Подключим org-auto-tangle:
      1;;; A simple emacs package to allow org file tangling upon save
      2;;; https://github.com/yilkalargaw/org-auto-tangle/
      3(desire 'org-auto-tangle)
      4(require 'org-auto-tangle)
      5(add-hook 'org-mode-hook 'org-auto-tangle-mode)
      6
      7;;; Auto-tangle as the default behavior for all org buffers
      8;; (setq org-auto-tangle-default t)
      
      Распечатка 49: packages/org/desire.ecd/babel.ecf
  1. Конец

    1;;;
    
    Распечатка 50: packages/org/desire.ecd/babel.ecf

3.18.2 Разное

 1;; (desire 'org-ql)
 2
 3(desire 'org-appear)
 4(desire 'org-fragtog)
 5(desire 'org-custom-cookies)
 6;; (desire 'svg-tag-mode)
 7(desire 'org-superstar)
 8;; (desire 'org-modern-indent :recipe '(:fetcher github :repo "jdtsmith/org-modern-indent" :branch "main" :files ("*.el")))
 9(desire 'org-modern)
10;; (desire 'org-contacts)
11;; (desire 'google-contacts)
12(desire 'org-edna)
13(desire 'org-ref)
14(desire 'org-tree-slide)
Распечатка 51: rc.packages.el

3.18.3 Повестка дня

  • Конфигурация повестки дня:
 1;;; Agenda
 2(desire 'org-super-agenda)
 3
 4;;(if (desiredp 'org-ql)
 5;; (desire 'org-agenda-files-track-ql)
 6(desire 'org-agenda-files-track)
 7;;)
 8
 9;;(if (desiredp 'org-ql)
10;; (desire 'org-agenda-files-track-ql :recipe '(:fetcher github :repo "nicolas-graves/org-agenda-files-track" :branch "master" :files ("org-agenda-files-track-ql.el")))
11;; (desire 'org-agenda-files-track :recipe '(:fetcher github :repo "nicolas-graves/org-agenda-files-track" :branch "master" :files ("org-agenda-files-track.el")))
12;;)
13
14;;; Literate
15(desire 'org-tanglesync)
16
17;; (desire 'org-gcal)
18(desire 'org-journal)
19
20(desire 'org-noter)
21;; (desire 'org-noter :recipe '(:fetcher github :repo "org-noter/org-noter" :branch "feature/org-roam-integration" :files ("*.el" "modules/*.el")))
22
23(desire 'org-transclusion)
Распечатка 52: rc.packages.el

3.18.4 org-gtd

  1. Клавиатурные сочетания

3.18.5 mobileorg

1(desired 'mobileorg)
Распечатка 54: rc.packages.el

3.18.6 org-mode

1(desire 'org)
2
3;;; For messaging
4;; (desire 'org-msg)
5
6;;;}}}
Распечатка 55: rc.packages.el
  1. Предпросмотр LaTeX

    • Org-mode. Предпросмотр TeX
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Previewing LaTeX fragments
      3;;; https://orgmode.org/manual/Previewing-LaTeX-fragments.html
      
      Распечатка 56: packages/org/desire.ecd/preview-latex.ecf
    • Зададим каталог для создаваемых изображений (по умолчанию они создаются в рабочем каталоге):
      1;;; LaTeX image directory
      2(setq org-preview-latex-image-directory (concat home-cache-path "org-latex/"))
      
      Распечатка 57: packages/org/desire.ecd/preview-latex.ecf
    • Зададим опции создания изображений:
      1;;; Output format
      2(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.0))
      3(setq org-format-latex-options (plist-put org-format-latex-options :density 600))
      4(setq org-format-latex-options (plist-put org-format-latex-options :background "Transparent"))
      
      Распечатка 58: packages/org/desire.ecd/preview-latex.ecf
    • Зададим формат изображений. В данном случае это формат svg:
       1(setq org-latex-create-formula-image-program 'dvisvgm)
       2(setq org-preview-latex-process-alist
       3      '((dvipng :programs
       4              ("lualatex" "dvipng")
       5              :description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust
       6              (1.0 . 1.0)
       7              :latex-compiler
       8              ("lualatex -output-format dvi -interaction nonstopmode -output-directory %o %f")
       9              :image-converter
      10              ("dvipng -D %D -T tight -o %O %f"))
      11      (dvisvgm :programs
      12               ("latex" "dvisvgm")
      13               :description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust
      14               (1.7 . 1.5)
      15               :latex-compiler
      16               ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
      17               :image-converter
      18               ("dvisvgm %f -n -b min -c %S -o %O"))
      19      (imagemagick :programs
      20                   ("latex" "convert")
      21                   :description "pdf > png" :message "you need to install the programs: latex and imagemagick." :use-xcolor t :image-input-type "pdf" :image-output-type "png" :image-size-adjust
      22                   (1.0 . 1.0)
      23                   :latex-compiler
      24                   ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
      25                   :image-converter
      26                   ("convert -density %D -trim -antialias %f -quality 100 %O"))))
      
      Распечатка 59: packages/org/desire.ecd/preview-latex.ecf
    • Теперь зададим настройки для LaTeX:
      1;;; Configure latex
      2(setq org-latex-inputenc-alist '(("utf8" . "utf8x")))
      3;;; Default position for LaTeX figures
      4(setq org-latex-default-figure-position "!htbp")
      
      Распечатка 60: packages/org/desire.ecd/preview-latex.ecf
    • Опишем используемые пакеты:
       1;;; Unicode fonts
       2(add-to-list 'org-latex-packages-alist '("" "unicode-math") t)
       3;;; Physics2 package
       4;; (add-to-list 'org-latex-packages-alist '("" "physics2") t)
       5;;; Math
       6(add-to-list 'org-latex-packages-alist '("" "amsmath") t)
       7(add-to-list 'org-latex-packages-alist '("" "mathtools") t)
       8;;; Local definitions
       9;; (add-to-list 'org-latex-packages-alist '("" "local-define") t)
      10
      11;;;
      
      Распечатка 61: packages/org/desire.ecd/preview-latex.ecf

3.19 Заметочники

3.19.1 Org-roam

 1;;; Org-roam {{{
 2
 3(desire 'emacsql)
 4
 5;; (desire 'delve :recipe '(:fetcher github :repo "publicimageltd/delve" :branch "main"))
 6(desire 'zetteldesk)
 7
 8;; (desire 'org-roam-server)
 9;; (desire 'org-roam-ui :recipe '(:host github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))
10;; (desire 'org-roam-ui :recipe '(:fetcher github :repo "org-roam/org-roam-ui" :files ("*.el" "out")))
11(desire 'org-roam-ui)
12
13
14(desire 'magit-section)
15(desire 'org-roam)
16
17;;;}}}

3.19.2 Denote

1
2(desire 'deft)
3;; (desire-conf 'zetteldeft nil "zetteldeft" t)
4
5;; (desire 'denote)
6
7;;}}}

3.20 Разное

 1;; XML, XHTML, HTML {{{
 2
 3;;(desire-conf 'nxml nil "rng-auto")
 4                                      ; (desire-conf 'psgml)
 5
 6;;;}}}
 7;;;{{{ Palm pilot support
 8
 9                                      ;(desire-conf 'palm)
10
11;;;}}}
12;;; Desktop {{{
13
14;; (desire-conf 'desktop)
15(desire-conf 'session nil "session")
16(desire-conf 'saveplace nil "saveplace")
17
18(desire 'ibuffer)
19;; (desire 'persp-mode)
20;; (desire 'perspective)
21;; (desire 'bufler)
22;; (desire 'tabspaces)
23
24;;}}}
25;;; Appointments, diary, calendar {{{
26
27;; Use "M-x calendar RET" to display the calendar and start
28;; appointment warnings.
29
30;; (desire-conf 'appt)
31(desire 'calendar)
32;; (desire-conf 'todo-mode)
33;; (desire-conf 'diary "diary-lib")
34
35;;;}}}
36;;; These provide options for the various message handling packages {{{
37
38(desire 'browse-url)
39;; (desire-conf 'mailcrypt)
40;; (desire 'supercite)
41
42;;;}}}

3.21 Почта

 1;;; Message {{{
 2
 3(desire 'smtpmail)
 4;; (desire 'gnus)
 5(desire 'message)
 6;; (desire-conf 'vm)
 7;; (desire 'wl :ensurename 'wanderlust)
 8;; (desire-conf 'sendmail)
 9;; (desire 'mu4e-dashboard :recipe '(:fetcher github :repo "rougier/mu4e-dashboard"))
10(desire 'mu4e :precondition-system-executable "mu")
11
12;;;}}}

3.22 Блоги

 1;;; Blogs {{{
 2
 3;; (desire-conf 'hexo nil "hexo")
 4;; (desire-conf 'blog-admin nil "blog-admin") ;; Blog admin for emacs with hexo/org-page supported
 5(desire-conf 'easy-hugo  nil "easy-hugo" t) ;; Emacs major mode for managing hugo
 6
 7;;;}}}
 8;;; Miscellaneous {{{
 9
10(desire 'ebuku)
11(desire-conf 'graphviz-dot-mode nil "graphviz-dot-mode")
12;; (desire-conf 'abbrev)
13;; (desire-conf 'bibtex)
14;; (desire-conf 'calc)
15;; (desire-conf 'eiffel-mode)
16;; (desire-conf 'filladapt)
17;; (desire-conf 'hugs-mode)
18;; (desire-conf 'html-helper-mode)
19;; (desire-conf 'lispdir)
20;; (desire-conf 'php-mode)
21;; (desire-conf 'ps-print)
22;; (desire-conf 'sh-script)
23;; (desire-conf 'shell)
24;; (desire-conf 'sql-mode)
25;; (desire-conf 'w3)
26(desire 'web-mode)
27(desire 'gnuplot)
28
29(desire 'pass)
30
31
32(desire 'multiple-cursors)

3.23 Мессенджеры

1(desire 'telega)

3.24 Отложенное чтение

3.24.1 Pocket reader

1(desire 'pocket-reader)

3.24.2 Wallabag

  • Подключение пакета:
    1(desire 'wallabag :recipe '(:fetcher github :repo "chenyanming/wallabag.el" :branch "master" :files ("*.el" "*.alist" "*.css")))
    
    Распечатка 63: rc.packages.el
  • Начальные настройки:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs
    3;;; https://github.com/chenyanming/wallabag.el
    4
    5
    6;;;
    
    Распечатка 64: packages/wallabag/loaddefs.ecf
  • Загрузка пакета:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs
     3;;; https://github.com/chenyanming/wallabag.el
     4
     5(require 'wallabag)
     6
     7;;; Retrieve new entries after `M-x wallabag`
     8(add-hook 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter)
     9
    10;;; Image Caching. Setting url-automatic-caching non-nil causes documents to be cached automatically
    11(setq url-automatic-caching t)
    12
    13;;;
    
    Распечатка 65: packages/wallabag/desire.ecf
  • Шаблон настройки параметров для пользователя:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Emacs wallabag client - A Read It Later/Web Archiving Solution in Emacs
     3;;; https://github.com/chenyanming/wallabag.el
     4
     5;;; Wallabag server host name
     6;; (setq wallabag-host "https://xx.xx.xx")
     7
     8;;; Username
     9;; (setq wallabag-username "xx")
    10
    11;;; Password
    12;; (setq wallabag-password "xx")
    13
    14;;; Created with API clients management
    15;; (setq wallabag-clientid "xx")
    16
    17;;; Created with API clients management
    18;; (setq wallabag-secret "xx")
    19
    20;;;
    
    Распечатка 66: packages/wallabag/personal.ecf

3.25 Dashboard

 1
 2;;;}}}
 3
 4;; (desire 'grammarly)
 5
 6;; (desire 'flycheck-grammarly)
 7
 8(desire 'dashboard)
 9
10;; PERSONAL
11
12;; (require 'chord-mode)  ; edit guitar music.
13;; (require 'discography) ; variant of BibTeX mode for discographies.

3.26 Разные программные режимы

3.26.1 Начало

  • Файл rc.packages.el:
    1;;; Different program modes {{{
    

3.26.2 Пакет csv-mode

  • Emacs. cvs-mode
  • Файл rc.packages.el:
    1;;; csv-mode
    2(desire 'csv-mode)
    
  • Установим вызов cvs-mode для расширения .cvs.
    • Файл packages/csv-mode/loaddefs.ecf:
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Major mode for editing comma/char separated values
      3;;; https://elpa.gnu.org/packages/csv-mode.html
      4
      5(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
      6
      7;;;
      
  • Загружаем пакет при необходимости.
    • Файл packages/csv-mode/desire.ecf:
      1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
      2;;; Major mode for editing comma/char separated values
      3;;; https://elpa.gnu.org/packages/csv-mode.html
      4
      5(require 'csv-mode)
      
  • Подключим режим визуального выравнивания полей.
    • Файл packages/csv-mode/desire.ecf:
      1;;; Keeps fields visually aligned, on-the-fly
      2(add-hook 'csv-mode-hook 'csv-align-mode)
      
  • Настроим визуально представление длинных строк.
    • Файл packages/csv-mode/desire.ecf:
      1(add-hook 'csv-mode-hook '(lambda () (interactive) (toggle-truncate-lines nil)))
      2
      3;;;
      

3.26.3 Поддержка ebuild-файлов

  • Сайт: https://wiki.gentoo.org/wiki/Project:Emacs
  • Файл rc.packages.el:
    1;;; Ebuild files
    2(desire 'ebuild-mode :recipe '(:fetcher github :repo "emacsmirror/ebuild-mode" :branch "master"))
    
    Распечатка 67: rc.packages.el
  • Настроим загрузку:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Edit ebuild and eclass files
     3;;; https://wiki.gentoo.org/wiki/Project:Emacs
     4;;; https://github.com/emacsmirror/ebuild-mode
     5
     6(add-to-list 'load-path "/usr/share/emacs/site-lisp/ebuild-mode")
     7(autoload 'ebuild-mode "ebuild-mode"
     8  "Major mode for Gentoo .ebuild files." t)
     9(autoload 'ebuild-eclass-mode "ebuild-mode"
    10  "Major mode for Gentoo .eclass files." t)
    11(autoload 'ebuild-repo-mode "ebuild-mode"
    12  "Minor mode for files in an ebuild repository." t)
    13(autoload 'ebuild-repo-mode-maybe-enable "ebuild-mode")
    14(autoload 'devbook-mode "devbook-mode"
    15  "Major mode for editing the Gentoo Devmanual." t)
    16(autoload 'gentoo-newsitem-mode "gentoo-newsitem-mode"
    17  "Major mode for Gentoo GLEP 42 news items." t)
    18(autoload 'glep-mode "glep-mode"
    19  "Major mode for Gentoo Linux Enhancement Proposals." t)
    20
    21(add-to-list 'auto-mode-alist '("\\.ebuild\\'" . ebuild-mode))
    22(add-to-list 'auto-mode-alist '("\\.eclass\\'" . ebuild-eclass-mode))
    23(add-to-list 'auto-mode-alist '("/devmanual.*\\.xml\\'" . devbook-mode))
    24(add-to-list 'auto-mode-alist
    25         '("/[0-9]\\{4\\}-[01][0-9]-[0-3][0-9]-.+\\.[a-z]\\{2\\}\\.txt\\'"
    26           . gentoo-newsitem-mode))
    27(add-to-list 'auto-mode-alist '("/glep.*\\.rst\\'" . glep-mode))
    28(add-to-list 'auto-mode-alist
    29         '("/\\(package\\.\\(mask\\|unmask\\|use\\|env\
    30\\|license\\|properties\\|accept_\\(keywords\\|restrict\\)\\)\
    31\\|\\(package\\.\\)?use.\\(stable\\.\\)?\\(force\\|mask\\)\\)\\'"
    32           . conf-space-mode))
    33(add-to-list 'auto-mode-alist
    34         '("/make\\.\\(conf\\|defaults\\)\\'" . conf-unix-mode))
    35(add-to-list 'interpreter-mode-alist '("openrc-run" . sh-mode))
    36(add-to-list 'interpreter-mode-alist '("runscript" . sh-mode))
    37(add-hook 'find-file-hook #'ebuild-repo-mode-maybe-enable)
    38(modify-coding-system-alist 'file "\\.\\(ebuild\\|eclass\\)\\'" 'utf-8)
    
    Распечатка 68: packages/ebuild-mode/loaddefs.ecf

3.26.4 Asymptote

  1. Редактирование файлов Asymptote

    • Поддержка редактирования файлов Asymptote.
    • Файл rc.packages.el:
      1;;; Asymptote
      2(desire 'asy-mode :recipe '(:fetcher github :repo "vectorgraphics/asymptote" :branch "master" :files ("base/asy-mode.el")))
      
      Распечатка 69: rc.packages.el
    • Конфигурационный файл:
       1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
       2;;; 2D & 3D TeX-Aware Vector Graphics Language
       3;;; https://github.com/vectorgraphics/asymptote
       4
       5(autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t)
       6(autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t)
       7(autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t)
       8(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode))
       9
      10;;;
      
      Распечатка 70: packages/asy-mode.ecf
  1. Поддержка Asymptote в Babel

    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Org-Babel support for evaluating asymptote
    3;;; https://github.com/hurrja/ob-asymptote
    4
    5(desire 'ob-asymptote)
    6(require 'ob-asymptote)
    7
    8;;;
    
    Распечатка 71: packages/org/desire.ecd/ob-asymptote.ecf

3.26.5 kmonad-файлы

  • Поддержка синтаксиса конфигурационных файлов kmonad.
  • Файл rc.packages.el:
    1;;; kbd-mode
    2;; (desire 'kbd-mode :recipe '(:fetcher github :repo "kmonad/kbd-mode" :branch "master"))
    
    Распечатка 72: rc.packages.el
  • Конфигурационный файл:
    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Emacs mode for syntax highlighting kmonad's .kbd files.
    3;;; https://github.com/kmonad/kbd-mode
    4
    5(autoload 'kdb-mode "kbd-mode.el" "Kmonad's .kbd files" t)
    6(add-to-list 'auto-mode-alist '("\\.kbd$" . kbd-mode))
    7
    8;;;
    
    Распечатка 73: packages/kbd-mode.ecf

3.26.6 Julia

1;;; Julia {{{
2
3;;; Code completion and syntax checking
4                                      ;(desire 'eglot-jl)
5;;; REPL integration
6(desire 'julia-snail)
7;; (desire 'julia-repl)
8;;; Syntax highlighting and latex symbols
9(desire 'julia-mode)
  1. Конец

    • Файл rc.packages.el:
      1;;;}}}
      

3.26.7 Разное

 1(desire 'speedbar)
 2;; (desire-conf 'semantic nil "semantic")
 3
 4;; (desire-conf 'cedet nil "cedet")
 5;; (desire-conf 'ecb nil "ecb")
 6
 7;; (desire-conf 'php-mode nil "php-mode")
 8;; (desire-conf 'eiffel-mode nil "eiffel-mode")
 9
10(desire 'ebib)
11
12(desire 'lua-mode)
1
2
3(desire 'yaml-mode)
4(desire 'ini-mode)
5(desire 'hcl-mode)
6
7(desire 'magit-gitflow)
8(desire 'magit)

3.26.8 Конец

  • Файл rc.packages.el:
    1;;;}}}
    

3.27 Редактирование текста в броузере

3.27.1 Начало

  • Файл rc.packages.el:
    1;;; Edit text areas in browsers {{{
    

3.27.2 Edit with Emacs

  • Файл rc.packages.el:
    1(desire 'edit-server)
    
  • Файл packages/edit-server.ecf:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; A Chromium/Firefox "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension.
     3;;; https://github.com/stsquad/emacs_chrome
     4
     5(require 'edit-server)
     6
     7(setq edit-server-new-frame nil)
     8(edit-server-start)
     9
    10(setq edit-server-url-major-mode-alist
    11      '(("github\\.com" . markdown-mode)))
    12
    13;;;
    

3.27.3 Ghost Text

  • Файл rc.packages.el:
    1;; (desire 'atomic-chrome)
    
  • Файл packages/atomic-chrome.ecf:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Edit text area on Chrome with Emacs using Atomic Chrome
     3;;; https://github.com/alpha22jp/atomic-chrome
     4
     5(require 'atomic-chrome)
     6(atomic-chrome-start-server)
     7
     8;;; Atomic Chrome for Emacs automatically reflects modifications to the browser by default
     9(setq atomic-chrome-enable-auto-update t)
    10
    11;;; The default major mode of editing buffer is `text-mode`. You can change the major mode manually
    12(setq atomic-chrome-default-major-mode 'markdown-mode)
    13
    14;;; Choose the major mode for a specific website
    15(setq atomic-chrome-url-major-mode-alist
    16      '(("github\\.com" . gfm-mode)
    17        ("redmine" . textile-mode)))
    18
    19;;; Select editing buffer style
    20;;; full: Open in the selected window.
    21;;; split: Open in the new window by splitting the selected window (default).
    22;;; frame: Create a new frame and window in it.
    23;; (setq atomic-chrome-buffer-open-style split)
    24
    25;;;
    

3.27.4 Конец

  • Файл rc.packages.el:
    1;;;}}}
    

3.28 Навигация по файлам

3.28.1 Dired

  • Файл rc.packages.el:
     1;;; Dired {{{
     2
     3(desire 'mouse3 :recipe '(:fetcher github :repo "emacsmirror/mouse3" :branch "master" :files ("*.el")))
     4
     5(desire 'dired)
     6(desire 'dired+ :recipe '(:fetcher github :repo "emacsmirror/dired-plus" :branch "master" :files ("*.el")))
     7
     8;; (desire 'ranger)
     9;; (desire 'efar)
    10;; (desire 'sunrise-commander :recipe '(:fetcher github :repo "sunrise-commander/sunrise-commander"))
    11(desire 'dirvish)
    12;; (desire 'diredc)
    13
    14;;;}}}
    

3.28.2 Neotree

3.28.3 Treemacs

  • Файл rc.packages.el:
    1(desire 'treemacs)
    

3.29 Навигация по тексту

3.29.1 Начало

  • Файл rc.packages.el:
    1;;; Text navigation {{{
    

3.29.2 line-reminder

  • Line annotation for changed and saved lines: https://github.com/emacs-vs/line-reminder
  • Файл rc.packages.el:
    1;;; Line annotation for changed and saved lines
    2(desire 'line-reminder)
    
  • Файл rc.packages.el:
     1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
     2;;; Line annotation for changed and saved lines
     3;;; https://github.com/emacs-vs/line-reminder
     4
     5;;; Enable for all buffers
     6(global-line-reminder-mode t)
     7
     8;;; Display Annotation
     9;;; linum | indicators
    10(setq line-reminder-show-option 'linum)
    11
    12;;; Display thumbnail
    13(setq line-reminder-thumbnail t)
    14
    15;;;
    

3.29.3 Конец

  • Файл rc.packages.el:
    1;;;}}}
    

3.30 Modeline

3.30.1 Начало

  • Файл rc.packages.el:
    1;;; Modeline {{{
    
    Распечатка 74: rc.packages.el

3.30.2 Общие настройки modeline

  • Загрузим только конфигурационный файл:

    1(desire-conf 'modeline)
    
    Распечатка 75: rc.packages.el
  • Заголовок файла:

    1;;; -*- mode: emacs-lisp; lexical-binding: t; coding: utf-8-unix; -*-
    2;;; Configure modeline
    
    Распечатка 76: packages/modeline.ecf
  • Показывать столбец, в котором находится курсор (https://www.gnu.org/software/emacs/manual/html_node/efaq/Displaying-the-current-line-or-column.html):

    1;;; Show column number
    2(setq column-number-mode t)
    
    Распечатка 77: packages/modeline.ecf
  • Задаём 24-часовой формат времени:

    1;;; Time in 24 hour format, plus day and date.
    2(setq display-time-day-and-date t)
    3(setq display-time-24hr-format t)
    
    Распечатка 78: packages/modeline.ecf
  • Мы можем захотеть видеть и секунды:

    1;;; Display time in seconds in the mode line
    2;;; %H is the hour on a 24-hour clock, %I is on a 12-hour clock,
    3;;; %k is like %H only blank-padded, %l is like %I blank-padded.
    4;;; %p is the locale's equivalent of either AM or PM.
    5;;; %M is the minute, %S is the second.
    6(setq display-time-format "%H:%M:%S")
    7(setq display-time-interval 1)
    
    Распечатка 79: packages/modeline.ecf
  • Разрешим показывать время в модлайн:

    1;;; Enable the display of time and CPU load average in the modeline
    2(display-time-mode 1)
    3
    4;;;
    
    Распечатка 80: packages/modeline.ecf

3.30.3 Конец

  • Файл rc.packages.el:
    1;;;}}}
    
    Распечатка 81: rc.packages.el

3.31 Темы

  • Подключаем темы в файле rc.packages.el:
     1;;; Themes {{{
     2
     3;;; Nested menu for minor modes
     4(desire 'minions)
     5
     6;;; Tabs and ribbons for the mode-line
     7(desire 'moody)
     8
     9;;; Spacemacs theme
    10;; (desire 'spacemacs-theme :precondition-lisp-library "spacemacs-theme-pkg")
    11
    12;;; Doom themes
    13;; (desire 'doom-themes)
    14
    15;; (desire 'zenburn-theme)
    16;; (desire 'lambda-themes :recipe '(:fetcher github :repo "Lambda-Emacs/lambda-themes" :branch "main"))
    17;; (desire 'tao-theme)
    18
    19;;; N Λ N O Theme
    20;; (desire 'nano-theme)
    21
    22;;; Increase the padding/spacing of frames and windows
    23;; (desire 'spacious-padding)
    

3.31.1 Modus-themes

3.31.2 Ef-themes

3.31.3 Финализирование

  • Финализируем раздел в rc.packages.el:
    1
    2;;;}}}
    

3.32 Финализирование

  • Финализируем файл rc.packages.el:
    1
    2;;; rc.packages.el ends here
    

Дмитрий Сергеевич Кулябов
Дмитрий Сергеевич Кулябов
Профессор кафедры теории вероятностей и кибербезопасности

Мои научные интересы включают физику, администрирование Unix и сетей.

Похожие