From: Perry Smith <pedz@easesoftware.com>
To: Ulrich Deiters <ulrich.deiters@uni-koeln.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: turning on SGML mode
Date: Thu, 12 Mar 2020 19:26:16 -0500 [thread overview]
Message-ID: <B01C80D8-CDD0-43C2-90B9-EEA805730F12@easesoftware.com> (raw)
In-Reply-To: <a09a1fd5-8190-6dd6-2205-4e59264b03de@uni-koeln.de>
I think the mode is buffer specific and if the file you are editing has a suffix that matches a well known suffix, that will trigger the major mode for that buffer.
Your command doesn’t specify a file to edit but I doubt if you are staying within the *scratch* buffer.
I think, one option is to replace the setq-default with just (sgml-mode) but, again, that will be just for the buffer that happens to be the current buffer when that gets executed. I think you could also add an -f argument to your command line such as -f '(sgml-mode)'
All this to ask / say: what is an example file name of what you are editing or … do you actually just say within the *scratch* buffer?
> On Mar 12, 2020, at 4:01 PM, Ulrich Deiters <ulrich.deiters@uni-koeln.de> wrote:
>
> Dear all,
>
> I abuse Emacs for my typesetting, i.e., I use Emacs with the psgml
> extension to edit XML documents (where Emacs gives me context-dependent
> menus and automatic syntax checks), translate the XML file to LaTeX,
> and convert the outcome to PDF.
>
> My XML file starts with
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE book SYSTEM "$ATXHOME/xml/book.dtd">
> <article>
> …
>
> and I invoke Emacs by
>
> emacs -l $ATXHOME/interface/cfg_emacs.el -geometry +0+0
>
> where cfg_emacs.el contains definitions of menu points etc.
>
> My problem: Whenever I start Emacs, I need to enter
>
> ESC x sgml-mode
>
> manually. I tried to add
>
> (setq-default major-mode 'sgml-mode)
>
> to the configuration file, but that does not turn on
> the SGML mode. What am I doing wrong?
>
> Kind regards,
>
> Ulrich
>
> --
> Prof. i.R. Dr. Ulrich K. Deiters ______________________________________
> Institut f. Physikalische Chemie \ Greinstr. 4–6, D-50939 Köln
> Universitaet zu Köln /\/\... \ Tel. +49 (0)2232 932964
> _______________________L|L|__|_____\ http://www.uni-koeln.de/deiters/
>
next prev parent reply other threads:[~2020-03-13 0:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 21:01 turning on SGML mode Ulrich Deiters
2020-03-12 22:12 ` Stefan Monnier
2020-03-13 0:12 ` Ulrich Deiters
2020-03-13 0:26 ` Perry Smith [this message]
2020-03-13 16:06 ` Ulrich Deiters
2020-03-13 8:38 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B01C80D8-CDD0-43C2-90B9-EEA805730F12@easesoftware.com \
--to=pedz@easesoftware.com \
--cc=help-gnu-emacs@gnu.org \
--cc=ulrich.deiters@uni-koeln.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).