Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to add a note with emacs buffers?

While working on a project, or while browsing code I often open many buffers in emacs. There are often a lot of things that I am seeing in many windows. When the stack in my mind deepens I often forget what particular thing I was looking in some buffer/file which I opened 15-30 mins back. Is there a way where I can add a small note to these buffers when I open them, so I can always go back to them.

Thanks.

like image 307
0xhacker Avatar asked Jul 18 '13 23:07

0xhacker


People also ask

How many buffer can you have in Emacs at a time?

At any time, one and only one buffer is selected. It is also called the current buffer. Often we say that a command operates on "the buffer" as if there were only one; but really this means that the command operates on the selected buffer (most commands do).

Can you only have one buffer open in Emacs at a time?

Each Emacs window displays one Emacs buffer at any time. A single buffer may appear in more than one window; if it does, any changes in its text are displayed in all the windows where it appears.

What is Emacs buffer?

Buffers in Emacs editing are objects that have distinct names and hold text that can be edited. Buffers appear to Lisp programs as a special data type. You can think of the contents of a buffer as a string that you can extend; insertions and deletions may occur in any part of the buffer.

How do you convert from one buffer to another?

For conveniently switching between a few buffers, use the commands C-x LEFT and C-x RIGHT . C-x LEFT ( previous-buffer ) selects the previous buffer (following the order of most recent selection in the current frame), while C-x RIGHT ( next-buffer ) moves through buffers in the reverse direction.


2 Answers

I would recommend looking into org mode's agenda feature.

From within the currently open buffer, you can file away a note to review later. You can set deadlines, TODO / WAITING labels, and most importantly, provide a hyperlink that will take you back to the exact location in the buffer you filed the note from. And you can recall the list of stored links from anywhere with a simple keystroke.

like image 52
keelerm Avatar answered Oct 27 '22 10:10

keelerm


An alternative to using Org mode is to set Emacs bookmarks to keep track of places you have been and take notes about them.

You can add a note (an "annotation") to any bookmark when you create it (see option bookmark-use-annotations) or later (see C-x r l), and you can edit such annotations anytime.

With Bookmark+ you can even use temporary bookmarks, which don't get saved, and you can tag bookmarks with any number of tags you invent.

Both annotations and Bookmark+ tags are free-form text. You can search for the text in either annotations or tags across any set of bookmarks. It is easy to organize bookmarks in various ways, including switching among different sets.

like image 32
Drew Avatar answered Oct 27 '22 10:10

Drew