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
3
votes
3answers
1k views

Send region to shell in another buffer

Is this possible with stock emacs: I'm editing a .txt file that has a snippet of bash code When I do C-x b RET I can switch to a preopened M-x shell buffer named guesuser@...
1
vote
1answer
285 views

Installed emacs by emacs-bootstrap, got cannot load error and buffer list not work

Using Mac Pro macOS 10.13.1 iTerm2 Has two problems: After installed emacs by emacs-bootstrap, got this error when start it: When try to open buffer list by C-x C-b, it shown this window at bottom ...
3
votes
1answer
186 views

switch to dedicated window instead of duplicating the buffer

I can make a buffer dedicated to a frame using the following snippet I got from other posts (defun toggle-window-dedicated () "Toggle whether the current active window is dedicated or not" (...
3
votes
1answer
478 views

Is it possible to modify the emacs buffer with read-only text?

I am new to emacs lisp and emacs itself, coming from vim. I have seen such a nice feature in the idea: This is a mutable buffer with read-only text hints: type of a variable and a argument name in ...
0
votes
1answer
135 views

Evil emacs use `dd` change buffer and paste with `p`?

I'm running evil emacs in terminal mode. I have two files open in buffers I'm switching between with c-x, left/right. I cut a line of text with dd then switch to another buffer and try to paste with ...
1
vote
1answer
126 views

How to write a helm function to select only from shell buffers

I recently switched from ido to helm. Now I'm using helm-buffers-list to select buffers. Additionally I want to create a customised helm-buffers-list function which allows me only to select from ...
0
votes
2answers
141 views

Emacs Prelude key binding for bury-buffer

Does Emacs Prelude provide a key binding for bury-buffer, which I use very frequently?
4
votes
2answers
680 views

How can I kill all unmodified buffers / files and delete their related frames?

How can I close all unmodified buffers? Usually after a day of work - I've got a ton of buffers / frames open. Right now I have to navigate to each frame and close it - which then prompts me if the ...
2
votes
3answers
250 views

Switch to the nth most recently used buffer

I switch buffers with C-x b a lot. C-x b switches to the most recently used buffer. What if I want to switch to the 2nd most recently used buffer (or the nth most recently used buffer). I tried the ...
2
votes
2answers
395 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
301 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
185 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
217 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
1k 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
262 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
113 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
93 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
329 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
110 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
102 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
134 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
103 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
311 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
513 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
162 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
511 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
54 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
34 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
117 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
361 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
80 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
119 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
158 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
103 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
260 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
232 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
179 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
226 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-...
3
votes
2answers
552 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
810 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
107 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
138 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
101 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
27 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
235 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 ...
6
votes
0answers
209 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
94 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 2 3
4
5
9