unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50; XML conf file
@ 2007-12-15 15:22 Peter Dyballa
       [not found] ` <E1J5xsk-0001vH-9f@fencepost.gnu.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Dyballa @ 2007-12-15 15:22 UTC (permalink / raw)
  To: emacs-pretest-bug

Hello!

When launching GNU Emacs with -Q and opening an XML file file.conf,  
then the buffer is in Conf[Space] mode, which is the wrong mode.

To determine conf-mode there should these modern days first be a  
check whether some XML typical constructs like ``<!´´ or ``</´´ or  
words like ``DOCTYPE´´ are used.

In GNU Emacs 23.0.50.1 (powerpc-apple-darwin8.11.0, X toolkit, Xaw3d  
scroll bars)
  of 2007-12-15 on Latsche.local
Windowing system distributor `The XFree86 Project, Inc', version  
11.0.40400000
configured using `configure  '--with-dbus' '--without-sound' '-- 
without-pop' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '-- 
with-png' '--with-x-toolkit=athena' '--enable-locallisppath=/Library/ 
Application Support/Emacs/calendar22:/Library/Application Support/ 
Emacs/caml:/Library/Application Support/Emacs:/sw/share/emacs21/site- 
lisp/elib' 'PKG_CONFIG_PATH=/sw/lib/freetype219/lib/pkgconfig:/sw/lib/ 
fontconfig2/lib/pkgconfig:/usr/X11R7/lib/pkgconfig:/sw/lib/pkgconfig:/ 
sw/lib/system-openssl/lib/pkgconfig:/sw/share/pkgconfig:/usr/lib/ 
pkgconfig:/usr/local/lib/pkgconfig:/usr/local/clamXav/lib/pkgconfig'  
'CFLAGS=-bind_at_load -pipe -fPIC -mcpu=7450 -mtune=7450 -fast -mpim- 
altivec -ftree-vectorize -foptimize-register-move -freorder-blocks - 
freorder-blocks-and-partition -fthread-jumps -fpeephole -fno- 
crossjumping' 'CPPFLAGS=-no-cpp-precomp -I/usr/include/openssl -I/sw/ 
include/pango-1.0 -I/sw/lib/freetype219/include -I/sw/lib/freetype219/ 
include/freetype2 -I/sw/lib/fontconfig2/include -I/sw/include -I/usr/ 
local/include -idirafter /usr/X11R6/include' 'LDFLAGS=-dead_strip - 
multiply_defined suppress -L/sw/lib/ncurses -L/sw/lib/freetype219/lib  
-L/sw/lib/fontconfig2/lib -L/sw/lib -L/usr/local/lib -L/usr/X11R6/lib''

Important settings:
   value of $LC_ALL: nil
   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: Conf[Space]

Minor modes in effect:
   tooltip-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
   view-mode: t

--
Greetings

   Pete

To drink without thirst and to make love all the time, madam, it is  
only these which distinguish us from the other beasts.
				– Beaumarchais

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 23.0.50; XML conf file
       [not found] ` <E1J5xsk-0001vH-9f@fencepost.gnu.org>
@ 2007-12-22 19:43   ` Peter Dyballa
  2007-12-23  1:02     ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Dyballa @ 2007-12-22 19:43 UTC (permalink / raw)
  To: rms; +Cc: emacs-pretest-bug


Am 22.12.2007 um 07:30 schrieb Richard Stallman:

> Did someone fix this?

I did not receive any eMail yet.

> Would you please remind people about this once a week until they  
> fix it?

OK, I can support you in doing this!

>
> Can you try to fix it?

No. My ability to programme in Lisp is almost not existing. I can  
look into files.el, which sets auto-mode-alist at some time, probably  
I would not find an improvement.

Can it be that conf-mode comes too early into play? Wouldn't it make  
more sense to first check the type of a file, and when it is  
something not binary and not XML (i.e. something fundamental) then  
the file's name and extension are checked? I found the bug with /etc/ 
fonts/fonts.conf, in case someone needs an object to work on.

Maybe adding

	("<\\?xml" . xml-mode)

to magic-mode-alist, also in files.el, can correct this. By default  
it's empty ... How are PS, PDF, ... XML determined? Ah, I see now:  
magic-fallback-mode-alist. And it comes one step too late!

--
Greetings

   Pete

                   Sorry my terrible English, my native language Lisp!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 23.0.50; XML conf file
  2007-12-22 19:43   ` Peter Dyballa
@ 2007-12-23  1:02     ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2007-12-23  1:02 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: emacs-pretest-bug, rms

> Can it be that conf-mode comes too early into play? Wouldn't it make more
> sense to first check the type of a file, and when it is  something not
> binary and not XML (i.e. something fundamental) then  the file's name and
> extension are checked? I found the bug with /etc/ fonts/fonts.conf, in case
> someone needs an object to work on.

conf-mode is very "generic" and broad in its application.  It's kind of
a default mode for a class of files, so it should be improved to check
for other classes of conf-files, such as XML.  No need to change
anything to magic-mode-alist (which would have much further-reaching
consequences).


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-23  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-15 15:22 23.0.50; XML conf file Peter Dyballa
     [not found] ` <E1J5xsk-0001vH-9f@fencepost.gnu.org>
2007-12-22 19:43   ` Peter Dyballa
2007-12-23  1:02     ` Stefan Monnier

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).