GNU bug report logs - #14887
24.2; enriched-mode, message "Text is read only" on buffer save

Previous Next

Package: emacs;

Reported by: andrea.rossetti <at> gmail.com

Date: Tue, 16 Jul 2013 23:27:02 UTC

Severity: normal

Found in version 24.2

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14887 in the body.
You can then email your comments to 14887 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14887; Package emacs. (Tue, 16 Jul 2013 23:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to andrea.rossetti <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 16 Jul 2013 23:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: andrea.rossetti <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2; enriched-mode, message "Text is read only" on buffer save
Date: Wed, 17 Jul 2013 01:14:41 +0200
================= how to replicate =================
- start up Emacs
- M-x enriched-mode
- write some text like "hello dear friends!" in buffer
- select the word "dear" with the mouse
- make "dear" read-only using Edit/Text properties/
  /Special prop./Read only
- C-x C-s to save file as test1.txt (save operation
  will be successful)
- write additional text " thanks!" after "friends!"
- C-x C-s to save again; this time file saving will
  not succeed, and you will see the message "Text file
  is read only"
====================================================

  May someone please confirm if he/she can replicate
this somewhat weird behaviour. I think it may be some
small error in enriched-mode, but I'm rather new to
Emacs and may have missed something. 

  My kindest regards,

       Andrea Rossetti
http://github.com/thesoftwarebin





In GNU Emacs 24.2.1 (i386-mingw-nt6.1.7600)
 of 2012-08-29 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7600
Configured using:
 `configure --with-gcc (4.6) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ITA
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  enriched-mode: t
  show-paren-mode: t
  server-mode: t
  recentf-mode: t
  cua-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  use-hard-newlines: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> M-x e n r i c h e d - m o d 
e <return> y <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <edit> <props> <sp> r C-x C-s <C-S-left> 
<C-S-left> <C-S-left> <C-S-left> <C-S-left> <C-S-right> 
<S-right> D e s k t o p / p r o v a . <backspace> 1 
. t x t <return> <C-S-kp-end> <up> <down> e x t r a 
SPC t e x t C-x C-s M-x r e p o <tab> r t - e m <tab> 
<return>

Recent messages:
Loading c:/Users/andrea/AppData/Roaming/.recentf...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Make newlines between paragraphs hard? (y or n)  y
Enriched: encoding document...
These text properties could not be saved:
    (fontified)
Wrote c:/Users/andrea/Desktop/prova1.txt
Saving file c:/Users/andrea/Desktop/prova1.txt...
copy-to-buffer: Text is read-only
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums help-mode view
enriched csv-mode-autoloads graphviz-dot-mode-autoloads muse-autoloads
info paredit-autoloads slime-repl-autoloads slime-autoloads package
tabulated-list edmacro kmacro paren server recentf tree-widget easymenu
gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit
cua-base cus-start cus-load time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 27 Jul 2013 00:33:01 GMT) Full text and rfc822 format available.

Notification sent to andrea.rossetti <at> gmail.com:
bug acknowledged by developer. (Sat, 27 Jul 2013 00:33:02 GMT) Full text and rfc822 format available.

Message #10 received at 14887-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 14887-done <at> debbugs.gnu.org
Subject: Re: bug#14887: 24.2;
 enriched-mode, message "Text is read only" on buffer save
Date: Fri, 26 Jul 2013 20:32:22 -0400
Version: 24.4

Thanks for the report. This patch (against 24.3) fixes it.
(Because format.el is compiled into Emacs, you must rebuild Emacs after
applying this patch.)


*** lisp/format.el	2013-01-01 09:11:05 +0000
--- lisp/format.el	2013-07-27 00:29:42 +0000
***************
*** 225,234 ****
  		(setq selective-display sel-disp)
  		(set-buffer-multibyte multibyte)
  		(setq buffer-file-coding-system coding-system))
! 	      (copy-to-buffer copy-buf from to)
! 	      (set-buffer copy-buf)
! 	      (format-insert-annotations write-region-annotations-so-far from)
! 	      (format-encode-run-method to-fn (point-min) (point-max) orig-buf)
                (when (buffer-live-p copy-buf)
                  (with-current-buffer copy-buf
                    ;; Set write-region-post-annotation-function to
--- 225,236 ----
  		(setq selective-display sel-disp)
  		(set-buffer-multibyte multibyte)
  		(setq buffer-file-coding-system coding-system))
! 	      (let ((inhibit-read-only t)) ; bug#14887
! 		(copy-to-buffer copy-buf from to)
! 		(set-buffer copy-buf)
! 		(format-insert-annotations write-region-annotations-so-far from)
! 		(format-encode-run-method to-fn (point-min) (point-max)
! 					  orig-buf))
                (when (buffer-live-p copy-buf)
                  (with-current-buffer copy-buf
                    ;; Set write-region-post-annotation-function to





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Aug 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.