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
4
votes
1answer
208 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 ...
2
votes
1answer
271 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
22 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 ...
2
votes
0answers
65 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
68 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
48 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
142 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-...
1
vote
2answers
258 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
172 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
71 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
169 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
53 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
30 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
350 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-...
1
vote
1answer
701 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
56 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 ...
2
votes
1answer
101 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
2answers
169 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 ...
2
votes
1answer
60 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 ...
2
votes
1answer
189 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 ...
2
votes
1answer
808 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
62 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 ...
2
votes
1answer
120 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 ...
2
votes
1answer
275 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 ...
2
votes
5answers
279 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
30 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
179 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-...
5
votes
5answers
1k 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 ...
2
votes
1answer
92 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 ...
1
vote
1answer
50 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
108 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
300 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
105 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
89 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
765 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
341 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 ...
3
votes
1answer
624 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 ...
4
votes
2answers
313 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
85 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
55 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
114 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-...
3
votes
3answers
1k 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@...
1
vote
1answer
261 views

Installed emacs by emacs-bootstrap, got cannot load error and buffer list not work

Using Mac Pro macOS 10.13.1 iTerm2 Has two problems: After installed emacs by emacs-bootstrap, got this error when start it: When try to open buffer list by C-x C-b, it shown this window at bottom ...
3
votes
1answer
171 views

switch to dedicated window instead of duplicating the buffer

I can make a buffer dedicated to a frame using the following snippet I got from other posts (defun toggle-window-dedicated () "Toggle whether the current active window is dedicated or not" (...
3
votes
1answer
415 views

Is it possible to modify the emacs buffer with read-only text?

I am new to emacs lisp and emacs itself, coming from vim. I have seen such a nice feature in the idea: This is a mutable buffer with read-only text hints: type of a variable and a argument name in ...
0
votes
1answer
127 views

Evil emacs use `dd` change buffer and paste with `p`?

I'm running evil emacs in terminal mode. I have two files open in buffers I'm switching between with c-x, left/right. I cut a line of text with dd then switch to another buffer and try to paste with ...
1
vote
1answer
121 views

How to write a helm function to select only from shell buffers

I recently switched from ido to helm. Now I'm using helm-buffers-list to select buffers. Additionally I want to create a customised helm-buffers-list function which allows me only to select from ...
0
votes
2answers
134 views

Emacs Prelude key binding for bury-buffer

Does Emacs Prelude provide a key binding for bury-buffer, which I use very frequently?
4
votes
2answers
614 views

How can I kill all unmodified buffers / files and delete their related frames?

How can I close all unmodified buffers? Usually after a day of work - I've got a ton of buffers / frames open. Right now I have to navigate to each frame and close it - which then prompts me if the ...
2
votes
3answers
233 views

Switch to the nth most recently used buffer

I switch buffers with C-x b a lot. C-x b switches to the most recently used buffer. What if I want to switch to the 2nd most recently used buffer (or the nth most recently used buffer). I tried the ...