all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Werner LEMBERG <wl@gnu.org>
To: rms@gnu.org
Cc: rgm@gnu.org, emacs-devel@gnu.org
Subject: Re: file variables and man pages with preprocessors
Date: Fri, 09 Nov 2007 08:27:38 +0100 (CET)	[thread overview]
Message-ID: <20071109.082738.184452170.wl@gnu.org> (raw)
In-Reply-To: <E1IqBMA-0005HD-GJ@fencepost.gnu.org>

>     Well, preconv acts as a filter -- as do (almost) all components
>     in groff -- thus reading something from the `end of a file' (a)
>     needs a temporary buffer since the input data stream is `stdin'
>     in most cases and (b) isn't implemented in preconv due to (a).
> 
> I don't understand this.  What is preconv, and what does it have to
> do with visiting these files in Emacs?

`preconv' is a new preprocessor (currently in the CVS of groff only)
which converts man pages in any input encoding to something groff can
digest.  It supports the GNU Emacs convention for coding tags at the
beginning of a file but not at the end of a file for the reasons given
above.

Consider this example of troff.man (omitting some lines for brevity):

  '\" t
  .ig
    troff.man
    Copyright (C) ...
  ..
  .
  .TH TROFF 1 "2000-10-20" "Groff Version 1.2.3"
  .SH NAME
  troff \- the troff processor of the groff text formatting system

Here, the first line indicates that the `tbl' preprocessor is needed;
and the `man' program will call it due to this line.

Now assume that I want to have this man page in, say, German.  It how
has to start with

  '\" t
  .\" -*- coding: latin-1 -*-
  .ig
    troff.man
    Copyright (C) ...
  ..
  .
  .TH TROFF 1 "2000-10-20" "Groff Version 1.2.3"
  .SH NAME
  troff \- Der troff-Prozessor des groff-Textformatierungssystems

to use latin-1 (or another suitable encoding like utf-8).

Opening such a file currently in Emacs doesn't select the proper file
encoding.


    Werner

  reply	other threads:[~2007-11-09  7:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06  7:50 file variables and man pages with preprocessors Werner LEMBERG
2007-11-07  0:15 ` Richard Stallman
2007-11-07  4:01   ` Glenn Morris
2007-11-07 16:39     ` Richard Stallman
2007-11-08  0:54       ` Werner LEMBERG
2007-11-08 17:39         ` Richard Stallman
2007-11-09  7:27           ` Werner LEMBERG [this message]
2007-11-09 20:16             ` Glenn Morris
2007-11-10 17:54             ` Richard Stallman
2007-11-12  6:45               ` Werner LEMBERG
2007-11-12  8:50                 ` Glenn Morris
2007-11-12 11:20                   ` Werner LEMBERG
2007-11-12 20:13                     ` Glenn Morris
2007-11-13 11:32                       ` Werner LEMBERG

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071109.082738.184452170.wl@gnu.org \
    --to=wl@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    --cc=rms@gnu.org \
    /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.
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.