From 6aec34070b26580b2fbb4f2a0455ed5bba9c1029 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 2 Mar 2024 19:04:01 +0800 Subject: view: focus on mail timer in timer-list * view-conf.el (durand-view-timers-or-temps): If this command calls timer-list, I want to place the cursor on the line showing my timer for fetching mails, if there is such a line. --- view-conf.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/view-conf.el b/view-conf.el index 1d78947..09f70ee 100644 --- a/view-conf.el +++ b/view-conf.el @@ -138,7 +138,12 @@ If ARG is '(4), view the list of timers." connected: %s, cycles: %d, condition: %s" full-capacity remain "%%" fullp charging connected cycle condition))))) - ((equal arg (list 4)) (list-timers)) + ((equal arg (list 4)) + (list-timers) + (save-match-data + (cond + ((search-forward "mail" nil t) + (goto-char (pos-bol)))))) (t (user-error "Unsupported ARG: %S" arg)))) -- cgit v1.2.3-18-g5258