Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
21 views

How to force new `shell` to appear in current buffer?

Whenever I run M-x shell, a buffer appears almost randomly somewhere - splitting current buffers as it sees fit. I cannot work out the logic behind it. The docstring says: (shell &optional ...
2
votes
1answer
51 views

What is the difference between switch-to-next-buffer and next-buffer?

To go to the next/prev buffer I use the commands next-buffer / prev-buffer. This works well and is very comfortable. But there are also two other commands switch-to-next-buffer / switch-to-prev-buffer ...
3
votes
1answer
35 views

How to skip some buffers when use prev-buffer/next-buffer? [duplicate]

windows 10, emacs 26.1 Suppose I open 10 buffers. If I can use prev-buffer (C-x left) / next-buffer (C-x right) to go to prev/next buffers. It's very comfortable. But I need when I do this to skip ...
1
vote
1answer
32 views

How hide helm buffers in *Buffer-List*?

windows 10, emacs 26.1, helm 3.0 Here my buffer list: How I can hide all helm buffers? I'm don't want to Emacs to show them in Buffer List ?
1
vote
0answers
5 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 ...
0
votes
0answers
6 views

Is it possible to make layouts-ts buffers not to overlap?

I usually use many layouts-ts in my emacs client. In first layout (say, default one, 0) there are buffers that actually belong to (were opened in) another layouts-ts. Is it possible to make buffers ...
2
votes
0answers
34 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, ...
1
vote
1answer
50 views

Compare if the file content is changed on the buffer

I want to do something like if the "buffer-changed" but "content-not-changed", reverted the buffer. When I work on the checking if the content changed, I tested the following code, but it can't ...
1
vote
1answer
27 views

Place the current buffer at the end of the buffer list without switching buffers in the frame

Is it possible to place the current buffer at the end of the buffer list without switching buffers in the window? I would like to write a wrapper function for ibuffer that modifies the buffer list so ...
2
votes
1answer
80 views

How to get xemacs-like Buffers menu entry in emacs?

xemacs has a nicely organized Buffers entry in its built-in menu. As you can see from the snapshot, it's sorted alphabetically and grouped by modes: I can't find how to make emacs do the same. menu-...
0
votes
0answers
7 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 '...
1
vote
2answers
74 views

How fast swap between buffers?

Windows 10, Emacs 25.1 I have 4 open buffers. Here To switch from buffer "file_1.txt" to buffer "file_2.txt" I use standard command windmove-right. It is bound to <M-right>. To switch from ...
5
votes
1answer
76 views

Edit simultaneously many buffers and save all of them after edit

Windows 10, Emacs 25.1, Helm I open 3 different files: I need: Edit simultaneously all buffers. Add text "customer/" to the node "bodyFileName"in all buffers. After edit save all buffers, Here ...
4
votes
1answer
42 views

Smarter behaviour for “rename-uniquely”?

I am starting to use "rename-uniquely" for help buffers so I can see multiple function helps at the same time. However, what I get is: *Help* *Help*<2> *Help*<3> etc What I would ...
1
vote
1answer
41 views

Don't allow emacs to save a buffer

So this is probably a weird question but out of muscle memory I tend to save files constantly. This becomes a slight inconvenience when I have a compilation buffer then accidentally save that. I was ...
0
votes
1answer
17 views

Launch term in command-line-default-directory

Currently, I have following key binding defined in my init.el: (global-set-key (kbd "C-c C-SPC") (lambda() (interactive) (term (getenv "SHELL"))...
0
votes
0answers
15 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
1answer
67 views

Enable .dir-locals.el variables inside just opened buffer

I'm programmtically create a new buffer as a result of shell command (defun jira-ticket-view (&optional jira-ticket) "Open Jira Ticket Inside Emacs" (interactive) (setq jiraURL (get-jira-...
0
votes
1answer
61 views

Create a new file in a new folder

In Ivy, it can not to create directly a new file in a new folder (as type C-x C-f, then write a file path /current_path/new_fold/new_file). If there is a better way to do it, how to use the key ...
1
vote
1answer
31 views

How can I enable key-binding in a temporary-buffer?

I have a large number of org files that are created to store some specific information, that wont change. I am trying to create a function to go find that file and insert it into a temporary buffer so ...
0
votes
0answers
20 views

Minimap avoiding change window

Recently I started using minimap-mode, but it has been a bit buggy as sometimes when I split the window and open two different buffers, it won't let me go back to a buffer with code (and minimap). So ...
0
votes
1answer
51 views

Emacs daemon multiple buffers for same file

When running Emacs as a daemon, function find-file automatically selects and uses a preexisting buffer that is visiting the same file. My problem is, when using the same buffer in multiple frames ...
2
votes
1answer
41 views

How do I kill all buffers that were opened from browsing rgrep results?

I had a set of buffers open that I want to keep. Then I started a search with M-x rgrep (SPC f g on Spacemacs). While browsing results with n and p, each file containing a result is opened in a new ...
1
vote
1answer
23 views

Can I exit the second client without closing the first client's buffers that were opened in the second client?

First I ran emacs --daemon. Then in one shell, I ran emacsclient -nw and open several files in the buffer. Then in another shell, I did the same thing. At the same time I found that the file buffers ...
1
vote
1answer
188 views

Was org-iswitchb removed, and what is it's closest replacement?

Just getting started getting comfortable with Org. Part of my initial configuration was copied from the GNU manual: (global-set-key "\C-cb" 'org-iswitchb) That didn't work ever; for posterity and ...
0
votes
0answers
28 views

Bury gnuplot buffer for good

When I work with gnuplot from emacs, I open up a file buffer write the commands there and occasionally evaluate the entire buffer using C-c C-b sequence. Unfortunately, whenever I C-c C-b, the ...
0
votes
0answers
43 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 ...
1
vote
1answer
31 views

disable async new buffer question

When I give a new async command with an interactively called async-shell-command, it gives a message "A command is running in the default buffer. Use a new buffer? (y or n)". I think this behaviour ...
1
vote
1answer
49 views

Show included text inline, like with org-display-inline-images

Goal In org-mode, you can include parts of other files during export with the keyword #+INCLUDE. I would like to be able to view the included files in-line in the current buffer (and maybe even edit ...
1
vote
4answers
54 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 ...
0
votes
0answers
27 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 ...
1
vote
1answer
71 views

Why do regexp that matches text in buffer does not (necessarily) match same text in string?

I have a regexp, org-parse-regexp which matches org items which I define to be a heading and a source block (actually, I include more stuff but I want to keep it simple). I've tested it using re-...
0
votes
0answers
22 views

Possible to make 'file changed on disk' have an 'All' option?

I have emacs setup to notify me when a file changes on disk. This is fine mostly, however when many buffers change on disk (typically when switching branches) It can be very annoying to have many of ...
4
votes
4answers
196 views

Open the same file in two frames

With long files, I like to have two buffers that display the same file but at different positions. However, since I have two physical displays, I'd like to have two Emacs buffer, each on its own ...
3
votes
1answer
56 views

Find the first difference between two buffers

Given two buffers, how do I find the first character position where their contents differ? E.g. for contents abcdef and abcDeF, the first difference would be at point=4. For abc and ab, it would be at ...
0
votes
0answers
12 views

why cant emacs fsharp mode display pop-up information nor execute interactively?

When I try to use fsharp to display type signatures and tooltips, the buffer tells me that File 'c:\user\path\[file_name]' not parsed. I've read that this is common when you are using fs files. In ...
1
vote
1answer
41 views

Quickly get the full path+name of the file being edited

When editing a a files in a deeply nested folder structure, how can I quickly copy/yank the full name of the file (including folder path(s) )
0
votes
1answer
54 views

Highlight (and increase font) for specific words in the buffer when it's opened

I'm looking for functionality that will allow me to highlight specific words of text when I open the buffer in specific mode, like it should work if you're in js2-mode web-mode vue-mode and the ...
1
vote
1answer
88 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 ...
3
votes
1answer
90 views

List modified line numbers in a buffer

Emacs provides a fair few commands (delete-trailing-whitespace, for instance) that can be used to clean up buffers, but sometimes we cannot use them and risk compromising the version history of ...
0
votes
0answers
50 views

How can I set a directory buffer in one window to open files in another window?

The setup I am going for would look something like this: ------------------------------ | | | | | B | | | | | A |----...
0
votes
0answers
42 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 ...
1
vote
1answer
270 views

Pop up new frame (with only one window and frame) to show specific buffers

I'm trying to add functionality to my spacemacs config. I want to show allAlchemist buffers in another frame. For example Alchemist Test Report or Alchemist Mix. So when I use M-RET t b, spacemacs ...
2
votes
1answer
124 views

Projectile buffer names with project relative filenames

I have a largish project with many hundreds of source files involved, and duplicate filenames. I would like to set the buffer names (automatically) to the (projectile) project relative path, instead ...
1
vote
1answer
100 views

Remapping C-x C-b to Open List of Buffers in Same Window

I use Emacs across different machines and operating systems. I noticed that when I press C-x C-b to get a list of all buffers, on some machines the list opens in the same window where the cursor is ...
2
votes
2answers
60 views

how to open all files from specific path as read-only buffer

I am looking for a way to open all files from $MYPATH (for instance) as read-only buffer by default. And all rest of the files should be opened as normal buffer (I mean, not read-only buffer). Does ...
4
votes
1answer
59 views

Access contents of buffers from outside

I want to access contents of emacs buffers from outside like in acme editor. Acme is in part a file server that exports device-like files that may be manipulated to access and control the contents ...
0
votes
1answer
38 views

How do I add a sticker to a line in emacs?

I'd like to add a sticker(marker) to a line in the buffer. I wanna do this because I want to mark places which I should not forgive to change during some refactoring process. I want these markers to ...
0
votes
2answers
81 views

init.el: Run function only if no other buffers present

I currently have my *Org Agenda* opening on startup using the following in my init.el: (setq inhibit-splash-screen t) ;; no welcome screen (defun agendafocus() "Focus on agenda at Startup" (org-...
2
votes
3answers
294 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@...