D. D. Brierton | 7 Apr 02:44 2005

PSGML conflicts with sgml-mode (CVS Emacs)

>From the PROBLEMS file in CVS Emacs:

        *** PSGML conflicts with sgml-mode.

        PSGML package uses the same names of some variables (like
        keymap) as built-in sgml-mode.el because it was created as a
        replacement of that package.  The conflict will be shown if you
        load sgml-mode.el before psgml.el.  E.g. this could happen if
        you edit HTML page and then start to work with SGML or XML file.
        html-mode (from sgml-mode.el) is used for HTML file and loading
        of psgml.el (for sgml-mode or xml-mode) will cause an error.

At the moment I am working around this problem by manually removing
sgml-mode.el and sgml-mode.elc
from /usr/share/emacs/21.3.50/lisp/textmodes/, but clearly that is not
an elegant solution. Can someone explain an elegant way to work around
the above problem?

This is on Fedora Core 3:

$ rpm -q emacs psgml
emacs-21.3.50-0.20041210
psgml-1.2.5-4

The psgml RPM is from Fedora Core and the CVS Emacs RPMs are from this
yum repository:

[emacs-cvs-testing]
name=Emacs CVS Packages (testing)
baseurl=http://people.redhat.com/petersen/emacs/current/i386/RPMS.testing
(Continue reading)

Lennart Staflin | 7 Apr 12:41 2005
Picon
Picon
Picon

Re: PSGML conflicts with sgml-mode (CVS Emacs)


On 7 apr 2005, at 02:44, D. D. Brierton wrote:

>> From the PROBLEMS file in CVS Emacs:
>
>         *** PSGML conflicts with sgml-mode.
>
>         PSGML package uses the same names of some variables (like
>         keymap) as built-in sgml-mode.el because it was created as a
>         replacement of that package.  The conflict will be shown if you
>         load sgml-mode.el before psgml.el.  E.g. this could happen if
>         you edit HTML page and then start to work with SGML or XML 
> file.
>         html-mode (from sgml-mode.el) is used for HTML file and loading
>         of psgml.el (for sgml-mode or xml-mode) will cause an error.
>
> At the moment I am working around this problem by manually removing
> sgml-mode.el and sgml-mode.elc
> from /usr/share/emacs/21.3.50/lisp/textmodes/, but clearly that is not
> an elegant solution. Can someone explain an elegant way to work around
> the above problem?

If you are using psgml for sgml and xml (with autoloads), it would seem 
that html-mode is the major problem. One solution (workaround really) 
is to replace html-mode with sgml-mode in auto-mode-alist. Another 
solution is to make a simple html-mode that uses sgml-mode.

I use something like:

(defun html-mode ()
(Continue reading)

D. D. Brierton | 7 Apr 15:01 2005

Re: PSGML conflicts with sgml-mode (CVS Emacs)

On Thu, 2005-04-07 at 12:41 +0200, Lennart Staflin wrote:

> If you are using psgml for sgml and xml (with autoloads), it would seem 
> that html-mode is the major problem. One solution (workaround really) 
> is to replace html-mode with sgml-mode in auto-mode-alist. Another 
> solution is to make a simple html-mode that uses sgml-mode.
> 
> I use something like:
> 
> (defun html-mode ()
>    (interactive)
>    (sgml-mode)
>    (make-local-variable 'sgml-default-doctype-name)
>    (setq	sgml-default-doctype-name    "HTML"
> 	sgml-always-quote-attributes t
> 	sgml-indent-step             2
> 	sgml-indent-data	     t
> 	sgml-minimize-attributes     nil
> 	sgml-omittag                 t
> 	sgml-shortag                 t  ))

I already use something very similar to what you have here. I'm no lisp
guru, so I can't see what it is that is different in my setup which
means that I still get the conflict with sgml-mode for html. I think
these ae the relevant parts of my (quite complicated) psgml setup:

(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t )
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)

(setq auto-mode-alist
(Continue reading)

Dave Pawson | 7 Apr 17:49 2005
Picon

Re: PSGML conflicts with sgml-mode (CVS Emacs)

On Thu, 2005-04-07 at 12:41 +0200, Lennart Staflin wrote:

> > the above problem?
> 
> If you are using psgml for sgml and xml (with autoloads), it would seem 
> that html-mode is the major problem.

 I'd second that view.

I've never yet had html-mode do anything other than cause trouble.
sgml-mode is more than a good substitute, assuming you know enough
html to get by.

regards DaveP

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Gmane