* Crash when buffer is edited while save-buffer asks for coding system
@ 2007-12-25 0:34 Michael Schierl
0 siblings, 0 replies; only message in thread
From: Michael Schierl @ 2007-12-25 0:34 UTC (permalink / raw)
To: bug-gnu-emacs
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Manual way:
- emacs -Q
- Create a new text file
- C-x RET f windows-1252 RET
- insert "Hi"
- M-x ucs-insert RET 2122 RET (inserts a trademark symbol)
- C-x C-s
- C-x RET f latin-1 RET C-x C-s
- Emacs will ask for a coding system, since latin-1 does not contain the
trademark symbol.
- C-x C-o until point is in your file with the trademark
- C-a C-d to delete the first character
- C-x C-o until point is back at minibuffer
- RET
- "Would you like to attach a debugger?" I guess you will select Yes
here :)
Automatic way:
(progn
(with-current-buffer (find-file-noselect (make-temp-file
"charsetbug"))
(set-buffer-file-coding-system 'windows-1252)
(insert "Hi")
(ucs-insert 8482) ;; trademark sign
(save-buffer 0)
(setq buf (current-buffer))
(pop-to-buffer buf))
(set-buffer buf)
(set-buffer-file-coding-system 'latin-1)
(defun abcd () (interactive)
(let ((wnd (selected-window)))
(select-window (get-buffer-window buf))
(goto-char (point-min))
(delete-char 1)
(select-window wnd)
(execute-kbd-macro "\r")))
(global-set-key "\C-cq" 'abcd)
(execute-kbd-macro "\C-x\C-s\C-cq"))
Merry Christmas! :)
In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/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: DEU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
M-x r e p o r t - e m a c s - b u g <return>
Recent messages:
("D:\\Progs\\emacs\\bin\\emacs.exe" "-q")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p. [2 times]
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-25 0:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-25 0:34 Crash when buffer is edited while save-buffer asks for coding system Michael Schierl
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).