(require 'package )
(add-to-list 'package-archives '(" gnu" . " https://elpa.gnu.org/packages/" ) t )
(add-to-list 'package-archives '(" melpa" . " https://melpa.org/packages/" ) t )
(add-to-list 'package-archives '(" nongnu" . " https://elpa.nongnu.org/nongnu/" ) t )
(setq use-package-compute-statistics 't )
automatic-install-on-startup
(setopt use-package-always-ensure 't )
(use-package reverse-im
:ensure t
:init (reverse-im-mode)
:custom
(reverse-im-input-methods '(" cyrillic-colemak" ))
(reverse-im-cache-file " ~/.cache/emacs/reverse-im-cache.el" )
:pin melpa )
(use-package ispell
:commands (ispell ispell-region ispell-word)
:config
(ispell-set-spellchecker-params )
(ispell-hunspell-add-multi-dic " en_US,ru_RU" )
:custom
(ispell-program-name " hunspell" )
(ispell-dictionary " en_US,ru_RU" )
; ; store into personal wiki
(ispell-personal-dictionary " ~/howm/.hunspell_personal" ))
(setq system-time-locale " C" ) ; ; for org-pomodoro
; ; for loading config in org-mode
(defvar *fs-encoding* 'utf-8 )
(prefer-coding-system 'utf-8-unix )
(setopt icon-map-list nil )
(global-visual-line-mode )
(use-package modus-themes
:init (load-theme 'modus-operandi )
:when (not (eq window-system nil )))
(use-package vertico
:init (vertico-mode)
(setq completion-in-region-function
(lambda (&rest args )
(apply (if vertico-mode
#'consult-completion-in-region
#'completion--in-region )
args))))
(use-package consult)
(use-package consult-eglot :commands (eglot))
(use-package dired
:custom (dired-dwim-target t )
:ensure nil )
(use-package magit :commands (magit))
(use-package howm
:init (when (not (eq system-type 'windows-nt ))
(setq howm-view-use-grep t ))
:custom
(howm-search-other-dir t )
:pin melpa )
(defun howm-insert-prop-line (&optional mode )
" Enable & save major MODE to the -*- line to use it with howm."
(interactive (list (intern
(completing-read " Choose major mode: "
(mapcar #'cdr auto-mode-alist)
nil t ))))
(funcall mode)
(howm-mode)
(add-file-local-variable-prop-line
'mode (intern (string-trim-right (symbol-name mode) " -mode" ))))
; ; programmatically: (howm-insert-prop-line 'c-mode)
(use-package org-pomodoro
:custom
(org-pomodoro-keep-killed-pomodoro-time 't )
(org-pomodoro-length 80 )
(org-pomodoro-short-break-length 15 )
(org-pomodoro-long-break-length 35 )
:pin melpa )
(use-package org-pomodoro-third-time
:vc (:url " git@github.com:telotortium/org-pomodoro-third-time.git" )
:init (org-pomodoro-third-time-mode))
(use-package org-drill
:pin melpa )
(defun my-org-drill-file-names-in-howm ()
" Return list of absolute filenames of org-drill files in howm"
(delete-dups
(mapcar #'car (howm-grep " \: drill\: "
(howm-files-in-directory howm-directory)))))
(defun my-org-drill-set-scope ()
(interactive )
(let ((scope-var
(completing-read " Choose scope for org-drill: " (list
" howm"
" file"
" tree"
" file-no-restriction"
" agenda"
" agenda-with-archives"
" directory" ))))
(if (equal scope-var " howm" )
(setq org-drill-scope (my-org-drill-file-names-in-howm))
(setq org-drill-scope (intern scope-var)))))
(define-advice org-drill (:before (&rest _args))
(my-org-drill-set-scope))
(define-advice org-drill-cram (:before (&rest _args))
(my-org-drill-set-scope))
(defun org-drill-time-to-inactive-org-timestamp (time )
" Convert TIME into org-mode timestamp."
(format-time-string
(concat " [" (cdr org-time-stamp-formats) " ]" )
time))
(use-package auctex
:init (setq TeX-auto-save t )
(setq TeX-parse-self t )
(setq-default TeX-master nil )
:pin gnu )
(setq-default TeX-engine 'luatex )
(setq
user-full-name " artsi0m"
user-mail-address " karakin2000@gmail.com" )
(use-package smtpmail
:custom
(smtpmail-smtp-server " smtp.gmail.com" )
(smtpmail-stream-type 'starttls )
(smtpmail-smtp-service 587 )
(smtpmail-servers-requiring-authorization " *" )
(send-mail-function 'smtpmail-send-it )
:ensure nil )
(use-package gnus
:custom
(gnus-save-score t )
(gnus-startup-file " ~/howm/.newsrc" )
(gnus-backup-startup-file 'never )
(nnrss-use-local t )
(gnus-use-cache t )
(gnus-select-method
'(nnimap " gmail"
(nnimap-address " imap.gmail.com" )
(nnmail-expiry-target " nnimap+gmail:[Gmail]/Корзина" )
(nnimap-server-port 993 )
(nnimap-stream ssl)
(gnus-search-engine gnus-search-imap)
(nnmail-expiry-wait immediate)))
:ensure nil )