GNU bug report logs -
#48768
Introducing ability to append to docstring
Previous Next
Reported by: ludvig-faddeev <at> gmx.com
Date: Tue, 1 Jun 2021 00:08:02 UTC
Severity: wishlist
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48768 in the body.
You can then email your comments to 48768 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 00:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ludvig-faddeev <at> gmx.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 01 Jun 2021 00:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
A useful capability would allow one to append to a defun docstring using a defvar.
User could write a brief description for the docstring, and later append more details
from a defvar.
I like my functions to be succinct without an overly long docstring. This makes
the implementation code readily displayed on the visible window, without having
to scroll through an excessively long documentation string.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 04:54:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 48768 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> A useful capability would allow one to append to a defun docstring using a defvar.
> User could write a brief description for the docstring, and later append more details
> from a defvar.
Could you show an example of what this would look like, in use?
I'm trying to guess -- though I don't have confidence in my guess --
and I think this might be a useful feature but would be easier to use
with a different interface.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 14:09:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 48768 <at> debbugs.gnu.org (full text, mbox):
Richard Stallman <rms <at> gnu.org> writes:
> > A useful capability would allow one to append to a defun docstring
> > using a defvar.
>
> > User could write a brief description for the docstring, and later
> > append more details
> > from a defvar.
>
> Could you show an example of what this would look like, in use?
>
> I'm trying to guess -- though I don't have confidence in my guess --
> and I think this might be a useful feature but would be easier to use
> with a different interface.
We already have the `function-documentation' symbol property, no?
I wonder what use cases the OP has in mind for that that interface we
have is not sufficient and why the suggested interface would be more
appropriate.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 14:45:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 48768 <at> debbugs.gnu.org (full text, mbox):
> > > A useful capability would allow one to append to a defun docstring
> > > using a defvar.
> > > User could write a brief description for the docstring, and later
> > > append more details
> > > from a defvar.
> >
> > Could you show an example of what this would look like, in use?
> >
> > I'm trying to guess -- though I don't have confidence in my guess --
> > and I think this might be a useful feature but would be easier to use
> > with a different interface.
>
> We already have the `function-documentation' symbol property, no?
>
> I wonder what use cases the OP has in mind for that that interface we
> have is not sufficient and why the suggested interface would be more
> appropriate.
Not to mention that you can add to an existing doc string
using advice (old advice or new nadvice, AFAIK).
___
In the days before nadvice, the doc addition appeared
in-line, as part of the doc you see when you use `C-h f'.
Now (unfortunately) we instead insert a link in the
`C-h f' help display, and only if you click that link
do you see (only) that added doc in *Help*.
IOW, you don't get an integrated view of the doc. One
could argue that this is a plus, not a minus, as it
separates what is provided by the advice. I think this
is a loss, but I can see that it could be good for each
behavior (integrated or separate) to be possible.
Unfortunately, we only have the separate-display (link)
behavior, not the integrated-doc behavior.
There's one such link for each bit of advice for the
function, and there's no indication that any given bit
of advice provides more doc.
E.g. In my setup command `dired' has two bits of advice,
and this is (the start of) what `C-h f dired' shows:
,----
| dired is an interactive autoloaded compiled Lisp function in
| 'dired.el'.
|
| It is bound to C-x d, menu-bar file dired.
|
| (dired DIRNAME &optional SWITCHES)
|
| :around advice: 'ad-Advice-dired'
| :around advice: 'ls-lisp--dired'
|
| "Edit" directory DIRNAME--delete, rename, print, etc. some files in it.
| Optional second argument SWITCHES specifies the `ls' options used.
| (Interactively, use a prefix argument to be able to specify SWITCHES.)
| ...
`----
'ad-Advice-dired' and 'ls-lisp--dired' are help links.
That first bit of advice, named `ad-Advice-dired',
only adds doc to the doc string. Clicking that link
shows (only) that additional doc.
The second bit of advice adds no doc - it is provided
by vanilla Emacs itself (in ls-lisp.el). Clicking
that second link shows only this in *Help*:
,----
| ls-lisp--dired is an interactive compiled Lisp function in
| 'ls-lisp.el'.
|
| (ls-lisp--dired ORIG-FUN DIR-OR-LIST &optional SWITCHES)
`----
___
I thought Emacs has a general policy for its code
not to use advice, but `ls-lisp.el' does use it:
(advice-add 'dired :around #'ls-lisp--dired)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 15:37:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 48768 <at> debbugs.gnu.org (full text, mbox):
ludvig-faddeev <at> gmx.com writes:
> A useful capability would allow one to append to a defun docstring
> using a defvar.
>
> User could write a brief description for the docstring, and later
> append more details
> from a defvar.
I do not think that would be a useful interface -- you can append and
change doc strings all you want by manipulating the
`function-documentation' property.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
48768 <at> debbugs.gnu.org and ludvig-faddeev <at> gmx.com
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 01 Jun 2021 15:37:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48768
; Package
emacs
.
(Tue, 01 Jun 2021 16:04:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 48768 <at> debbugs.gnu.org (full text, mbox):
> Sent: Wednesday, June 02, 2021 at 3:36 AM
> From: "Lars Ingebrigtsen" <larsi <at> gnus.org>
> To: ludvig-faddeev <at> gmx.com
> Cc: 48768 <at> debbugs.gnu.org
> Subject: Re: bug#48768: Introducing ability to append to docstring
>
> ludvig-faddeev <at> gmx.com writes:
>
> > A useful capability would allow one to append to a defun docstring
> > using a defvar.
> >
> > User could write a brief description for the docstring, and later
> > append more details
> > from a defvar.
>
> I do not think that would be a useful interface -- you can append and
> change doc strings all you want by manipulating the
> `function-documentation' property.
>
> So I'm closing this bug report.
If you can tell me how to append, I can use that, but currently, what people
have said do not work.
So appending to a doc-string is not useful. Appending to a string is the most
useful thing there is !
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Jun 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.