Guest User

.emacs

a guest
Jul 30th, 2021
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 4.33 KB | None | 0 0
  1.  
  2. ;; Added by Package.el.  This must come before configurations of
  3. ;; installed packages.  Don't delete this line.  If you don't want it,
  4. ;; just comment it out by adding a semicolon to the start of the line.
  5. ;; You may delete these explanatory comments.
  6. (package-initialize)
  7.  
  8. (custom-set-variables
  9.  ;; custom-set-variables was added by Custom.
  10.  ;; If you edit it by hand, you could mess it up, so be careful.
  11.  ;; Your init file should contain only one such instance.
  12.  ;; If there is more than one, they won't work right.
  13.  '(column-number-mode t)
  14.  '(current-language-environment "UTF-8")
  15.  '(cursor-type (quote box))
  16.  '(custom-enabled-themes (quote (wombat)))
  17.  '(global-display-line-numbers-mode t)
  18.  '(markdown-command "/usr/bin/pandoc")
  19.  '(mm-inline-large-images (quote resize))
  20.  '(org-agenda-files
  21.    (quote
  22.     ("~/Общедоступные/Процесс/Обеспечение.org" "~/Общедоступные/Процесс/Механизатор.org" "~/Общедоступные/Процесс/Токарь.org")))
  23.  '(org-display-remote-inline-images (quote download))
  24.  '(org-startup-with-inline-images t)
  25.  '(package-selected-packages (quote (auctex org markdown-mode)))
  26.  '(scroll-bar-mode nil)
  27.  '(send-mail-function (quote mailclient-send-it))
  28.  '(show-paren-mode t)
  29.  '(size-indication-mode t))
  30. (custom-set-faces
  31.  ;; custom-set-faces was added by Custom.
  32.  ;; If you edit it by hand, you could mess it up, so be careful.
  33.  ;; Your init file should contain only one such instance.
  34.  ;; If there is more than one, they won't work right.
  35.  '(default ((t (:family "Iosevka Slab" :foundry "BE5N" :slant normal :weight normal :height 112 :width normal)))))
  36.  
  37. ;; Установка tab-ов
  38. (defun my-insert-tab-char ()
  39.   "Insert a tab char. (ASCII 4, \t)"
  40.   (interactive)
  41.   (insert "\t"))
  42.  
  43. (global-set-key (kbd "TAB") 'my-insert-tab-char)
  44. ;; make return key also do indent, globally
  45. (electric-indent-mode 1)
  46.  
  47. ;; Подключаем репозиторий elpa
  48. (add-to-list 'package-archives
  49.     '("org" . "https://orgmode.org/elpa/") t)
  50.  
  51. ;; Подключаем репозиторий MELPA stable
  52. (require 'package)
  53. (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
  54. ;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
  55. ;; and `package-pinned-packages`. Most users will not need or want to do this.
  56. ;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
  57. (package-initialize)
  58.  
  59. ;; Меняю названия TODO
  60. (setq org-todo-keywords
  61.       '((sequence "ИСПОЛНИТЬ"
  62.           "|"
  63.           "ИСПОЛНЕНО"
  64.           "ОТМЕНЕНО"
  65.           "ОСТАНОВЛЕНО")))
  66.  
  67. ;; Красим ключевые слова задач в разные цвета
  68. (setq org-todo-keyword-faces
  69.      '(
  70.     ("ИСПОЛНИТЬ" :background "red1" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
  71.     ("ИСПОЛНЕНО" :background "green" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
  72.      ("ОТМЕНЕНО" :background "gray" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
  73.      ("ОСТАНОВЛЕНО" :background "blue" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
  74.     ))
  75. ;; По инструкции https://orgmode.org/manual/Closing-items.html#Closing-items
  76. (setq org-log-done 'time)
  77. (setq org-log-done 'note)
  78.  
  79. ;; Исправляем сломавшиеся ссылки
  80. (defun org-fix-links ()
  81.   "Fix ill-formatted internal links.
  82. E.g. replace [[*TODO Headline][headline]] by [[*Headline][headline]].
  83. Go through the buffer and ask for the replacement."
  84.   (interactive)
  85.   (visible-mode 1)
  86.   (save-excursion
  87.     (goto-char (point-min))
  88.     (let ((regexp (format "\\[\\[\\*%s\\s-+"
  89.                           (regexp-opt org-todo-keywords-1 t))))
  90.       (while (re-search-forward regexp nil t)
  91.         (when (and (save-excursion
  92.                      (goto-char (match-beginning 0))
  93.                      (looking-at-p org-link-bracket-re))
  94.                    (y-or-n-p "Fix link (remove TODO keyword)? "))
  95.           (replace-match "[[*")))))
  96.   (visible-mode -1))
  97.  
  98. ;; Чиню ссылки по инструкции https://www.linux.org.ru/forum/general/16448988?cid=16449039
  99. (defun string-empty-p (s)
  100. (zerop (length s)))
  101.  
Advertisement
Add Comment
Please, Sign In to add comment