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
0
votes
1answer
10 views

How to configure a command to open in same-window unless already open in active frame?

I can use display-buffer-alist to configure a command to open in the same window: (add-to-list 'display-buffer-alist '("*grep*" display-buffer-same-window)) The problem in this case, however, is if ...
0
votes
2answers
39 views

query-replace{-regexp} fails in linux in a non-X terminal when I am in anything other than text mode

I am running emacs 26.1 under linux. It has been working fine for over a year. Recently, I upgraded a lot of packages on my machine, but I did not upgrade nor alter emacs in any way. Now, query-...
0
votes
1answer
30 views

buffer-substring fails in linux in a non-X terminal when I am in anything other than text mode

NOTE: I was careless in evaluating this problem, and the data I posted here is not correct and does not reflect the actual issue that I am facing. Since there are already answers to this question, I ...
0
votes
2answers
32 views

Standard ML Emacs “real time” compilation?

I'm interested in configuring my Emacs environment to perform real-time compilation of a Standard ML buffer, on the event corresponding to a ";" character being entered (at the end of a line), such ...
1
vote
1answer
29 views

ESS: display-buffer-alist reusable-frames does not work as expected

I'm trying to use the display-buffer-alist variable to control how Emacs displays spawned inferior shells (ess-r in particular). I'm using the display-buffer-alist value from ess doc: (setq display-...
1
vote
2answers
66 views

Change major mode for buffer without a corresponding file

I want to change the major mode from fundamental-mode to compilation-mode for a buffer which contains some generated output named for eg. *results*. I've tried to add an entry to auto-mode-alist but ...
0
votes
0answers
17 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
1answer
16 views

How to create a function that have the functionality of helm-projectile-switch-to-buffer but with added opened org files?

I really like helm-projectile-switch-to-buffer as it shows buffers for the specific project I am working in (i have multiple projects open at the same time). But I also rely on org files for notes and ...
0
votes
3answers
83 views

Killing current buffer reliably

I try to add a nicer key binding to kill the current buffer. An obvious solution is to use kill-this-buffer, but often it does not work, or e.g. does not work the first time. The key binding for it ...
0
votes
0answers
34 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
48 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 ...
1
vote
1answer
54 views

Rename org buffers to org's +TITLE instead of filename

I have hundreds of org files in a single directory that I use as a personal knowledge base and use deft to quickly find and open them. Each file is automatically named based on the current time (yyyy-...
1
vote
1answer
26 views

How to stop (aquamacs) emacs opening all new buffers in new (gui) window/emacs frame?

I've just upgraded my aquamacs installation and a bunch of packages, and now emacs is opening every new buffer in a new (gui) window (aka emacs frame). I don't like this. I want to have every buffer ...
3
votes
1answer
30 views

How to know if the buffer returned by a function is newly opened?

I'm using a command that reverts a diff chunk in a buffer (linked question), however I don't know if the buffer is newly opened - or if an existing buffer is used. While I could make a list of all ...
4
votes
1answer
259 views

How to give user free rein to edit a buffer in the middle of lisp code?

I'm trying to run some code, a little like this: (defun myfun () (message "one") (user-does-things) (message "two") I would like the code to do this: display "one" let the user edit in ...
4
votes
1answer
57 views

How to replace the buffer without slowing down the undo system?

Say I have a command that operates on the entire buffer. The simple solution is to: Run the command taking the entire buffer as input. Store the output. Clear the current buffer. Insert the new ...
0
votes
2answers
55 views

How to cycle among all live buffers?

Emacs 26.2 M-C-L is bound to switch-to-next-buffer. I have many files open but it's simply flopping between two. On my old XEmacs the same key cycled through all of them (and S-M-C-L did so ...
0
votes
1answer
31 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
19 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 ...
1
vote
1answer
44 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
66 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 ...
1
vote
1answer
28 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
28 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 ...
2
votes
1answer
36 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 ...
0
votes
2answers
64 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
2answers
285 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 ...
1
vote
1answer
47 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" | ...
1
vote
1answer
31 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
90 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 ...
0
votes
1answer
52 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
142 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
35 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
28 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
31 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 ...
1
vote
1answer
27 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
25 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
32 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
26 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 ...
0
votes
1answer
52 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
37 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
32 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
36 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
39 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
267 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.
0
votes
1answer
29 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
67 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 ....
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 ...

1 2 3 4 5 9