Questions tagged [buffers]

The text you are editing in Emacs resides in an object called a buffer. Each time you visit a file, a buffer is used to hold the file's text. Each time you invoke Dired, a buffer is used to hold the directory listing.

Filter by
Sorted by
Tagged with
2
votes
2answers
366 views

Frame centric (tmux like) emacs workflow

I really like the tmux workflow where one could split a window into multiple planes and then create a second window which could be also split multiple times, so one could have a window where some ...
3
votes
2answers
254 views

Animated progress indicator

This question was originally asking for a custom progress indicator, but I've since removed the 'custom' requirement because I think the generalized case is more helpful to others. I have added a ...
2
votes
1answer
30 views

Prevent AucTeX from changing font within some tags

When I'm using AucTex, I tend to have problems with how the package formats the fonts I use within tags such as \textit{}. It appears that AucTeX wants to display an italicized version of the buffer's ...
2
votes
1answer
180 views

get buffer scroll position and height (aka min and max on-screen buffer locations)

I'm interested in the region of a buffer that is visible on-screen. How do you get the current scroll position of a buffer? I.e. the line number of the topmost line in the viewable area? (Given ...
0
votes
1answer
202 views

Disable confirmation when erasing & saving buffer

In the Emacs sources I found the following trick: (let (buffer-file-name) (erase-buffer)) which inhibits ask-user-about-supersession-threat, but I need to save the buffer too, so I can't hide ...
3
votes
1answer
927 views

How to open multiple files without automatically activating the “Buffer List” split?

Running emacs with multiple files automatically opens the "Buffer List" split-window. eg: emacs -Q *.txt Opens a split window, one which contains a list of buffers. How can multiple files be ...
6
votes
0answers
249 views

How do i run zone (zone-when-idle) for all windows?

Zone Mode is awesome But when I run it using M-x zone, or by setting zone-when-idle variable it starts animating only one(selected) window. Is there any way to run it for all windows?
1
vote
1answer
102 views

Dired+: Not enter in folder when window is split

Windows 10, Emacs 25.1., Dired+ I want to copy file from folder "test" to folder "response". My steps: Open folder "test" see screen: split window by command (split-window-vertically &optional ...
5
votes
0answers
90 views

Customize modeline to display name of prev/next buffer

As topic says - I'm using tabbar + tabbar-forward-tab to quickly switch between recent buffers right now, but I don't really like it. I'd rather have the names of the previous and next buffer show up ...
9
votes
1answer
293 views

How can I automatically close buffers when the underlying file is deleted?

I leave Emacs running all day, and will often will do a lot of file system manipulation on files that are open in Emacs buffers. For example, I might switch to a different branch in Git that has a ...
1
vote
2answers
95 views

Opposite of display-buffer

My use-case: So, I have two windows in a frame. Each window has a different buffer rendering in it. Out of them one was previously displayed using the function display-buffer. Now, I want that buffer ...
1
vote
2answers
94 views

How to get emacs to prompt when a new buffer is changed on save?

for background, I am an emacs newbie and long time unix user... What I am trying to do is to work in emacs in a pattern that is familiar to someone who has used a windows, linux, mac text editor such ...
0
votes
2answers
127 views

quickly switching to a buffer with a particular file name/mode

G'day! it's my "learn some more Elisp" day. I'm trying to make a shortcut that opens my main org file. I've made it this far (global-set-key (kbd "C-c h") 'switch-to-most-recent-org-file) (defun ...
1
vote
2answers
96 views

Transform w3m buffer names in ivy-switch-buffer

emacs-w3m really likes to have its buffers have names like *w3m*<16> or *w3m* so when switching buffers, it's impossible to tell just from the names which buffer is displaying which web page. I'...
3
votes
2answers
263 views

The difference between save-current-buffer and save-selected-window

Consider: (defun test() (interactive) (save-selected-window (switch-to-buffer-other-window "Test buffer."))) When test is run interactively while in a buffer visiting a file, the buffer is ...
4
votes
1answer
479 views

How to insert a formatted string into a specific buffer?

I am looking for a way to insert a formatted text into a specific buffer (not the active buffer). As it seems to me, the only way to do so is to use a snippet as shown below: (insert (propertize (...
3
votes
2answers
2k views

Working with LaTeX in Spacemacs: can PDFs be seen in a buffer, rather than via external PDF reader?

I have been using the latest version of Spacemacs, with AUCTeX. However, when I compile the .tex file into a .pdf file, it opens in my default external PDF viewer software. Is there a way to make ...
4
votes
2answers
148 views

How to show part of buffer in different buffer?

I have a buffer with some data. I want to select part of buffer and open the selection in different buffer (and window) to make it easier to read for me. Is there some function that does it? I am ...
1
vote
1answer
455 views

disable auto-completion for all buffers by default in spacemacs

Is there a way to keep auto-completion enabled as a layer, but have it disabled by default in spacemacs? For example, I want to have the auto-completion layer enabled in dotspacemacs-configuration-...
4
votes
1answer
53 views

Prevent specific parts of buffer from being editable

I wonder if it is possible to prevent specific parts of a buffer from being editable. For example, when I have outlined my document in an org-mode file, I would like to prevent any accidental changes ...
0
votes
0answers
32 views

emacs: leaving buffer in terminal emacs

After opening a file with emacsclient -nw foo.txt I see When done with a buffer, type C-x # in the minibuffer. I however habitually do C-x C-c instead of C-x # Is there a practical difference ...
1
vote
0answers
114 views

Sending an s-expression to another buffer

I'm currently working in Clojure with Arcadia, which is requiring me to use a REPL that doesn't have support with Cider. This has been giving me some trouble given how I usually code, so I'd like to ...
3
votes
1answer
325 views

org mode not showing all the text in my file?

I am new to Emacs and struggling to learn it. I have a test.org file: * Heading ** Sub-Heading *** Third-level When I open the file, the buffer just displays: * Heading... Where did all the ...
0
votes
0answers
78 views

Numbered buffers

I think when I was using Vim buffers were numbered and very easy to switch between (4gt etc.?). Is there nothing like this in Emacs? With ido and an evil leader binding, <space>bn<cr> (if ...
2
votes
1answer
109 views

can other-buffer in split windows select a visible buffer?

I often swap 2 most latest buffers back and forth with (switch-to-buffer (other-buffer)). This works just fine in most situations. However, when I have 2 split windows, and the other window is ...
2
votes
0answers
156 views

reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place [duplicate]

I added (desktop-save-mode 1) to my custom.el towards the end to save buffers and frames. But I primarily use emacs --daemon and start an emacsclient -t. For some reason, if I use just Emacs the ...
2
votes
0answers
99 views

Emacs shell and telnet buffer auto jumps to end of buffer while browsing buffer contents

Was recently required to update to RHEL 7.x and with that came a newer release of Emacs (24.3.1). With emacs I am a big user of shells and telnet sessions within emacs so that I can easily browse the ...
2
votes
1answer
244 views

Helm-ag result buffer disappears

After doing a helm-ag search there is an option to 'save results in buffer'. My issue is that the result buffer disappears if another buffer or file is opened. Is there some way to prevent the buffer ...
0
votes
2answers
215 views

Make the emacs command history size unlimited so I can keep track of files?

I'd like to make the size of the emacs command history unlimited. I open and edit too many files in many different folders and I need a way to keep track of them. The emacs command history looks ...
3
votes
2answers
171 views

Problem with save-current-buffer and find-file

I have a list of files that I want to successively visit with find-file and then return to the first buffer. I thought that save-current-buffer would help me to achieve this. However, with the ...
1
vote
1answer
45 views

Change buffer displayed in window after x amount of time

I find myself switching between buffers constantly to double check activity in other buffers. Is it possible for windows to display different buffers after x amount of time? In other words can I get "...
6
votes
0answers
210 views

ivy preview buffer without buffer creation

When searching in a project using a counsel-ag, I want to implement a preview, similar to the counsel-grep. Now I use copy-paste from counsel-ag with :update-fn (lambda () (counsel-grep-...
2
votes
2answers
480 views

How can I run a command on several buffers / files?

I'm working on some code that is spread across several files. I keep finding myself doing whitespace-cleanup and indent-region (on the whole file), and having to do it on each of the six files. Any ...
3
votes
2answers
743 views

Making it clearer I'm in god-mode

I've been using emacs for a while, but am being quite dismayed by some quite hectic pinky-pain, so have just started using Chris Done's god-mode, which is great, I like it so far. The problem is that ...
3
votes
1answer
96 views

is there some sort of namespace(or filter) for files and buffers per frame available?

Using emacs in daemon mode is fine, because you only pay startup time once. But after a while the buffer and file list is getting filled. So is there a way to see only files which belong to the actual ...
4
votes
1answer
122 views

buffer menu unsort entries

Where can I handle how the control + left-click menu displays entries? This is how it looks when it is displayed the way I want, i.e. with no fancy sorting by file type: And this is how it looks ...
1
vote
1answer
98 views

Want to select asterisk buffers after killing the current buffer

I am facing the question about the buffer selected after killing the current buffer. When I kill the current buffer, the recent file buffer is selected ignoring asterisk buffers. Unless there are no ...
1
vote
0answers
26 views

ANSI coloring in emacs start-process output buffer [duplicate]

I am running a process from within emacs which uses ANSI color codes in its output. I'm using start-process to create the process, and provided a custom buffer name for the process's output (start-...
7
votes
3answers
219 views

How can I have multiple *Help* buffers with different content?

Using C-h f and C-h v shows usefull help. Sometimes I want to compare information. So it would be useful to have more than one *Help* buffer, with different content, visible at the same time. But ...
4
votes
0answers
193 views

Rename buffer in Ibuffer

A buffer can be renamed with rename-buffer command. Is it possible to rename buffers from IBuffer? A use case is to rename a bunch of Term buffers from Ibuffer. The default name for Term buffers is *...
3
votes
0answers
87 views

show full file path in helm-buffers-list and helm-mini

I'd like to show the full file path (if available) for Buffers in helm-buffers-list and helm-mini, just like it shows in the Recentf section of helm-mini. How can I do this? The reason is that I ...
1
vote
1answer
183 views

Copy part of the file in the buffer

I need to copy part of the file (with re-search-forward) to another file under the marker. I know how to use re-search-forward, but I have problems with buffer. Am i right with my logic? 1) open ...
2
votes
1answer
46 views

How do I prevent emacsclient --tty FILE from flashing the other frame's buffer before loading FILE

With emacs -Q if you M-x server-start, then open a buffer, then back in the terminal emacsclient --tty SOMEOTHERFILE a new frame will be created, but it will initially show the buffer shown in the ...
0
votes
1answer
19 views

Calling previous-buffer does not update the buffer-list so it breaks other functions that depends on other-buffer

I have a lisp function that relies on other-buffer which refers to buffer-list. Calling previous-buffer on a window does not update the buffer-list so it breaks the function. How do make it so ...
6
votes
2answers
2k views

how to name buffers (*shell*)

I'm interested in naming Emacs buffers. In particular I'd like to give names to shell buffers that I've started. That way I can easily tell them apart when switching buffers.
2
votes
0answers
25 views

Is it possible to select a buffer by the line at point?

I'm not entirely clear that this is a good idea... but it feels like it might be. To avoid having to think about "which buffer contains what" it might be nice to be able to select buffers by recently ...
11
votes
3answers
913 views

How to add a timestamp to each entry in Emacs' *Messages* buffer?

I depend on the *Messages* buffer a lot, but entries are not timestamped. How can one add a timestamp to each entry in Emacs' Messages buffer? So that something like this: Loading /Users/gsl/lisp.d/...
4
votes
2answers
297 views

Save *Messages* history

Many procedures in Emacs write to the *Messages* buffer. I usually kill it from time to time. My problem is that the content gets deleted once the buffer get killed. Is there a way to preserve the ...
1
vote
1answer
140 views

Large blank space between menu-bar and buffer window

There is a large blank space between the top of the buffer and the bottom of the menu-bar in my Emacs 24 on Ubunutu 16.10 that doesn't want to go away. I've tried Googling but can't really find ...
4
votes
2answers
228 views

Something like save-excursion that saves the complete buffer state?

[This question is related to, but not a duplicate of, the question copy contents of current buffer in a temp buffer and operate on that. Besides other incidental things (e.g., the question itself is ...