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; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-05 21:45 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 ` Andreas Röhler
  2 siblings, 1 reply; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-06  1:21 ` Alexis
@ 2014-12-06 17:32   ` Ulrich Deiters
  0 siblings, 0 replies; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-05 21:45 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  8:31 ` Andreas Röhler
  2 siblings, 1 reply; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-06 22:06 ` Stefan Monnier
@ 2014-12-07  1:15   ` Ulrich Deiters
  0 siblings, 0 replies; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-05 21:45 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; 26+ 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] 26+ messages in thread

* Re: PSGML broken?
  2014-12-07  8:31 ` Andreas Röhler
@ 2014-12-07 10:21   ` Florian v. Savigny
  0 siblings, 0 replies; 26+ 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] 26+ messages in thread

* PSGML broken?
@ 2023-01-09 18:26 Ulrich Deiters
  2023-01-09 20:17 ` Thibaut Verron
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-09 18:26 UTC (permalink / raw)
  To: help-gnu-emacs

Greetings!

I have recently upgraded to Emacs 27.2 (under openSUSE Leap 15.4) and
find that the "markup menus" (which let me select XML/SGML tags as well
as tag options depending on the context.

PSGML is installed on my computer, but I do not see it in the list
of installable packages any longer.

Shift-F10 merely invokes the drop-down menus from the menu bar (e.g.,
the "File" menu).

The Emacs Wiki on PSGML (https://www.emacswiki.org/emacs/PsgmlMode)
mentions the Marmalade repository as well as the main PSGML page;
both links are dead.

Does someone know how to restore the previous behavior?



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

* Re: PSGML broken?
  2023-01-09 18:26 PSGML broken? Ulrich Deiters
@ 2023-01-09 20:17 ` Thibaut Verron
  2023-01-09 22:19   ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Thibaut Verron @ 2023-01-09 20:17 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Hello!

Le lun. 9 janv. 2023 à 20:52, Ulrich Deiters <ulrich.deiters@gmx.de> a
écrit :

> Greetings!
>
> I have recently upgraded to Emacs 27.2 (under openSUSE Leap 15.4)


I can't believe that Emacs 27.2 was released less than two years ago. :)


> and
> find that the "markup menus" (which let me select XML/SGML tags as well
> as tag options depending on the context.
>
> PSGML is installed on my computer, but I do not see it in the list
> of installable packages any longer.


> Shift-F10 merely invokes the drop-down menus from the menu bar (e.g.,
> the "File" menu).
>
> The Emacs Wiki on PSGML (https://www.emacswiki.org/emacs/PsgmlMode)
> mentions the Marmalade repository as well as the main PSGML page;
> both links are dead.
>

If that was the case, you would probably have to find a new package to do
the same job.

Fortunately, it looks like the package is now also hosted on GNU Elpa:
http://elpa.gnu.org/packages/psgml.html and that link won't die. The
package also received an update in the past two weeks, so it is still
maintained.

It should be installable out of the box, so it is strange that you don't
see it in the list of installable packages.

What steps do you use to produce that list?

Can you try it with a fresh emacs (started with emacs -q)?

Best wishes,
Thibaut


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

* Re: PSGML broken?
  2023-01-09 20:17 ` Thibaut Verron
@ 2023-01-09 22:19   ` Ulrich Deiters
  2023-01-10  1:13     ` Emanuel Berg
                       ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-09 22:19 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Thibaut,

Emacs 27.2 is what comes with my Linux distribution. I know that 27.2
is not the latest version, but it is dangerous to force an upgrade
with software that has so many dependencies.

I ran "emacs -q", entered "M-x package-install", and then "?" at
the prompt. This gave a list of packages, among which I cannot see
psgml, xml or nxml.

I saw the elpa website and the new psgml package. Unfortunately,
I did not find any hints how to make emacs aware of the package.
Usually software packages contain an install script or at least a
text file that describes the installation/activation. This is not
the case here.

Regards,

Ulrich

-- 
Prof. i.R. Dr. Ulrich K. Deiters ______________________________________
Institut f. Physikalische Chemie \ Greinstr. 4–6, D-50939 Köln
Universität zu Köln    /\/\...    \ Tel. +49 (0)2232 932964
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

* Re: PSGML broken?
  2023-01-09 22:19   ` Ulrich Deiters
@ 2023-01-10  1:13     ` Emanuel Berg
  2023-01-10  7:57     ` Michael Albinus
       [not found]     ` <ea5f839c-ca91-e08b-fd74-0e0dfd247246@gmail.com>
  2 siblings, 0 replies; 26+ messages in thread
From: Emanuel Berg @ 2023-01-10  1:13 UTC (permalink / raw)
  To: help-gnu-emacs

Ulrich Deiters wrote:

> Emacs 27.2 is what comes with my Linux distribution. I know
> that 27.2 is not the latest version, but it is dangerous to
> force an upgrade with software that has so
> many dependencies.

Highly recommended is to install it from source, after some
initial mucking around with commands (not a bad thing, as it
increases understanding) it'll be as easy or easier than with
the distro's package manager - also more flexible with
a higher degree of fine-tune possible.

Maybe your problem is already solved, there?

Here are a bunch of commands and functions:

  https://dataswamp.org/~incal/conf/.zsh/install-emacs

You may think that not a lot has happened - but that's
incorrect, it has - and that you will get there eventually
anyway - but that is like relying on time to heal all wounds.
While true, it doesn't happen quickly enough; and time is, as
well all know, finite.

Just try - and you will fly (quote barrel racer)

And you can still have the repos' version intact.

Actually, it is not "dangerous" at all, it is completely
safe :)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: PSGML broken?
  2023-01-09 22:19   ` Ulrich Deiters
  2023-01-10  1:13     ` Emanuel Berg
@ 2023-01-10  7:57     ` Michael Albinus
       [not found]     ` <ea5f839c-ca91-e08b-fd74-0e0dfd247246@gmail.com>
  2 siblings, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2023-01-10  7:57 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Ulrich Deiters <ulrich.deiters@uni-koeln.de> writes:

> Dear Thibaut,

Hi Ulrich,

> I ran "emacs -q", entered "M-x package-install", and then "?" at
> the prompt. This gave a list of packages, among which I cannot see
> psgml, xml or nxml.

package-install installs only packages which are not installed yet. The
upcoming Emacs 29 will give you also package-update for installing a
newer version, but this won't help you now.

So you must show existing packages via "M-x list-packages", select psgml,
and upgrade.

> Regards,
>
> Ulrich

Best regards, Michael.



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

* Re: PSGML broken?
       [not found]     ` <ea5f839c-ca91-e08b-fd74-0e0dfd247246@gmail.com>
@ 2023-01-10 22:42       ` Ulrich Deiters
  2023-01-13 10:19         ` Arash Esbati
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-10 22:42 UTC (permalink / raw)
  To: help-gnu-emacs

I just compiled Emacs 28.2 (from the tar.gz file from gnu.org).
Unfortunately, the problem persists: Neither "M-x package-install"
nor "M-x package-list" display psgml as an option. What must I do
to make emacs aware of the psgml package? Copy the psgml directory
into emacs/site-lisp?

Regards,

Ulrich

-- 
Prof. i.R. Dr. Ulrich K. Deiters ______________________________________
Institut f. Physikalische Chemie \ Greinstr. 4–6, D-50939 Köln
Universität zu Köln    /\/\...    \ Tel. +49 (0)2232 932964
_______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/



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

* Re: PSGML broken?
  2023-01-10 22:42       ` Ulrich Deiters
@ 2023-01-13 10:19         ` Arash Esbati
  2023-01-13 12:37           ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Arash Esbati @ 2023-01-13 10:19 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Ulrich Deiters <ulrich.deiters@uni-koeln.de> writes:

> I just compiled Emacs 28.2 (from the tar.gz file from gnu.org).
> Unfortunately, the problem persists: Neither "M-x package-install"
> nor "M-x package-list" display psgml as an option. What must I do
> to make emacs aware of the psgml package? Copy the psgml directory
> into emacs/site-lisp?

You can fetch the tarball[1] manually and then use
`package-install-file':

,----[ C-h f package-install-file RET ]
| package-install-file is an autoloaded interactive native-compiled Lisp
| function in ‘package.el’.
| 
| (package-install-file FILE)
| 
| Install a package from FILE.
| The file can either be a tar file, an Emacs Lisp file, or a
| directory.
| 
|   Probably introduced at or before Emacs version 25.1.
| 
`----

You should still find out why 'M-x list-packages' doesn't show psgml.

Best, Arash

Footnotes:
[1]  https://elpa.gnu.org/packages/psgml-1.3.5.tar



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

* Re: PSGML broken?
  2023-01-13 10:19         ` Arash Esbati
@ 2023-01-13 12:37           ` Ulrich Deiters
  2023-01-13 12:49             ` Arash Esbati
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-13 12:37 UTC (permalink / raw)
  To: Arash Esbati; +Cc: help-gnu-emacs

> You can fetch the tarball[1] manually and then use
> `package-install-file':

"package-install-file" helped somewhat: psgml is now listed as
installed.

But I still cannot obtain the psgml functionality. My DTDs are ignored,
Mouse-3 does irritating things instead of bringing up context menus, and
of my drop-down menus only the 1st level can be displayed. Enforcing
sgml-mode does not help.

Regards,

Ulrich



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

* Re: PSGML broken?
  2023-01-13 12:37           ` Ulrich Deiters
@ 2023-01-13 12:49             ` Arash Esbati
  2023-01-13 15:12               ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Arash Esbati @ 2023-01-13 12:49 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Ulrich Deiters <ulrich.deiters@uni-koeln.de> writes:

> "package-install-file" helped somewhat: psgml is now listed as
> installed.
>
> But I still cannot obtain the psgml functionality. My DTDs are ignored,
> Mouse-3 does irritating things instead of bringing up context menus, and
> of my drop-down menus only the 1st level can be displayed. Enforcing
> sgml-mode does not help.

Sorry, can't help, I don't use this package.

Reg. Mouse-3: Do you have (context-menu-mode 1) in your init file?  I'm
not sure it is enabled by default.

Best, Arash



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

* Re: PSGML broken?
  2023-01-13 12:49             ` Arash Esbati
@ 2023-01-13 15:12               ` Ulrich Deiters
  2023-01-14 11:43                 ` Arash Esbati
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-13 15:12 UTC (permalink / raw)
  To: Arash Esbati; +Cc: help-gnu-emacs

Am 13.01.23 um 13:49 schrieb Arash Esbati:
> Reg. Mouse-3: Do you have (context-menu-mode 1) in your init file?  I'm
> not sure it is enabled by default.

This stops the unwanted behaviour of mouse-3. But it does not restore
the SGML/XML parsing that I am used to. I seems that Emacs/PSGML does
not read my DTDs any longer.

I may have to fall back to XEmacs, for this still works (with the recent
PSGML extension!). This makes me suspect that the source of the trouble
is Emacs, not PSGML.

Regards,

Ulrich




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

* Re: PSGML broken?
  2023-01-13 15:12               ` Ulrich Deiters
@ 2023-01-14 11:43                 ` Arash Esbati
  2023-01-14 19:12                   ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Arash Esbati @ 2023-01-14 11:43 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Ulrich Deiters <ulrich.deiters@uni-koeln.de> writes:

> Am 13.01.23 um 13:49 schrieb Arash Esbati:
>> Reg. Mouse-3: Do you have (context-menu-mode 1) in your init file?  I'm
>> not sure it is enabled by default.
>
> This stops the unwanted behaviour of mouse-3.  But it does not restore
> the SGML/XML parsing that I am used to.

I didn't expect that as well.

> I seems that Emacs/PSGML does not read my DTDs any longer.
>
> I may have to fall back to XEmacs, for this still works (with the recent
> PSGML extension!). This makes me suspect that the source of the trouble
> is Emacs, not PSGML.

I'm not familiar with PSGML, but maybe you have to go through the
customize options it provides and see where it looks for private DTD's.
Maybe the XEmacs package does some additions/customizations which are
now missing.  I'm just speculating.

Best, Arash



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

* Re: PSGML broken?
  2023-01-14 11:43                 ` Arash Esbati
@ 2023-01-14 19:12                   ` Ulrich Deiters
  2023-01-14 19:28                     ` Eli Zaretskii
  2023-01-15 10:57                     ` Arash Esbati
  0 siblings, 2 replies; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-14 19:12 UTC (permalink / raw)
  To: Arash Esbati; +Cc: help-gnu-emacs

Am 14.01.23 um 12:43 schrieb Arash Esbati:
> but maybe you have to go through the
> customize options it provides and see where it looks for private DTD's.

Well, my XML documents contain a line that tells PSGML where to
find the DTD, and this always worked until I recently updated Emacs.
Unfortunately, the links to the PSGML documentation are broken …

One website states that "psgml" is a major mode of Emacs. But
"M-x psgml-mode" does not work. "M-x sgml-mode" succeeds, but
ignores the DTD …

As Emacs once worked (version 25.3.1), there must have a change
occurred between that version and 27.2 . Is there a way to
find out what happened?

Regards,

Ulrich






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

* Re: PSGML broken?
  2023-01-14 19:12                   ` Ulrich Deiters
@ 2023-01-14 19:28                     ` Eli Zaretskii
  2023-01-14 22:12                       ` Ulrich Deiters
  2023-01-15 10:57                     ` Arash Esbati
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2023-01-14 19:28 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 14 Jan 2023 20:12:48 +0100
> Cc: help-gnu-emacs@gnu.org
> From: Ulrich Deiters <ulrich.deiters@uni-koeln.de>
> 
> Am 14.01.23 um 12:43 schrieb Arash Esbati:
> > but maybe you have to go through the
> > customize options it provides and see where it looks for private DTD's.
> 
> Well, my XML documents contain a line that tells PSGML where to
> find the DTD, and this always worked until I recently updated Emacs.
> Unfortunately, the links to the PSGML documentation are broken …
> 
> One website states that "psgml" is a major mode of Emacs. But
> "M-x psgml-mode" does not work. "M-x sgml-mode" succeeds, but
> ignores the DTD …
> 
> As Emacs once worked (version 25.3.1), there must have a change
> occurred between that version and 27.2 . Is there a way to
> find out what happened?

Can you tell enough details for us to try to help you more efficiently?
Like (1) what was the PSGML version you had installed before, (2) what
exactly doesn't work -- show some file, tell how you try to use PSGML,
and what happens that shouldn't?  Also, are you sure "M-x sgml-mode"
invokes PSGML and not the sgml-mode that comes with Emacs?



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

* Re: PSGML broken?
  2023-01-14 19:28                     ` Eli Zaretskii
@ 2023-01-14 22:12                       ` Ulrich Deiters
  2023-01-15  6:45                         ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-14 22:12 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

> Can you tell enough details for us to try to help you more efficiently?
> Like (1) what was the PSGML version you had installed before, (2) what
> exactly doesn't work -- show some file, tell how you try to use PSGML,
> and what happens that shouldn't?  Also, are you sure "M-x sgml-mode"
> invokes PSGML and not the sgml-mode that comes with Emacs?

… with pleasure!

The old psgml version, which is still shipped with openSUSE Leap
versions <= 15.4, is 1.3.2. The most recent version is 1.3.5.

The Emacs version shipped with openSUSE Leap 15.3 was 25.3.1.
The version shipped with Leap 15.4 is 27.2, and the latest version
that I got from GNU is 28.2.

emacs-25.3.1 with psgml-1.3.2 works.
emacs-27.2 with psgml-1.3.2 fails.
emacs-28.2 with psgml-1.3.5 fails.

When I run emacs-25.3.1 on one of my XML files, it indicates that it is
in the SGML mode ("SGML" written on the bottom line, SGML menu in the 
menu bar). Whether this an emacs-built-in SGML or PSGML disguised as
SGML I cannot say.

I attach an XML template for letters, which invokes some DTDs.
The DTDs should be stored in a directory named $ATXHOME/xml. The
editor should be invoked as "emacs -l cfg_emacs_aux.el doc.xml".

I suspect that the new Emacs balks at something in my cfg_emax_aux.el .

Regards,

Ulrich


[-- Attachment #2: doc.xml --]
[-- Type: text/xml, Size: 252 bytes --]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE letter SYSTEM "$ATXHOME/xml/letter.dtd">
<letter>
<from><leader symbol="space">&today;</from>

<to> </to>

<re></re>

<salutation></salutation>

<body>
<par></par>
</body>

<closing></closing>
</letter>

[-- Attachment #3: letter.dtd --]
[-- Type: application/xml-dtd, Size: 2114 bytes --]

[-- Attachment #4: common1.dtd --]
[-- Type: application/xml-dtd, Size: 1249 bytes --]

[-- Attachment #5: common2.dtd --]
[-- Type: application/xml-dtd, Size: 4940 bytes --]

[-- Attachment #6: entities.dtd --]
[-- Type: application/xml-dtd, Size: 1177 bytes --]

[-- Attachment #7: cfg_emacs_aux.el --]
[-- Type: text/x-emacs-lisp, Size: 1109 bytes --]

; customization of editor behaviour (SGML/XML-specific items)
; (modify as needed!)

(setq inhibit-startup-screen t)

; (setq-default major-mode 'sgml-mode)	; deadly under openSUSE Leap 15.0


(defun sgml-preferences()		; (sgml-preferences)
  (setq sgml-set-face t)
  (setq sgml-auto-insert-required-elements t)
  (setq sgml-indent-step 0)
  (setq sgml-auto-activate-dtd t)
  (turn-on-auto-fill)
  (setq fill-column 80)
  (setq sgml-markup-faces '(
    (start-tag . font-lock-keyword-face)
    (end-tag . font-lock-keyword-face)
    (comment . font-lock-comment-face)
    (pi . font-lock-constant-face) ;; <?xml?>
    (sgml . font-lock-type-face)
    (doctype . bold)
    (entity . italic)
    (shortref . font-lock-reference-face)
  ))
)
(add-hook 'sgml-mode-hook 'sgml-preferences t)

; provide XEmacs-like context menus
(defun go-bind-markup-menu-to-mouse3 ()
; (define-key sgml-mode-map [(down-mouse-3)] 'sgml-tags-menu)
  (define-key global-map [(down-mouse-3)] 'sgml-tags-menu)
)
(add-hook 'sgml-mode-hook 'go-bind-markup-menu-to-mouse3 t)

(find-file "doc.xml")			; load ArchiTeX text file
(sgml-mode)

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

* Re: PSGML broken?
  2023-01-14 22:12                       ` Ulrich Deiters
@ 2023-01-15  6:45                         ` Eli Zaretskii
  2023-01-15 10:24                           ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2023-01-15  6:45 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 14 Jan 2023 23:12:13 +0100
> From: Ulrich Deiters <ulrich.deiters@uni-koeln.de>
> 
> > Can you tell enough details for us to try to help you more efficiently?
> > Like (1) what was the PSGML version you had installed before, (2) what
> > exactly doesn't work -- show some file, tell how you try to use PSGML,
> > and what happens that shouldn't?  Also, are you sure "M-x sgml-mode"
> > invokes PSGML and not the sgml-mode that comes with Emacs?
> 
> … with pleasure!
> 
> The old psgml version, which is still shipped with openSUSE Leap
> versions <= 15.4, is 1.3.2. The most recent version is 1.3.5.
> 
> The Emacs version shipped with openSUSE Leap 15.3 was 25.3.1.
> The version shipped with Leap 15.4 is 27.2, and the latest version
> that I got from GNU is 28.2.
> 
> emacs-25.3.1 with psgml-1.3.2 works.
> emacs-27.2 with psgml-1.3.2 fails.
> emacs-28.2 with psgml-1.3.5 fails.
> 
> When I run emacs-25.3.1 on one of my XML files, it indicates that it is
> in the SGML mode ("SGML" written on the bottom line, SGML menu in the 
> menu bar). Whether this an emacs-built-in SGML or PSGML disguised as
> SGML I cannot say.

I can: it's the sgml-mode that comes with Emacs.  PSGML shows "PSGML"
on the mode line.

So I think what you should do is:

  . start Emacs
  . type "M-x load-library RET psgml RET

Then try visiting your XML files and see if things work better now.
If they do, I suggest to add this to your init file:

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

(These two lines are from the PSGML manual, which comes with the
package; did you read it?)  This should cause Emacs to use PSGML for
sgml-mode and xml-mode, and you should see what you were used to see
in Emacs 25.



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

* Re: PSGML broken?
  2023-01-15  6:45                         ` Eli Zaretskii
@ 2023-01-15 10:24                           ` Ulrich Deiters
  2023-01-15 10:51                             ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-15 10:24 UTC (permalink / raw)
  To: help-gnu-emacs

> So I think what you should do is:
> 
>   . start Emacs
>   . type "M-x load-library RET psgml RET
> 
> Then try visiting your XML files and see if things work better now.

This succeeds with the system-wide installed Emacs-27.2, not
with Emacs-28.2, which is still in the installation directory
(it reports psgml as installed, but cannot find the library).

Using the Emacs-27.2:
I visited one of my XML files, and, for the first time, I got
the correct SGML menu in the menu bar. So there is some progress.
However, when I try to use this menu to load a DTD or to
insert a tag attribute, all I get is the error message
"Symbol's value as variable is void:
default-enable-multibyte-characters"
What should I do to get rid of this error message?

> (These two lines are from the PSGML manual, which comes with the
> package; did you read it?)

I saw these lines elsewhere. But where is the PSGML manual?
It is not included in the distribution, and the link on the
GNU page (to lysator.se) is broken.

Regards,

Ulrich



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

* Re: PSGML broken?
  2023-01-15 10:24                           ` Ulrich Deiters
@ 2023-01-15 10:51                             ` Eli Zaretskii
  2023-01-15 16:37                               ` Ulrich Deiters
  0 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2023-01-15 10:51 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 15 Jan 2023 11:24:30 +0100
> From: Ulrich Deiters <ulrich.deiters@uni-koeln.de>
> 
> > So I think what you should do is:
> > 
> >   . start Emacs
> >   . type "M-x load-library RET psgml RET
> > 
> > Then try visiting your XML files and see if things work better now.
> 
> This succeeds with the system-wide installed Emacs-27.2, not
> with Emacs-28.2, which is still in the installation directory
> (it reports psgml as installed, but cannot find the library).

So your installation of PSGML seems to be broken.  How did you install
it, and how was that installation different from what you had with
Emacs 25?

> Using the Emacs-27.2:
> I visited one of my XML files, and, for the first time, I got
> the correct SGML menu in the menu bar. So there is some progress.

Of course!  You are finally using PSGML, not another mode which just
happens to have the same name...

> However, when I try to use this menu to load a DTD or to
> insert a tag attribute, all I get is the error message
> "Symbol's value as variable is void:
> default-enable-multibyte-characters"
> What should I do to get rid of this error message?

I don't know.  This message doesn't come from PSGML, assuming you have
the latest version 1.3.5 of PSGML.  Or are you using an older version?

> > (These two lines are from the PSGML manual, which comes with the
> > package; did you read it?)
> 
> I saw these lines elsewhere. But where is the PSGML manual?
> It is not included in the distribution, and the link on the
> GNU page (to lysator.se) is broken.

In the tarball for PSGML 1.3.5 I see the file psgml.texi that is the
manual.  The installation with package.el is supposed to produce the
Info manual from it, but you can also read the Texinfo sources
directly.

Are you using the latest version of PSGML?  If not, please do.  Also,
I recommend installing from ELPA with package.el.



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

* Re: PSGML broken?
  2023-01-14 19:12                   ` Ulrich Deiters
  2023-01-14 19:28                     ` Eli Zaretskii
@ 2023-01-15 10:57                     ` Arash Esbati
  1 sibling, 0 replies; 26+ messages in thread
From: Arash Esbati @ 2023-01-15 10:57 UTC (permalink / raw)
  To: Ulrich Deiters; +Cc: help-gnu-emacs

Ulrich Deiters <ulrich.deiters@uni-koeln.de> writes:

> Unfortunately, the links to the PSGML documentation are broken …

The tarball you've installed contains psgml.texi.  You can run

  pdftex psgml.texi && texindex psgml.cp && pdftex psgml.texi

to get psgml.pdf or makeinfo on it for psgml.info which you can read
inside Emacs.

Best, Arash



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

* Re: PSGML broken?
  2023-01-15 10:51                             ` Eli Zaretskii
@ 2023-01-15 16:37                               ` Ulrich Deiters
  0 siblings, 0 replies; 26+ messages in thread
From: Ulrich Deiters @ 2023-01-15 16:37 UTC (permalink / raw)
  To: help-gnu-emacs

> The tarball you've installed contains psgml.texi.  You can run
> 
>   pdftex psgml.texi …
Yes, now that you mention it, I found the file. I had been looking
for the usual README or for PDF files.

> So your installation of PSGML seems to be broken.  How did you install
> it, and how was that installation different from what you had with
> Emacs 25?

This was probably the case. I brought my Emacs-27.2 up,
entered "M-x package-list", and deleted psgml. Then
I installed it again, and for reasons unknown Emacs
got a fresh psgml code from the Internet and put it into
my .emacs.d directory.

When I then entered "emacs" at a terminal, then did a
"M-x load-library RET psgml", and then used the File → Open File
menu to open an XML file, PSGML behaved correctly.

But:
The autoload instructions from the PSGML manual have no effect.
Instead, I put a "(load "psgml")" instruction into my init_psgml.el
file and force its loading with emacs -l init_psgml.el . This
appears to work. Problem solved!

My impression is that the psgml library has already to be active when
an XML/SGML file is opened. Otherwise Emacs gives preference to its
generic XML and SGML modes, and never loads psgml (autoload is
supposed to load libraries when they are called for). Perhaps it
would be better to have a psgml-mode? The PSGML manual says that
"psgml" is a major mode for Emacs, but one cannot enter
"M-x psgml-mode". Having two SGML modes with the same name is
perhaps confusing.

Anyway, Emacs is working as it should. Thank you all for your
help!

Regards,

Ulrich




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

end of thread, other threads:[~2023-01-15 16:37 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 18:26 PSGML broken? Ulrich Deiters
2023-01-09 20:17 ` Thibaut Verron
2023-01-09 22:19   ` Ulrich Deiters
2023-01-10  1:13     ` Emanuel Berg
2023-01-10  7:57     ` Michael Albinus
     [not found]     ` <ea5f839c-ca91-e08b-fd74-0e0dfd247246@gmail.com>
2023-01-10 22:42       ` Ulrich Deiters
2023-01-13 10:19         ` Arash Esbati
2023-01-13 12:37           ` Ulrich Deiters
2023-01-13 12:49             ` Arash Esbati
2023-01-13 15:12               ` Ulrich Deiters
2023-01-14 11:43                 ` Arash Esbati
2023-01-14 19:12                   ` Ulrich Deiters
2023-01-14 19:28                     ` Eli Zaretskii
2023-01-14 22:12                       ` Ulrich Deiters
2023-01-15  6:45                         ` Eli Zaretskii
2023-01-15 10:24                           ` Ulrich Deiters
2023-01-15 10:51                             ` Eli Zaretskii
2023-01-15 16:37                               ` Ulrich Deiters
2023-01-15 10:57                     ` Arash Esbati
  -- strict thread matches above, loose matches on Subject: below --
2014-12-05 21:45 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  8:31 ` 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).