The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [revert-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
62 views

How to quickly revert the buffer?

revert-buffer is often slower than closing an opening the same file. I've noticed - for example, I can undo to the state of the file before reverting. While this might be useful in some cases, I ...
1
vote
2answers
30 views

Automatic periodic reload of all orgmode agenda files

I use about 15 orgmode agenda files, and a number of them I use passively only. Examples are my wife's agenda converted from Google calendar, a work agenda from Outlook and a list of git commits (...
2
votes
0answers
33 views

How to make emacs not crash when converting binary file to UTF-8

When I run revert-buffer-with-coding-system [RET] UTF-8 Emacs crashes. This is the file I'm trying to revert. \0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`...
1
vote
1answer
76 views

Revert buffer with coding system

Chances are that every time utf-coding should be activated by invoking 'M-x revert-coding-system` , even though a long list of utf-prefer configuration: (prefer-coding-system 'utf-8) (set-...
6
votes
1answer
120 views

Surprisingly persistent local variable

A local variable keeps coming back, and I know not whence. In a certain buffer, TeX-command-extra-options is "--synctex=1", even after I have removed this from my init.el and restarted Emacs. I tried ...
2
votes
1answer
105 views

How to revert a buffer using the “g” shortcut

I can refresh my dired buffer using M-x revert-buffer and I've seen multiple places that I can do this more easily using g but don't understand how that would be run. Does it mean M-x g or running g &...
1
vote
0answers
22 views

automatically backup before revert

I would like to backup buffers before they are (auto) reverted. This is nontrivial because the file a buffer is visiting isn't current, and the backup system normally works by duplicating the file ...
1
vote
1answer
67 views

How to understand the meaning of “revert”?

Suppose I open a file in a buffer of Emacs, and then some other program different from Emacs modifies the file. When I try to modify the buffer in Emacs, Emacs will notify me about the change which ...
3
votes
1answer
164 views

Dired+. Autorefresh after copy files

Windows 10, Emacs 25.1, Dired+. I copy file from one folder to another. Here screens: After copy I get the next result: As you can see the bottom buffer is not refresh. So I need to go to bottom ...
2
votes
0answers
241 views

Auto-revert for changed pdf buffers?

Specifically in the content of exporting org->latex->pdf when using pdftools to view the resulting pdf, how can I stop emacs from asking me if I want to revert the pdf buffer and instead just auto-...
2
votes
0answers
67 views

Recommended use of non-file-visiting revert-buffer-function

Summary I am working on a major mode derived from special-mode, which populates its buffers with formatted lists of items retrieved from a web API. Reverting such a buffer involves refetching and ...
1
vote
1answer
174 views

How to revert buffer after magit-checkout?

I use smart-mode-line package and I noticed when I change/checkout branches in command line, or in Magit, this is not reflected in the Smart Mode Line. I still see the name of the old branch, while I ...
2
votes
1answer
170 views

dired not showing recently created files when emacs is run in daemon mode

When running emacs in daemon mode, a directory listing using dired does not seem to show the latest created files. What could be the cause of this issue, and how can I fix it?
11
votes
1answer
458 views

How to stop dired printing “Reverting buffer …”

After setting dired-auto-revert-buffer to t, even when I'm working on a buffer of file that may produce some results, the message keep printing if there is a dired buffer behind current buffer. This ...
9
votes
5answers
2k views

Revert all open buffers (and ignore errors)

When working on a project under version control with git, I often want to do some things in a shell that affect many of my open files, then revert every buffer that I have open to make sure that I don'...
1
vote
2answers
43 views

Reload single file in every window

I have this function that reload a file but it don't work when I have same buffer opened in 2 different windows: (defun reload () "Reload a file it will kill buffer, open file again and jump to ...
0
votes
1answer
121 views

Emacs auto-revert remote image file

I would like to auto-revert some remote image/pdf files. I have activated the option (setq auto-revert-remote-files t) and see that the file effectively auto-revert. Yet the image does not update. I ...
11
votes
1answer
526 views

On “really edit the buffer”, have emacs run ediff-current-file automatically?

Context When emacs detects that a file was changed outside of an editing buffer. Observed emacs will ask: somefilename changed in disk; really edit the buffer? (y, n, r or C-h) (Incidentally, ...
1
vote
1answer
150 views

Get revert-buffer to stop corrupting my files

I'm not sure how to completely reproduce this. It may be related to this other question of mine. My hope is that someone else has seen this as well and knows what causes it. Sometimes when editing ...
8
votes
3answers
2k views

global-auto-revert-mode doesn't seem to work?

My init file includes (setq global-auto-revert-mode t) and I can confirm it's true with C-h v. But I still have to manually revert all my files with revert-buffer whenever I change git branches. I ...
1
vote
1answer
83 views

How to determine the current text scaling?

When I type C-x C-+ the height of the default face in the current buffer is increased. However, when I revert the buffer, the text scaling is reset to normal. I would like to keep the same scaling ...
5
votes
1answer
689 views

Revert-buffer ---> Discard unsaved changes without y/n prompt

(setq revert-without-query '(".*")) With this extra line in .emacs file, i have configured emacs to revert buffers without any prompt. It doesn't prompt for clean buffers but when the buffer has ...
5
votes
2answers
432 views

What is the best way to reload git stashed changes you've popped while file is open in buffer?

When I'm viewing a file and then pop a stash which modifies that file in the working tree using git stash pop in either bash or eshell, what is the best way to immediately see those changes in the ...
110
votes
9answers
67k views

How do I reload a file in a buffer?

I usually work on files which are updated in the file system via version control. What's a quick way to reload a file without having to C-x C-f the file again and getting asked if I want to reload it?