all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PSGML questions
@ 2004-05-21  9:43 Peter Westlake
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Westlake @ 2004-05-21  9:43 UTC (permalink / raw)


I am trying to use PSGML 1.3.1 with Emacs 21.3, and there is a
conflict between PSGML and sgml-mode.el, because they both define
sgml-mode. I can unload-feature the original sgml-mode and then load
psgml, but that only works interactively. For some reason it doesn't
work in .emacs, perhaps because the original sgml-mode has already
been loaded by then to handle some XML files opened by Emacs desktop.

Taking sgml-mode.el out of the Emacs directory works up to a point,
but gives an error, probably because the desktop tries to load it.
To make this work I would need to remove all mention of sgml-mode.el
from the Emacs lisp directory. This would be bad because I would have
to do it all again next time I upgrade.

Alternatively, I could rename everything in PSGML (to psgml-mode,
etc). auto-mode-alist associates .sgml and .xml with sgml-mode, but
putting new entries at the beginning will override that. The question
is whether any other packages call sgml-mode explicitly. Several of
the standard ones refer to it (flyspell, tildify, whitespace, and
others) but don't actually call it. Does anyone know of any packages
that do?

- since writing that I have tried renaming all the sgml- variables and
functions in PSGML to psgml-, and it nearly works. But sometimes I get
the error "Symbol's value as variable is void: psgml-local-catalogs".
If the XML file is the current buffer when I quit Emacs, the error
will not happen and the file will be parsed and fontified. If any
other buffer is current on quitting, the error happens and the file
buffer is not fontified. Either way, if I go to the Markup menu and
try to "Add Element To Element", it tells me that symbol
psgml-add-element-menu's value as a function is void. This might not
be entirely my fault: a colleague has Xemacs, which has PSGML as
standard, and it gave the same error about sgml-add-element-menu.
I have tried to debug with edebug, but so far all I have achieved is
to confirm that the symbols are void just as the message says.

Any suggestions for what might be going wrong? And has anyone seen any
of these errors in the original PSGML 1.3.1?

Peter.

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

* Re: PSGML questions
       [not found] <mailman.6687.1085149417.1061.help-gnu-emacs@gnu.org>
@ 2004-05-21 17:05 ` Kevin Rodgers
  2004-05-21 18:19   ` Peter Westlake
  2004-05-21 22:19 ` Kevin Rodgers
  1 sibling, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2004-05-21 17:05 UTC (permalink / raw)


Peter Westlake wrote:

> I am trying to use PSGML 1.3.1 with Emacs 21.3, and there is a
> conflict between PSGML and sgml-mode.el, because they both define
> sgml-mode. I can unload-feature the original sgml-mode and then load
> psgml, but that only works interactively. For some reason it doesn't
> work in .emacs, perhaps because the original sgml-mode has already
> been loaded by then to handle some XML files opened by Emacs desktop.
> 
> Taking sgml-mode.el out of the Emacs directory works up to a point,
> but gives an error, probably because the desktop tries to load it.
> To make this work I would need to remove all mention of sgml-mode.el
> from the Emacs lisp directory. This would be bad because I would have
> to do it all again next time I upgrade.
> 
> Alternatively, I could rename everything in PSGML (to psgml-mode,
> etc). auto-mode-alist associates .sgml and .xml with sgml-mode, but
> putting new entries at the beginning will override that. The question
> is whether any other packages call sgml-mode explicitly. Several of
> the standard ones refer to it (flyspell, tildify, whitespace, and
> others) but don't actually call it. Does anyone know of any packages
> that do?

This is a long-standing problem:


http://www.google.com/groups?selm=3BAB7A26.1A902239%40ihs.com

-- 
Kevin Rodgers

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

* Re: PSGML questions
  2004-05-21 17:05 ` PSGML questions Kevin Rodgers
@ 2004-05-21 18:19   ` Peter Westlake
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Westlake @ 2004-05-21 18:19 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Peter Westlake wrote:
>
>> I am trying to use PSGML 1.3.1 with Emacs 21.3, and there is a
>> conflict between PSGML and sgml-mode.el, because they both define
>> sgml-mode.
...
>> Alternatively, I could rename everything in PSGML (to psgml-mode,
>> etc).
...
>
> This is a long-standing problem:
>
>
> http://www.google.com/groups?selm=3BAB7A26.1A902239%40ihs.com

I tried your cunning method of transforming the symbols internally
after loading, and it almost worked; most of the time the parsing
would succeed, but the buffer was never fontified and the Markup
menu functions did not work properly. At least they were defined
- most of the time - but Insert Element offered to insert any old
element, and Add Element To Element offered to but never actually
altered the text.

Once or twice I got an error about sgml-add-element-menu being void,
just as I had in my edited version. This really does seem to be a
problem with the original code. I would quite like to carry on and
get the revised version working, as it seems like a useful thing to
do, but I'll need some help debugging it.

Once it works (if it ever does) I have another change to the mode,
which allows local caching of system ids, as described here:
<http://www.docbook.org/tdg/en/html/ch02.html#s-pid-sid-catalogs>

As well as a catalog having entries like

  PUBLIC publicid filename

it can have ones like:

  SYSTEM systemid filename

which uses a local copy of the DTD. This is useful because all
my documents have a system id but not a public id.


Peter.

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

* Re: PSGML questions
       [not found] <mailman.6687.1085149417.1061.help-gnu-emacs@gnu.org>
  2004-05-21 17:05 ` PSGML questions Kevin Rodgers
@ 2004-05-21 22:19 ` Kevin Rodgers
  2004-05-22  3:44   ` Ian Zimmerman
  1 sibling, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2004-05-21 22:19 UTC (permalink / raw)


Peter Westlake wrote:
 > I am trying to use PSGML 1.3.1 with Emacs 21.3, and there is a
 > conflict between PSGML and sgml-mode.el, because they both define
 > sgml-mode. I can unload-feature the original sgml-mode and then load
 > psgml, but that only works interactively. For some reason it doesn't
 > work in .emacs, perhaps because the original sgml-mode has already
 > been loaded by then to handle some XML files opened by Emacs desktop.
 >
 > Taking sgml-mode.el out of the Emacs directory works up to a point,
 > but gives an error, probably because the desktop tries to load it.
 > To make this work I would need to remove all mention of sgml-mode.el
 > from the Emacs lisp directory. This would be bad because I would have
 > to do it all again next time I upgrade.

Oops, I think missed a key point: you're only interested in using PSGML,
not sgml-mode.el -- and definitely not both concurrently -- right?

Also, are you editing SGML or XML?  If you're editing XML, nxml may be
better:

http://www.xmlhack.com/read.php?item=2061
http://groups.yahoo.com/group/emacs-nxml-mode/

-- 
Kevin Rodgers

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

* Re: PSGML questions
  2004-05-21 22:19 ` Kevin Rodgers
@ 2004-05-22  3:44   ` Ian Zimmerman
  2004-05-24 18:33     ` Kevin Rodgers
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Zimmerman @ 2004-05-22  3:44 UTC (permalink / raw)



Kevin> Oops, I think missed a key point: you're only interested in using
Kevin> PSGML, not sgml-mode.el -- and definitely not both concurrently

I don't know about Peter, but for me this is definitely true.

Kevin> Also, are you editing SGML or XML?  If you're editing XML, nxml
Kevin> may be better:

Why do you think so?  Unicode?  I type everything in ASCII + entities.
And I always use DTDs not schemas.  Any other possible advantage?

-- 
Nothing can be explained to a stone.
Or to a stoned person, either.

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

* Re: PSGML questions
  2004-05-22  3:44   ` Ian Zimmerman
@ 2004-05-24 18:33     ` Kevin Rodgers
  2004-05-24 23:03       ` Peter Westlake
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2004-05-24 18:33 UTC (permalink / raw)


Ian Zimmerman wrote:
 > Kevin> Also, are you editing SGML or XML?  If you're editing XML, nxml
 > Kevin> may be better:
 >
 > Why do you think so?  Unicode?  I type everything in ASCII + entities.
 > And I always use DTDs not schemas.  Any other possible advantage?

Well, I was under the impression that PSGML was no longer being actively
maintained.  Even after checking its project page
(http://sourceforge.net/projects/psgml/) and its home page
(http://www.lysator.liu.se/~lenst/about_psgml/), it's not clear what
it's status is.

-- 
Kevin Rodgers

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

* Re: PSGML questions
  2004-05-24 18:33     ` Kevin Rodgers
@ 2004-05-24 23:03       ` Peter Westlake
  2004-05-25  7:04         ` Kai Grossjohann
       [not found]         ` <mailman.7215.1085472742.1061.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Westlake @ 2004-05-24 23:03 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Ian Zimmerman wrote:
>  > Kevin> Also, are you editing SGML or XML?  If you're editing XML, nxml
>  > Kevin> may be better:
>  >
>  > Why do you think so?  Unicode?  I type everything in ASCII + entities.
>  > And I always use DTDs not schemas.  Any other possible advantage?
>
> Well, I was under the impression that PSGML was no longer being actively
> maintained.  Even after checking its project page
> (http://sourceforge.net/projects/psgml/) and its home page
> (http://www.lysator.liu.se/~lenst/about_psgml/), it's not clear what
> it's status is.

I get that impression too. I did look at nxml, but it only appears to
be for schemas, not DTDs. I have data files in XML, which may contain
non-ASCII characters, and which only have a DTD.

Peter.

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

* Re: PSGML questions
  2004-05-24 23:03       ` Peter Westlake
@ 2004-05-25  7:04         ` Kai Grossjohann
       [not found]         ` <mailman.7215.1085472742.1061.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Kai Grossjohann @ 2004-05-25  7:04 UTC (permalink / raw)


Peter Westlake <postmaster@random.uklinux.net> writes:

> I get that impression too. I did look at nxml, but it only appears to
> be for schemas, not DTDs. I have data files in XML, which may contain
> non-ASCII characters, and which only have a DTD.

I guess that there is surely a tool which automatically converts a
DTD into an equivalent RelaxNG schema.

Kai

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

* Re: PSGML questions
       [not found]         ` <mailman.7215.1085472742.1061.help-gnu-emacs@gnu.org>
@ 2004-05-25  9:00           ` Thomas Haselberger
  2004-06-11 10:47             ` Peter Westlake
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Haselberger @ 2004-05-25  9:00 UTC (permalink / raw)


Kai Grossjohann <kai@emptydomain.de> writes:

> Peter Westlake <postmaster@random.uklinux.net> writes:
>
>> I get that impression too. I did look at nxml, but it only appears to
>> be for schemas, not DTDs. I have data files in XML, which may contain
>> non-ASCII characters, and which only have a DTD.
>
> I guess that there is surely a tool which automatically converts a
> DTD into an equivalent RelaxNG schema.
>
> Kai

I used 

http://www.thaiopensource.com/relaxng/trang.html

for that task - it worked fine for me.

tom

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

* Re: PSGML questions
  2004-05-25  9:00           ` Thomas Haselberger
@ 2004-06-11 10:47             ` Peter Westlake
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Westlake @ 2004-06-11 10:47 UTC (permalink / raw)


Thomas Haselberger <t.haselberger@gmx.net> writes:

> Kai Grossjohann <kai@emptydomain.de> writes:
>
>> Peter Westlake <postmaster@random.uklinux.net> writes:
>>
>>> I get that impression too. I did look at nxml, but it only appears to
>>> be for schemas, not DTDs. I have data files in XML, which may contain
>>> non-ASCII characters, and which only have a DTD.
>>
>> I guess that there is surely a tool which automatically converts a
>> DTD into an equivalent RelaxNG schema.
>>
>> Kai
>
> I used 
>
> http://www.thaiopensource.com/relaxng/trang.html
>
> for that task - it worked fine for me.
>
> tom

Okay - I shall give up on PSGML, I think. It just broke my DTD,
too: it turned "(#PCDATA)" into "(#PCDATA>".

Peter.

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

end of thread, other threads:[~2004-06-11 10:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6687.1085149417.1061.help-gnu-emacs@gnu.org>
2004-05-21 17:05 ` PSGML questions Kevin Rodgers
2004-05-21 18:19   ` Peter Westlake
2004-05-21 22:19 ` Kevin Rodgers
2004-05-22  3:44   ` Ian Zimmerman
2004-05-24 18:33     ` Kevin Rodgers
2004-05-24 23:03       ` Peter Westlake
2004-05-25  7:04         ` Kai Grossjohann
     [not found]         ` <mailman.7215.1085472742.1061.help-gnu-emacs@gnu.org>
2004-05-25  9:00           ` Thomas Haselberger
2004-06-11 10:47             ` Peter Westlake
2004-05-21  9:43 Peter Westlake

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.