From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Schierl Newsgroups: gmane.emacs.bugs Subject: Crash when buffer is edited while save-buffer asks for coding system Date: Tue, 25 Dec 2007 01:34:00 +0100 Message-ID: <47704FF8.9030202@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198542860 29658 80.91.229.12 (25 Dec 2007 00:34:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2007 00:34:20 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 25 01:34:33 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J6xke-0002AP-Tp for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Dec 2007 01:34:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J6xkK-000171-Gu for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Dec 2007 19:34:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J6xkF-00016q-L6 for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2007 19:34:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J6xkD-00016C-Vp for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2007 19:34:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J6xkD-000165-QL for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2007 19:34:05 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J6xkD-0005Um-HA for bug-gnu-emacs@gnu.org; Mon, 24 Dec 2007 19:34:05 -0500 Original-Received: (qmail invoked by alias); 25 Dec 2007 00:34:03 -0000 Original-Received: from p549B8344.dip0.t-ipconnect.de (EHLO [192.168.0.202]) [84.155.131.68] by mail.gmx.net (mp042) with SMTP; 25 Dec 2007 01:34:03 +0100 X-Authenticated: #13243522 X-Provags-ID: V01U2FsdGVkX1+4fS8lVgi4MfeETMZ+p8JpGOjsr8ntt8hWzryeL4 6CS21Oe4TjdZoa User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 X-Enigmail-Version: 0.95.5 OpenPGP: id=58B48CDD X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17234 Archived-At: 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 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