Coding problem with Euro sign

2005-12-13 Thread Ralf Angeli
Attached you can find a file with two 8-bit characters I extracted
from a file produced by Visual Studio under Windows.  The characters
should be u umlaut and the Euro sign.  Emacs does not seem to be able
to find the right coding system for it and displays it with
raw-text-dos.  I could not get the file displayed correctly by loading
it with iso-latin-1, iso-latin-9, or cp1251.  And I am not sure if
this is a problem of Emacs or if Visual Studio simply produced
garbage.

� u umlaut
€ euro


In GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.6.10)
 of 2005-12-07 on pacem, modified by Debian
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--build' 'i486-linux-gnu' '--host' 
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' 
'--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/22.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.0.50/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.0.50/leim'
 '--with-x=yes' '--with-x-toolkit=gtk' 'CFLAGS=-DDEBIAN -g -Wno-pointer-sign 
-O2' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu''

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: en_US
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  desktop-save-mode: t
  display-time-mode: t
  iswitchb-mode: t
  recentf-mode: t
  show-paren-mode: t
  encoded-kbd-mode: t
  auto-compression-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x k  C-x  c i s o - l a  1  
C-x C-f s c  t e s  x  .  
t . t x  
 s t  x   C-x k  
C-x  c i s o - l a t  9  C-x C-f 
M-p  C-x k  C-x  c c p 1 2 
  C-x C-f M-p  M-x r e p o r t 
- e m  

Recent messages:
Cleaning up the recentf list...done (1 removed)
Loading iswitchb...done
Loading time...done
Loading desktop...done
No desktop file.
For information about the GNU Project and its goals, type C-h C-p.
Loading cl-seq...done
Making completion list...
Loading help-mode...done
Loading emacsbug...done
___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: customize-face

2005-12-13 Thread martin rudalics

>
>   I suppose this happens because signal_after_change
> is called with arguments `opoint' and `PT - opoint' where opoint = 1090
> and PT = 1090 + 52 + 1.
>
> Can you find the line number of the call to signal_after_change?
> We need to determine why its argument FROM is incorrect.

It's the call in `insert_and_inherit' around line 770 of insdel.c in the
particular example.  However, if some before-change-function inserts or
deletes text before the position where the change happened, you will get
an "incorrect" FROM for any insert using the "opoint" / "PT - opoint"
concept.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: find-file sometimes doesn't

2005-12-13 Thread Stefan Monnier
> 2005-12-12  Bill Wohler  <[EMAIL PROTECTED]>

>   * vc-svn.el (vc-svn-registered): Fix problem of visiting
>   non-writable Subversion-controlled files by saving window
>   configuration before calling vc-do-command. vc-do-command calls
>   pop-to-buffer on error which is unexpected during registration.

> Index: vc-svn.el
> ===
> RCS file: /cvsroot/emacs/emacs/lisp/vc-svn.el,v
> retrieving revision 1.22
> diff -u -r1.22 vc-svn.el
> --- vc-svn.el 14 Nov 2005 04:33:03 -  1.22
> +++ vc-svn.el 13 Dec 2005 00:42:59 -
> @@ -114,13 +114,18 @@
>  (file-name-directory file)))
>  (with-temp-buffer
>(cd (file-name-directory file))
> -  (condition-case nil
> -   (vc-svn-command t 0 file "status" "-v")
> - ;; Some problem happened.  E.g. We can't find an `svn' executable.
> -;; We used to only catch `file-error' but when the process is run on
> -;; a remote host via Tramp, the error is only reported via the
> -;; exit status which is turned into an `error' by vc-do-command.
> - (error nil))
> +(condition-case nil
> +;; Save configuration since vc-do-command calls pop-to-buffer on
> +;; error (such as visiting a Subversion-controlled file that you
> +;; don't have permission to edit). This causes later problems
> +;; during registration.
> +(save-window-excursion
> +  (vc-svn-command t 0 file "status" "-v"))
> +  ;; Some problem happened.  E.g. We can't find an `svn' executable.
> +  ;; We used to only catch `file-error' but when the process is run 
> on
> +  ;; a remote host via Tramp, the error is only reported via the
> +  ;; exit status which is turned into an `error' by vc-do-command.
> +  (error nil))
>(vc-svn-parse-status t)
>(eq 'SVN (vc-file-getprop file 'vc-backend)
 
Interesting.
But the above solution still has the following problem: pop-to-buffer may
create a new frame, in which case the save-window-excursion won't be enough.
Basically, we need to tell vc-do-command not to call pop-to-buffer.

I'll install a patch for it, thanks.


Stefan


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Coding problem with Euro sign

2005-12-13 Thread David Hansen
On Tue, 13 Dec 2005 13:12:02 +0100 Ralf Angeli wrote:

> Attached you can find a file with two 8-bit characters I extracted
> from a file produced by Visual Studio under Windows.  The characters
> should be u umlaut and the Euro sign.  Emacs does not seem to be able
> to find the right coding system for it and displays it with
> raw-text-dos.  I could not get the file displayed correctly by loading
> it with iso-latin-1, iso-latin-9, or cp1251.  And I am not sure if
> this is a problem of Emacs or if Visual Studio simply produced
> garbage.

The \200 (0x80) is EUR in windows-1252.  But i have no clue what
the 0xc2 is doing there.

With

-*- coding: windows-1252; -*-

in the first line or when you open the file with

C-x RET c windows-1252 RET C-x C-f test.txt RET 

the EUR gets displayed but there's still this 0xc2 (latin capital
letter A with circumflex in latin-1/9 or windows-1252).

David



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: find-file sometimes doesn't

2005-12-13 Thread Bill Wohler
Stefan Monnier <[EMAIL PROTECTED]> wrote:

> Interesting.
> But the above solution still has the following problem: pop-to-buffer may
> create a new frame, in which case the save-window-excursion won't be enough.
> Basically, we need to tell vc-do-command not to call pop-to-buffer.
> 
> I'll install a patch for it, thanks.

Thank you.

-- 
Bill Wohler <[EMAIL PROTECTED]>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


kill-rectangle counts incorrectly

2005-12-13 Thread Peter Dyballa

Hello!

When I do in Mac OS X 10.3.9 (Panther) in a tcsh driven *shell* buffer  
for example 'find  
/Users/pete/Quellen/Fonts/ 
{adobe,apple,bh,bitstream,itc,monotype,ms,public} -name "8[pr].map"  
-ls' I get a listing like this:


70370228 lrwxr-xr-x1 pete pete   12 4 Aug 23:56:  
/Users/pete/Quellen/Fonts/adobe/univers/8p.map -> ../../8p.map
70370238 lrwxr-xr-x1 pete pete   12 4 Aug 23:56:  
/Users/pete/Quellen/Fonts/adobe/univers/8r.map -> ../../8r.map
49002698 lrwxr-xr-x1 pete pete   12 3 Mai 1 005^@  
/Users/pete/Quellen/Fonts/apple/Ayuthaya/8p.map -> ../../8p.map
49002688 lrwxr-xr-x1 pete pete   12 3 Mai 1 005^@  
/Users/pete/Quellen/Fonts/apple/Ayuthaya/8r.map -> ../../8r.map


By some means the date of the files found is not correctly output and  
^@ (ASCII NUL) is added to it, but that's not the problem! The problem  
becomes visible when I position the cursor on the colon right to 23:56  
in the first line, mark it, and go down to the last line. When I now go  
forward (right) by one char, the cursor in deed steps forward by two  
columns (because of the way the ASCII NUL is displayed) -- and the  
rectangle which is killed now, is two characters wide and not one!  
That's a bug -- in my opinion.



In GNU Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0, X toolkit, Xaw3d  
scroll bars)

 of 2005-12-10 on localhost
X server distributor `The XFree86 Project, Inc', version 11.0.4030
configured using `configure '--without-pop' '--with-xpm' '--with-jpeg'  
'--with-tiff' '--with-gif' '--with-png' '--without-sound'  
'--enable-locallisppath=/Library/Application  
Support/Emacs/calendar22:/Library/Application  
Support/Emacs/preview:/Library/Application  
Support/Emacs/auctex/images:/Library/Application  
Support/Emacs/auctex:/Library/Application Support/Emacs' 'CFLAGS=-ggdb  
-O2 -pipe -faltivec -maltivec -mcpu=740 -no-cpp-precomp  
-fomit-frame-pointer -foptimize-register-move -fcprop-registers  
-frename-registers -freorder-blocks -fpeephole -mpowerpc-gfxopt  
-mpowerpc-gpopt' 'CPPFLAGS=-I/usr/local/include -I/sw/include/libpng12  
-I/sw/lib/pango-ft219/include -I/sw/include/pango-1.0  
-I/sw/lib/freetype219/include -I/sw/include' 'LDFLAGS=-L/usr/X11R6/lib  
-L/usr/local/lib -L/sw/lib/ncurses -L/sw/lib/freetype219/lib  
-L/sw/lib/pango-ft219/lib -L/sw/lib''


Important settings:
  value of $LC_ALL: de_DE.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: de_DE.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Shell

Minor modes in effect:
  desktop-save-mode: t
  display-time-mode: t
  mouse-sel-mode: t
  show-paren-mode: t
  tooltip-mode: t
  auto-compression-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

--
Greetings

  Pete

 Increase the size of your bike by at least *five* inches



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: find-file sometimes doesn't

2005-12-13 Thread Stefan Monnier
>> But the above solution still has the following problem: pop-to-buffer may
>> create a new frame, in which case the save-window-excursion won't be enough.
>> Basically, we need to tell vc-do-command not to call pop-to-buffer.
>> 
>> I'll install a patch for it, thanks.
> Thank you.

Does the patch below solve the problem?


Stefan


Index: lisp/vc.el
===
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.404
diff -u -r1.404 vc.el
--- lisp/vc.el  31 Oct 2005 01:22:56 -  1.404
+++ lisp/vc.el  13 Dec 2005 21:32:43 -
@@ -930,8 +930,9 @@
 current buffer if BUFFER is t.  If the destination buffer is not
 already current, set it up properly and erase it.  The command is
 considered successful if its exit status does not exceed OKSTATUS (if
-OKSTATUS is nil, that means to ignore errors, if it is 'async, that
-means not to wait for termination of the subprocess).  FILE is the
+OKSTATUS is nil, that means to ignore error status, if it is 'async, that
+means not to wait for termination of the subprocess; if it is t it means to
+ignore all execution errors).  FILE is the
 name of the working file (may also be nil, to execute commands that
 don't expect a file name).  If an optional list of FLAGS is present,
 that is inserted into the command line before the filename."
@@ -976,7 +977,9 @@
   `(unless (active-minibuffer-window)
   (message "Running %s in the background... done" ',command
  (setq status (apply 'process-file command nil t nil squeezed))
- (when (or (not (integerp status)) (and okstatus (< okstatus status)))
+ (when (and (not (eq t okstatus))
+ (or (not (integerp status))
+ (and okstatus (< okstatus status
(pop-to-buffer (current-buffer))
(goto-char (point-min))
(shrink-window-if-larger-than-buffer)
Index: lisp/vc-svn.el
===
RCS file: /sources/emacs/emacs/lisp/vc-svn.el,v
retrieving revision 1.22
diff -u -r1.22 vc-svn.el
--- lisp/vc-svn.el  14 Nov 2005 04:33:03 -  1.22
+++ lisp/vc-svn.el  13 Dec 2005 21:32:43 -
@@ -114,15 +114,19 @@
   (file-name-directory file)))
 (with-temp-buffer
   (cd (file-name-directory file))
-  (condition-case nil
- (vc-svn-command t 0 file "status" "-v")
-   ;; Some problem happened.  E.g. We can't find an `svn' executable.
-;; We used to only catch `file-error' but when the process is run on
-;; a remote host via Tramp, the error is only reported via the
-;; exit status which is turned into an `error' by vc-do-command.
-   (error nil))
-  (vc-svn-parse-status t)
-  (eq 'SVN (vc-file-getprop file 'vc-backend)
+  (let ((status 
+ (condition-case nil
+ ;; Ignore all errors.
+ (vc-svn-command t t file "status" "-v")
+   ;; Some problem happened.  E.g. We can't find an `svn'
+   ;; executable.  We used to only catch `file-error' but when
+   ;; the process is run on a remote host via Tramp, the error
+   ;; is only reported via the exit status which is turned into
+   ;; an `error' by vc-do-command.
+   (error nil
+(when (eq 0 status)
+  (vc-svn-parse-status t)
+  (eq 'SVN (vc-file-getprop file 'vc-backend)))
 
 (defun vc-svn-state (file &optional localp)
   "SVN-specific version of `vc-state'."


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: find-file sometimes doesn't

2005-12-13 Thread Bill Wohler
Stefan Monnier <[EMAIL PROTECTED]> wrote:

> >> But the above solution still has the following problem: pop-to-buffer may
> >> create a new frame, in which case the save-window-excursion won't be 
> >> enough.
> >> Basically, we need to tell vc-do-command not to call pop-to-buffer.
> >> 
> >> I'll install a patch for it, thanks.
> > Thank you.
> 
> Does the patch below solve the problem?

Yes, thanks.

-- 
Bill Wohler <[EMAIL PROTECTED]>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Coding problem with Euro sign

2005-12-13 Thread Ralf Angeli
* David Hansen (2005-12-13) writes:

> On Tue, 13 Dec 2005 13:12:02 +0100 Ralf Angeli wrote:
>
>> Attached you can find a file with two 8-bit characters I extracted
>> from a file produced by Visual Studio under Windows.  The characters
>> should be u umlaut and the Euro sign.  Emacs does not seem to be able
>> to find the right coding system for it and displays it with
>> raw-text-dos.  I could not get the file displayed correctly by loading
>> it with iso-latin-1, iso-latin-9, or cp1251.  And I am not sure if
>> this is a problem of Emacs or if Visual Studio simply produced
>> garbage.
>
> The \200 (0x80) is EUR in windows-1252.  But i have no clue what
> the 0xc2 is doing there.

The 0xc2 seems to have gotten into the file while sending it.  It is
not there in the original and can be deleted without affecting the
outcome of choosing a coding system.

> With
>
> -*- coding: windows-1252; -*-
>
> in the first line or when you open the file with
>
> C-x RET c windows-1252 RET C-x C-f test.txt RET 
>
> the EUR gets displayed but there's still this 0xc2 (latin capital
> letter A with circumflex in latin-1/9 or windows-1252).

Really?  In my case this results in

,
|   character: ь (01212154, 332908, 0x5146c, U+044C)
| charset: [mule-unicode-0100-24ff]
|  (Unicode characters of the range U+0100..U+24FF.)
|  code point: [40 108]
|  syntax: wwhich means: word
|category: y:Cyrillic  
| buffer code: 0x9C 0xF4 0xA8 0xEC
|   file code: 0xFC (encoded by coding system windows-1251-dos)
| display: by this font (glyph code)
|  -Misc-Fixed-Bold-R-Normal--18-120-100-100-C-90-ISO10646-1 (0x44C)
`

for the u umlaut and

,
|   character: Ђ (01212042, 332834, 0x51422, U+0402)
| charset: [mule-unicode-0100-24ff]
|  (Unicode characters of the range U+0100..U+24FF.)
|  code point: [40 34]
|  syntax: wwhich means: word
|category: y:Cyrillic  
| buffer code: 0x9C 0xF4 0xA8 0xA2
|   file code: 0x80 (encoded by coding system windows-1251-dos)
| display: by this font (glyph code)
|  -Misc-Fixed-Bold-R-Normal--18-120-100-100-C-90-ISO10646-1 (0x402)
`

for the Euro sign.

For the record, the following is what I get if I load the file without
specifying a coding system before (i.e. when it ends up being
displayed with raw-text-dos):

,
|   character: ü (0374, 252, 0xfc)
| charset: [eight-bit-graphic] (8-bit graphic char (0xA0..0xFF))
|  code point: [252]
|  syntax:  which means: whitespace
| buffer code: 0xFC
|   file code: 0xFC (encoded by coding system raw-text-dos)
| display: by display table entry [?ü] (see below)
| 
| The display table entry is displayed by these fonts (glyph codes):
| ü: -Bitstream-Terminal-Medium-R-Normal--18-140-100-100-C-110-ISO8859-1 (0xFC)
`

,
|   character: € (0200, 128, 0x80, U+0080)
| charset: [eight-bit-control] (8-bit control code (0x80..0x9F))
|  code point: [128]
|  syntax:  which means: whitespace
| buffer code: 0x80
|   file code: 0x80 (encoded by coding system raw-text-dos)
| display: by this font (glyph code)
|  -Bitstream-Terminal-Medium-R-Normal--18-140-100-100-C-110-ISO8859-1 
(0x80)
`

-- 
Ralf



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Coding problem with Euro sign

2005-12-13 Thread David Hansen
On Tue, 13 Dec 2005 23:42:02 +0100 Ralf Angeli wrote:

> * David Hansen (2005-12-13) writes:
>
>> With
>>
>> -*- coding: windows-1252; -*-
>>
>> in the first line or when you open the file with
>>
>> C-x RET c windows-1252 RET C-x C-f test.txt RET 
>>
>> the EUR gets displayed but there's still this 0xc2 (latin capital
>> letter A with circumflex in latin-1/9 or windows-1252).
>
> Really?  In my case this results in
>
> ,
> |   character: ь (01212154, 332908, 0x5146c, U+044C)
> | charset: [mule-unicode-0100-24ff]
> |  (Unicode characters of the range U+0100..U+24FF.)
> |  code point: [40 108]
> |  syntax: w  which means: word
> |category: y:Cyrillic  
> | buffer code: 0x9C 0xF4 0xA8 0xEC
> |   file code: 0xFC (encoded by coding system windows-1251-dos)
   ^
   ^
It for me it's

  file code: 0xFC (encoded by coding system windows-1252-unix)
   ^
   ^

Sure you didn't made a typo in the coding system?

David



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Coding problem with Euro sign

2005-12-13 Thread Ralf Angeli
* David Hansen (2005-12-14) writes:

> On Tue, 13 Dec 2005 23:42:02 +0100 Ralf Angeli wrote:
>
>> |   file code: 0xFC (encoded by coding system windows-1251-dos)
>^
>^
> It for me it's
>
>   file code: 0xFC (encoded by coding system windows-1252-unix)
>^
>^
>
> Sure you didn't made a typo in the coding system?

Argh, yes, that was the problem.  Not so much a typo, I simply used
the wrong coding system.  Thanks for setting me right (twice).

-- 
Ralf



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug