views:

46

answers:

2

I just upgraded from Emacs 21.2 to 23.2 (on Windows XP) and while I managed to tweak my .emacs to fit the new changes, I couldn't find a solution for the unreadable buffer names:

Neither in the minibuffer, nor in the buffer menu can the characters be displayed normally. Instead, all I see are the infamous Unicode blank rectangles.

Any idea how to fix that?

Thanks.

Update: Again, all buffers are displayed perfectly (same font) - even with syntax highlighting. Buffers that contain buffer names also display everything properly, except for buffer names. Weird.

Could this possibly be related to the new feature introduced in Emacs 23.2 called "uniquify-buffer-name-style"?

+1  A: 

The most likely explanation for rectangles is that your font doesn't have the required characters. The fix is to choose a different font (or install a more complete version of the same font).

Or is the problem that Emacs assumes the wrong encoding for file names? If so, please give more information, such as what encoding the file names are in, what it looks like Emacs is interpreting them as, and examples of working and non-working file names.

Gilles
Gilles, thanks so much for your quick answer. The buffers themselves display file contents just fine, isn't the minibuffer font the same as the rest of the buffers? Also, in the same Buffer Menu list, the the column "CRM Buffer" displays rectangles, while the column "File" displays the filenames properly. I suspect the problem lies with something unique to buffer names. Dired mode, for example, displays everything properly. I think that by default Windows XP filename encoding is Unicode?
Android Eve
+1  A: 

OK - with the help of Tim X from gnu.emacs.help, I found the offending lines in my .emacs that broke the new version (both statements need to be commented out!):

     (setq default-frame-alist
            (cons '(font . "-*-Lucida Console-normal-r-*-*-12-*-*-*-c-*-*-
iso8859-1")
                  default-frame-alist))
     (set-default-font
      "-*-Lucida Console-normal-r-*-*-12-*-*-*-c-*-*-iso8859-1")

Per Tim's advice, I used the Options menu to set the font and then save it to my .emacs. That resulted in appending the following 2-line single statement:

(custom-set-faces
'(default ((t (:inherit nil :stipple nil :background
"Black" :foreground "LightGray" :inverse-video nil :box nil :strike-
through nil :overline nil :underline nil :slant normal :weight
normal :height 90 :width normal :foundry "outline" :family "Lucida
Console")))))

By doing so, I am not sure my .emacs will continue working in Linux (as it did before - my .emacs was 100% cross-platform before).

Android Eve