emacs: termux

This commit is contained in:
Pavel Korytov 2024-05-23 00:36:56 +03:00
parent 4ba6e874ae
commit 6866ac5fd7
2 changed files with 4 additions and 4 deletions

View file

@ -379,7 +379,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(global-set-key (kbd "C-+") 'my/zoom-in)
(global-set-key (kbd "C-=") 'my/zoom-out)
(when my/is-termux
(when (and my/is-termux (not (equal (my/system-name) "snow")))
(define-key key-translation-map (kbd "`") (kbd "<escape>"))
(define-key key-translation-map (kbd "<escape>") (kbd "`")))
@ -2555,6 +2555,7 @@ Returns (<buffer> . <workspace-index>) or nil."
(defun my/ltex-need-p ()
(let ((file-name (buffer-file-name)))
(cond
(my/is-termux nil)
((null file-name) nil)
((string-match-p (rx "/home/pavel/" (+ alnum) ".org" eos) file-name) nil)
((string-match-p (rx (literal org-directory) "/" (or "roam" "inbox-notes" "literature-notes" "journal")) file-name) t)
@ -7859,7 +7860,6 @@ base toot."
(use-package ellama
:straight t
:if (not my/is-termux)
:init
(setq ellama-language "English")
:config

View file

@ -680,7 +680,7 @@ Evil does a pretty good job of abstracting all these packages with a set of vim-
For some reason my ONYX device has the tilde and escape wrong.
#+begin_src emacs-lisp
(when my/is-termux
(when (and my/is-termux (not (equal (my/system-name) "snow")))
(define-key key-translation-map (kbd "`") (kbd "<escape>"))
(define-key key-translation-map (kbd "<escape>") (kbd "`")))
#+end_src
@ -3505,6 +3505,7 @@ Check whether it's necessary to run LTeX:
(defun my/ltex-need-p ()
(let ((file-name (buffer-file-name)))
(cond
(my/is-termux nil)
((null file-name) nil)
((string-match-p (rx "/home/pavel/" (+ alnum) ".org" eos) file-name) nil)
((string-match-p (rx (literal org-directory) "/" (or "roam" "inbox-notes" "literature-notes" "journal")) file-name) t)
@ -10795,7 +10796,6 @@ I don't have access to any proprietary APIs, but LLaMA 3 8b with [[https://ollam
#+begin_src emacs-lisp
(use-package ellama
:straight t
:if (not my/is-termux)
:init
(setq ellama-language "English")
:config