Skip to main content

Questions tagged [read-only-mode]

Filter by
Sorted by
Tagged with
2 votes
2 answers
209 views

I am still using older emacs versions (27.1 & 26.1 are on my work machines). At some point I likely want to upgrade, but one thing that I use quite frequently is toggle-read-only, which gives me a ...
Christian Herenz's user avatar
2 votes
1 answer
166 views

The Emacs occur buffer is editable, but it does not make it easy to delete lines. One normally gets something like this: 2 matches for "Wyk" in buffer: diary 59:%%(diary-anniversary 5 ...
edman's user avatar
  • 1,281
0 votes
1 answer
47 views

Killing commands, such as kill-word, have started to erase text in read-only buffers. For example, invoking kill-word in dired-mode or mu4e-headers-mode will delete words from a filename or from an ...
Pablo's user avatar
  • 369
0 votes
0 answers
68 views

I'd like to prevent all user inputs when a command is running in comint-like buffers (created by shell, run-python etc.) by enabling read-only-mode when I hit enter to run the command and disabling it ...
Saddle Point's user avatar
0 votes
1 answer
85 views

I'd like to switch between two modes source editing mode debug mode (where source is read-only, and you can use all other regular emacs commands + some debug related hot keys (such as n for next) ...
eugene's user avatar
  • 539
0 votes
0 answers
41 views

I'm looking for a mode or hook that automatically opens a generated in read-only and auto-revert-mode mode alongside an associated with a source file. For instance when calling dmd -vgc-ast on a .d-...
Nordlöw's user avatar
  • 577
1 vote
0 answers
74 views

I teach, and I like to use real files as examples in class. I want to be able to edit the buffer to show student things, but I don't want to risk accidentally writing the changes on the file. What I ...
elPolloDiablo's user avatar
1 vote
2 answers
293 views

I am searching and replacing text within all marked files in a Dired buffer, as per this post: https://emacs.stackexchange.com/a/9497/37866 I am successful until the point where it finds the first ...
marsh's user avatar
  • 11
1 vote
1 answer
103 views

I am annotating parts of text in an emacs buffer using text properties. The code I am using looks something like this: (set-text-properties beg end nil) ; clear properties (add-face-text-property ...
Ott Toomet's user avatar
1 vote
1 answer
434 views

I want to disable evil insert key such as a, i, o in read-only mode (keep navigation key such as j and k), my idea is to disable these keys in local buffer when enabling read-only mode and enable ...
Ynjxsjmh's user avatar
  • 323
0 votes
1 answer
105 views

Given that (setq org-list-allow-alphabetical t). Consider the following example, where | stands for the point: 1. |Lorem Ipsum 1. Lorem Ipsum 1. |Lorem Ipsum a. Lorem Ipsum While org-fill-...
Firmin Martin's user avatar
1 vote
1 answer
149 views

Is there a "read only mode" in mu4e? I recently had the case to use mu4e to read emails from a system using thunderbird with maildir. I noticed that for example a file called somemessage.eml ...
student's user avatar
  • 1,199
0 votes
1 answer
676 views

This problem is driving me crazy. Emacs open all buffers including new ones in read only mode (yes, I know that I can do C-x C-q). I've tried everything including: Delete .emacs.d/ Delete .config/...
guasian's user avatar
2 votes
2 answers
508 views

A new error has occurred with a recent upgrade to Emacs 27.1. I'm trying to edit .gitignore and get the following error: *ERROR*: Unlocking file: Invalid argument, <directory>/.gitignore To ...
user avatar
0 votes
2 answers
154 views

I am sick of pressing Insert instead of Backspace and running into problems in certain modes. How can I fix it? One option is to have some visual indication that overwrite mode has been activated, so ...
ruby_object's user avatar
0 votes
1 answer
155 views

Just when is it appropriate to put the asterisk * into the interactive spec of a command function? The elisp manual says the effect is to cause an error if the command is attempted in a read only ...
q.undertow's user avatar
2 votes
0 answers
114 views

I use the package dired-narrow (which I have bound to C-x /) together with dired-toggle-read-only (C-x C-q). However, if I press C-c C-c to commit my changes after using dired-toggle-read-only this ...
edman's user avatar
  • 1,281
10 votes
3 answers
7k views

I have a buffer in read-only mode. Killing the buffer and reopening it does not do the job while restarting emacs does. How to exit the read-only mode without restarting emacs?
Viesturs's user avatar
  • 875
1 vote
1 answer
191 views

I am writing a custom function which is supposed to write selected text to some arbitrary file on the system. It does something like (defun write-region-to-file (&optional arg) (interactive "*...
Pommy's user avatar
  • 124
2 votes
1 answer
556 views

moving point command: next-line, previous-line, forward-char, backward-char, etc. How to omit Ctrl key in read-only-mode? How can I combine with read-only-mode-hook to automatically enable keybind ...
dongli si's user avatar
2 votes
3 answers
1k views

When read the org mode manual to provide support for the raised question. The contents in read-only buffer is causally need to be copied as reference here. Take the Org Capture Template as an ...
Alice's user avatar
  • 219
1 vote
2 answers
491 views

Is it possible to make only parts of a buffer read-only? Say I have set two marks or line-numbers in the buffer and I would like to make everything between those two marks or line-numbers as read-...
smilingbuddha's user avatar
1 vote
1 answer
727 views

Is there a standard function to create an Emacs buffer in which we cannot type anything in (i.e. cannot be edited) but any running Elisp code can make changes to the buffer The following code does ...
smilingbuddha's user avatar
2 votes
1 answer
337 views

I know it's possible to make a "portion" of a buffer read-only. As an effect, the whole line becomes uneditable. What I would like it to make a specific region uneditable, for exemple a rectangle ...
loukios's user avatar
  • 865
1 vote
1 answer
85 views

This is a very strange issue and its cause is hard to determine. I often leave Emacs open for days, or even weeks at a time. My current emacs-uptime is 9 and a half days. That's pretty normal and ...
GDP2's user avatar
  • 1,380
7 votes
1 answer
208 views

A buffer can be made write-protected by toggling the read-only mode via M-x toggle-read-only. Is there a way to make a buffer read-only in a window, while editing it in another window?
AlQuemist's user avatar
  • 175
9 votes
2 answers
1k views

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 ...
StupidKris's user avatar
7 votes
2 answers
373 views

I want to enable show-trailing-whitespace for editable file and disable show-trailing-whitespace for read only files. I've tried (defun my/read-only-whitespace () (setq-local show-trailing-...
Moyamo's user avatar
  • 408
4 votes
1 answer
1k views

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 the ...
VP.'s user avatar
  • 197
5 votes
1 answer
2k views

I want some files to be read-only when I open them. Maybe using some kind of header would work? Parsing the extension would work too but I want to apply to, for example, some ".txt" files so is not ...
hhaamm's user avatar
  • 305
7 votes
1 answer
4k views

The readonly status of the current buffer can be toggled with (read-only-mode) or pressing C-x C-q but I intend to make a buffer which is not current, writable. The below is what I am using (with-...
myTerminal's user avatar
4 votes
1 answer
804 views

I'd like to set some things (e.g., cursor shape) when in read-only-mode. That part is easy enough with (add-hook 'read-only-mode-hook (lambda() (setq-local cursor-type 'box))) Then I'...
Ista's user avatar
  • 1,218
3 votes
1 answer
263 views

I want to create a buffer where some parts are editable, but others are not. I'm using the read-only string property to do this, e.g.: (with-current-buffer (get-buffer-create "*scratch-demo*") (...
Wilfred Hughes's user avatar
1 vote
1 answer
243 views

I'm using recentf-mode, part of Emacs. I'd like to open a file from the Open Recent buffer read-only, like if I had opened it via C-x C-r. Maybe if you type C-u in the Open Recent buffer before ...
Keks Dose's user avatar
  • 538
1 vote
1 answer
1k views

If i have a writable buffer, i can use this to insert hyperlink. (require 'button) (insert-button "foo" 'action (lambda (x) (find-file "~/test.py"))) But i have to add clickable text property to a ...
Chillar Anand's user avatar
1 vote
0 answers
131 views

In my current Emacs configuration, when ECB is active and I find-file in a non-existing directory, I keep getting interrupted to answer the following question in the echo-area: File /tmp/new-foo/bar....
user avatar
2 votes
2 answers
1k views

I am running emacs 24 with the Inferior Python mode for the interpreter. See below for all the minor modes in effect. Basically the problem is that particular lines (say at the prompt) remain read-...
Pushpendre's user avatar
2 votes
0 answers
499 views

When using ansi-term in line mode emacs lets you edit the buffer arbitrarily, not just after the last prompt. I'm trying to make it read only so I stop fudging with command output. The problem is all ...
Joseph Garvin's user avatar
9 votes
2 answers
891 views

I know I can set something like -*- mode: read-only-mode -*- inside a commentary and Emacs will open the corresponding file as read-only. My problem is that I still want to read files that include ...
shackra's user avatar
  • 2,842
9 votes
2 answers
5k views

Is there any easy way to flush all output in the shell buffer? Since recently (I believe Emacs 24.4 already has this) *shell* buffers aren't editable, they behave similar to how typical terminal would ...
wvxvw's user avatar
  • 11.6k