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.

63 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
266 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?
6
votes
0answers
266 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-...
6
votes
0answers
234 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 *...
5
votes
0answers
108 views

Why is cloning of file buffers prohibited?

Why does clone-buffer not work on file buffers. I can make it work by the following advice: (advice-add 'clone-buffer :around (lambda (oldfun &rest args) "Allow cloning file buffers." ...
5
votes
0answers
94 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 ...
3
votes
0answers
267 views

Force new window to open to the left or right

I have two frames open with the following window splits: Frame 1 Frame 2 |---+---+ |------| |a |b | |d | | | | | | |---+---+ | | |c | | | |---+---+ |------| Say that ...
3
votes
0answers
82 views

Calculate current-column including display properties

I am trying to calculate the width of text within either a buffer or a string after it has been displayed, i.e. after taking into account the width of any display properties, such as embedded images, ...
3
votes
0answers
103 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 ...
3
votes
0answers
124 views

Save configuration of buffers, buffer positions and windows for later recall

I have different workflows with emacs: for example Python development and LaTeX. When I code some Python I like to have a wider window to have different buffers opened at the same time, plus a repl ...
3
votes
0answers
1k views

When using emacsclient, how can I open the file in the active buffer?

When I open a file with emacsclient without invoking -c, Emacs visits the file in a new buffer in the background while leaving my current window configuration in place. I'd like to change this, e.g. ...
2
votes
0answers
70 views

migrated from emacs 25 to 26.1: cannot force find-file/counsel-projectile-find-file to always open buffer in current window

Recently I migrated from emacs 25 to 26.1. Before I reached the window behaviour, where I could always open a file at the window at point. The most simple case to illustrate undesired behaviour: I ...
2
votes
0answers
157 views

How to fix a buffer to a pane

I have my emacs in 2 by 2 configuration. When debugging, certain actions triggered the opening of another file. The newly opened file could be in a specific window pane and covers originally opened ...
2
votes
0answers
106 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
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 ...
2
votes
0answers
133 views

Add an article preview to the gnus-summary-line-format

I am using gnus to read my email and the current setting for the gnus-summary-line-format in my .gnus.el is (gnus-summary-line-format "%U%~(pad-left 5)R: %~(max-right 25)D | %~(pad-right 25)~(max-...
1
vote
1answer
15 views

How to save and restore the association of a window to buffer across Emacs sessions?

I have a window layout with three windows and I would like Emacs to remember the buffers even if the buffers don't exist after restart. Context: I am using Spacemacs for Clojure development. In ...
1
vote
1answer
39 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 ...
1
vote
1answer
58 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 ...
1
vote
0answers
27 views

Flycheck error buffer empty for python files in the {package-name}/bin/ directory

I have this odd problem when I run flycheck on the python files inside the {package-name}/bin directory of my git repository. When I attempt to run flycheck on these files, the buffer with the ...
1
vote
0answers
119 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 ...
1
vote
0answers
152 views

how to prevent buffer menu from folding

Is there a way to prevent emacs from folding the buffer menu? Example, when I Control + 'right click' on a buffer I see a menu like this: Buffer Menu ----------- JavaScript > XQuery > Custom &...
1
vote
0answers
91 views

Weird emacs graphics on popup windows

I have emacs 25.1.1 installed on my kubuntu 16.10 with gtk-3.18.9. Those popup messages that you get with emacs when you exit without saving: Those are looking very strange and taking up my full ...
1
vote
0answers
43 views

Calling `doc-view-goto-page` in other buffer

I'm trying to control paging of a PDF file in doc-view mode. Say we have the following snippet (let ((origin-frame (window-frame))) (with-selected-frame (make-frame-command) (let ((pdf-buffer (...
1
vote
0answers
66 views

How to trigger function on particularly named buffer creation?

How does one trigger a function to run when a buffer of a particular name is created? My use case is connecting to freenode with ERC for Emacs related channels. I manually call a function to create a ...
1
vote
0answers
24 views

Rename Jabber buffer

I would like to rename a connected Jabber buffer. However, if I rename the buffer in the usual way, new messages coming in recreate the original one. How can I rename the buffer so that it remains ...
1
vote
0answers
724 views

Some buffers don't allow evil mode commands

Switching to *Messages* causes evil-leader keys not to be used and :q tries to quit the whole emacs instance from this buffer, but not other buffers. Also the C-w c (to close pane) doesn't work ...
1
vote
0answers
28 views

find-file opens file but buries its buffer when ECB is activated

I have a hook in my .emacs file that activates ECB when prog-mode entered: (add-hook 'prog-mode-hook 'ecb-activate) When I open the first file that starts a prog-mode, it seems to cause find-file* ...
1
vote
0answers
128 views

Using cmd-N and cmd-T with emacs

I am using a Mac 10.9.5 and Emacs 24.4, installed with macports and aliased as alias emacs /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs At the moment, when I have an emacs file open and I ...
1
vote
0answers
66 views

Suppress new buffer when running typeset command (C-c C-c) in AUCTeX

When running C-c C-c to typeset/compile the LaTeX code in the current buffer, a second buffer pops up to show the compilation -- is there a way to suppress this buffer if there are no errors?
0
votes
0answers
23 views

Setting up Emacs as an external editor on windows 10

Apologies if this has been asked multiple times already, haven't found a useful answer. I am trying to use Emacs as an external editor on two separate applications in windows 10, one is a notes app (...
0
votes
0answers
40 views

How to add a kill-buffer item at the beginning of the Buffers menu-bar menu?

When I want to kill a buffer and I have my hands on the keyboard it's simply C-x k RET but if I have already the right hand on the mouse the k RET part is a bit out of reach for my left hand… ...
0
votes
1answer
41 views

Re-fill compilation-mode buffer from shell script

This might require more tricks than just Emacs-fu, but since Emacs is at the heart of it I hope to get some ideas on how to approach my need here. I use Emacs/Make/gcc as my development environment. ...
0
votes
0answers
9 views

Center the following buffer in next-error-follow-minor-mode

I am using next-error-follow-minor-mode to preview my search results. The problem is that the preview buffer doesn't center around the current line: Related
0
votes
1answer
44 views

Why set-window-dedicated-p doesn't work with certain buffers?

I use emacs for latex, with pdf-tools. My layout is always a window with PDFView buffer on the right, any other buffer on the left. I always want the right window that cannot be touched by ...
0
votes
0answers
27 views

Opening a Remote Shell Renames Buffer Open to \*shell\*

here is a simple elisp program for opening a shell in a named buffer: (defun shell-make (dir buffer-name) (let* ((default-directory dir) (buffer (get-buffer-create buffer-name))) (set-...
0
votes
0answers
29 views

How to find what is creating and killing so many buffers?

A bunch of creating and killing buffers in my setup and I can't track down what is it. Here is my debug code: (add-hook 'kill-buffer-hook (lambda() (message "Killed: %s / %s" major-mode (...
0
votes
1answer
31 views

How could “C-x 4 b ”which pop-up-window but display to the right?

In emacs -Q, I strike C-x 4 b which invoke (switch-to-buffer-other-window) and display the other window vertically as I reference it's source code (defun switch-to-buffer-other-window (buffer-or-...
0
votes
1answer
47 views

How to prevent a file show up for a second when emacsclient starts?

I am using emacs-daemon. When every I re-start my daemon and do C-x C-b my Buffer List seems always full. Later, when I start my emacsclient for a seconds(like a fast flash) it shows a file that ...
0
votes
0answers
45 views

how can I re-use the window created by `display-buffer-in-side-window`?

I'm creating a window at the bottom of the frame with display-buffer-in-side-window and it displays a given buffer, I would like to have another buffer created but re-use that exact same window. How ...
0
votes
0answers
47 views

disable automatic python file scrolling if using blacken or yapfify

I am using blacken to automatically format my python files (use-package blacken :demand t :after python :init (add-hook 'python-mode-hook 'blacken-mode) ) (use-package python :mode ("\\.py\\'" ...
0
votes
0answers
67 views

how to buffer video output from a .mp4 file?

Just like images and tetris game, I want to select a region preserved for buffering saved video files. The goal is to get a cool looking notebook that supports my vlogs.
0
votes
0answers
41 views

Work in indirect-buffer faster than in original?

When I read the org-manual which are about 12,000 lines long, it's slow to edit such a large file. Then I invoke "narrow-to-substree" and read "2.Documents Structure" in a indirect-buffer. At this ...
0
votes
0answers
100 views

Always open buffer in a new frame instead of a window

I found this question which suggested that setting pop-up-frames to a non-nil value should enable this behaviour. However when I added (setq pop-up-frames t) to my emacs init only some of the buffers ...
0
votes
1answer
62 views

Whitespace mode settings on per major mode basis

When I open the Linux Kernel code, my default indentation conflicts with the desired formatting of the Kernel. I use Emacs Prelude, so I added the settings from this link to my c-mode-common-hook. I ...
0
votes
0answers
23 views

Fringe value not taking effect until I switch buffers

I'm not quite sure how best to describe what's going on. I have the following lines on my init.el file. (setq-default left-fringe-width 40) (setq-default right-fringe-width 40) I expect this to ...
0
votes
0answers
42 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
39 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
51 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
0answers
16 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
50 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 ...