* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax @ 2008-10-16 21:22 ` Drew Adams 2008-10-16 23:41 ` Lennart Borgman (gmail) ` (4 more replies) 0 siblings, 5 replies; 26+ messages in thread From: Drew Adams @ 2008-10-16 21:22 UTC (permalink / raw) To: emacs-pretest-bug [-- Attachment #1.1: Type: text/plain, Size: 1540 bytes --] Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an error, saying Invalid read syntax: "?". In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-10-03 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' 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: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: 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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f c o n r r <backspace> <backspace> t r i b / v l i n e <tab> <return> M-x l o a d - f <return> <return> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading c:/drews-lisp-20/CONTRIB/vline.el (source)... load-with-code-conversion: Invalid read syntax: "?" [-- Attachment #1.2: Type: text/html, Size: 2427 bytes --] [-- Attachment #2: vline.el --] [-- Type: application/octet-stream, Size: 6330 bytes --] ;;; vline.el --- show vertical line mode. ;; Copyright (C) 2002, 2008 by Taiki SUGAWARA <buzz.taiki@gmail.com> ;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com> ;; Keywords: faces, editing, emulating ;; Version: 1.03 ;; Time-stamp: <2008-01-22 17:58:43 UTC taiki> ;; URL: http://www.emacswiki.org/cgi-bin/wiki/vline.el ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This file is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Usage ;; put followings your .emacs ;; (require 'vline) ;; ;; if you display a vertical line, type M-x vline-mode. `vline-mode' doesn't ;; effect other buffers, because it is a buffer local minor mode. if you hide ;; a vertical line, type M-x vline-mode again. ;; ;; if you display a vertical line in all buffers, type M-x vline-global-mode. ;; ;; `vline-style' provides a display style of vertical line. see `vline-style' docstring. ;;; Changes ;; ;; 2008-01-22 taiki ;; applied patch from Lennart Borgman ;; - Added :group 'vline ;; - Added defcustom vline-current-window-only ;; - Added header items to simplify for users ;;; Code: (defvar vline-overlay-table-size 200) (defvar vline-overlay-table (make-vector vline-overlay-table-size nil)) (defvar vline-line-char ?|) (defcustom vline-style 'face "*This variable holds vertical line display style. Available values are followings: `face' : use face. `compose' : use composit char. `mixed' : use face and composit char." :type '(radio (const face) (const compose) (const mixed)) :group 'vline) (defface vline '((t (:background "gray90"))) "*A default face for vertical line highlighting." :group 'vline) (defcustom vline-face 'vline "*A face for vertical line highlighting." :type 'face :group 'vline) (defcustom vline-current-window-only nil "*If non-nil then show column in current window only. If the buffer is shown in several windows then show column only in the currently selected window." :type 'boolean :group 'vline) (define-minor-mode vline-mode "Display vertical line mode." :global nil :lighter " VL" :group 'vline (if vline-mode (add-hook 'post-command-hook 'vline-post-command-hook nil t) (vline-clear) (remove-hook 'post-command-hook 'vline-post-command-hook t))) (define-minor-mode vline-global-mode "Display vertical line mode as globally." :global t :lighter " VL" :group 'vline (if vline-global-mode (add-hook 'post-command-hook 'vline-global-post-command-hook) (vline-clear) (remove-hook 'post-command-hook 'vline-global-post-command-hook))) (defun vline-post-command-hook () (when (and vline-mode (not (minibufferp))) (vline-show))) (defun vline-global-post-command-hook () (when (and vline-global-mode (not (minibufferp))) (vline-show))) (defun vline-clear () (mapcar (lambda (ovr) (and ovr (delete-overlay ovr))) vline-overlay-table)) (defun vline-show (&optional point) (vline-clear) (save-excursion (if point (goto-char point) (setq point (point))) (let* ((column (current-column)) (i 0) (compose-p (memq vline-style '(compose mixed))) (face-p (memq vline-style '(face mixed))) (line-char (if compose-p vline-line-char ? )) (line-str (make-string 1 line-char))) (when face-p (setq line-str (propertize line-str 'face vline-face))) (goto-char (window-start)) (while (and (< i (1- (window-height))) (< i (length vline-overlay-table)) (not (eobp))) (move-to-column column) ;; non-cursor line only (workaround of eol probrem. (unless (= (point) point) ;; if column over the cursor's column (when tab or wide char is appered. (when (> (current-column) column) (backward-char)) (let ((ovr (aref vline-overlay-table i)) ;; consider a newline, tab and wide char. (str (concat (make-string (- column (current-column)) ? ) line-str)) (char (char-after))) ;; create overlay if not found. (unless ovr (setq ovr (make-overlay 0 0)) (overlay-put ovr 'rear-nonsticky t) (aset vline-overlay-table i ovr)) ;; initialize overlay. (overlay-put ovr 'face nil) (overlay-put ovr 'before-string nil) (overlay-put ovr 'after-string nil) (overlay-put ovr 'invisible nil) (overlay-put ovr 'window (if vline-current-window-only (selected-window) nil)) (cond ;; tab, wide-space. ((memq char '(?\t ? )) (setq str (concat str (make-string (- (save-excursion (forward-char) (current-column)) (current-column) (string-width str)) ? ))) (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'invisible t) (overlay-put ovr 'after-string str)) ;; eol ((eolp) (move-overlay ovr (point) (point)) (overlay-put ovr 'after-string str)) (t (cond (compose-p (let (str) (when char (setq str (compose-chars char (cond ((= (char-width char) 1) '(tc . tc)) ((= (current-column) column) '(tc . tr)) (t '(tc . tl))) line-char)) (when face-p (setq str (propertize str 'face vline-face))) (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'invisible t) (overlay-put ovr 'after-string str)))) (face-p (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'face vline-face))))))) (setq i (1+ i)) (forward-line))))) (provide 'vline) ;;; vline.el ends here ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-16 21:22 ` bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Drew Adams @ 2008-10-16 23:41 ` Lennart Borgman (gmail) 2008-10-17 0:00 ` Drew Adams 2008-10-17 8:15 ` Eli Zaretskii ` (3 subsequent siblings) 4 siblings, 1 reply; 26+ messages in thread From: Lennart Borgman (gmail) @ 2008-10-16 23:41 UTC (permalink / raw) To: Drew Adams, 1187 Drew Adams wrote: > Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an > error, saying Invalid read syntax: "?". Just for info: I had some similar problems and decided to set current-language-environment to "UTF-8" ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-16 23:41 ` Lennart Borgman (gmail) @ 2008-10-17 0:00 ` Drew Adams 2008-10-17 8:18 ` Eli Zaretskii 0 siblings, 1 reply; 26+ messages in thread From: Drew Adams @ 2008-10-17 0:00 UTC (permalink / raw) To: 'Lennart Borgman (gmail)', 1187 > From: Lennart Borgman Sent: Thursday, October 16, 2008 4:41 PM > > Library vline.el can be read fine in Emacs 22, but Emacs 23 > > raises an error, saying Invalid read syntax: "?". > > Just for info: I had some similar problems and decided to set > current-language-environment to "UTF-8" OK, thanks for the workaround. But that should not be necessary. In Emacs 22, it just DTRT. Users should be able to load the file in both Emacs versions without fiddling with the language environment. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 0:00 ` Drew Adams @ 2008-10-17 8:18 ` Eli Zaretskii 2008-10-17 8:36 ` Lennart Borgman (gmail) 0 siblings, 1 reply; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 8:18 UTC (permalink / raw) To: Drew Adams, 1187; +Cc: bug-gnu-emacs > From: "Drew Adams" <drew.adams@oracle.com> > Date: Thu, 16 Oct 2008 17:00:40 -0700 > Cc: > > > Just for info: I had some similar problems and decided to set > > current-language-environment to "UTF-8" > > OK, thanks for the workaround. > > But that should not be necessary. In Emacs 22, it just DTRT. Users should be > able to load the file in both Emacs versions without fiddling with the language > environment. But that could be a problem with vline.el itself, you know. It uses non-ASCII characters, but does not include any "coding:" cookies, so Emacs is left with its guesswork for how to interpret the 8-bit bytes included in the file. And that guesswork is not fool-proof. I will look at this closer after you report the details about the bytes that I requested in my other message. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 8:18 ` Eli Zaretskii @ 2008-10-17 8:36 ` Lennart Borgman (gmail) 2008-10-17 9:57 ` Eli Zaretskii 0 siblings, 1 reply; 26+ messages in thread From: Lennart Borgman (gmail) @ 2008-10-17 8:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 1187 Eli Zaretskii wrote: >> From: "Drew Adams" <drew.adams@oracle.com> >> Date: Thu, 16 Oct 2008 17:00:40 -0700 >> Cc: >> >>> Just for info: I had some similar problems and decided to set >>> current-language-environment to "UTF-8" >> OK, thanks for the workaround. >> >> But that should not be necessary. In Emacs 22, it just DTRT. Users should be >> able to load the file in both Emacs versions without fiddling with the language >> environment. > > But that could be a problem with vline.el itself, you know. It uses > non-ASCII characters, but does not include any "coding:" cookies, so > Emacs is left with its guesswork for how to interpret the 8-bit bytes > included in the file. And that guesswork is not fool-proof. > > I will look at this closer after you report the details about the > bytes that I requested in my other message. I do not remember; could the defaults be changed so that reading files like vline.el will succeed? ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 8:36 ` Lennart Borgman (gmail) @ 2008-10-17 9:57 ` Eli Zaretskii 0 siblings, 0 replies; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 9:57 UTC (permalink / raw) To: Lennart Borgman (gmail); +Cc: 1187 > Date: Fri, 17 Oct 2008 10:36:47 +0200 > From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> > CC: Drew Adams <drew.adams@oracle.com>, 1187@emacsbugs.donarmstrong.com > > Eli Zaretskii wrote: > >> From: "Drew Adams" <drew.adams@oracle.com> > >> Date: Thu, 16 Oct 2008 17:00:40 -0700 > >> Cc: > >> > >>> Just for info: I had some similar problems and decided to set > >>> current-language-environment to "UTF-8" > >> OK, thanks for the workaround. > >> > >> But that should not be necessary. In Emacs 22, it just DTRT. Users should be > >> able to load the file in both Emacs versions without fiddling with the language > >> environment. > > > > But that could be a problem with vline.el itself, you know. It uses > > non-ASCII characters, but does not include any "coding:" cookies, so > > Emacs is left with its guesswork for how to interpret the 8-bit bytes > > included in the file. And that guesswork is not fool-proof. > > > > I will look at this closer after you report the details about the > > bytes that I requested in my other message. > > I do not remember; could the defaults be changed so that reading files > like vline.el will succeed? Obviously, that depends on the nature of the problem, which at least to me is not yet clear. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-16 21:22 ` bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Drew Adams 2008-10-16 23:41 ` Lennart Borgman (gmail) @ 2008-10-17 8:15 ` Eli Zaretskii 2008-10-17 14:26 ` Drew Adams 2008-10-17 12:30 ` Lawrence Mitchell ` (2 subsequent siblings) 4 siblings, 1 reply; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 8:15 UTC (permalink / raw) To: Drew Adams, 1187; +Cc: emacs-pretest-bug, bug-gnu-emacs > From: "Drew Adams" <drew.adams@oracle.com> > Date: Thu, 16 Oct 2008 14:22:45 -0700 > Cc: > > Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an > error, saying Invalid read syntax: "?". I cannot reproduce this, perhaps because when I saved the vline.el you attached, I selected a wrong encoding. Please visit the file with "M-x find-file-literally" and tell me what 8-bit bytes you see on the line that begins with "((memq char '(?\t". Then visit that file normally with Emacs 22 and tell what non-ASCII character(s) you see on that line (use "C-u C-x =" to describe those characters). ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 8:15 ` Eli Zaretskii @ 2008-10-17 14:26 ` Drew Adams 0 siblings, 0 replies; 26+ messages in thread From: Drew Adams @ 2008-10-17 14:26 UTC (permalink / raw) To: 'Eli Zaretskii', 1187; +Cc: emacs-pretest-bug, bug-gnu-emacs > From: Eli Zaretskii Sent: Friday, October 17, 2008 1:15 AM > > From: "Drew Adams" Date: Thu, 16 Oct 2008 14:22:45 -0700 > > Library vline.el can be read fine in Emacs 22, but Emacs 23 > > raises an error, saying Invalid read syntax: "?". > > I cannot reproduce this, perhaps because when I saved the vline.el you > attached, I selected a wrong encoding. Please visit the file with > "M-x find-file-literally" and tell me what 8-bit bytes you see on the > line that begins with "((memq char '(?\t". Not sure what you mean, but I see this (pasting): ((memq char '(?\t ? )) which looks like this (typing this in): ((memq char '(?\t ?\343\200\200)) oops - as soon as I hit C-s to save what I'd typed so far, Outlook changed what it looks like (I'm using plain text with encoding auto-select (the only choice)). I'll type it again - this is what it looks like in Emacs: ((memq char '(?\t ?\343\200\200)) There, that time it didn't change - that's what I see: three octal sequences, of 343, 200, 200. > Then visit that file > normally with Emacs 22 and tell what non-ASCII character(s) you see on > that line (use "C-u C-x =" to describe those characters). The text looks like ((memq char '(?\t ? )), and C-u C-x = on the char after the second ? gives this: character: (53409, #o150241, #xd0a1, U+3000) charset: japanese-jisx0208 (JISX0208.1983/1990 Japanese Kanji: ISO-IR-87.) code point: #x21 #x21 syntax: _ which means: symbol category: j:Japanese |:While filling, we can break a line at this character. buffer code: #x92 #xA1 #xA1 file code: #xE3 #x80 #x80 (encoded by coding system mule-utf-8-unix) display: by this font (glyph code) -outline-Arial Unicode MS-normal-r-normal-normal-13-97-96-96-p-*-jisx0208-sjis (#x3000) There are text properties here: fontified t If I do the same thing in Emacs 23 (with find-file-literally), I see this: character: (227, #o343, #xe3) preferred charset: unicode (Unicode (ISO10646)) code point: 0xE3 syntax: w which means: word category: j:Japanese l:Latin v:Vietnamese buffer code: #xC3 #xA3 file code: #xC3 #xA3 (encoded by coding system no-conversion) display: by this font (glyph code) uniscribe:-outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso10646-1 (#x6D) Character code properties: customize what to show name: LATIN SMALL LETTER A WITH TILDE general-category: Ll (Letter, Lowercase) decomposition: (97 771) ('a' '\x03') old-name: LATIN SMALL LETTER A TILDE Does this help? Thx - Drew ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-16 21:22 ` bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Drew Adams 2008-10-16 23:41 ` Lennart Borgman (gmail) 2008-10-17 8:15 ` Eli Zaretskii @ 2008-10-17 12:30 ` Lawrence Mitchell 2008-10-17 13:07 ` Eli Zaretskii 2008-10-17 15:55 ` bug#1187: marked as done (23.0.60; Cannot read vline.el - invalid read syntax) Emacs bug Tracking System [not found] ` <handler.1187.D1187.122425837312105.notifdone@emacsbugs.donarmstrong.com> 4 siblings, 1 reply; 26+ messages in thread From: Lawrence Mitchell @ 2008-10-17 12:30 UTC (permalink / raw) To: bug-gnu-emacs; +Cc: emacs-pretest-bug Drew Adams wrote: > Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an > error, saying Invalid read syntax: "?". The following sequence of events works for me in GNU Emacs 23.0.60.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-10-07 on lamacq.ph.ed.ac.uk $ wget http://www.emacswiki.org/cgi-bin/emacs/download/vline.el \ -O /tmp/vline.el $ LANG=C emacs -Q --eval '(load-file "/tmp/vline.el")' LANG=C so that current-language-environment is "ASCII" and default-buffer-file-coding-system is nil. Successfully prints: Loading /tmp/vline.el (source)...done > In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) > of 2008-10-03 on LENNART-69DE564 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include > -fno-crossjumping' > 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: ENU ^^^ this seems to be the culprit. LANG=ENU is an unknown locale here but if LANG=en_GB such that default-buffer-file-coding-system is iso-latin-1-unix then the section of the file that causes problems is: (memq char '(?\t ? )) where the second character is: | character: (12288, #o30000, #x3000) | preferred charset: unicode (Unicode (ISO10646)) | code point: 0x3000 | syntax: _ which means: symbol | category: c:Chinese h:Korean j:Japanese | |:While filling, we can break a line at this character. | buffer code: #xE3 #x80 #x80 | file code: #xE3 #x80 #x80 (encoded by coding system utf-8-unix) | display: by this font (glyph code) | xft:-unknown-Kochi Gothic-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1 (#x6F3) | Character code properties: customize what to show | name: IDEOGRAPHIC SPACE | general-category: Zs (Separator, Space) | decomposition: (<wide> 32) (<wide> ' ') The difference between emacs-21.3 and emacs 23 appears to be that the former ignores the two extra bytes when reading in latin-1 but emacs 23 does not: $ od -c /tmp/f 0000000 ? 343 200 200 0000004 Emacs 23: (let ((coding-system-for-read 'iso-latin-1) ret) (with-temp-buffer (insert-file-contents "/tmp/f") (setq ret (read (current-buffer)))) (insert ret)) => (invalid-read-syntax "?") read(#<buffer *temp*>) ---- (let ((coding-system-for-read 'utf-8) ret) (with-temp-buffer (insert-file-contents "/tmp/f") (setq ret (read (current-buffer)))) (insert ret)) => IDEOGRAPHIC SPACE is inserted correctly Emacs 21.3 (let ((coding-system-for-read 'iso-latin-1) ret) (with-temp-buffer (insert-file-contents "/tmp/f") (setq ret (read (current-buffer)))) (insert ret)) => ã ; LATIN SMALL LETTER A WITH TILDE is inserted. ----- (let ((coding-system-for-read 'utf-8) ret) (with-temp-buffer (insert-file-contents "/tmp/f") (setq ret (read (current-buffer)))) (insert ret)) => IDEOGRAPHIC SPACE is inserted correctly -- Lawrence Mitchell <wence@gmx.li> ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 12:30 ` Lawrence Mitchell @ 2008-10-17 13:07 ` Eli Zaretskii 2008-10-17 14:40 ` Drew Adams 2008-10-17 14:58 ` Lennart Borgman (gmail) 0 siblings, 2 replies; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 13:07 UTC (permalink / raw) To: Lawrence Mitchell, 1187; +Cc: bug-gnu-emacs, bug-submit-list > From: Lawrence Mitchell <wence@gmx.li> > Date: Fri, 17 Oct 2008 13:30:24 +0100 > Cc: emacs-pretest-bug@gnu.org > > Drew Adams wrote: > > Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an > > error, saying Invalid read syntax: "?". > > The following sequence of events works for me in > > GNU Emacs 23.0.60.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll > bars) of 2008-10-07 on lamacq.ph.ed.ac.uk > > $ wget http://www.emacswiki.org/cgi-bin/emacs/download/vline.el \ > -O /tmp/vline.el > > $ LANG=C emacs -Q --eval '(load-file "/tmp/vline.el")' > LANG=C so that current-language-environment is "ASCII" > and default-buffer-file-coding-system is nil. > > Successfully prints: > Loading /tmp/vline.el (source)...done For me, the file vline.el downloaded from the above address loads successfully even without setting LANG to "C". Just a simple "C-x C-f" works and doesn't throw any errors. Either the version of vline.el Drew used is different, or something else is at work here. Drew, are you using the patched EmacsW32 binary produced by Lennart? If so, perhaps it's something that is being triggered by the patches. Or maybe something in Drew's .emacs customizations? ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 13:07 ` Eli Zaretskii @ 2008-10-17 14:40 ` Drew Adams 2008-10-17 15:53 ` Drew Adams 2008-10-17 14:58 ` Lennart Borgman (gmail) 1 sibling, 1 reply; 26+ messages in thread From: Drew Adams @ 2008-10-17 14:40 UTC (permalink / raw) To: 'Eli Zaretskii', 1187, 'Lawrence Mitchell' Cc: bug-gnu-emacs, bug-submit-list > > The following sequence of events works for me in > > > > GNU Emacs 23.0.60.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll > > bars) of 2008-10-07 on lamacq.ph.ed.ac.uk > > > > $ wget http://www.emacswiki.org/cgi-bin/emacs/download/vline.el \ > > -O /tmp/vline.el > > > > $ LANG=C emacs -Q --eval '(load-file "/tmp/vline.el")' > > LANG=C so that current-language-environment is "ASCII" > > and default-buffer-file-coding-system is nil. > > > > Successfully prints: > > Loading /tmp/vline.el (source)...done > > For me, the file vline.el downloaded from the above address loads > successfully even without setting LANG to "C". Just a simple "C-x > C-f" works and doesn't throw any errors. > > Either the version of vline.el Drew used is different, or something > else is at work here. Drew, are you using the patched EmacsW32 binary > produced by Lennart? If so, perhaps it's something that is being > triggered by the patches. Or maybe something in Drew's .emacs > customizations? No, I'm not using Lennart's patched binary; I'm using his vanilla binary. But it's possible I saved or modified the file somehow - I don't recall. But that should be irrelevant for the bug report - it doesn't matter if the file I sent is the original vline.el or something else. What matters is that I opened it using emacs -Q with a vanilla Emacs binary - no customizations, nothing else loaded, nada. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 14:40 ` Drew Adams @ 2008-10-17 15:53 ` Drew Adams 2008-10-17 16:04 ` Eli Zaretskii 0 siblings, 1 reply; 26+ messages in thread From: Drew Adams @ 2008-10-17 15:53 UTC (permalink / raw) To: 1187, 'Eli Zaretskii', 'Lawrence Mitchell' Cc: bug-gnu-emacs, bug-submit-list FWIW, my reply-all for this message: > -----Original Message----- > From: bug-gnu-emacs-bounces+drew.adams=oracle.com@gnu.org > [mailto:bug-gnu-emacs-bounces+drew.adams=oracle.com@gnu.org] > On Behalf Of Drew Adams > Sent: Friday, October 17, 2008 7:40 AM > To: 'Eli Zaretskii'; 1187@emacsbugs.donarmstrong.com; > 'Lawrence Mitchell' > Cc: bug-gnu-emacs@gnu.org; bug-submit-list@donarmstrong.com > Subject: bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax led to this returned mail message from the postmaster: The original message was received at Fri, 17 Oct 2008 09:40:29 -0500 from agminet01.oracle.com [141.146.126.228] ----- The following addresses had permanent fatal errors ----- <bug-submit-list@donarmstrong.com> (reason: 550 5.1.1 <bug-submit-list@donarmstrong.com>... User unknown) ----- Transcript of session follows ----- ... while talking to linnode.donarmstrong.com.: >>> DATA <<< 550 5.1.1 <bug-submit-list@donarmstrong.com>... User unknown 550 5.1.1 <bug-submit-list@donarmstrong.com>... User unknown <<< 503 5.0.0 Need RCPT (recipient) And the attached file details.txt has this: Reporting-MTA: dns; agminet02.oracle.com Arrival-Date: Fri, 17 Oct 2008 09:40:29 -0500 Final-Recipient: RFC822; bug-submit-list@donarmstrong.com Action: failed Status: 5.1.1 Remote-MTA: DNS; linnode.donarmstrong.com Diagnostic-Code: SMTP; 550 5.1.1 <bug-submit-list@donarmstrong.com>... User unknown Last-Attempt-Date: Fri, 17 Oct 2008 10:43:28 -0500 Dunno if this indicates a bug in the bug-reporting system or not. I guess it was Eli who added the address bug-submit-list@donarmstrong.com to the cc list. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 15:53 ` Drew Adams @ 2008-10-17 16:04 ` Eli Zaretskii 0 siblings, 0 replies; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 16:04 UTC (permalink / raw) To: Drew Adams; +Cc: wence, bug-gnu-emacs, 1187 > From: "Drew Adams" <drew.adams@oracle.com> > Cc: <bug-gnu-emacs@gnu.org>, <bug-submit-list@donarmstrong.com> > Date: Fri, 17 Oct 2008 08:53:46 -0700 > > Dunno if this indicates a bug in the bug-reporting system or not. I guess it was > Eli who added the address bug-submit-list@donarmstrong.com to the cc list. Yes, sorry. It's error-prone to manually remove addresses from the list when replying, and this time I goofed. I wish the bug tracker didn't add such addresses to messages it sends to humans. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 13:07 ` Eli Zaretskii 2008-10-17 14:40 ` Drew Adams @ 2008-10-17 14:58 ` Lennart Borgman (gmail) 2008-10-17 15:18 ` Drew Adams 1 sibling, 1 reply; 26+ messages in thread From: Lennart Borgman (gmail) @ 2008-10-17 14:58 UTC (permalink / raw) To: Eli Zaretskii, 1187; +Cc: Lawrence Mitchell Eli Zaretskii wrote: >> From: Lawrence Mitchell <wence@gmx.li> >> Date: Fri, 17 Oct 2008 13:30:24 +0100 >> Cc: emacs-pretest-bug@gnu.org >> >> Drew Adams wrote: >>> Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an >>> error, saying Invalid read syntax: "?". >> The following sequence of events works for me in >> >> GNU Emacs 23.0.60.4 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll >> bars) of 2008-10-07 on lamacq.ph.ed.ac.uk >> >> $ wget http://www.emacswiki.org/cgi-bin/emacs/download/vline.el \ >> -O /tmp/vline.el >> >> $ LANG=C emacs -Q --eval '(load-file "/tmp/vline.el")' >> LANG=C so that current-language-environment is "ASCII" >> and default-buffer-file-coding-system is nil. >> >> Successfully prints: >> Loading /tmp/vline.el (source)...done > > For me, the file vline.el downloaded from the above address loads > successfully even without setting LANG to "C". Just a simple "C-x > C-f" works and doesn't throw any errors. > > Either the version of vline.el Drew used is different, or something > else is at work here. Drew, are you using the patched EmacsW32 binary > produced by Lennart? If so, perhaps it's something that is being > triggered by the patches. Or maybe something in Drew's .emacs > customizations? I think Drew is using the unpatched version. And I can see this problem with both the unpatched and the patched version. However there might be a misunderstanding. There is no error while reading vline.el. The error comes when I do eval-buffer. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 14:58 ` Lennart Borgman (gmail) @ 2008-10-17 15:18 ` Drew Adams 2008-10-17 15:58 ` Lawrence Mitchell 2008-10-17 16:00 ` Eli Zaretskii 0 siblings, 2 replies; 26+ messages in thread From: Drew Adams @ 2008-10-17 15:18 UTC (permalink / raw) To: 'Lennart Borgman (gmail)', 'Eli Zaretskii', 1187 Cc: 'Lawrence Mitchell' > > For me, the file vline.el downloaded from the above address loads > > successfully even without setting LANG to "C". Just a simple "C-x > > C-f" works and doesn't throw any errors. > > > > Either the version of vline.el Drew used is different, or something > > else is at work here. Drew, are you using the patched > > EmacsW32 binary produced by Lennart? If so, perhaps it's something > > that is being triggered by the patches. Or maybe something in Drew's > > .emacs customizations? > > I think Drew is using the unpatched version. Correct. > And I can see this problem with both the unpatched and the patched version. > > However there might be a misunderstanding. There is no error while > reading vline.el. The error comes when I do eval-buffer. Yes, the problem arises when I load (so, eval) the library. But Lawrence and Eli both mentioned loading also. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 15:18 ` Drew Adams @ 2008-10-17 15:58 ` Lawrence Mitchell 2008-10-17 16:09 ` Drew Adams 2008-10-17 16:00 ` Eli Zaretskii 1 sibling, 1 reply; 26+ messages in thread From: Lawrence Mitchell @ 2008-10-17 15:58 UTC (permalink / raw) To: Drew Adams; +Cc: 1187 Hi Drew: Drew Adams wrote: >>> For me, the file vline.el downloaded from the above address loads >>> successfully even without setting LANG to "C". Just a simple "C-x >>> C-f" works and doesn't throw any errors. >>> Either the version of vline.el Drew used is different, or something >>> else is at work here. Drew, are you using the patched >>> EmacsW32 binary produced by Lennart? If so, perhaps it's something >>> that is being triggered by the patches. Or maybe something in Drew's >>> .emacs customizations? >> I think Drew is using the unpatched version. > Correct. >> And I can see this problem with both the unpatched and the patched version. >> However there might be a misunderstanding. There is no error while >> reading vline.el. The error comes when I do eval-buffer. > Yes, the problem arises when I load (so, eval) the library. But > Lawrence and Eli both mentioned loading also. I think the problem is a bad interaction between your language environment and the file in question. Does the following command load vline.el successfully? emacs -Q --eval '(let ((coding-system-for-read (quote utf-8))) (load-file "path/to/vline.el"))' ? For me, the above works regardless of my LANG environment variable however: LANG=en_US emacs -Q --eval '(load-file "path/to/vline.el")' Loading /Home/s0198183/tmp/vline.el (source)... Invalid read syntax: "?" In this case, emacs uses the iso-latin-1 coding-system to open the file and barfs when trying to read the utf-8 character in it. Cheers, Lawrence -- Lawrence Mitchell <wence@gmx.li> ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 15:58 ` Lawrence Mitchell @ 2008-10-17 16:09 ` Drew Adams 0 siblings, 0 replies; 26+ messages in thread From: Drew Adams @ 2008-10-17 16:09 UTC (permalink / raw) To: 'Lawrence Mitchell'; +Cc: 1187 > I think the problem is a bad interaction between your language > environment and the file in question. > > Does the following command load vline.el successfully? > > emacs -Q --eval '(let ((coding-system-for-read (quote utf-8))) > (load-file "path/to/vline.el"))' Yes, that works. (Actually, I just put the sexp in *scratch* and eval'd it there. > For me, the above works regardless of my LANG environment > variable however: > > LANG=en_US emacs -Q --eval '(load-file "path/to/vline.el")' > > Loading /Home/s0198183/tmp/vline.el (source)... > Invalid read syntax: "?" > > In this case, emacs uses the iso-latin-1 coding-system to open > the file and barfs when trying to read the utf-8 character in it. OK, I guess you found the problem, but what is the solution? Are users expected to set `coding-system-for-read'? Is vline.el expected to use a local variable to state that it is UTF-8? This seemed to work OK in Emacs 22 without users doing anything special. But, as Eli said (or perhaps it was you), perhaps Emacs 22 was simply ignoring some of the code. Is this a vline.el bug or an Emacs 23 bug or an Emacs 22 bug or a user problem (language environment)? ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 15:18 ` Drew Adams 2008-10-17 15:58 ` Lawrence Mitchell @ 2008-10-17 16:00 ` Eli Zaretskii 2008-10-17 16:21 ` Drew Adams 1 sibling, 1 reply; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 16:00 UTC (permalink / raw) To: Drew Adams; +Cc: wence, 1187 > From: "Drew Adams" <drew.adams@oracle.com> > Cc: "'Lawrence Mitchell'" <wence@gmx.li> > Date: Fri, 17 Oct 2008 08:18:06 -0700 > > > However there might be a misunderstanding. There is no error while > > reading vline.el. The error comes when I do eval-buffer. > > Yes, the problem arises when I load (so, eval) the library. But Lawrence and Eli > both mentioned loading also. No, I said visiting with "C-x C-f". And your original report said: Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an error, saying Invalid read syntax: "?". It said nothing about evaluating it. Anyway, does the problem go away if you visit the file with "C-x RET c utf-8 RET C-x C-f vline.el RET" before evaluating it? If this does the trick, then please talk to the author and ask him to include an explicit coding: cookie in the file. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 16:00 ` Eli Zaretskii @ 2008-10-17 16:21 ` Drew Adams 2008-10-17 18:24 ` Eli Zaretskii 0 siblings, 1 reply; 26+ messages in thread From: Drew Adams @ 2008-10-17 16:21 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: wence, 1187 > > > However there might be a misunderstanding. There is no error while > > > reading vline.el. The error comes when I do eval-buffer. > > > > Yes, the problem arises when I load (so, eval) the library. > > But Lawrence and Eli both mentioned loading also. > > No, I said visiting with "C-x C-f". Not really. You said: For me, the file vline.el downloaded from the above address loads ^^^^^ successfully even without setting LANG to "C". But you did add this, which confuses things (loading with visiting): Just a simple "C-x C-f" works and doesn't throw any errors. I didn't notice that last part. > And your original report said: > > Library vline.el can be read fine in Emacs 22, but Emacs 23 > raises an error, saying Invalid read syntax: "?". > > It said nothing about evaluating it. Yes, I too was not clear enough. I meant load, not visit. > Anyway, does the problem go away if you visit the file with > > "C-x RET c utf-8 RET C-x C-f vline.el RET" > > before evaluating it? Yes and no. I did `C-x RET c utf-8 RET C-x C-f vline.el RET'. If I then do `M-x load-file RET', then I get the same error. However, if instead of `M-x load-file RET' I use `M-x eval-buffer RET', then I don't get the error. > If this does the trick, then please talk to the author and ask him to > include an explicit coding: cookie in the file. I can do that, if you tell me exactly what to tell him needs to be done. However, is it normal that Emacs 23 raises an error if the encoding is wrong? Emacs 22 does not raise any error here. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 16:21 ` Drew Adams @ 2008-10-17 18:24 ` Eli Zaretskii 2008-10-20 10:28 ` Kenichi Handa 0 siblings, 1 reply; 26+ messages in thread From: Eli Zaretskii @ 2008-10-17 18:24 UTC (permalink / raw) To: Drew Adams, Kenichi Handa; +Cc: bug-gnu-emacs, 1187 > From: "Drew Adams" <drew.adams@oracle.com> > Cc: <lennart.borgman@gmail.com>, <1187@emacsbugs.donarmstrong.com>, > <wence@gmx.li> > Date: Fri, 17 Oct 2008 09:21:16 -0700 > > > Anyway, does the problem go away if you visit the file with > > > > "C-x RET c utf-8 RET C-x C-f vline.el RET" > > > > before evaluating it? > > Yes and no. I did `C-x RET c utf-8 RET C-x C-f vline.el RET'. If I then do `M-x > load-file RET', then I get the same error. However, if instead of `M-x load-file > RET' I use `M-x eval-buffer RET', then I don't get the error. I meant the latter, sorry for another vague request. > > If this does the trick, then please talk to the author and ask him to > > include an explicit coding: cookie in the file. > > I can do that, if you tell me exactly what to tell him needs to be done. Add a "coding: utf-8" cookie on the first line of the file. See the beginning of calendar/icalendar.el for an example. > However, is it normal that Emacs 23 raises an error if the encoding is wrong? > Emacs 22 does not raise any error here. I don't know. Perhaps Handa-san can tell if there's a better way of handling this particular case, without a need for a coding cookie. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-17 18:24 ` Eli Zaretskii @ 2008-10-20 10:28 ` Kenichi Handa 2008-10-20 10:58 ` Eli Zaretskii 0 siblings, 1 reply; 26+ messages in thread From: Kenichi Handa @ 2008-10-20 10:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: bug-gnu-emacs, 1187 In article <uwsg7krkr.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes: > > However, is it normal that Emacs 23 raises an error if the encoding is wrong? > > Emacs 22 does not raise any error here. > I don't know. Perhaps Handa-san can tell if there's a better way of > handling this particular case, without a need for a coding cookie. Please send me the vnline.el that causes this problem. I'll check what is wrong. --- Kenichi Handa handa@ni.aist.go.jp ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-20 10:28 ` Kenichi Handa @ 2008-10-20 10:58 ` Eli Zaretskii 2008-10-21 2:40 ` Kenichi Handa 0 siblings, 1 reply; 26+ messages in thread From: Eli Zaretskii @ 2008-10-20 10:58 UTC (permalink / raw) To: Kenichi Handa; +Cc: bug-gnu-emacs, 1187 > From: Kenichi Handa <handa@m17n.org> > CC: drew.adams@oracle.com, 1187@emacsbugs.donarmstrong.com, > bug-gnu-emacs@gnu.org > Date: Mon, 20 Oct 2008 19:28:08 +0900 > > In article <uwsg7krkr.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes: > > > > However, is it normal that Emacs 23 raises an error if the encoding is wrong? > > > Emacs 22 does not raise any error here. > > > I don't know. Perhaps Handa-san can tell if there's a better way of > > handling this particular case, without a need for a coding cookie. > > Please send me the vnline.el that causes this problem. I'll > check what is wrong. It's vline.el, and you can download it from here: http://www.emacswiki.org/cgi-bin/wiki/vline.el (It is better to download, to avoid any possible transformations of the file in mail transfer.) ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-20 10:58 ` Eli Zaretskii @ 2008-10-21 2:40 ` Kenichi Handa 2008-10-21 4:46 ` Drew Adams 0 siblings, 1 reply; 26+ messages in thread From: Kenichi Handa @ 2008-10-21 2:40 UTC (permalink / raw) To: Eli Zaretskii; +Cc: bug-gnu-emacs, 1187 In article <uy70jilch.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes: > It's vline.el, and you can download it from here: > http://www.emacswiki.org/cgi-bin/wiki/vline.el > (It is better to download, to avoid any possible transformations of > the file in mail transfer.) Ok, I found what is the problem. In Emacs 22, iso-8859-1 is a coding of type `iso-2022', but in Emacs 23, it's of type `charset', and I forgot to handle latin-extra-code-table (which has nil for the byte 0x80) in the detector of that kind of coding system. As I've just installed a fix, the latest code should detect vline.el correctly as utf-8. But, the reason why it's detected as utf-8 is because the file contains a byte 0x80. If a file doesn't contain a byte in the range 0x80..0x9F and nil in latin-extra-code-table, it's impossible to distinguish iso-latin-1 from utf-8. So, in general, it's a good idea to add coding-tag: utf-8 for utf-8 files. --- Kenichi Handa handa@ni.aist.go.jp ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax 2008-10-21 2:40 ` Kenichi Handa @ 2008-10-21 4:46 ` Drew Adams 0 siblings, 0 replies; 26+ messages in thread From: Drew Adams @ 2008-10-21 4:46 UTC (permalink / raw) To: 'Kenichi Handa', 'Eli Zaretskii'; +Cc: bug-gnu-emacs, 1187 > From: Kenichi Handa Sent: Monday, October 20, 2008 7:41 PM > Ok, I found what is the problem. In Emacs 22, iso-8859-1 is > a coding of type `iso-2022', but in Emacs 23, it's of type > `charset', and I forgot to handle latin-extra-code-table > (which has nil for the byte 0x80) in the detector of that > kind of coding system. As I've just installed a fix, the > latest code should detect vline.el correctly as utf-8. > > But, the reason why it's detected as utf-8 is because the > file contains a byte 0x80. If a file doesn't contain a byte > in the range 0x80..0x9F and nil in latin-extra-code-table, > it's impossible to distinguish iso-latin-1 from utf-8. > > So, in general, it's a good idea to add coding-tag: utf-8 > for utf-8 files. Thanks very much for following up with this, especially after the bug had been closed. I've sent your message to the author. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#1187: marked as done (23.0.60; Cannot read vline.el - invalid read syntax) 2008-10-16 21:22 ` bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Drew Adams ` (2 preceding siblings ...) 2008-10-17 12:30 ` Lawrence Mitchell @ 2008-10-17 15:55 ` Emacs bug Tracking System [not found] ` <handler.1187.D1187.122425837312105.notifdone@emacsbugs.donarmstrong.com> 4 siblings, 0 replies; 26+ messages in thread From: Emacs bug Tracking System @ 2008-10-17 15:55 UTC (permalink / raw) To: Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 895 bytes --] Your message dated Fri, 17 Oct 2008 11:46:05 -0400 with message-id <jwv3aivjkhw.fsf-monnier+emacsbugreports@gnu.org> and subject line Re: bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax has caused the Emacs bug report #1187, regarding 23.0.60; Cannot read vline.el - invalid read syntax to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 1187: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1187 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 14262 bytes --] [-- Attachment #2.1.1.1: Type: text/plain, Size: 1540 bytes --] Library vline.el can be read fine in Emacs 22, but Emacs 23 raises an error, saying Invalid read syntax: "?". In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-10-03 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' 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: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: 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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f c o n r r <backspace> <backspace> t r i b / v l i n e <tab> <return> M-x l o a d - f <return> <return> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading c:/drews-lisp-20/CONTRIB/vline.el (source)... load-with-code-conversion: Invalid read syntax: "?" [-- Attachment #2.1.1.2: Type: text/html, Size: 2427 bytes --] [-- Attachment #2.1.2: vline.el --] [-- Type: application/octet-stream, Size: 6330 bytes --] ;;; vline.el --- show vertical line mode. ;; Copyright (C) 2002, 2008 by Taiki SUGAWARA <buzz.taiki@gmail.com> ;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com> ;; Keywords: faces, editing, emulating ;; Version: 1.03 ;; Time-stamp: <2008-01-22 17:58:43 UTC taiki> ;; URL: http://www.emacswiki.org/cgi-bin/wiki/vline.el ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This file is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Usage ;; put followings your .emacs ;; (require 'vline) ;; ;; if you display a vertical line, type M-x vline-mode. `vline-mode' doesn't ;; effect other buffers, because it is a buffer local minor mode. if you hide ;; a vertical line, type M-x vline-mode again. ;; ;; if you display a vertical line in all buffers, type M-x vline-global-mode. ;; ;; `vline-style' provides a display style of vertical line. see `vline-style' docstring. ;;; Changes ;; ;; 2008-01-22 taiki ;; applied patch from Lennart Borgman ;; - Added :group 'vline ;; - Added defcustom vline-current-window-only ;; - Added header items to simplify for users ;;; Code: (defvar vline-overlay-table-size 200) (defvar vline-overlay-table (make-vector vline-overlay-table-size nil)) (defvar vline-line-char ?|) (defcustom vline-style 'face "*This variable holds vertical line display style. Available values are followings: `face' : use face. `compose' : use composit char. `mixed' : use face and composit char." :type '(radio (const face) (const compose) (const mixed)) :group 'vline) (defface vline '((t (:background "gray90"))) "*A default face for vertical line highlighting." :group 'vline) (defcustom vline-face 'vline "*A face for vertical line highlighting." :type 'face :group 'vline) (defcustom vline-current-window-only nil "*If non-nil then show column in current window only. If the buffer is shown in several windows then show column only in the currently selected window." :type 'boolean :group 'vline) (define-minor-mode vline-mode "Display vertical line mode." :global nil :lighter " VL" :group 'vline (if vline-mode (add-hook 'post-command-hook 'vline-post-command-hook nil t) (vline-clear) (remove-hook 'post-command-hook 'vline-post-command-hook t))) (define-minor-mode vline-global-mode "Display vertical line mode as globally." :global t :lighter " VL" :group 'vline (if vline-global-mode (add-hook 'post-command-hook 'vline-global-post-command-hook) (vline-clear) (remove-hook 'post-command-hook 'vline-global-post-command-hook))) (defun vline-post-command-hook () (when (and vline-mode (not (minibufferp))) (vline-show))) (defun vline-global-post-command-hook () (when (and vline-global-mode (not (minibufferp))) (vline-show))) (defun vline-clear () (mapcar (lambda (ovr) (and ovr (delete-overlay ovr))) vline-overlay-table)) (defun vline-show (&optional point) (vline-clear) (save-excursion (if point (goto-char point) (setq point (point))) (let* ((column (current-column)) (i 0) (compose-p (memq vline-style '(compose mixed))) (face-p (memq vline-style '(face mixed))) (line-char (if compose-p vline-line-char ? )) (line-str (make-string 1 line-char))) (when face-p (setq line-str (propertize line-str 'face vline-face))) (goto-char (window-start)) (while (and (< i (1- (window-height))) (< i (length vline-overlay-table)) (not (eobp))) (move-to-column column) ;; non-cursor line only (workaround of eol probrem. (unless (= (point) point) ;; if column over the cursor's column (when tab or wide char is appered. (when (> (current-column) column) (backward-char)) (let ((ovr (aref vline-overlay-table i)) ;; consider a newline, tab and wide char. (str (concat (make-string (- column (current-column)) ? ) line-str)) (char (char-after))) ;; create overlay if not found. (unless ovr (setq ovr (make-overlay 0 0)) (overlay-put ovr 'rear-nonsticky t) (aset vline-overlay-table i ovr)) ;; initialize overlay. (overlay-put ovr 'face nil) (overlay-put ovr 'before-string nil) (overlay-put ovr 'after-string nil) (overlay-put ovr 'invisible nil) (overlay-put ovr 'window (if vline-current-window-only (selected-window) nil)) (cond ;; tab, wide-space. ((memq char '(?\t ? )) (setq str (concat str (make-string (- (save-excursion (forward-char) (current-column)) (current-column) (string-width str)) ? ))) (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'invisible t) (overlay-put ovr 'after-string str)) ;; eol ((eolp) (move-overlay ovr (point) (point)) (overlay-put ovr 'after-string str)) (t (cond (compose-p (let (str) (when char (setq str (compose-chars char (cond ((= (char-width char) 1) '(tc . tc)) ((= (current-column) column) '(tc . tr)) (t '(tc . tl))) line-char)) (when face-p (setq str (propertize str 'face vline-face))) (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'invisible t) (overlay-put ovr 'after-string str)))) (face-p (move-overlay ovr (point) (1+ (point))) (overlay-put ovr 'face vline-face))))))) (setq i (1+ i)) (forward-line))))) (provide 'vline) ;;; vline.el ends here [-- Attachment #3: Type: message/rfc822, Size: 2154 bytes --] From: Stefan Monnier <monnier@iro.umontreal.ca> To: Eli Zaretskii <eliz@gnu.org> Cc: 1187-done@emacsbugs.donarmstrong.com, Lawrence Mitchell <wence@gmx.li> Subject: Re: bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Date: Fri, 17 Oct 2008 11:46:05 -0400 Message-ID: <jwv3aivjkhw.fsf-monnier+emacsbugreports@gnu.org> http://www.emacswiki.org/cgi-bin/emacs/download/vline.el contains non-ascii chars, but does not contain any coding tag, so depending on your coding settings, it will decode it in different ways, some of which will lead to load-time errors, others to incorrect behavior. There's nothing for Emacs to do here. Such uses are OK for a file you wrote for your own use, but for distribution to people who may use other locales, it's not. Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
[parent not found: <handler.1187.D1187.122425837312105.notifdone@emacsbugs.donarmstrong.com>]
* bug#1187: closed by Stefan Monnier <monnier@iro.umontreal.ca> (Re: bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax) [not found] ` <handler.1187.D1187.122425837312105.notifdone@emacsbugs.donarmstrong.com> @ 2008-10-17 16:48 ` Drew Adams 0 siblings, 0 replies; 26+ messages in thread From: Drew Adams @ 2008-10-17 16:48 UTC (permalink / raw) To: 1187 > This is an automatic notification regarding your bug report > which was filed against the emacs package: > > #1187: 23.0.60; Cannot read vline.el - invalid read syntax > > It has been closed by Stefan Monnier <monnier@iro.umontreal.ca>. > > Their explanation is attached below along with your original report. > If this explanation is unsatisfactory and you have not received a > better one in a separate message then please contact Stefan > Monnier <monnier@iro.umontreal.ca> by replying to this email. [Note: "replying to this email" - even Reply All, does *not* send anything to monnier@iro.umontreal.ca. That address needs to be added by hand, apparently.] Uh, why was this closed in the middle of debugging and a discussion about it? http://www.emacswiki.org/cgi-bin/emacs/download/vline.el contains non-ascii chars, but does not contain any coding tag, so depending on your coding settings, it will decode it in different ways, some of which will lead to load-time errors, others to incorrect behavior. There's nothing for Emacs to do here. Such uses are OK for a file you wrote for your own use, but for distribution to people who may use other locales, it's not. Not too helpful. Please explain what the author needs to do to fix the file. And does the Emacs doc perhaps need to be updated to explain that libraries that worked in Emacs 22 might need to be modified by adding coding settings in order to work in Emacs 23? BTW, the URL you cite does not correspond to the file I sent, as someone pointed out, even though the file names are the same. The problem might be the same for both files (dunno), but the reference is incorrect. This bug report you closed is not about the file you closed it for. ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2008-10-21 4:46 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <jwv3aivjkhw.fsf-monnier+emacsbugreports@gnu.org> 2008-10-16 21:22 ` bug#1187: 23.0.60; Cannot read vline.el - invalid read syntax Drew Adams 2008-10-16 23:41 ` Lennart Borgman (gmail) 2008-10-17 0:00 ` Drew Adams 2008-10-17 8:18 ` Eli Zaretskii 2008-10-17 8:36 ` Lennart Borgman (gmail) 2008-10-17 9:57 ` Eli Zaretskii 2008-10-17 8:15 ` Eli Zaretskii 2008-10-17 14:26 ` Drew Adams 2008-10-17 12:30 ` Lawrence Mitchell 2008-10-17 13:07 ` Eli Zaretskii 2008-10-17 14:40 ` Drew Adams 2008-10-17 15:53 ` Drew Adams 2008-10-17 16:04 ` Eli Zaretskii 2008-10-17 14:58 ` Lennart Borgman (gmail) 2008-10-17 15:18 ` Drew Adams 2008-10-17 15:58 ` Lawrence Mitchell 2008-10-17 16:09 ` Drew Adams 2008-10-17 16:00 ` Eli Zaretskii 2008-10-17 16:21 ` Drew Adams 2008-10-17 18:24 ` Eli Zaretskii 2008-10-20 10:28 ` Kenichi Handa 2008-10-20 10:58 ` Eli Zaretskii 2008-10-21 2:40 ` Kenichi Handa 2008-10-21 4:46 ` Drew Adams 2008-10-17 15:55 ` bug#1187: marked as done (23.0.60; Cannot read vline.el - invalid read syntax) Emacs bug Tracking System [not found] ` <handler.1187.D1187.122425837312105.notifdone@emacsbugs.donarmstrong.com> 2008-10-17 16:48 ` bug#1187: closed by Stefan Monnier <monnier@iro.umontreal.ca> (Re: bug#1187: 23.0.60; " Drew Adams
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).