unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* PSGML broken?
@ 2014-12-05 21:45 Ulrich Deiters
  2014-12-06  1:21 ` Alexis
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ulrich Deiters @ 2014-12-05 21:45 UTC (permalink / raw)
  To: help-gnu-emacs

How do I enter the sgml mode?

Starting emacs as

emacs -l /usr/share/emacs/site-lisp/psgml/psgml.el

gives the warning: "old-style backquotes detected!"
When I then enter

M-x sgml-mode

the mode is set (the top menu shows "SGML"), but there
is also the error message "Symbol's function definition
is void: make-local-hook"

Opening an XML file and trying to parse the associated
DTD generates a ton of SGML error messages.

Is this a bug or am I missing something?



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

* Re: PSGML broken?
  2014-12-05 21:45 PSGML broken? Ulrich Deiters
@ 2014-12-06  1:21 ` Alexis
  2014-12-06 17:32   ` Ulrich Deiters
  2014-12-06 22:06 ` Stefan Monnier
  2014-12-07  8:31 ` PSGML broken? Andreas Röhler
  2 siblings, 1 reply; 12+ messages in thread
From: Alexis @ 2014-12-06  1:21 UTC (permalink / raw)
  To: help-gnu-emacs


Ulrich Deiters writes:

> How do I enter the sgml mode?

What version of Emacs are you using?

> Starting emacs as
>
> emacs -l /usr/share/emacs/site-lisp/psgml/psgml.el

Why do you need to load this file manually? Isn't `sgml-mode` available
by default, i.e. even when starting Emacs simply via:

    emacs -Q

?

> the mode is set (the top menu shows "SGML"), but there
> is also the error message "Symbol's function definition
> is void: make-local-hook"

The `make-local-hook` function was removed in Emacs 24.1, which was
released in June 2012.

Do you have something in your Emacs config (e.g. your .emacs) that calls
`make-local-hook`?


Alexis.



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

* Re: PSGML broken?
  2014-12-06  1:21 ` Alexis
@ 2014-12-06 17:32   ` Ulrich Deiters
  0 siblings, 0 replies; 12+ messages in thread
From: Ulrich Deiters @ 2014-12-06 17:32 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Alexis,

> What version of Emacs are you using?

my Emacs version is 24.1.3. I got it as a part of the openSUSE 13.2
operating system.

> Do you have something in your Emacs config (e.g. your .emacs) that calls
> `make-local-hook`?

Indeed, there was an old configuration file. I deleted it, but I
still get the error message "Symbol's position is void: make-local-hook".

The weird thing that I once managed to enter SGML mode without that
error message. I got an "SGML" in the menu bar, and the associated
menu was rather short. Now I cannot reproduce this behaviour any more:
I get the error message, and the SGML menu is rather long and intricate.

So waht is going wrong here?

Regards,

Ulrich


-- 
Prof. Dr. Ulrich K. Deiters      ______________________________________
Institut f. Physikalische Chemie \ Luxemburger Str. 116, D-50939 Koeln
Universitaet zu Koeln  /\/\...    \ Tel. +49 (0)221 470-4543, Fax -4900
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

* Re: PSGML broken?
  2014-12-05 21:45 PSGML broken? Ulrich Deiters
  2014-12-06  1:21 ` Alexis
@ 2014-12-06 22:06 ` Stefan Monnier
  2014-12-07  1:15   ` Ulrich Deiters
  2014-12-07 10:17   ` PSGML broken? (Yes, but fixed.) Florian v. Savigny
  2014-12-07  8:31 ` PSGML broken? Andreas Röhler
  2 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2014-12-06 22:06 UTC (permalink / raw)
  To: help-gnu-emacs

> How do I enter the sgml mode?
> Starting emacs as
> emacs -l /usr/share/emacs/site-lisp/psgml/psgml.el
> gives the warning: "old-style backquotes detected!"

I suggest you take a look at http://www.emacswiki.org/emacs/PsgmlMode


        Stefan




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

* Re: PSGML broken?
  2014-12-06 22:06 ` Stefan Monnier
@ 2014-12-07  1:15   ` Ulrich Deiters
  2014-12-07 10:17   ` PSGML broken? (Yes, but fixed.) Florian v. Savigny
  1 sibling, 0 replies; 12+ messages in thread
From: Ulrich Deiters @ 2014-12-07  1:15 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Stefan,

> I suggest you take a look at http://www.emacswiki.org/emacs/PsgmlMode

Thanks, this is a very nice page. I was not aware of this website.

Unfortunately, it does not solve my problem. After some playing around
I found this:

- When I invoke Emacs as

emacs doc.xml

and then enter M-x sgml-mode, I get an error message about make-local-
hook not being available. There is an SGML item in the menu bar, which
looks similar to that of XEmacs, but none of the items works.

- When I invoke Emacs as

emacs -Q doc.xml

and switch to SGML mode, there is no error message. The SGML menu is
much shorter, but the items work; I can even validate my document
against a DTD. But I do not have the functionalities of the other
mode.

I suspect that I am getting either PSGML or a generic SGML mode. But
why should the -Q option make a difference? And how can I make PSGML
work?

Best regards,

Ulrich




-- 
Prof. Dr. Ulrich K. Deiters      ______________________________________
Institut f. Physikalische Chemie \ Luxemburger Str. 116, D-50939 Koeln
Universitaet zu Koeln  /\/\...    \ Tel. +49 (0)221 470-4543, Fax -4900
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

* Re: PSGML broken?
  2014-12-05 21:45 PSGML broken? Ulrich Deiters
  2014-12-06  1:21 ` Alexis
  2014-12-06 22:06 ` Stefan Monnier
@ 2014-12-07  8:31 ` Andreas Röhler
  2014-12-07 10:21   ` Florian v. Savigny
  2 siblings, 1 reply; 12+ messages in thread
From: Andreas Röhler @ 2014-12-07  8:31 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs@gnu.org List

On 05.12.2014 22:45, Ulrich Deiters wrote:
> How do I enter the sgml mode?
>
> Starting emacs as
>
> emacs -l /usr/share/emacs/site-lisp/psgml/psgml.el
>
> gives the warning: "old-style backquotes detected!"

[ ... ]

Information WRT to this error is delivered with NEWS.19: Common Lisp syntax for the backquote and comma macros.

BTW there is no replacement for psgml suite yet, which is by far the most comprehensive tool.
Newer modes might be preferable in supporting of specific xml-styles.

A version with macro-stuff fixed seems to exist here:

https://github.com/lenst/psgml.git







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

* Re: PSGML broken? (Yes, but fixed.)
  2014-12-06 22:06 ` Stefan Monnier
  2014-12-07  1:15   ` Ulrich Deiters
@ 2014-12-07 10:17   ` Florian v. Savigny
  2014-12-07 11:30     ` Ulrich Deiters
  2014-12-07 15:56     ` Stefan Monnier
  1 sibling, 2 replies; 12+ messages in thread
From: Florian v. Savigny @ 2014-12-07 10:17 UTC (permalink / raw)
  To: help-gnu-emacs



  > I suggest you take a look at http://www.emacswiki.org/emacs/PsgmlMode

That's a very informative and helpful page indeed. The information on
the package fixed for Emacsen >= 24, however, was outdated (my fault)
- there has been a version "1.4.1" now for some time.

I have just fixed that. The "1.4.1" version lives on the Marmalade
repo now, and if you use the package system, you can also install it
directly via that.

It's a bit of a pity (if understandable) that the official maintainers
seem to have lost any interest in the package, because it's an
impressive piece of software, and, to my knowledge, the only way to
work with legacy SGML documents. (The fixes I made were really trivial.)

I work with psgml on a daily basis.

-- 

Florian von Savigny
Melanchthonstr. 41
33615 Bielefeld



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

* Re: PSGML broken?
  2014-12-07  8:31 ` PSGML broken? Andreas Röhler
@ 2014-12-07 10:21   ` Florian v. Savigny
  0 siblings, 0 replies; 12+ messages in thread
From: Florian v. Savigny @ 2014-12-07 10:21 UTC (permalink / raw)
  To: help-gnu-emacs



  > A version with macro-stuff fixed seems to exist here:
  > 
  > https://github.com/lenst/psgml.git

Oh, I did not know that when I did it myself some years ago. (What a
waste of effort.) Ulrich, you might want to test both and report if
they both work.


-- 

Florian von Savigny
Melanchthonstr. 41
33615 Bielefeld



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

* Re: PSGML broken? (Yes, but fixed.)
  2014-12-07 10:17   ` PSGML broken? (Yes, but fixed.) Florian v. Savigny
@ 2014-12-07 11:30     ` Ulrich Deiters
  2014-12-07 15:37       ` Florian v. Savigny
  2014-12-07 15:56     ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Ulrich Deiters @ 2014-12-07 11:30 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Florian,

thank you for your advice. But I am an Emacs newbie - just trying to
migrate from XEmacs, as that is not working anymore with the latest
openSUSE distribution. You have to be a little bit more specific.

- I found the marmalade repository and added it to the Emacs
repositories. What must I do next? "M-x list-packages" does not
show anything that looks related to SGML.

- I looked up the github page: Nice, but what am I supposed to
do there? The link to the lysator website is dead.

Regards,

Ulrich


P.S.: I have been using XEmacs in SGML mode for composing texts - from
letters to a textbook. I wrote my own DTDs for that, and a program that
converts XML/SGML to LaTeX. I am rather dismayed to find that XEmacs
crashes, that Emacs cannot enter PSGML mode (at least for me), that
jEdit's XML parser is faulty, and that the other XML editors I looked
up do not accept external DTDs.

-- 
Prof. Dr. Ulrich K. Deiters      ______________________________________
Institut f. Physikalische Chemie \ Luxemburger Str. 116, D-50939 Koeln
Universitaet zu Koeln  /\/\...    \ Tel. +49 (0)221 470-4543, Fax -4900
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

* Re: PSGML broken? (Yes, but fixed.)
  2014-12-07 11:30     ` Ulrich Deiters
@ 2014-12-07 15:37       ` Florian v. Savigny
  2014-12-07 20:23         ` Ulrich Deiters
  0 siblings, 1 reply; 12+ messages in thread
From: Florian v. Savigny @ 2014-12-07 15:37 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs


Hi Ulrich,

  > - I found the marmalade repository and added it to the Emacs
  > repositories. What must I do next? "M-x list-packages" does not
  > show anything that looks related to SGML.


You're halfway there, I think. The marmalade repo homepage
(marmalade-repo.org) explains (a bit further down on the page):

(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
;; you've already done that, I think

M-x package-refresh-contents
;; That's the step you are missing, I think

I have tried that out, and it works fine. Although I got the following
error message for the marmalade repo:

	Contacting host: marmalade-repo.org:80
	gnutls.c: [0] (Emacs) fatal error: Die TLS-Verbindung wurde nicht sauber beendet.

that has not had any negative effects. (It might have to do with a
current HTTPS bug in Emacs 24.4. - the version I am using -, which has
not yet been fixed. They are explaining that on their homepage as
well.)

M-x list-packages then does list the psgml package I put there, and
offers to install it.

Whatever route you choose, I think it would be wise to uninstall the
version of psgml that you are using first, if only to prevent possible
confusion. If your psgml version is an official OpenSuSE package, you
might want to advise them that it only works with Emacsen < 24. (You
should, in that case, be able to uninstall it via YaST - I think psgml
is usually installed as an extra package.)

I have just run an install via M-x list-packages and the Install
button of the psgml "page" it offers. It seems to work smoothly
(including compilation - you can ignore the warnings), but please let
me know if something does not work.

If you are not yet familiar enough with the package system, have a
look at

C-h i
m Emacs
m Packages

The only thing I can promise you is that PSGML in that version does
work.


  > - I looked up the github page: Nice, but what am I supposed to
  > do there? The link to the lysator website is dead.

If the github version works, installing it would probably a bit more
manual work, and it is also possible to simply download the package
from marmalade, untar it and install it. (Which would be more or less
the same.)

As to the lysator website, see my remark on Lennart Staflin below.

  > I am rather dismayed to find that XEmacs crashes,

I do not want to enter into any which-editor-is-better debates
(because I have never used anything but GNU Emacs), but I suspect that
in switching to GNU Emacs, you have switched to the most viable
flavour. It has been around for ~ 30 years now and is maturing and
maturing and maturing. Without any haste.

  > that Emacs cannot enter PSGML mode (at least for me)

I think with SGML, one has to accept that nobody uses it anymore for
new projects, so nobody maintains anything anymore. (I have no idea
how many SGML legacy documents which have not already been converted
to XML still exist - except HTML, of course -, but I think those
legacy documents will be the most important area.) The comp.text.sgml
newsgroup has long been dead, and so has the psgml mailing list
(nothing but a spam message about twice a year).

When I applied the little syntax fixes to psgml, I had a hard time,
and in fact, mostly failed in, tracking down the authors to ask their
permission to put it on ELPA. (That is why it is only available on
Marmalade.) Most prominently, Lennart Staflin himself. He never
replied to mails, and I have no idea what has become of him.

But that does not mean that SGML does not work. There is still a
rock-solid parser (nsgmls) and, well, PSGML. (I use my own
transformation tools, so I do not know much about this part of the
toolchain.) My personal reason for indeed sticking to SGML, is,
amazingly, PSGML. It's an extremely clever editor, and DTD-aware, and
I have been able to extend it according to my needs in various
ways. That said, I think James Clark's nXML mode is simpler and faster
(and probably holds huge promise), but he somehow paused developing
it some years ago due to his being too busy, and there is no (at least
not yet any) documentation on how to extend it.

I expect nXML development to resume in the future (but when?), and
that even I will ultimately move everything to XML, but SGML does
work. Using it is probably a bit like listening to vinyl records.

Best regards,

Florian

-- 

Florian von Savigny
Melanchthonstr. 41
33615 Bielefeld



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

* Re: PSGML broken? (Yes, but fixed.)
  2014-12-07 10:17   ` PSGML broken? (Yes, but fixed.) Florian v. Savigny
  2014-12-07 11:30     ` Ulrich Deiters
@ 2014-12-07 15:56     ` Stefan Monnier
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2014-12-07 15:56 UTC (permalink / raw)
  To: help-gnu-emacs

> It's a bit of a pity (if understandable) that the official maintainers
> seem to have lost any interest in the package, because it's an

These things happen all the time.  The real problem is that nobody
took over the maintenance.

BTW, if someone would like to try and help me get its copyright status
cleared, I'd be happy to include psgml into GNU ELPA.


        Stefan




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

* Re: PSGML broken? (Yes, but fixed.)
  2014-12-07 15:37       ` Florian v. Savigny
@ 2014-12-07 20:23         ` Ulrich Deiters
  0 siblings, 0 replies; 12+ messages in thread
From: Ulrich Deiters @ 2014-12-07 20:23 UTC (permalink / raw)
  To: Florian v. Savigny; +Cc: help-gnu-emacs

Am 07.12.2014 um 16:37 schrieb Florian v. Savigny:
> (add-to-list 'package-archives '("marmalade" ."http://marmalade-repo.org/packages/"))
> M-x package-refresh-contents

Well, I had to do it more than once, but finally Emacs understood
what I wanted. :-)

It is working!

Thank you for your help.

Ulrich

-- 
Prof. Dr. Ulrich K. Deiters      ______________________________________
Institut f. Physikalische Chemie \ Luxemburger Str. 116, D-50939 Koeln
Universitaet zu Koeln  /\/\...    \ Tel. +49 (0)221 470-4543, Fax -4900
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

end of thread, other threads:[~2014-12-07 20:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05 21:45 PSGML broken? Ulrich Deiters
2014-12-06  1:21 ` Alexis
2014-12-06 17:32   ` Ulrich Deiters
2014-12-06 22:06 ` Stefan Monnier
2014-12-07  1:15   ` Ulrich Deiters
2014-12-07 10:17   ` PSGML broken? (Yes, but fixed.) Florian v. Savigny
2014-12-07 11:30     ` Ulrich Deiters
2014-12-07 15:37       ` Florian v. Savigny
2014-12-07 20:23         ` Ulrich Deiters
2014-12-07 15:56     ` Stefan Monnier
2014-12-07  8:31 ` PSGML broken? Andreas Röhler
2014-12-07 10:21   ` Florian v. Savigny

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