Can we make an Emacs buffer to be static/pinned?

蓝咒 提交于 2019-12-05 02:20:27

问题


I use an Org file to keep track of my activities, because it's often that I am loosing track of what actually I am aiming to do :)

Now, I would like to reserved a top buffer window with only 5 lines tall and show the narrowed todo from that org file. All other window/buffer activites will not touch that static/pinned buffer.

Is there a way to achieve that result???

Thanks!

EDITED : Can we make that certain buffer to have different background Color? I pressume it's not, because all we have is set-background-color... I hope I am wrong..


回答1:


If you clock in to the Org TODO item, that task will be displayed in the modeline of the current buffer; you might also find that helpful as a reminder of what you're working on.




回答2:


Maybe setting the variable special-display-buffer-names will set you in the right direction.

(setq special-display-buffer-names 
      '(("magic buffer"  (width . 70)
              (height . 7)
              (background-color . "green"))
       ))

to test certainly made a buffer called "magic buffer" turn up in a small and very very green frame. (For real-life use, of course do go through the customize mechanism by all means.)

ETA: And then, there's also this question which might apply here.




回答3:


The original part of the question is a duplicate. See How do I make this Emacs frame keep its buffer and not get resized? (which is slightly enhanced over the earlier Pin Emacs buffers to windows (for cscope)), and the set-window-dedicated-p function.




回答4:


YOu can use org-todo-list to show TODO items and org-agenda will show you useful choices such as "M" that filters your TODO items by keyword.




回答5:


I struggled with the same problem for a while. The best solution I came up with was creating a small Emacs frame (size: 80x13) for my Org-mode agenda and placing it in an always-visible portion of my screen. (Use "C-x 5 2" to create a new frame.)



来源:https://stackoverflow.com/questions/4941398/can-we-make-an-emacs-buffer-to-be-static-pinned

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!