summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-12-01 12:04:14 +0000
committerjao <jao@gnu.org>2026-12-01 12:04:14 +0000
commit855db2c9c439e9be1c66520f44615369b648a914 (patch)
treece8623ffc3896fbf2acf6b4502ab7aa76c299ff1
parentbca51e1655d5a305745b7826cf5134f37f6a960a (diff)
downloadelibs-855db2c9c439e9be1c66520f44615369b648a914.tar.gz
elibs-855db2c9c439e9be1c66520f44615369b648a914.tar.bz2
nits
-rw-r--r--custom/jao-custom-chats.el9
-rw-r--r--custom/jao-custom-notmuch.el16
-rw-r--r--init.el50
-rw-r--r--lib/eos/jao-buffers.el21
-rw-r--r--lib/eos/jao-shell.el2
5 files changed, 37 insertions, 61 deletions
diff --git a/custom/jao-custom-chats.el b/custom/jao-custom-chats.el
index 57af82f..1d0899f 100644
--- a/custom/jao-custom-chats.el
+++ b/custom/jao-custom-chats.el
@@ -141,13 +141,12 @@
(defun jao-chats-open-afio ()
(jao-afio-trisect)
- (when (y-or-n-p "telegram? ")
+ (when (y-or-n-p "open chats? ")
(telega)
- (other-buffer))
- (when (y-or-n-p "mastodon? ")
+ (other-buffer)
(mastodon)
- (other-buffer))
- (when (y-or-n-p "irc? ") (circe "Libera Chat")))
+ (other-buffer)
+ (circe "Libera Chat")))
(setq jao-afio-open-chats #'jao-chats-open-afio)
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index b1f2446..37d56b2 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -30,6 +30,10 @@
(propertize (format "%s%s" (plist-get c :name) (plist-get c :count))
'face (or (plist-get c :face) 'jao-themes-dimm)))
+(when jao-notmuch-enabled
+ (jao-minibuffer-add-variable 'jao-notmuch-minibuffer-string -20))
+
+;;; notifications
(defun jao-notmuch-notify ()
(interactive)
(let* ((cnts (notmuch-hello-query-counts jao-notmuch-minibuffer-queries))
@@ -42,16 +46,6 @@
(when jao-notmuch-mac-hammerspoon (jao-notmuch-hammerspoon))
(jao-minibuffer-refresh)))
-(defun jao-notmuch-notify-and-update (&optional first agenda)
- (jao-notmuch-notify)
- (with-current-buffer "*notmuch-hello*"
- (notmuch-hello-update)
- (when (and first (not (widget-at))) (jao-notmuch-hello-first))
- (when agenda (jao-notmuch-refresh-agenda))))
-
-(when jao-notmuch-enabled
- (jao-minibuffer-add-variable 'jao-notmuch-minibuffer-string -20))
-
;;; saved searches
(defvar jao-notmuch-title-face 'jao-themes-f00)
(defvar jao-notmuch-alt-title-face '(:foreground "grey60"))
@@ -463,7 +457,7 @@
(defun jao-notmuch-after-tree-quit (&optional _both)
(when (not (derived-mode-p 'notmuch-tree-mode 'notmuch-hello-mode))
(jump-to-register ?G))
- (jao-notmuch-notify-and-update t))
+ (jao-notmuch-refresh-hello t))
(defun jao-notmuch-tree--sentinel (proc)
(when (eq (process-status proc) 'exit)
diff --git a/init.el b/init.el
index ea45340..0ab0159 100644
--- a/init.el
+++ b/init.el
@@ -873,8 +873,7 @@
(setq cursor-in-non-selected-windows nil
visible-cursor nil) ;; stop blinking in xterm
-;;;; uniquifiy
-(require 'uniquify)
+;;;; uniquify
(setq uniquify-buffer-name-style 'forward
uniquify-trailing-separator-p t)
@@ -899,18 +898,9 @@
:config
(jao-define-attached-buffer "^\\*xref\\*"))
-;;;; same mode
-(global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode-cmd)
-
-;;;; projects
-;; (use-package project :demand t)
-;; (use-package list-projects :ensure t)
-
;;;; buffer quit function (the triple ESC)
(setq buffer-quit-function (lambda () t))
-;;;; redisplay escape hatch
-;; (setq max-redisplay-ticks 2250000)
;;;; scrolling
(if window-system
(setq scroll-preserve-screen-position 'always
@@ -931,26 +921,6 @@
(diff-buffer-with-file (buffer-file-name buffer)))
"show diff between the buffer and its file"))
-;;;; copy buffer file name
-;; https://stackoverflow.com/questions/18812938/copy-full-file-path-into-copy-paste-clipboard
-(defun copy-buffer-file-name-as-kill (choice)
- "Copy the buffer-file-name to the kill-ring"
- (interactive "cCopy Buffer Name (F) Full, (D) Directory, (N) Name")
- (let ((new-kill-string)
- (name (if (eq major-mode 'dired-mode)
- (dired-get-filename)
- (or (buffer-file-name) ""))))
- (cond ((eq choice ?f)
- (setq new-kill-string name))
- ((eq choice ?d)
- (setq new-kill-string (file-name-directory name)))
- ((eq choice ?n)
- (setq new-kill-string (file-name-nondirectory name)))
- (t (message "Quit")))
- (when new-kill-string
- (message "%s copied" new-kill-string)
- (kill-new new-kill-string))))
-
;;;; warnings display
(setq warning-display-at-bottom nil)
@@ -1163,15 +1133,9 @@
:custom ((ispell-personal-dictionary
(expand-file-name "~/.emacs.d/ispell.dict"))))
-;; (use-package reverso
-;; :ensure t
-;; :init (setq reverso-languages '(english spanish french german)))
-
-;; (use-package wordreference
-;; :ensure t
-;; :init (setq wordreference-target-lang "es"
-;; wordreference-source-lang "en")
-;; :bind (("C-c D" . wordreference-search)))
+(use-package reverso
+ :ensure t
+ :init (setq reverso-languages '(english spanish french german)))
;;;; markdown
(use-package markdown-mode
@@ -1498,10 +1462,7 @@
'("i" "branch from issue" jao-forge-create-branch-from-issue)))
;;;; forgejo
-(use-package forgejo
- :ensure t
- :custom
- (forgejo-hosts '(("https://codeberg.org"))))
+(use-package forgejo :ensure t)
;;;; other git packages
(use-package git-timemachine :ensure t)
@@ -2034,6 +1995,7 @@
(global-set-key (kbd "<f4>") #'jao-transient-utils)
(global-set-key (kbd "<f5>") #'jao-weather)
(global-set-key (kbd "s-w") #'jao-transient-utils)
+ (global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode-cmd)
(global-set-key "\C-cj" #'join-line)
(global-set-key "\C-cn" #'next-error)
(global-set-key "\C-cq" #'auto-fill-mode)
diff --git a/lib/eos/jao-buffers.el b/lib/eos/jao-buffers.el
index 800b264..5665117 100644
--- a/lib/eos/jao-buffers.el
+++ b/lib/eos/jao-buffers.el
@@ -21,7 +21,28 @@
;;; deps
(require 'eldoc)
+(require 'dired)
+;;; copy buffer file name
+;; https://stackoverflow.com/questions/18812938/copy-full-file-path-into-copy-paste-clipboard
+;;;###autoload
+(defun copy-buffer-file-name-as-kill (choice)
+ "Copy the buffer-file-name to the kill-ring"
+ (interactive "cCopy buffer name: (f)ull, (d)irectory, (n)ame")
+ (let ((new-kill-string)
+ (name (if (eq major-mode 'dired-mode)
+ (dired-get-filename)
+ (or (buffer-file-name) ""))))
+ (cond ((eq choice ?f)
+ (setq new-kill-string name))
+ ((eq choice ?d)
+ (setq new-kill-string (file-name-directory name)))
+ ((eq choice ?n)
+ (setq new-kill-string (file-name-nondirectory name)))
+ (t (message "Quit")))
+ (when new-kill-string
+ (message "%s copied" new-kill-string)
+ (kill-new new-kill-string))))
;;; lines
;;;###autoload
diff --git a/lib/eos/jao-shell.el b/lib/eos/jao-shell.el
index 8745492..4d35e4c 100644
--- a/lib/eos/jao-shell.el
+++ b/lib/eos/jao-shell.el
@@ -68,7 +68,7 @@
(lambda (process event)
(when (string= event "finished\n")
(kill-buffer (process-buffer process))))))
- (setq-local jao-term--cmd cmd)
+ (setq-local jao-term--cmd cmd scroll-margin 0)
(term-send-string nil (format "%s%s\n" cmd (if no-kill "" ";exit"))))))
;;;###autoload