summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2024-03-02 19:04:01 +0800
committerJSDurand <mmemmew@gmail.com>2024-03-02 19:04:01 +0800
commit6aec34070b26580b2fbb4f2a0455ed5bba9c1029 (patch)
tree2076b101a8bdcd60970b4d386427f15dea269569
parentad946996f619c264b1527598abf4ecdc8ad4bd57 (diff)
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.
-rw-r--r--view-conf.el7
1 files changed, 6 insertions, 1 deletions
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))))