From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kazuhiro Ito Newsgroups: gmane.emacs.devel Subject: Re: Emacs24 coding system problems Date: Mon, 26 Nov 2012 17:30:25 +0900 Message-ID: <87zk24davy.wl%%xmue@d1.dion.ne.jp> References: <20627.33570.796000.901596@gargle.gargle.HOWL> <20649.12724.125000.858979@gargle.gargle.HOWL> <83k3tizkl2.fsf@gnu.org> <20649.61758.750000.69012@gargle.gargle.HOWL> <20657.53134.989000.793074@gargle.gargle.HOWL> <874nkdrjhc.wl%%xmue@d1.dion.ne.jp> <20658.30817.183000.810770@gargle.gargle.HOWL> <831ufhz8pl.fsf@gnu.org> <20658.43946.898000.250218@gargle.gargle.HOWL> <83y5hpxc6y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1353918657 14891 80.91.229.3 (26 Nov 2012 08:30:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2012 08:30:57 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, Uday Reddy , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 26 09:31:08 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tcu5r-00007a-Gu for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2012 09:31:07 +0100 Original-Received: from localhost ([::1]:36571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcu5g-0006gL-4G for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2012 03:30:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcu5Y-0006g4-2W for emacs-devel@gnu.org; Mon, 26 Nov 2012 03:30:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tcu5R-00036N-D1 for emacs-devel@gnu.org; Mon, 26 Nov 2012 03:30:47 -0500 Original-Received: from msa102.auone-net.jp ([61.117.18.162]:47757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcu5L-00034L-JF; Mon, 26 Nov 2012 03:30:36 -0500 Original-Received: from GUNGNIR.med.osaka-cu.ac.jp (unknown [114.179.36.76]) by msa102.auone-net.jp (au one net msa) with ESMTP id 20ABA360038; Mon, 26 Nov 2012 17:30:26 +0900 (JST) In-Reply-To: <83y5hpxc6y.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 61.117.18.162 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155092 Archived-At: At Mon, 26 Nov 2012 05:41:57 +0200, Eli Zaretskii wrote: > > > Date: Sun, 25 Nov 2012 23:37:14 +0000 > > From: Uday Reddy > > Cc: Uday Reddy , > > kzhr@d1.dion.ne.jp, > > monnier@IRO.UMontreal.CA, > > emacs-devel@gnu.org > > > > Hmm. Eli, it looks like you haven't read Kazuhiro's bug report closely. > > find-file-noselect is setting the variable. > > It does? Can you show me where? find-file-not-found-set-buffer-file-coding-system in lisp/dos-w32.el. lisp/dos-w32.el adds find-file-not-found-set-buffer-file-coding-system to find-file-not-found-functions. Please try the below code on trunk or emacs-24 on Windows. (let ((debug-on-error t)) (defadvice find-file-not-found-set-buffer-file-coding-system (after debug activate) (when buffer-file-type (error "buffer-file-type is non-nil"))) (list (setq buffer-file-type nil) (progn (let ((coding-system-for-read 'no-conversion)) ;; Specify non-existing file. (kill-buffer (find-file-noselect "c:/zzzzzzz"))) buffer-file-type))) Debugger entered--Lisp error: (error "buffer-file-type is non-nil") signal(error ("buffer-file-type is non-nil")) error("buffer-file-type is non-nil") find-file-not-found-set-buffer-file-coding-system() run-hook-with-args-until-success(find-file-not-found-set-buffer-file-coding-system) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t)) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t)))) (if rawfile (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents-literally filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t))))) (save-current-buffer (set-buffer buf) (kill-local-variable (quote find-file-literally)) (kill-local-variable (quote buffer-file-coding-system)) (kill-local-variable (quote cursor-type)) (let ((inhibit-read-only t)) (erase-buffer)) (and (default-value (quote enable-multibyte-characters)) (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents-literally filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t))))) (if (equal filename b uffer-file-name) (setq buffer-file-truename truename) (setq buffer-file-truename (abbreviate-file-name (file-truename buffer-file-name)))) (setq buffer-file-number number) (if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq default-directory (file-name-directory buffer-file-name)) (and backup-enable-predicate (not (funcall backup-enable-predicate buffer-file-name)) (progn (make-local-variable (quote backup-inhibited)) (setq backup-inhibited t))) (if rawfile (progn (set-buffer-multibyte nil) (setq buffer-file-coding-system (quote no-conversion)) (set-buffer-major-mode buf) (make-local-variable (quote find-file-literally)) (setq find-file-literally t)) (after-find-file error (not nowarn))) (current-buffer)) (with-current-buffer buf (kill-local-variable (quote find-file-literally)) (kill-local-variable (quote buffer-file-coding-system)) (kill-local-variable (quote cursor-type)) (let ((inhibit-read-only t)) (erase-buffer)) (and (default-value (quote enable-multibyte-characters)) (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents-literally filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (when (and (file-exists-p filename) (not (file-readable-p filename))) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t))))) (if (equal filename buffer-file-na me) (setq buffer-file-truename truename) (setq buffer-file-truename (abbreviate-file-name (file-truename buffer-file-name)))) (setq buffer-file-number number) (if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq default-directory (file-name-directory buffer-file-name)) (and backup-enable-predicate (not (funcall backup-enable-predicate buffer-file-name)) (progn (make-local-variable (quote backup-inhibited)) (setq backup-inhibited t))) (if rawfile (progn (set-buffer-multibyte nil) (setq buffer-file-coding-system (quote no-conversion)) (set-buffer-major-mode buf) (make-local-variable (quote find-file-literally)) (setq find-file-literally t)) (after-find-file error (not nowarn))) (current-buffer)) (let (error) (with-current-buffer buf (kill-local-variable (quote find-file-literally)) (kill-local-variable (quote buffer-file-coding-system)) (kill-local-variable (quote cursor-type)) (let ((inhibit-read-only t)) (erase-buffer)) (and (default-value (quote enable-multibyte-characters)) (not rawfile) (set-buffer-multibyte t)) (if rawfile (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents-literally filename t)) (file-error (when (and (file-exists-p filename) (not ...)) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (setq error t))) (condition-case nil (let ((inhibit-read-only t)) (insert-file-contents filename t)) (file-error (when (and (file-exists-p filename) (not ...)) (kill-buffer buf) (signal (quote file-error) (list "File is not readable" filename))) (or (run-hook-with-args-until-success (quote find-file-not-found-functions)) (setq error t))))) (if (equal filename buffer-file-name) (setq buffer-file-truename tr uename) (setq buffer-file-truename (abbreviate-file-name (file-truename buffer-file-name)))) (setq buffer-file-number number) (if find-file-visit-truename (setq buffer-file-name (expand-file-name buffer-file-truename))) (setq default-directory (file-name-directory buffer-file-name)) (and backup-enable-predicate (not (funcall backup-enable-predicate buffer-file-name)) (progn (make-local-variable (quote backup-inhibited)) (setq backup-inhibited t))) (if rawfile (progn (set-buffer-multibyte nil) (setq buffer-file-coding-system (quote no-conversion)) (set-buffer-major-mode buf) (make-local-variable (quote find-file-literally)) (setq find-file-literally t)) (after-find-file error (not nowarn))) (current-buffer))) find-file-noselect-1(# "c:/zzzzzzz" nil nil "c:/zzzzzzz" nil) find-file-noselect("c:/zzzzzzz") (kill-buffer (find-file-noselect "c:/zzzzzzz")) (let ((coding-system-for-read (quote no-conversion))) (kill-buffer (find-file-noselect "c:/zzzzzzz"))) (progn (let ((coding-system-for-read (quote no-conversion))) (kill-buffer (find-file-noselect "c:/zzzzzzz"))) buffer-file-type) (list (setq buffer-file-type nil) (progn (let ((coding-system-for-read (quote no-conversion))) (kill-buffer (find-file-noselect "c:/zzzzzzz"))) buffer-file-type)) (let ((debug-on-error t)) (defadvice find-file-not-found-set-buffer-file-coding-system (after debug activate) (when buffer-file-type (error "buffer-file-type is non-nil"))) (list (setq buffer-file-type nil) (progn (let ((coding-system-for-read (quote no-conversion))) (kill-buffer (find-file-noselect "c:/zzzzzzz"))) buffer-file-type))) eval((let ((debug-on-error t)) (defadvice find-file-not-found-set-buffer-file-coding-system (after debug activate) (when buffer-file-type (error "buffer-file-type is non-nil"))) (list (setq buffer-file-type nil) (progn (let ((coding-system-for-read (quote no-conversion))) (kill-buffer (find-file-noselect "c:/zzzzzzz"))) buffer-file-type))) nil) eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp nil nil) -- Kazuhiro Ito