all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [dak@gnu.org: Where to ask for Info features?]
@ 2004-04-02 14:16 Karl Berry
  2004-04-03 23:40 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Berry @ 2004-04-02 14:16 UTC (permalink / raw)


Would someone like to work on these features for the Emacs Info reader?
I don't know if the alt text is displayed as a popup help now, or if
it's possible to set the cut&paste text for an image, but anyway ...

thanks,
karl


Date: 02 Apr 2004 13:27:35 +0200
From: David Kastrup <dak@gnu.org>
To: karl@gnu.org
Subject: Where to ask for Info features?


Info is supposed to gain more image support.  I'd have the following
wish list:

If I have an image in an info buffer, I would want to be able to
supply

a) a popup help text displayed when over the image
b) the text to be used for cut&paste of the image

This would typically be the "ALT" text in HTML browsers, and at least
b) would be the "hidden" text masked by the image in Emacs windows.
a) would probably default to b).

Application: well, suppose we convert amsldoc.tex into Texinfo format.
It would be nice to have a way of converting the whole kaboodle such
that we can cut&paste images directly from the Texinfo buffer as
source text.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-02 14:16 [dak@gnu.org: Where to ask for Info features?] Karl Berry
@ 2004-04-03 23:40 ` Richard Stallman
  2004-04-04  0:29   ` David Kastrup
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2004-04-03 23:40 UTC (permalink / raw)
  Cc: emacs-devel

    a) a popup help text displayed when over the image

That is probably feasible with tooltips, but what would it be used for?

    b) the text to be used for cut&paste of the image

Why would we want that?  It would seem more natural for cutting and
pasting to copy the image, right?

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-03 23:40 ` Richard Stallman
@ 2004-04-04  0:29   ` David Kastrup
  2004-04-04  0:45     ` David Kastrup
                       ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Kastrup @ 2004-04-04  0:29 UTC (permalink / raw)
  Cc: emacs-devel, Karl Berry

Richard Stallman <rms@gnu.org> writes:

>     a) a popup help text displayed when over the image
> 
> That is probably feasible with tooltips, but what would it be used for?
> 
>     b) the text to be used for cut&paste of the image
> 
> Why would we want that?  It would seem more natural for cutting and
> pasting to copy the image, right?

The application I have in mind is a help text presenting various LaTeX
constructs in their typeset form (as one example, it could be a buffer
full of mathematical symbols).  If you cut and pasted such symbols
from a TeXinfo buffer into a LaTeX source buffer, you would want to
have the respective source code pasted, whether or not the image
property is left on during the process (it would not survive
revisiting the buffer, however).

Anyhow: in Emacs images are either overlays (in which case it is
impossible to copy them anyway) or text properties.  While there is
the special case of empty overlays also, in general an image covers
an underlying text.  If you cut&paste an image into some buffer
related to a file, saving the file will just save the underlying
text.  And if the images are supposed to illustrate the look of some
symbol like \sum, it would be nice if the pasted text looked like
this also.

If we need to have a text to place the image display property on
anyway, it would be nice if the actual used text would be under the
control of the Texinfo author.  It might also be considered like the
"ALT" tag in html: text to be written in case that the image can't be
loaded or the info reader is incapable of displaying images.  In
fact, since info can be converted into HTML, and HTML can also be
displayed by text browsers like Lynx, we really want to have a useful
"ALT" text instead of the image.

In a similar vein, being able to tack a tooltip on might come handy
for giving additional information about some image.  For tooltips
maybe a more generally applicable interface could be useful that would
allow them to be placed on text as well.

Right now, in the application I am thinking of (a LaTeX help system
written in Texinfo), I'd mostly need them on images, and I would
probably have the tooltip identical to the cut&paste text.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-04  0:29   ` David Kastrup
@ 2004-04-04  0:45     ` David Kastrup
  2004-04-04 23:40     ` Richard Stallman
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2004-04-04  0:45 UTC (permalink / raw)
  Cc: Karl Berry, emacs-devel

David Kastrup <dak@gnu.org> writes:

> Right now, in the application I am thinking of (a LaTeX help system
> written in Texinfo), I'd mostly need them on images, and I would
> probably have the tooltip identical to the cut&paste text.

Additional information: in many HTML browsers, a tooltip with the ALT
text is displayed when the mouse hovers over an image, and cutting
and pasting will also cut&paste the ALT text.

Another thing that I'd want in the context of images in Texinfo would
be a possibility to specify the descender value, the percentage of
image below the baseline.  That makes it possible to specify a row of
symbols as images and have them line up properly which is quite
important if you want to have convincing renderings of mathematics.

For an illustration, compare the screenshot
<URL:http://preview-latex.sourceforge.net/screenshot.png> with
<URL:http://preview-latex.sourceforge.net/xscreenshot.png>.

It is surprising how badly the look of mathematics suffers when the
baseline info gets lost (the bug has been fixed since then).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-04  0:29   ` David Kastrup
  2004-04-04  0:45     ` David Kastrup
@ 2004-04-04 23:40     ` Richard Stallman
  2004-04-05  2:30       ` David Kastrup
  2004-04-05  0:50     ` Kim F. Storm
  2004-04-05  0:56     ` Kim F. Storm
  3 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2004-04-04 23:40 UTC (permalink / raw)
  Cc: emacs-devel, karl

    Anyhow: in Emacs images are either overlays (in which case it is
    impossible to copy them anyway) or text properties.  While there is
    the special case of empty overlays also, in general an image covers
    an underlying text.

When you copy text that includes image properties, these properties
will either be kept or discarded depending on yank-excluded-properties.
Perhaps we should make that include `display' in some cases.

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-04  0:29   ` David Kastrup
  2004-04-04  0:45     ` David Kastrup
  2004-04-04 23:40     ` Richard Stallman
@ 2004-04-05  0:50     ` Kim F. Storm
  2004-04-05  2:23       ` David Kastrup
  2004-04-05  0:56     ` Kim F. Storm
  3 siblings, 1 reply; 11+ messages in thread
From: Kim F. Storm @ 2004-04-05  0:50 UTC (permalink / raw)
  Cc: Karl Berry, rms, emacs-devel

David Kastrup <dak@gnu.org> writes:

> Richard Stallman <rms@gnu.org> writes:
> 
> >     a) a popup help text displayed when over the image
> > 
> > That is probably feasible with tooltips, but what would it be used for?

If you put an image map on the image, you can define a hot-spot
covering the entire image and put a help-echo property on the
hot-spot.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-04  0:29   ` David Kastrup
                       ` (2 preceding siblings ...)
  2004-04-05  0:50     ` Kim F. Storm
@ 2004-04-05  0:56     ` Kim F. Storm
  3 siblings, 0 replies; 11+ messages in thread
From: Kim F. Storm @ 2004-04-05  0:56 UTC (permalink / raw)
  Cc: Karl Berry, rms, emacs-devel

David Kastrup <dak@gnu.org> writes:

> Richard Stallman <rms@gnu.org> writes:
> 
> >     a) a popup help text displayed when over the image
> > 
> > That is probably feasible with tooltips, but what would it be used for?

Please disregard my previous message -- although correct, it is much more
complex than needed.  

There is a simpler solution -- just put a help-echo property on the
same string where you put the display property:

(insert (propertize "abc"
         'help-echo "HELLO"
         'display (find-image `((:type xpm :file "gnu.xpm")))))

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-05  0:50     ` Kim F. Storm
@ 2004-04-05  2:23       ` David Kastrup
  2004-04-05 15:06         ` Karl Berry
  0 siblings, 1 reply; 11+ messages in thread
From: David Kastrup @ 2004-04-05  2:23 UTC (permalink / raw)
  Cc: Karl Berry, rms, emacs-devel

storm@cua.dk (Kim F. Storm) writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > Richard Stallman <rms@gnu.org> writes:
> > 
> > >     a) a popup help text displayed when over the image
> > > 
> > > That is probably feasible with tooltips, but what would it be used for?
> 
> If you put an image map on the image, you can define a hot-spot
> covering the entire image and put a help-echo property on the
> hot-spot.

You can put the help-echo property on the image itself.  That's not
the problem.  I _know_ Emacs can do this, I was just asking for a way
in which an Info file can tell Emacs to do it.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-04 23:40     ` Richard Stallman
@ 2004-04-05  2:30       ` David Kastrup
  0 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2004-04-05  2:30 UTC (permalink / raw)
  Cc: emacs-devel, karl

Richard Stallman <rms@gnu.org> writes:

>     Anyhow: in Emacs images are either overlays (in which case it is
>     impossible to copy them anyway) or text properties.  While there is
>     the special case of empty overlays also, in general an image covers
>     an underlying text.
> 
> When you copy text that includes image properties, these properties
> will either be kept or discarded depending on yank-excluded-properties.
> Perhaps we should make that include `display' in some cases.

Pretty often, I guess, since yanking more often than not implies an
actual _use_ of the text in different context.  And in most contexts,
an image does not have a useful representation in the file.

But that actually was not what my proposal was about.  It was about
the ability to specify in the info file what text it should be that
carries the image property (or the image overlay: as I don't think an
info image would make sense in any other buffer, one might as well
make it an overlay, which is a buffer-local entity).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-05  2:23       ` David Kastrup
@ 2004-04-05 15:06         ` Karl Berry
  2004-04-05 15:33           ` David Kastrup
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Berry @ 2004-04-05 15:06 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm

    I was just asking for a way
    in which an Info file can tell Emacs to do it.

David, as I mentioned to you, right now @image takes a bunch of optional
arguments:

    @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION]]]]}

In the Info output (as of the upcoming release) this gets written as:

     ^@^H[image src="BINARYFILE" text="TXTFILE"
                alt="ALTTEXT ... ^@^H]

And the Info readers interpret/ignore this as they please.  So this is
easily extendable with more image properties as they are needed.

I hope/assume the alttext will do for the help text.

If we need more arguments to @image, please elucidate.

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

* Re: [dak@gnu.org: Where to ask for Info features?]
  2004-04-05 15:06         ` Karl Berry
@ 2004-04-05 15:33           ` David Kastrup
  0 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2004-04-05 15:33 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm

karl@freefriends.org (Karl Berry) writes:

>     I was just asking for a way
>     in which an Info file can tell Emacs to do it.
> 
> David, as I mentioned to you,

You have to excuse my bad memory.

> right now @image takes a bunch of optional arguments:
> 
>     @image{FILENAME[, WIDTH[, HEIGHT[, ALTTEXT[, EXTENSION]]]]}
> 
> In the Info output (as of the upcoming release) this gets written as:
> 
>      ^@^H[image src="BINARYFILE" text="TXTFILE"
>                 alt="ALTTEXT ... ^@^H]
> 
> And the Info readers interpret/ignore this as they please.  So this
> is easily extendable with more image properties as they are needed.

This looks rather like being just what I'd need.

> I hope/assume the alttext will do for the help text.

It certainly would.  I just want to make sure that the info reader in
Emacs would

a) make the ALTTEXT, if specified, the base text onto which the image
property gets attached, so that copy&paste and writing of buffer
regions will save the ALTTEXT.

b) have an option that will make the ALTTEXT also be the default for
the tooltip help, like HTML browsers tend to do.

I don't know whether this already is the case.  Please excuse my
ignorance in these matters: I am not yet working with this feature,
but once I find time to do so, it would be inconvenient if I find that
one of the very rare feature releases of Emacs happened in between
and missed out on those semantics which certainly appear desirable to
me.

I am glad to hear that most of my worries appear to be
unsubstantiated.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

end of thread, other threads:[~2004-04-05 15:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-02 14:16 [dak@gnu.org: Where to ask for Info features?] Karl Berry
2004-04-03 23:40 ` Richard Stallman
2004-04-04  0:29   ` David Kastrup
2004-04-04  0:45     ` David Kastrup
2004-04-04 23:40     ` Richard Stallman
2004-04-05  2:30       ` David Kastrup
2004-04-05  0:50     ` Kim F. Storm
2004-04-05  2:23       ` David Kastrup
2004-04-05 15:06         ` Karl Berry
2004-04-05 15:33           ` David Kastrup
2004-04-05  0:56     ` Kim F. Storm

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.