emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display-completion-list should not strip text properties


From: David Kastrup
Subject: Re: display-completion-list should not strip text properties
Date: Tue, 04 Sep 2007 07:59:04 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

>>     Or using \, like in the query-replace string to eval part of the
>>     replacement string:
>>
>>     (defun foo ()
>>       "mumble \\,(propertize "toto" 'face 'highlight) titi"
>>       whatever)
>>
>> That is a clean feature.
>
> I proposed only a new syntax for this feature, but now after
> thinking more about the whole idea, I see that this feature is too
> ad-hoc.  Allowing to eval arbitrary expressions while printing the
> doc string in the Help buffer is too fragile approach.  There is no
> guarantee that after all interacting evaluations there will a
> readable result in the Help buffer.

Well, there never is such a guarantee to start with.

(defun foo ()
 "5sji [3q98y5ew9pnthy45wp9tvnhy45pnt5uvpwmthuvqptnhbewptb|"
 whatever)

also has no readable result in the help buffer.

> I think a better approach is to use a markup language in doc strings,
> be it XHTML or even TexinfoML.  Then using a style sheet it can be
> formatted nicely in the Help buffer.  Example of a doc string:
>
> (defun foo ()
>   "To create a file, just <emph>visit it</emph> with <kbd>C-x C-f</kbd>.
> See also <xref>find-file-literally</xref>."
> )

That requires a whole new subsystem separate of Emacs and a rationale
to call it for every string display.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]