Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1
vote
1answer
40 views

How to always show buffer in the new created frame?

My workflow is: I initialize emacs with a shortcut (in my ~/.i3/config I have a line like this bindcode $mod+49 exec emacsclient -c -n -q -a=''. I use i3wm.org) By default it goes to temp.org, in ....
1
vote
1answer
22 views

How to bury *Ibuffer* when switching to another buffer?

M-x ibuffer Select a buffer Kill that buffer The *Ibuffer* buffer re-appears. How can I get it to behave more like a *Help* buffer, which is buried (dropped to the end of the "recently used" list) ...
0
votes
1answer
22 views

window-configuration-change-hook false positives from desktop-mode

I'm trying to use window-configuration-change-hook in a package to perform some action when a buffer becomes visible for the first time. It works, however when starting Emacs, desktop-mode calls ...
0
votes
1answer
55 views

Assign buffer-name to variable

I'd like to write Elisp code that compares text character by character between two buffers. To do that, I need to first assign buffer names to the variables source-buffer and target-buffer ...
11
votes
5answers
3k views

Revert all open buffers (and ignore errors)

When working on a project under version control with git, I often want to do some things in a shell that affect many of my open files, then revert every buffer that I have open to make sure that I don'...
1
vote
1answer
50 views

How can I automatically swap frame buffers if the buffer is already open?

I've seen the https://www.emacswiki.org/emacs/buffer-move.el script, but I'm trying to something a bit different. Suppose I have a frame with a buffer from file A.h in it and A.cpp in another frame ...
0
votes
2answers
62 views

Create many buffers, name properly, silently

I am trying to avoid using the desktop save mode 1 option in my .emacs file. We sudo a shared service account, so my buffers may differ from my colleagues buffers. I launch Emacs from GNU/Linux with ...
1
vote
1answer
26 views

Left margin grows while typing

My buffer slips to the right while editing a file. Whenever I press a button, left margin area grows one character. This isn't happening for all files. My buffer normally looks like this: line with ...
0
votes
1answer
22 views

move focus between sub-windows (or buffers?) with ctrl-tab?

Currently using GNU Emacs 23.1.1. I've used xemacs since the late 90s and am only now switching to proper emacs. If I had my xemacs window split into a top buffer and bottom buffer, I could move the ...
0
votes
1answer
103 views

Removing buffers from buffer list

This is my first day on Emacs, and I am really liking it so far, but I cannot seem to be able to work correctly with buffers. I am trying to kill specific buffers with C-x k, however upon checking the ...
68
votes
18answers
32k views

How do I switch buffers quickly?

In vanilla Emacs, I have to do C-x b and then manually type out the buffer name to switch. If I forget the name of the buffer, I have to hit TAB to list possible completions. Is there anything I can ...
2
votes
1answer
30 views

How to ignore case when switching buffers?

I want to open a buffer called Echo.md and switch-buffer (C-x b) does not auto-complete it when I type echo because of the case. But find-file does auto-complete from lower-case to upper-case. The ...
1
vote
2answers
86 views

switching from tmux + terminal emacs to Emacs only

I am thinking of switching from tmux + terminal emacs (emacs -nw) to just pure emacs. The only thing that is holding me back is tmux offer switching between sessions without switching the terminal ...
6
votes
1answer
146 views

Clone a buffer to see the same contents in an other mode

Suppose I'm working on a file in org-mode or enriched-mode or html-mode ..., and I wanted to see the same contents in an other window with an other mode, say text-mode, how to do that? I tried to ...
0
votes
2answers
74 views

How select and kill desire many buffers in ido mode?

Emacs 26.1. ido, smex If I want to kill one buffer I use command C-x k Here result: As result I can kill ONE desire buffer. But suppose I need to kill the next buffers: build.gradle, approfile....
2
votes
1answer
61 views

show top 5 used buffer at the bottom of buffer

I'm currently using helm-buffer, and I have bind my c-x b to (helm-buffers-list),however when I switch buffer, I still have to: 1. c-x b 2. type some works 3. enter sometimes, I probably just ...
1
vote
1answer
43 views

get the full path (path + filename) of the currently editing file in to the OS clipboard

when editing a file (for example a .pl file) Whats the quickest way to get the full path (path + filename) of the currently editing file in to the OS clipboard. I'm on macOS, where echo "hello" | ...
0
votes
2answers
148 views

Multiple buffers for same file

The find-file command automatically selects and uses a preexisting buffer that is visiting the same file. My problem is, when using the same buffer in multiple frames, the frames will lag ...
1
vote
1answer
279 views

Kill initial buffers

I want to kill some buffers created by default, such as the GNU Emacs, but putting: (kill-buffer "*GNU Emacs*") On the .emacs doesn't work. I guess this code is called before the initial buffers are ...
2
votes
5answers
255 views

Replacing buffer content without losing point

I looking into extending atomic-chrome to work with text areas that can be modified from the server side, such as site providing collaborative LaTeX editing. The plugin provides updates containing the ...
6
votes
2answers
1k 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.
1
vote
1answer
23 views

Next buffer command change when in the terminal window

I am totally new to Emacs and on this first day I am trying to do very basic stuff in emacs. I am stuck at switching buffers when there is a terminal window open (by using M-x term). The next buffer ...
1
vote
1answer
60 views

how to enable pager like behavior in a shell buffer?

I can't believe I'm saying this, but one thing that is "nice" about windows cmd is the pager. When I do man grep in a bash shell inside emacs buffer it spits out the entire content at once. Is there a ...
15
votes
1answer
3k views

Get content of a buffer

So buffer-string gets the content of the current buffer. But it doesn't allow specifying other buffers. How can I get around that? Do I need something like save-window-excursion to make it work?
0
votes
1answer
29 views

Multiple initial buffers in different windows

I have Emacs set up to open an initial org mode buffer on startup by (setq initial-buffer-choice "~/Directory/Subdirectory/inital_buffer1.org") Ideally on start up, I would like to open 2 buffers in ...
1
vote
1answer
90 views

Do not open “GNU Emacs” buffer when launching Emacs [duplicate]

"GNU Emacs" buffer is opened automatically when launching Emacs(both terminal and GUI), and I have to kill that buffer everytime. It's boring. How to turn "GNU Emacs" buffer off autimatically when ...
0
votes
0answers
31 views

setting left margin to particular buffer

I have buffer called *mydashboard* which is simply an org file. I want to set the left margin of this buffer to 20 chars. I am planning to use this as my dashboard where I can pin my links to other ...
0
votes
0answers
25 views

Tabs on windows with custom buffers

I am new to Emacs and I am trying to set up a decent workflow for projects I already have. What I want to do is to be able to have tabs of buffers on each window (not frame). What I want ...
0
votes
0answers
23 views

Is there a way to split-window-right and switch-to-buffer / find-file in single command?

As described in question title. Closest solution that I can find is to use ido-find-file-other-window orido-switch-buffer-other-windew, but these create a horizontal split by default, and if a ...
0
votes
1answer
42 views

Emacs freeze with async command

Emacs 27.0.50. Windows 10. This function works finely when the line is commented: (defun Pfedj/write-async-file () (interactive) (async-start (lambda () (setq path "~/org/file....
1
vote
1answer
26 views

How to set setting for one mode only?

I currently have the hook below for displaying tabs when in text mode: (add-hook 'text-mode-hook (lambda () (standard-display-ascii ?\t "!---"))) I only want that setting to apply in text ...
0
votes
0answers
21 views

How to silence *Org Preview LaTeX Output* buffer?

Every time I preview a math segment, this buffer pops up with the following text: This is /path/to/bin/dvipng (dvipng (TeX Live)) 1.15 Copyright 2002-2015 Jan-Ake Larsson [1] Is there a way I can ...
0
votes
1answer
26 views

Making resize-mini-windows buffer-local while locally let-bound

Upon striking C-x s (save-some-buffers) or C-x C-c, it report errorsin mini-buffer Making resize-mini-windows buffer-local while locally let-bound. Search the above errors but return no helpful ...
0
votes
0answers
24 views

goto-last-change for multiple buffers

Is there a way to move the cursor to the place of the last change when working with multiple buffers? For working with a single buffer, the command goto-last-change can do the job. My question is for ...
1
vote
1answer
29 views

Disaable the prompts to save files

Every time, I save files, it prompts that save files ..? (y, n !) There are few cases that saving files are mistake operations. How could disable the confirmation prompts?
0
votes
0answers
15 views

emacs breaks down text snippet copied from another X Window application

When I select with a mouse a block of text in Firefox or VIM for example, copy it and then try to paste in Emacs, it gets pasted, but unaligned, meaning that beginning of the lines shift away to the ...
0
votes
0answers
13 views

When scrolling a list of buffer, can the buffer content be shown in a second window?

When using dired and peep together, I can scroll up (C-p) or down (C-n) the dired file list in the left window, and see the content of each file in the right window. This is a very practical ...
0
votes
0answers
26 views

How can I open WoMan's pages from bash?

I first tried emacsclient -t -e '(woman "sox")', but it opens the WoMan's buffer as a popup: Then I tried emacsclient -t -e '(woman "sox") (spacemacs/toggle-maximize-buffer) (sleep-for 3) (delete-...
0
votes
1answer
12 views

Invoke select-buffer inside the current buffer

I accidentally activate select-buffer inside the current buffer's working area However, no idea how to repeat the above operation even though pressing various keys. Cloned the configuration from ...
0
votes
0answers
34 views

Filter to track end of process output in buffer by default

Taking advice from the manual as per this link: https://www.gnu.org/software/emacs/manual/html_node/elisp/Filter-Functions.html I've created a filter for a process I'm running under emacs. (defun ...
2
votes
1answer
36 views

Can flymake or flycheck mark in dired (or in buffer lists) files with errors?

It would be nice if, in addition to flymake/flycheck marking errors in particular files, they could somehow mark files with errors in dired (or maybe just in the open-buffers list). The goal would be ...
3
votes
3answers
181 views

User command to reload file-local variables

How can I easily reload file-local variables, after I have changes their values in the file buffer? I know a work around Save and close the file and re-open. But this is pretty cumbersome.
2
votes
3answers
40 views

How to get the argument from previous use of `command-execute`?

I want to automatically rename the buffer name of compilation mode. The default name is *compilation*. Let's call my new compilation command my-compile. So supposing we run my command like this: M-x ...
0
votes
2answers
60 views

Save place in files but don't move the cursor to the saved position automatically

I'd like to have a command that moves the cursor to the last position it was in when I left the buffer (either by killing it or by killing Emacs). I know I can use saveplace.el to save the position ...
1
vote
1answer
393 views

How to edit and return value of string in Emacs Lisp?

Here is what I wish to achieve: (defun rcd-edit-value (value) (let ((file (make-temp-file "rcd-db-" nil ".txt" value))) (find-file file) (string-from-file))) (defun string-from-...
1
vote
1answer
57 views

Avoid spurious buffers with helm-find-file

I have C-x C-f bound to helm-find-files. Mostly this works really well, but if I hit TAB when there are no completions for an item (most often because I've fumble-fingered the directory or filename ...
2
votes
1answer
49 views

Set the major mode of a new buffer interactively

When creating a new buffer via: C-x b NonExistentBufferName RET RET I would like Emacs to ask me what major mode this buffer is going to use upon opening. Moreover, I want Emacs to infer the major ...
0
votes
0answers
42 views

How to show the output of a command in a quick-fix window?

If I have a command that runs and generates the following output. /path/to/file.rst:1 /another/path/to/file.rst:42 How would I call the command so a buffer is opened and clicking on the line jumps ...
1
vote
1answer
46 views

Select *Input History* buffer

The Emacs *shell* has a nice command history accessible via C-c C-l (comint-dynamic-list-input-ring). However, in classic Emacs fashion, the *Input History* buffer which displays the history is not ...
0
votes
0answers
48 views

Force opening file in new buffer

Is there a way in emacs to open a file (or a dired directory) in a new buffer, even if there's a buffer with the same file (or directory)? find-file and find-alternate-file always return the open ...