Diverted
Identify temporary Emacs diversions and automatically return to original location
Install / Use
/learn @xenodium/DivertedREADME
👉 [[https://github.com/sponsors/xenodium][Support this work via GitHub Sponsors]]
- diverted.el
Identify temporary diversions and automatically return to original point location.
Let's say you want to select the current function and indent region, this leaves your point in an unintended location. You likely wanted your point in the location becore selecting the current function. Diverted helps identify those scenarios and brings point back to your intended location.
- Before
#+HTML: <img src="https://raw.githubusercontent.com/xenodium/diverted/main/demo/before.gif"/>
Notice how point is left at the top of the screen after pressing TAB to indent region.
- After
#+HTML: <img src="https://raw.githubusercontent.com/xenodium/diverted/main/demo/after.gif"/>
Notice how point is left where it was prior to selecting the functoin and pressing TAB to indent region.
- Setup
-
Load package
#+begin_src emacs-lisp :lexical no (require 'diverted) #+end_src
-
Identify diversions and provide a breadcrumb to get back.
#+begin_src emacs-lisp :lexical no (add-to-list 'diverted-events (make-diverted-event :from 'er/expand-region :to 'indent-for-tab-command :breadcrumb (lambda () (diverted--pop-to-mark-command 2)))) #+end_src
-
Enable `diverted-mode'
#+begin_src emacs-lisp :lexical no (diverted-mode +1) #+end_src
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
