[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with better-registers: turn-off-all-minor modes or remove all t
From: |
Uwe Brauer |
Subject: |
problems with better-registers: turn-off-all-minor modes or remove all text-properties |
Date: |
Sat, 23 Jul 2022 18:45:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi
better-registers found in
https://github.com/emacsmirror/emacswiki.org/blob/master/better-registers.el
is unfortunately no longer maintained. It allows, among other things, to
save registers in a file for future sessions.
While there is no problem in saving some text of a buffer in fundamental
mode to a specific resister.
However for example message mode, that has in my case quite a bit of
minor modes turn on, results in a saving of the sort.
,----
|
| (set-register 49 #("
| Test again
| and again
| --
| I strongly condemn Putin's war of aggression against the Ukraine. I
| support to deliver weapons to Ukraine's military. I support the ban of
| Russia from SWIFT. I support the EU membership of the Ukraine. " 0 1
| (fontified t) 1 11 (fontified t) 11 22 (fontified t) 22 23 (fontified t)
| 23 25 (fontified t rear-nonsticky t field signature pabbrev-added t) 25
| 26 (fontified t rear-nonsticky t field signature) 26 27 (fontified t) 27
| 28 (fontified t pabbrev-added t) 28 29 (fontified t) 29 37 (fontified t
| pabbrev-added t) 37 38 (fontified t) 38 45 (fontified t pabbrev-added t)
| 45 46 (fontified t) 46 53 (fontified t pabbrev-added t) 53 54 (fontified
| t) 54 57 (fontified t pabbrev-added t) 57 58 (fontified t) 58 60
| (fontified t pabbrev-added t) 60 61 (fontified t) 61 71 (fontified t
| pabbrev-added t) 71 72 (fontified t) 72 79 (fontified t pabbrev-added t)
| 79 80 (fontified t) 80 83 (fontified t pabbrev-added t) 83 84 (fontified
| t) 84 91 (fontified t pabbrev-added t) 91 93 (fontified t) 93 94
| (fontified t pabbrev-added t) 94 95 (fontified t) 95 102 (fontified t
| pabbrev-added t) 102 103 (fontified t) 103 105 (fontified t
| pabbrev-added t) 105 106 (fontified t) 106 113 (fontified t
| pabbrev-added t) 113 114 (fontified t) 114 121 (fontified t
| pabbrev-added t) 121 122 (fontified t) 122 124 (fontified t
| pabbrev-added t) 124 125 (fontified t) 125 134 (fontified t
| pabbrev-added t) 134 135 (fontified t) 135 143 (fontified t
| pabbrev-added t) 143 146 (fontified t) 146 147 (fontified t
| pabbrev-added t) 147 148 (fontified t) 148 155 (fontified t
| pabbrev-added t) 155 156 (fontified t) 156 159 (fontified t
| pabbrev-added t) 159 160 (fontified t) 160 163 (fontified t
| pabbrev-added t) 163 164 (fontified t) 164 166 (fontified t
| pabbrev-added t) 166 167 (fontified t) 167 173 (fontified t
| pabbrev-added t) 173 174 (fontified t) 174 178 (fontified t
| pabbrev-added t) 178 179 (fontified t) 179 184 (fontified t
| pabbrev-added t) 184 186 (fontified t) 186 187 (fontified t
| pabbrev-added t) 187 188 (fontified t) 188 195 (fontified t
| pabbrev-added t) 195 196 (fontified t) 196 199 (fontified t
| pabbrev-added t) 199 200 (fontified t) 200 202 (fontified t
| pabbrev-added t) 202 203 (fontified t) 203 213 (fontified t
| pabbrev-added t) 213 214 (fontified t) 214 216 (fontified t
| pabbrev-added t) 216 217 (fontified t) 217 220 (fontified t
| pabbrev-added t) 220 221 (fontified t) 221 228 (fontified t
| pabbrev-added t) 228 231 (fontified t)))
`----
Which in turn causes problems when loading a file with such saved resisters.
Two workaround occured to me, but both did not work
1. Turn off all minor mode (which might be the culprit of all the
face stuff that is added) by using
(defun disable-all-minor-modes ()
(interactive)
(mapc
(lambda (mode-symbol)
(when (functionp mode-symbol)
;; some symbols are functions which aren't normal mode functions
(ignore-errors
(funcall mode-symbol -1))))
minor-mode-list))
Found in
https://emacs.stackexchange.com/questions/42239/how-to-disable-all-the-minor-modes-when-a-specific-major-mode-is-enabled-with
2. Or delete all the text-properties, by something like this
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil))
It did not work neither.
Any idea?
Thanks and regards
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
- problems with better-registers: turn-off-all-minor modes or remove all text-properties,
Uwe Brauer <=
- Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties, Thorsten Bonow, 2022/07/23
- Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties, Michael Heerdegen, 2022/07/23
- Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties, Michael Heerdegen, 2022/07/24
- Re: problems with better-registers: turn-off-all-minor modes or remove all text-properties, Uwe Brauer, 2022/07/24
- [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties), Uwe Brauer, 2022/07/24
- Re: [SOLVED], Michael Heerdegen, 2022/07/24
- Re: [SOLVED], Uwe Brauer, 2022/07/25
- Re: [SOLVED], Uwe Brauer, 2022/07/25
- Re: [SOLVED], Stefan Monnier, 2022/07/25
- Re: [SOLVED], Uwe Brauer, 2022/07/25