unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: terminal escapes in Info files?
@ 2003-10-28  1:26 Karl Berry
  2003-10-28 10:51 ` Alper Ersoy
  2003-10-29 19:02 ` Richard Stallman
  0 siblings, 2 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-28  1:26 UTC (permalink / raw)
  Cc: emacs-devel, rms, dirt

    > if we want to add font markup to info fmt, let's not use something as
    > ugly as terminal escape squences.  please design something clean!

Since Info is inherently limited to what can be displayed on a terminal,
it seems like ANSI escape sequences are as reasonable specification of
the capabilities as anything else?  Easy to implement, too.  Admittedly
the ESC [ blah blah sequences are ugly, though.

    How about using what Enriched-Text mode uses in Emacs?  See
    etc/enriched.doc in the Emacs distro.

That is indeed a lot cleaner (also quite a bit more verbose :).  Thanks
for mentioning it, I wasn't aware of it.

It seems using this would imply a new non-backward-compatible output
format, though, since every literal < needs to be escaped in enriched
format, and existing info readers don't know how to do that.

Using the ugly terminal escape sequences, on the other hand, is
backward-compatible because I'm sure that no real document has literal
terminal escape sequences (Texinfo hasn't had @ctrl for years ...).

Hmm.  As always, it seems there is no easy answer.

Thanks,
k

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 20:09 Karl Berry
  2003-10-29 12:52 ` Oliver Scholz
  2003-10-29 19:02 ` Richard Stallman
  0 siblings, 2 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-28 20:09 UTC (permalink / raw)
  Cc: eliz, emacs-devel, dirt

rms: I am actually coming to believe that using the raw terminal escape
sequences is as clean as anything else in this particular limited
context.  We specifically want to support what terminals can support.
Aren't the ANSI escape sequences as reasonable a way of specifying that
as anything?

I don't see any particular advantage to writing ^H^[bold^H^] (or <bold>
or whatever) instead of ^[[3m, and the implementation in both info and
M-x info gets much more complex if we introduce a layer of indirection,
which all it really amounts to.

This discussion is telling me that we may want a better output format in
general than Info, but any significant/large extensions are hard to mark
and turn Info into something other than what it was designed to be:
output on a terminal.  So, as far as improving Info itself goes in the
short term, this seems as good as anything.

What do you think?

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 20:06 Karl Berry
  2003-10-28 21:23 ` Stefan Monnier
  2003-10-28 23:41 ` Miles Bader
  0 siblings, 2 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-28 20:06 UTC (permalink / raw)
  Cc: eliz, emacs-devel, rms, dirt

    But by switching to something like enriched-mode, 

After a bit thought, I think we can't "switch" to enriched mode,
exactly, because of the compatibility problem.  We could write enriched
text as a new output format, and maybe in five years or so make it the
default.

    I guess the question is: how much work would it require to take
    the subset of HTML generated by makeinfo and render it (both
    in M-x info and in the info program) ?

As for the info program goes, it would be tantamount to writing a new
program.  I guess some of the screen display stuff could be reused.  But
in any case, I definitely wouldn't bother doing this.  Instead, I'd just
tell people to use lynx or emacs-w3 or whatever.  I've never really seen
the point of standalone info in the first place, as I've mentioned before.
But some people like it, so fine.

Also, makeinfo's html output is very very far from ideal.  (texi2html
does a better job, sadly.)  So it wouldn't be a good design to implement
only the html being output now.  I suspect it would end up needing to be
close to a full-fledged html interpreter, for the same reasons that you
surmise enriched text would eventually not be enough.

    why enhance the Info format rather than change the readers (to use
    the HTML output of makeinfo rather than the Info output) ?

1) Because that is a huge change with many ramifications.
2) Because anyone who wants to can already do that.  If you or anyone
   want to write or improve HTML readers for makeinfo's html output, great. 
   That can be done independently of changing existing Info files.
3) [the main point] Because Info is terminal-based.  Therefore, it makes
   sense to add capabilities to Info format which can be expressed on
   terminals -- namely, standard terminal escape sequences.  This is
   where we came in.

Inventing an entirely new output format, or using html as you suggest,
may well be a worthwhile goal, but it is very long term and will take a
lot of effort.

By contrast, getting the principal two existing Info readers to
understand ANSI escape sequences is very little work by comparison, has
no compatibility issues, and could immediately improve the info-browsing
experience.

One more msg coming up ...

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 20:06 Karl Berry
  0 siblings, 0 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-28 20:06 UTC (permalink / raw)
  Cc: eliz, emacs-devel, dirt

    >From what I can tell they include indices just fine, 

Eli is talking about the i command (which a lot of people like).  You
can't type i into a general html browser and expect to get completion on
index entries.

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 17:46 Karl Berry
  2003-10-28 18:08 ` Stefan Monnier
  0 siblings, 1 reply; 188+ messages in thread
From: Karl Berry @ 2003-10-28 17:46 UTC (permalink / raw)
  Cc: eliz, emacs-devel, rms, dirt

    Sorry, I thought the question was how to improve the `info' program
    and the `M-x info' command.

Yes, sure.  What are you saying?

If you're proposing that, say, info become an alias for lynx and
M-x info become an alias for w3-whatever, well, fine, but that doesn't
really address the issue.

    Why do people want to improve the Info format, exactly?

Because, believe it or not, some people still use it, there's a lot of
history there, and just eradicating Info and replacing it with HTML
would not go over well.

    Eliz>features such as index search that are not
    available in HTML

Well, since we're hypothetically talking about M-x info, I could imagine
it reading the HTML from a Texinfo document and knowing about the index, etc.

    yet doesn't support colors, bold/italics, and
    other text attributes that existing text-mode terminals can display.

<font color="red">
<b>
...
(Whether Emacs is capable of using any of that stuff on a text terminal,
I don't know.)

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 16:51 Karl Berry
  2003-10-28 16:59 ` Stefan Monnier
  0 siblings, 1 reply; 188+ messages in thread
From: Karl Berry @ 2003-10-28 16:51 UTC (permalink / raw)
  Cc: eliz, emacs-devel, rms, dirt

    Why not HTML ?  There's already an HTML backend in makeinfo, so no
    change is needed there.  

HTML is possible, but people who want that can already use it, right?
The question is how or whether to improve Info format.

^ permalink raw reply	[flat|nested] 188+ messages in thread
* Re: terminal escapes in Info files?
@ 2003-10-28 16:50 Karl Berry
  0 siblings, 0 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-28 16:50 UTC (permalink / raw)
  Cc: eliz, emacs-devel, rms, dirt

    Of course, a direction I'd even prefer is some way to make it possible to
    use the TeXinfo file(s) directly

The problem with this approach is that then Emacs has to know about
every change to the Texinfo source language.  That does not seem like a
good idea.  New commands could not be added to Texinfo without impacting
Info readers, in that case.  rms intentionally designed Texinfo so that
this would not happen.

In the present situation, info readers generally don't have to know or
care what the source commands are and when they change.  I've added
probably 20+ commands without impacting any reader and without any
compatibility issues.  (Occasionally there are commands that do have
compatibility issues, such as @anchor and the new @image support, but
these have been the exception.)

If I'm missing something here, please let me know ...

^ permalink raw reply	[flat|nested] 188+ messages in thread
* terminal escapes in Info files?
@ 2003-10-26 12:20 Karl Berry
  2003-10-26 12:40 ` Simon Josefsson
  2003-10-27  7:02 ` Richard Stallman
  0 siblings, 2 replies; 188+ messages in thread
From: Karl Berry @ 2003-10-26 12:20 UTC (permalink / raw)
  Cc: dirt

Dear Emacs developers,

Alper Ersoy (GTK developer, cc'd here) suggested to me that we enhance
Info format by allowing terminal escapes.  For example, @strong{this is
bold} in the Texinfo source could then end up getting displayed in
standout mode.

I can imagine two ways to implement this:
1) write ANSI terminal escape codes directly in the Info file.  (Even on
non-ANSI terminals, if there are any left, these could be translated to
appropriate termcap sequence.)

2) use the mechanism we created for @image to write a generic command in
the Info file, something like
      ^H^[display bold^H^]this is bold^H^[end display^H^]

In either case, the escapes would only be enabled with an option to
makeinfo for now, to provide for a phase-in period.

So here are my questions:
- what do you-all think of the idea in general?

- is one of (1) or (2) significantly easier to implement in Emacs?
  (2) is already implemented in standalone Info, via the --raw-escapes
  option, but this is not a determining factor in my mind.
  
  I know that Emacs's terminal-mode will interpret terminal escapes, but
  I don't know how easily that (or any other such support) can be
  integrated into info read.

- would anyone like to volunteer to implement this for Emacs :)?
  Neither Alper nor I can do it.  We can handle the makeinfo/standalone
  info changes, of course.

Thanks,
karl


P.S. Here are some references, FWIW:

- A list of escapes:
  http://www.isthe.com/chongo/tech/comp/ansi_escapes.html

- Documentation on using escapes in bash prompts:
  http://www.linux.org/docs/ldp/howto/Bash-Prompt-HOWTO/c341.html

- ANSI support in various terminals:
  http://search.cpan.org/~rra/ANSIColor-1.07/ANSIColor.pm#NOTES

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

end of thread, other threads:[~2004-09-02 19:02 UTC | newest]

Thread overview: 188+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28  1:26 terminal escapes in Info files? Karl Berry
2003-10-28 10:51 ` Alper Ersoy
2003-10-28 13:48   ` Oliver Scholz
2003-10-30 10:42     ` Alper Ersoy
2003-11-10 13:01       ` HTML as info format (was: terminal escapes in Info files?) Oliver Scholz
2003-11-17 13:29         ` HTML as info format Juri Linkov
2003-11-18  7:01           ` Richard Stallman
2003-11-18 14:54             ` Changes to Texinfo DTD [Was: Re: HTML as info format] Robert J. Chassell
2003-11-18 15:59               ` Changes to Texinfo DTD Oliver Scholz
2003-11-18 21:03                 ` Robert J. Chassell
2003-11-18 21:18                   ` Nic Ferrier
2003-11-19 12:38                     ` Robert J. Chassell
2003-11-19 13:18                       ` Nic Ferrier
2003-11-20 10:37                   ` Oliver Scholz
2003-11-20 16:55                     ` Robert J. Chassell
2003-11-20 18:19                       ` Oliver Scholz
2003-11-20 20:32                         ` Nic Ferrier
2003-11-20 22:05                           ` Oliver Scholz
2003-11-20 22:51                             ` Nic Ferrier
2003-11-21  2:13                             ` Robert J. Chassell
2003-11-21  8:49                               ` Nic Ferrier
2003-11-21  2:10                           ` Robert J. Chassell
2003-11-21  7:57                             ` Nic Ferrier
2003-11-24  7:57                               ` Juri Linkov
2003-11-24  9:32                                 ` Nic Ferrier
2003-11-22 21:19                           ` Richard Stallman
2003-11-22 21:41                             ` Nic Ferrier
2003-11-22 21:42                               ` Miles Bader
2003-11-22 21:56                                 ` Nic Ferrier
2003-11-24  7:55                                   ` Juri Linkov
2003-11-24  9:25                                     ` Why XSLT in Emacs Lisp? (was Re: Changes to Texinfo DTD) Nic Ferrier
2003-11-24 13:04                                       ` Why XSLT in Emacs Lisp? Alex Schroeder
2003-11-23 17:14                                 ` Changes to Texinfo DTD Robert J. Chassell
2003-11-24  7:54                                 ` Juri Linkov
2003-11-24 16:19                                   ` Luc Teirlinck
2003-11-24 22:32                                     ` Robert J. Chassell
2003-11-24 22:31                                       ` Miles Bader
2003-11-25  5:22                                     ` Juri Linkov
2003-11-25 16:48                                       ` Luc Teirlinck
2003-11-25 21:59                                         ` Juri Linkov
2003-11-25 23:32                                           ` Luc Teirlinck
2003-11-25 19:54                                       ` Luc Teirlinck
2003-11-25 21:48                                         ` Juri Linkov
2003-11-26  1:08                                           ` Luc Teirlinck
2003-12-02  6:42                                     ` Eli Zaretskii
2003-12-03  1:47                                       ` Luc Teirlinck
2003-12-03 16:18                                         ` Eli Zaretskii
2003-12-04  2:53                                           ` Luc Teirlinck
2003-12-04  7:58                                             ` Eli Zaretskii
2003-12-04  2:54                                           ` Luc Teirlinck
2003-12-04  8:04                                             ` Eli Zaretskii
2003-12-04  9:39                                               ` Oliver Scholz
2003-12-04 11:48                                                 ` Oliver Scholz
2003-12-04 15:35                                                 ` Eli Zaretskii
2003-12-04  8:19                                             ` Oliver Scholz
2003-12-04 13:49                                             ` Robert J. Chassell
2003-12-05  0:11                                             ` Richard Stallman
2003-12-05  9:49                                               ` Kim F. Storm
2003-12-06 16:11                                                 ` Alfred M. Szmidt
2003-12-06 17:11                                                   ` Eli Zaretskii
2003-12-09 16:47                                                     ` Alfred M. Szmidt
2003-12-10  7:25                                                       ` Eli Zaretskii
2003-12-04  3:35                                           ` Luc Teirlinck
2003-12-04  8:12                                             ` Eli Zaretskii
2003-11-22 23:59                               ` Stefan Monnier
2003-11-23  0:05                                 ` Nic Ferrier
2003-11-23 14:16                                   ` Oliver Scholz
2003-11-23 15:11                                     ` Nic Ferrier
2003-11-24 16:22                               ` Richard Stallman
2003-11-20 18:24                       ` Karl Eichwalder
2003-11-24 16:23                     ` Richard Stallman
2003-12-02  7:08           ` HTML as info format Eli Zaretskii
2003-12-01 10:38             ` Info enhancements Juri Linkov
2003-12-02  3:34               ` Luc Teirlinck
2003-12-02 10:54                 ` Juri Linkov
2003-12-02  4:43               ` Luc Teirlinck
2003-12-02 10:18               ` Info enhancements (was: Re: HTML as info format) Juri Linkov
2003-12-02 17:27                 ` Eli Zaretskii
2003-12-02 19:26                   ` Karl Berry
2003-12-03  5:38                     ` Info enhancements Juri Linkov
2003-12-03 13:27                       ` Karl Berry
2003-12-03 15:46                         ` Robert J. Chassell
2003-12-20  5:34                         ` Juri Linkov
2003-12-20 14:57                           ` Karl Berry
2003-12-03 17:16                     ` Info enhancements (was: Re: HTML as info format) Richard Stallman
2003-12-02 21:22               ` Info enhancements Reiner Steib
2003-12-03  3:54                 ` `s' (regex) search [was Re: Info enhancements] Harry Putnam
2003-12-03  5:47                   ` Eli Zaretskii
2003-12-03  9:42                     ` Harry Putnam
2003-12-03 11:31                       ` Eli Zaretskii
2003-12-03 11:56                         ` Harry Putnam
2003-12-03 16:27                           ` Eli Zaretskii
2003-12-03 19:13                             ` Harry Putnam
2003-12-04  8:34                               ` Eli Zaretskii
2003-12-03  5:04                 ` Info enhancements Juri Linkov
2004-09-01 16:42                   ` Reiner Steib
2004-09-01 20:55                     ` Juri Linkov
2004-09-02 19:02                       ` Richard Stallman
2003-12-03  0:33               ` Kim F. Storm
2003-12-03  6:43                 ` Juri Linkov
2003-12-12  2:08               ` Juri Linkov
2003-12-12 14:24                 ` Karl Berry
2003-12-12 17:14                   ` Eli Zaretskii
2003-12-12 19:23                     ` Stefan Monnier
2003-12-13 10:12                       ` Eli Zaretskii
2003-12-13 23:15                         ` Richard Stallman
2003-12-12 21:38                   ` Juri Linkov
2003-12-13 15:17                     ` Richard Stallman
2003-12-16  2:14                       ` Juri Linkov
2003-12-17  3:28                         ` Richard Stallman
2003-12-18  3:03                           ` Juri Linkov
2003-12-18 16:59                             ` Richard Stallman
2003-12-19 14:03                             ` Luc Teirlinck
2003-12-20  5:27                               ` Juri Linkov
2003-12-13 15:48                     ` Eli Zaretskii
2003-12-15  2:35                 ` Richard Stallman
2003-12-15  6:01                   ` Eli Zaretskii
2003-12-15 20:06                     ` Richard Stallman
2003-12-16  3:00                     ` Juri Linkov
2003-12-16 12:12                       ` Kim F. Storm
2003-12-17  3:28                         ` Richard Stallman
2003-12-17  3:28                       ` Richard Stallman
2004-07-01 21:07               ` non-blocking socket io: data limit on read? Nic Ferrier
2003-10-28 16:19   ` terminal escapes in Info files? Stefan Monnier
2003-10-29 19:02     ` Richard Stallman
2003-10-29 19:47       ` David Kastrup
2003-10-29 21:43         ` Eli Zaretskii
2003-10-29 22:39           ` David Kastrup
2003-10-30  6:03             ` Eli Zaretskii
2003-10-30 18:00         ` Richard Stallman
2003-10-29 19:01   ` Richard Stallman
2003-10-29 19:45     ` Alper Ersoy
2003-10-29 19:42       ` Eli Zaretskii
2003-10-30 18:00       ` Richard Stallman
2003-10-29 19:02 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2003-10-28 20:09 Karl Berry
2003-10-29 12:52 ` Oliver Scholz
2003-10-29 14:14   ` Eli Zaretskii
2003-10-29 14:31     ` Andreas Schwab
2003-10-29 17:51       ` Alper Ersoy
2003-10-29 18:53         ` Alper Ersoy
2003-10-29 18:11       ` Eli Zaretskii
2003-10-29 21:08         ` Andreas Schwab
2003-10-29 21:18           ` Alper Ersoy
2003-10-29 21:40           ` Eli Zaretskii
2003-10-29 15:28     ` Oliver Scholz
2003-10-31  2:29     ` Thien-Thi Nguyen
2003-10-29 19:02 ` Richard Stallman
2003-10-28 20:06 Karl Berry
2003-10-28 21:23 ` Stefan Monnier
2003-10-28 23:41 ` Miles Bader
2003-10-28 20:06 Karl Berry
2003-10-28 17:46 Karl Berry
2003-10-28 18:08 ` Stefan Monnier
2003-10-29 12:20   ` Oliver Scholz
2003-10-29 14:21     ` Eli Zaretskii
2003-10-29 16:24       ` Oliver Scholz
2003-10-29 17:29         ` Robert J. Chassell
2003-10-29 18:09           ` Stefan Monnier
2003-10-30  1:13             ` Robert J. Chassell
2003-10-30  6:10               ` Stephen J. Turnbull
2003-10-30 22:06                 ` Robert J. Chassell
2003-11-03 12:19                   ` Stephen J. Turnbull
2003-10-30 16:36               ` Stefan Monnier
2003-10-29 18:40           ` Oliver Scholz
2003-10-29 19:09             ` Oliver Scholz
2003-10-29 20:02               ` Luc Teirlinck
2003-10-29 20:47                 ` Oliver Scholz
2003-10-29 22:58                   ` Luc Teirlinck
2003-10-30  2:37                   ` Robert J. Chassell
2003-10-30  2:55                   ` Robert J. Chassell
2003-10-29 17:45         ` Eli Zaretskii
2003-10-29 18:00         ` Reiner Steib
2003-10-29 18:43           ` Oliver Scholz
2003-10-30  4:19     ` Richard Stallman
2003-10-30  6:11       ` Eli Zaretskii
2003-10-31  0:07         ` Richard Stallman
2003-10-28 16:51 Karl Berry
2003-10-28 16:59 ` Stefan Monnier
2003-10-28 17:16   ` Eli Zaretskii
2003-10-28 17:56     ` Stefan Monnier
2003-10-28 20:34       ` Eli Zaretskii
2003-10-28 16:50 Karl Berry
2003-10-26 12:20 Karl Berry
2003-10-26 12:40 ` Simon Josefsson
2003-10-26 15:40   ` Alex Schroeder
2003-10-27  7:02 ` Richard Stallman
2003-10-27 19:29   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

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