* bug#14887: 24.2; enriched-mode, message "Text is read only" on buffer save
@ 2013-07-16 23:14 andrea.rossetti
2013-07-27 0:32 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: andrea.rossetti @ 2013-07-16 23:14 UTC (permalink / raw)
To: 14887
================= 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#14887: 24.2; enriched-mode, message "Text is read only" on buffer save
2013-07-16 23:14 bug#14887: 24.2; enriched-mode, message "Text is read only" on buffer save andrea.rossetti
@ 2013-07-27 0:32 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-07-27 0:32 UTC (permalink / raw)
To: 14887-done
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-27 0:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 23:14 bug#14887: 24.2; enriched-mode, message "Text is read only" on buffer save andrea.rossetti
2013-07-27 0:32 ` Glenn Morris
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).