unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* a strange error with list-registers (and better-registers)
@ 2022-07-20 15:01 Uwe Brauer
  2022-07-20 19:19 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2022-07-20 15:01 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]


Hi 

I am running GNU emacs master from a couple of weeks ago. I very
frequently use list-registers (and better-registers to save these
registers (require 'better-registers) ;Version:1.175
(better-registers-install-save-registers-hook) (load
better-registers-save-file)

better-registers-save-file is a variable defined in ‘better-registers.el’.

Its value is "~/.emacsregisters.el"



Now the point is when I restart emacs, sometimes it complains about the
content of that register file. I solve this issue by deleting this
specific register entry, it seems somehow a problem that is connected
with the fonts used. Frankely the entry looks very boated and containing
unnecessary  information (I have seen also bloated information in my
.abbrev but not to this extend

May be somebody who is acquainted with this sort of information give me
a hint.
Here comes the bug trace
,----
| 
| Debugger entered--Lisp error: (invalid-read-syntax "#" 1 0)
|   read(#<buffer  *load*>)
|   edebug--read(read #<buffer  *load*>)
|   apply(edebug--read read #<buffer  *load*>)
|   #f(advice-wrapper :around read edebug--read)(#<buffer  *load*>)
|   eval-buffer(#<buffer  *load*> nil "/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil t)  ; Reading at buffer position 27963
|   load-with-code-conversion("/home/oub/ALLES/HGs/init_files/.emacsregisters.el" "/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil nil)
|   load("/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil nil t)
|   load-file("~/ALLES/HGs/init_files/.emacsregisters.el")
|   funcall-interactively(load-file "~/ALLES/HGs/init_files/.emacsregisters.el")
|   call-interactively(load-file nil nil)
|   command-execute(load-file)
| 
`----

Caused  by: file attached


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. 

[-- Attachment #2: bug-reg.txt --]
[-- Type: text/plain, Size: 5295 bytes --]


(set-register 49 #(">
>
>>>> 
>> Hola, tienes que utilizar el mismo número de clases que el año anterior. Si


[[End of S/MIME Signed Part]]
" 0 39 (fontified t) 39 59 (fontified t mouse-face highlight gnus-callback gnus-button-push button-data (#<marker in no buffer> (gnus-button-mid-or-mail-regexp 0 (>= gnus-button-message-level 5) gnus-button-handle-mid-or-mail 1)) action gnus-button-push keymap (keymap (menu-bar keymap (url\ button menu-item "Url Button" (keymap "Url Button" (Copy\ URL\ to\ kill\ ring menu-item "Copy URL to kill ring" gnus-article-copy-string) (Push\ the\ button menu-item "Push the button" push-button) (Push\ the\ button-2 menu-item "Push the button" push-button)))) (mouse-2 . push-button) (13 . push-button) (117 . gnus-article-copy-string)) follow-link t category t button t gnus-data (#<marker in no buffer> (gnus-button-mid-or-mail-regexp 0 (>= gnus-button-message-level 5) gnus-button-handle-mid-or-mail 1)
 ) gnus-string "pyustosc@quim.ucm.es") 59 61 (fontified t) 61 68 (fontified t mouse-face highlight gnus-callback gnus-cite-toggle button-data ">         mié>" action gnus-cite-toggle keymap (keymap (menu-bar keymap (url\ button menu-item "Url Button" (keymap "Url Button" (Copy\ URL\ to\ kill\ ring menu-item "Copy URL to kill ring" gnus-article-copy-string) (Push\ the\ button menu-item "Push the button" push-button) (Push\ the\ button-2 menu-item "Push the button" push-button)))) (mouse-2 . push-button) (13 . push-button) (117 . gnus-article-copy-string)) follow-link t category t button t gnus-data ">         mié>") 68 437 (fontified t) 437 439 (fontified t composition (0 2 [8211]) prettify-symbols-start 922 prettify-symbols-end 924) 439 548 (fontified t) 548 550 (fontified t composition
  (0 2 [8211]) prettify-symbols-start 1033 prettify-symbols-end 1035) 550 1016 (fontified t) 1016 1496 (fontified t) 1496 1532 (fontified t) 1532 1534 (fontified t) 1534 1542 (fontified t) 1542 1544 (gnus-undeletable t fontified t) 1544 1573 (mouse-face highlight gnus-face t keymap (keymap (menu-bar keymap (security\ part menu-item "Security Part" (keymap "Security Part" (Show\ Detail menu-item "Show Detail" gnus-article-press-button) (Save\.\.\. menu-item "Save..." gnus-mime-security-save-part) (Pipe\ To\ Command\.\.\. menu-item "Pipe To Command..." gnus-mime-security-pipe-part)))) (46 . undefined) (124 . gnus-mime-security-pipe-part) (112 . undefined) (101 . undefined) (69 . undefined) (105 . undefined) (99 . undefined) (100 . undefined) (114 . undefined) (15 . undefined) (111 . gnus-mi
 me-security-save-part) (67 . undefined) (116 . undefined) (118 . undefined) (down-mouse-3 . gnus-mime-security-button-menu) (mouse-2 . gnus-article-push-button) (13 . gnus-article-press-button)) gnus-callback gnus-mime-security-press-button gnus-line-format "%{%([[End of %t]%D]%)%}
" gnus-mime-details nil article-type annotation follow-link t gnus-data (#("multipart/signed" 0 16 (boundary "------------ms010902040307040206030803" micalg "sha-256" protocol "application/pkcs7-signature" buffer #<killed buffer> from nil start nil gnus-info "Good signature from B35B4D57118F84C37E39E17DBEF1AC2F371972D9 /CN=PONS BORDERIA MARIA JESUS - 22694731X/C=ES/SN=PONS BORDERIA/GN=MARIA JESUS/SerialNumber=IDCES-22694731X (trust full)" gnus-region (#<marker in no buffer> . #<marker in no buffer>))) (#<killed buffer> ("text/plain" (format . "flowed") (charset . "UTF-8")) quoted-printable nil ("inline") nil nil nil) (#<killed buffer> ("application/pkcs7-signature" (name . "smime.p7s")) base64 nil ("attachment" (filename . "smime.p7s")) "S/MIME Cryptographic Signature" nil nil)) button (t)
  category default-button fontified t) 1573 1574 (keymap (keymap (menu-bar keymap (security\ part menu-item "Security Part" (keymap "Security Part" (Show\ Detail menu-item "Show Detail" gnus-article-press-button) (Save\.\.\. menu-item "Save..." gnus-mime-security-save-part) (Pipe\ To\ Command\.\.\. menu-item "Pipe To Command..." gnus-mime-security-pipe-part)))) (46 . undefined) (124 . gnus-mime-security-pipe-part) (112 . undefined) (101 . undefined) (69 . undefined) (105 . undefined) (99 . undefined) (100 . undefined) (114 . undefined) (15 . undefined) (111 . gnus-mime-security-save-part) (67 . undefined) (116 . undefined) (118 . undefined) (down-mouse-3 . gnus-mime-security-button-menu) (mouse-2 . gnus-article-push-button) (13 . gnus-article-press-button)) gnus-callback gnus-mime-securit
 y-press-button gnus-line-format "%{%([[End of %t]%D]%)%}
" gnus-mime-details nil article-type annotation follow-link t gnus-data (#("multipart/signed" 0 16 (boundary "------------ms010902040307040206030803" micalg "sha-256" protocol "application/pkcs7-signature" buffer #<killed buffer> from nil start nil gnus-info "Good signature from B35B4D57118F84C37E39E17DBEF1AC2F371972D9 /CN=PONS BORDERIA MARIA JESUS - 22694731X/C=ES/SN=PONS BORDERIA/GN=MARIA JESUS/SerialNumber=IDCES-22694731X (trust full)" gnus-region (#<marker in no buffer> . #<marker in no buffer>))) (#<killed buffer> ("text/plain" (format . "flowed") (charset . "UTF-8")) quoted-printable nil ("inline") nil nil nil) (#<killed buffer> ("application/pkcs7-signature" (name . "smime.p7s")) base64 nil ("attachment" (filename . "smime.p7s")) "S/MIME Cryptographic Signature" nil nil)) fontified 
 t)))

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-20 15:01 a strange error with list-registers (and better-registers) Uwe Brauer
@ 2022-07-20 19:19 ` Stefan Monnier
  2022-07-20 22:40   ` Michael Heerdegen
  2022-07-22 15:07   ` Uwe Brauer
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2022-07-20 19:19 UTC (permalink / raw)
  To: emacs-devel

Please make it a `M-x report-emacs-bug`.

The problem is that the register you saved contained a string which
contained some text properties whose value cannot be printed in
a readable way.  The register code should catch the problem
when writing the file (e.g. by stripping this property).


        Stefan


Uwe Brauer [2022-07-20 17:01:38] wrote:

> Hi 
>
> I am running GNU emacs master from a couple of weeks ago. I very
> frequently use list-registers (and better-registers to save these
> registers (require 'better-registers) ;Version:1.175
> (better-registers-install-save-registers-hook) (load
> better-registers-save-file)
>
> better-registers-save-file is a variable defined in ‘better-registers.el’.
>
> Its value is "~/.emacsregisters.el"
>
>
>
> Now the point is when I restart emacs, sometimes it complains about the
> content of that register file. I solve this issue by deleting this
> specific register entry, it seems somehow a problem that is connected
> with the fonts used. Frankely the entry looks very boated and containing
> unnecessary  information (I have seen also bloated information in my
> .abbrev but not to this extend
>
> May be somebody who is acquainted with this sort of information give me
> a hint.
> Here comes the bug trace
> ,----
> | 
> | Debugger entered--Lisp error: (invalid-read-syntax "#" 1 0)
> |   read(#<buffer  *load*>)
> |   edebug--read(read #<buffer  *load*>)
> |   apply(edebug--read read #<buffer  *load*>)
> |   #f(advice-wrapper :around read edebug--read)(#<buffer  *load*>)
> |   eval-buffer(#<buffer  *load*> nil
> | "/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil t)  ; Reading at
> | buffer position 27963
> |   load-with-code-conversion("/home/oub/ALLES/HGs/init_files/.emacsregisters.el"
> | "/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil nil)
> |   load("/home/oub/ALLES/HGs/init_files/.emacsregisters.el" nil nil t)
> |   load-file("~/ALLES/HGs/init_files/.emacsregisters.el")
> |   funcall-interactively(load-file "~/ALLES/HGs/init_files/.emacsregisters.el")
> |   call-interactively(load-file nil nil)
> |   command-execute(load-file)
> | 
> `----
>
> Caused  by: file attached
>
>
> Regards
>
> Uwe Brauer 




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-20 19:19 ` Stefan Monnier
@ 2022-07-20 22:40   ` Michael Heerdegen
  2022-07-21  0:00     ` Stefan Monnier
  2022-07-22 15:10     ` Uwe Brauer
  2022-07-22 15:07   ` Uwe Brauer
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Heerdegen @ 2022-07-20 22:40 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Please make it a `M-x report-emacs-bug`.

Saving registers is not a feature of Emacs, and better-registers.el is
not in Emacs, so, unless I got something wrong, please better report to
the author of that package, Uwe.

Michael.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-20 22:40   ` Michael Heerdegen
@ 2022-07-21  0:00     ` Stefan Monnier
  2022-07-22 15:10     ` Uwe Brauer
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2022-07-21  0:00 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

Michael Heerdegen [2022-07-21 00:40:06] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Please make it a `M-x report-emacs-bug`.
>
> Saving registers is not a feature of Emacs, and better-registers.el is
> not in Emacs, so, unless I got something wrong, please better report to
> the author of that package, Uwe.

Indeed, thanks Michael,


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-20 19:19 ` Stefan Monnier
  2022-07-20 22:40   ` Michael Heerdegen
@ 2022-07-22 15:07   ` Uwe Brauer
  2022-07-22 19:55     ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2022-07-22 15:07 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Please make it a `M-x report-emacs-bug`.
> The problem is that the register you saved contained a string which
> contained some text properties whose value cannot be printed in
> a readable way.  The register code should catch the problem
> when writing the file (e.g. by stripping this property).

I see. What is not clear to me is why these text properties information
gets saved at first hand. I thought it might have to do with emacs
saving mechanism. I recall that saving registers did not cause any
problem, say in GNU emacs 26 (if I recall correctly).


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-20 22:40   ` Michael Heerdegen
  2022-07-21  0:00     ` Stefan Monnier
@ 2022-07-22 15:10     ` Uwe Brauer
  1 sibling, 0 replies; 12+ messages in thread
From: Uwe Brauer @ 2022-07-22 15:10 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

>>> "MH" == Michael Heerdegen <michael_heerdegen@web.de> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Please make it a `M-x report-emacs-bug`.

> Saving registers is not a feature of Emacs, and better-registers.el is
> not in Emacs, so, unless I got something wrong, please better report to
> the author of that package, Uwe.

Right, the package seems not very much maintained these days, but I give
it a try.

However that emacs does not save registers at all, seems to me a bit
strange, for me this is a very important feature that I use daily.

But there seems not much demand for such a feature, 😓

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-22 15:07   ` Uwe Brauer
@ 2022-07-22 19:55     ` Stefan Monnier
  2022-07-23  5:08       ` Uwe Brauer
  2022-07-23  5:30       ` [remove all text properties in a region] (was: a strange error with list-registers (and better-registers)) Uwe Brauer
  0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2022-07-22 19:55 UTC (permalink / raw)
  To: emacs-devel

> I see. What is not clear to me is why these text properties information
> gets saved at first hand. I thought it might have to do with emacs
> saving mechanism. I recall that saving registers did not cause any
> problem, say in GNU emacs 26 (if I recall correctly).

It doesn't depend on the version of Emacs, but on the values that happen
to be carried in the text-properties of the text you happen to have in
your registers.  Packages can put any kinds of values in any kinds of
text-properties.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-22 19:55     ` Stefan Monnier
@ 2022-07-23  5:08       ` Uwe Brauer
  2022-07-23 13:57         ` Stefan Monnier
  2022-07-23  5:30       ` [remove all text properties in a region] (was: a strange error with list-registers (and better-registers)) Uwe Brauer
  1 sibling, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2022-07-23  5:08 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

   >> I see. What is not clear to me is why these text properties information
   >> gets saved at first hand. I thought it might have to do with emacs
   >> saving mechanism. I recall that saving registers did not cause any
   >> problem, say in GNU emacs 26 (if I recall correctly).

   > It doesn't depend on the version of Emacs, but on the values that happen
   > to be carried in the text-properties of the text you happen to have in
   > your registers.  Packages can put any kinds of values in any kinds of
   > text-properties.


Ok I see, it seems that the culprit would be gnus, because mostly if I
save messages to registers, these call the problems.

Is there a command like: delete all text-properties in buffer or region?



-- 
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. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [remove all text properties in a region] (was: a strange error with list-registers (and better-registers))
  2022-07-22 19:55     ` Stefan Monnier
  2022-07-23  5:08       ` Uwe Brauer
@ 2022-07-23  5:30       ` Uwe Brauer
  2022-07-23 14:00         ` [remove all text properties in a region] Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Uwe Brauer @ 2022-07-23  5:30 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 5523 bytes --]

>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I see. What is not clear to me is why these text properties information
>> gets saved at first hand. I thought it might have to do with emacs
>> saving mechanism. I recall that saving registers did not cause any
>> problem, say in GNU emacs 26 (if I recall correctly).

> It doesn't depend on the version of Emacs, but on the values that happen
> to be carried in the text-properties of the text you happen to have in
> your registers.  Packages can put any kinds of values in any kinds of
> text-properties.

I just run a test on a typical message buffer (with, I admit quite a bit
of minor modes turn on)

The saved register looks like 


(set-register 49 #("

Uwe this 

-- 
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 wrap-prefix "") 1 2 (fontified t wrap-prefix "") 2 5
(fontified t wrap-prefix "" pabbrev-added t) 5 6 (fontified t
wrap-prefix "") 6 10 (fontified t wrap-prefix "" pabbrev-added t) 10 11
(fontified t wrap-prefix "") 11 12 (fontified t wrap-prefix "") 12 13
(fontified t wrap-prefix " ") 13 15 (fontified t rear-nonsticky t field
signature face message-signature-separator wrap-prefix " " pabbrev-added
t) 15 16 (fontified t rear-nonsticky t field signature face
message-signature-separator wrap-prefix " ") 16 17 (fontified t
wrap-prefix " ") 17 18 (fontified t wrap-prefix "" pabbrev-added t) 18
19 (fontified t wrap-prefix "") 19 27 (fontified t wrap-prefix ""
pabbrev-added t) 27 28 (fontified t wrap-prefix "") 28 35 (fontified t
wrap-prefix "" pabbrev-added t) 35 36 (fontified t wrap-prefix "") 36 43
(fontified t wrap-prefix "" pabbrev-added t) 43 44 (fontified t
wrap-prefix "") 44 47 (fontified t wrap-prefix "" pabbrev-added t) 47 48
(fontified t wrap-prefix "") 48 50 (fontified t wrap-prefix ""
pabbrev-added t) 50 51 (fontified t wrap-prefix "") 51 61 (fontified t
wrap-prefix "" pabbrev-added t) 61 62 (fontified t wrap-prefix "") 62 69
(fontified t wrap-prefix "" pabbrev-added t) 69 70 (fontified t
wrap-prefix "") 70 73 (fontified t wrap-prefix "" pabbrev-added t) 73 74
(fontified t wrap-prefix "") 74 81 (fontified t wrap-prefix ""
pabbrev-added t) 81 83 (fontified t wrap-prefix "") 83 84 (fontified t
wrap-prefix "" pabbrev-added t) 84 85 (fontified t wrap-prefix "") 85 92
(fontified t wrap-prefix "" pabbrev-added t) 92 93 (fontified t
wrap-prefix "") 93 95 (fontified t wrap-prefix "" pabbrev-added t) 95 96
(fontified t wrap-prefix "") 96 103 (fontified t wrap-prefix ""
pabbrev-added t) 103 104 (fontified t wrap-prefix "") 104 111 (fontified
t wrap-prefix "" pabbrev-added t) 111 112 (fontified t wrap-prefix "")
112 114 (fontified t wrap-prefix "" pabbrev-added t) 114 115 (fontified
t wrap-prefix "") 115 124 (fontified t wrap-prefix "" pabbrev-added t)
124 125 (fontified t wrap-prefix "") 125 133 (fontified t wrap-prefix ""
pabbrev-added t) 133 136 (fontified t wrap-prefix "") 136 137 (fontified
t wrap-prefix "" pabbrev-added t) 137 138 (fontified t wrap-prefix "")
138 145 (fontified t wrap-prefix "" pabbrev-added t) 145 146 (fontified
t wrap-prefix "") 146 149 (fontified t wrap-prefix "" pabbrev-added t)
149 150 (fontified t wrap-prefix "") 150 153 (fontified t wrap-prefix ""
pabbrev-added t) 153 154 (fontified t wrap-prefix "") 154 156 (fontified
t wrap-prefix "" pabbrev-added t) 156 157 (fontified t wrap-prefix "")
157 163 (fontified t wrap-prefix "" pabbrev-added t) 163 164 (fontified
t wrap-prefix "") 164 168 (fontified t wrap-prefix "" pabbrev-added t)
168 169 (fontified t wrap-prefix "") 169 174 (fontified t wrap-prefix ""
pabbrev-added t) 174 176 (fontified t wrap-prefix "") 176 177 (fontified
t wrap-prefix "" pabbrev-added t) 177 178 (fontified t wrap-prefix "")
178 185 (fontified t wrap-prefix "" pabbrev-added t) 185 186 (fontified
t wrap-prefix "") 186 189 (fontified t wrap-prefix "" pabbrev-added t)
189 190 (fontified t wrap-prefix "") 190 192 (fontified t wrap-prefix ""
pabbrev-added t) 192 193 (fontified t wrap-prefix "") 193 203 (fontified
t wrap-prefix "" pabbrev-added t) 203 204 (fontified t wrap-prefix "")
204 206 (fontified t wrap-prefix "" pabbrev-added t) 206 207 (fontified
t wrap-prefix "") 207 210 (fontified t wrap-prefix "" pabbrev-added t)
210 211 (fontified t wrap-prefix "") 211 218 (fontified t wrap-prefix ""
pabbrev-added t) 218 221 (fontified t wrap-prefix "")))

I don't need any of these properties. The documentation 
https://ftp.gnu.org/old-gnu/Manuals/elisp-manual-20-2.5/html_node/elisp_509.html#:~:text=To%20remove%20all%20text%20properties,for%20the%20new%20property%20list.&text=This%20function%20completely%20replaces%20the,defaults%20to%20the%20current%20buffer.

Does not mention a function that would simply remove all text-properties 

So I tried stuff like this 

(defun my-remove-all-text-properties-file ()
  (interactive)
  (set-text-properties (point-min) (point-max) nil))

(defun my-remove-all-text-properties-region ()
  (interactive)
  (set-text-properties (region-beginning) (region-end) nil))

But it seems not to work


Uwe 




-- 
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. 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5671 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-23  5:08       ` Uwe Brauer
@ 2022-07-23 13:57         ` Stefan Monnier
  2022-07-23 16:36           ` Uwe Brauer
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2022-07-23 13:57 UTC (permalink / raw)
  To: emacs-devel

Uwe Brauer [2022-07-23 07:08:36] wrote:
>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>    >> I see. What is not clear to me is why these text properties information
>    >> gets saved at first hand. I thought it might have to do with emacs
>    >> saving mechanism. I recall that saving registers did not cause any
>    >> problem, say in GNU emacs 26 (if I recall correctly).
>
>    > It doesn't depend on the version of Emacs, but on the values that happen
>    > to be carried in the text-properties of the text you happen to have in
>    > your registers.  Packages can put any kinds of values in any kinds of
>    > text-properties.
>
>
> Ok I see, it seems that the culprit would be gnus, because mostly if I
> save messages to registers, these call the problems.
>
> Is there a command like: delete all text-properties in buffer or region?

It sounds like you're asking for an immediate workaround.  This would be
more appropriate for gnu.emacs.help.

Here on emacs-devel, I'd rather focus on fixing the problem, which
requires fixing the code that saves the registers, maybe making it
filter out those properties which contain unprintable values.
But apparently, this code is not in Emacs (nor (Non)GNU ELPA)?


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [remove all text properties in a region]
  2022-07-23  5:30       ` [remove all text properties in a region] (was: a strange error with list-registers (and better-registers)) Uwe Brauer
@ 2022-07-23 14:00         ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2022-07-23 14:00 UTC (permalink / raw)
  To: emacs-devel

> The saved register looks like 
>
> (set-register 49 #("<...blablabla...>" ...blabla...)

Looks perfectly sane and harmless.  All those properties are printed and
read-back just fine.  In your problematic case you had a marker
somewhere in those properties.  Markers can't be printed and
a `read`able way, which is why you got an error later on when reading
them again at the next start.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: a strange error with list-registers (and better-registers)
  2022-07-23 13:57         ` Stefan Monnier
@ 2022-07-23 16:36           ` Uwe Brauer
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Brauer @ 2022-07-23 16:36 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]


> Uwe Brauer [2022-07-23 07:08:36] wrote:

> It sounds like you're asking for an immediate workaround.  This would be
> more appropriate for gnu.emacs.help.

> Here on emacs-devel, I'd rather focus on fixing the problem, which
> requires fixing the code that saves the registers, maybe making it
> filter out those properties which contain unprintable values.
> But apparently, this code is not in Emacs (nor (Non)GNU ELPA)?

The code was in MELPA, but now it can only be found in 

https://github.com/emacsmirror/emacswiki.org/blob/master/better-registers.el

Which is hardly official.

So yes I will try to get that solved in  gnu.emacs.help.


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-07-23 16:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 15:01 a strange error with list-registers (and better-registers) Uwe Brauer
2022-07-20 19:19 ` Stefan Monnier
2022-07-20 22:40   ` Michael Heerdegen
2022-07-21  0:00     ` Stefan Monnier
2022-07-22 15:10     ` Uwe Brauer
2022-07-22 15:07   ` Uwe Brauer
2022-07-22 19:55     ` Stefan Monnier
2022-07-23  5:08       ` Uwe Brauer
2022-07-23 13:57         ` Stefan Monnier
2022-07-23 16:36           ` Uwe Brauer
2022-07-23  5:30       ` [remove all text properties in a region] (was: a strange error with list-registers (and better-registers)) Uwe Brauer
2022-07-23 14:00         ` [remove all text properties in a region] Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).