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.

6
votes
1answer
108 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 ...
2
votes
1answer
46 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
37 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
1answer
16 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 ...
6
votes
0answers
196 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
166 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-...
5
votes
0answers
76 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
81 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 ...
4
votes
0answers
173 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
78 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
109 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
882 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
114 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 ...
2
votes
0answers
53 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, ...
2
votes
0answers
85 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
104 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
0answers
25 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
0answers
59 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 ...
1
vote
0answers
45 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 ...
1
vote
0answers
17 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
101 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
107 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
78 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
40 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
56 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
634 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
123 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
63 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
41 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 ...
0
votes
0answers
35 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 ...
0
votes
0answers
10 views

How to use helm-locate (or similar) when saving a buffer?

When opening a file, I often use helm-locate to quickly access any file anywhere. But when saving a new buffer, I navigate through the directory structure to get the location I need. Is there a way to ...
0
votes
0answers
26 views

Display annotation contents horizontally in pdf-tools *with* live-preview

When looking at annotations with the pdf-annot-list-annotations command from the pdf-tools package, I prefer to preview my annotation contents in a separate buffer, which is the default behavior. ...
0
votes
0answers
25 views

Emacs flashes when changing buffer with `ido-switch-buffer`

When I change buffer via ido-switch-buffer and enter a python buffer my entire Emacs flashes visually for a second. If I handle other files the same way, it does not. What can be the reason for that? ...
0
votes
0answers
24 views

buffer opens in window below if font size is changed

In my config file I changed the line (set-face-attribute 'default nil :height 100) to (set-face-attribute 'default nil :height 90) and suddenly, when I try to open a file in a separate vertical ...
0
votes
0answers
57 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 ...
0
votes
0answers
9 views

Limit the length of emacs-w3m buffer names

How can I limit the length of emacs-w3m buffer names?
0
votes
0answers
27 views

how would I be able to get a list of files that has been worked on the longest

Instead of recentf which returns a list of files that have been opened, how would I create a function that records the time (active buffer) that I've spent on a given file and returns the list (to a ...
0
votes
0answers
11 views

Not work package “buffer-move” - Symbol's value as variable is void: closed

Windows 10, Emacs 25.1 After install from Melpa and set in my init.el (require 'buffer-move) I restart Emacs and get error: Symbol's value as variable is void: closed When I evaluate (require '...
0
votes
0answers
25 views

Enable Evil jump to work across all panes instead of only active pane

Is there a way to enable evil-jump-forward and evil-jump-backward to use the jump list of all panes instead of only the active pane? In the gif below, here's what happens: Start on left pane at ...
0
votes
0answers
49 views

End of buffer in COMMIT_EDITMSG buffer when i space

I keep hitting a strange issue with the COMMIT_EDITMSG buffer on some occasions I can not insert a space, I can type all other alpha numeric characters just not insert a space between words. When i ...
0
votes
0answers
29 views

What methods are available for formatting text pragmatically for an info style display?

I want to create a temporary buffer and output some formatted text into the buffer, so indentation perhaps column type layouts. I have written some lisp code that returns a load of lists so I want to ...
0
votes
0answers
68 views

How can I run (recenter) after (call-interactive …) that jumps to a buffer?

I would like to jump to a buffer using rtags for eg. Example snippet: (defun generic-lookup () "Follow link/goto line." (interactive) (cond ((string= major-mode "c-mode") (progn ...
0
votes
0answers
30 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 ...
0
votes
0answers
66 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 ...
0
votes
0answers
82 views

open the shell buffer in the same frame as compilation buffer — C compilation

I'm regularly compiling some C programs and one thing is annoying : after I've compiled, I'm opening a shell with M-x shell ./foo, but the shell open in place of the source code's window. I would ...
0
votes
0answers
82 views

Is there a way for a display-buffer-base-action function to know the forthcoming major-mode?

I am writing a mode that implements a persistent horizontal window (very similar to the "persistence compile window" in ECB). While I did study the ECB code it is quite old and endeavored to work ...
0
votes
0answers
102 views

Recent buffers bar

Is there a solution to have last visited buffers in a single one-line bar? That I can see my last, lets say, five buffers all the time and press M-1, M-2, .. to switch to them fast. The TabBarMode ...