“Real elisp” series aims to tell my experience of using elisp to customize Emacs, and invite Emacs to give me some advice — if there are many Emacs users, hahaha.
I use Emacs’s org mode to manage the progress of watching animation
Every weekday for lunch and dinner, I will arrange a meal animation. In order to watch different animations for each meal, my approach is:
- Select an animation from the end of the list (for example, select “ghost blade”);
- In this animation, create a sub node (such as “watch the 17th session”), set it to todo state, and set the schedule attribute to the lunch or dinner time of the next day;
- Move the entry of the animation to the position of the first child node of the current parent node (that is, to the top of Rhapsody of animals), so that the next animation will not be selected immediately.
To move to the first child node, you can cut and paste, or you can use the shortcut provided by org mode
M-↑You can only move up one level. If you want to move to the location of the first child node, you need to keep pressing this shortcut key. In order to simplify this step, I defined a new command and shortcut key.
This function is very simple. It only needs to be called continuously
M-↑The command corresponding to the shortcut key, until it ends with an error. In order to know
M-↑Which function corresponds to? In a buffer whose main mode is org mode, press
C-h kAnd press again.
M-↑, you can see that its corresponding function is
Now, you can define this short and concise function
(defun up-to-top () Move the current entry all the way to the top (interactive) (loop (org-move-subtree-up)))
I’ve bound it to the shortcut C-C o u
(define-key org-mode-map "\C-cou" 'up-to-top)
Using org mode to record the viewing progress of the animation will create many items like “watch XX words” under the animation items. If it’s “steelmaking” which is more than 60 episodes of animation, it’s still quite shocking and perplexing to see this series of sub items when it unfolds. In order to solve this problem, I have also customized some other functions in org mode. I will explain them next time.
Read the original text