all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Philipp Stephani <p.stephani2@gmail.com>,
	Nicolas Petton <nicolas@petton.fr>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: Making DOC argument of define-minor-mode optional
Date: Wed, 28 Dec 2016 16:44:24 -0800 (PST)	[thread overview]
Message-ID: <7be41013-b0a8-4887-92c6-eb624ab87443@default> (raw)
In-Reply-To: <CAArVCkQba7RoWa+tB2UtNaex6=SEGMT=ZxmSedM0tyP9jXhG3Q@mail.gmail.com>

[It's hard for me to follow the non plain-text messages you
send.  In this case, it's not clear whom you are responding
to, and to whom you are asking the question.  My part of the
thread was two quotes back - dunno who replied to me with
"That sounds like a good approach", to which you are replying.]

>> I'd be in favor of (somehow) automatically having the
>> definer-provided DOC be augmented by a link that shows
>> the generic `define-minor-mode' doc, or similar.
>> 
>> IOW:
>> 
>> 1. Definers should need to provide a DOC string (even if
>>    they can fake it with "", which is not encouraged).
>> 
>> 2. Users of the mode should have access to the generic
>>    information also.  It should be sufficient that the
>>    DOC in the definition provides mode-specific information.
>>    It should not need to tell users general things about
>>    using a minor mode.
> 
> Do you have a good idea how to design the interface for this?

I don't have an idea about the implementation; sorry.

> I was thinking about something like this: Create a new help
> type, "mode", analogous to "variable" and "function". The
> documentation for the mode would be different from the toggle
> command and the mode variable, which would get a generic
> docstring. C-h o and C-h m would show the mode docstring
> instead of the toggle command docstring. The mode docstring
> would contain only a description of the mode itself, not the
> toggle command.
> 
> The primary downside is that many mode docstrings are written
> to be applicable to the toggle command. Maybe `define-minor-mode'
> could grow a :doc keyword argument for the mode docstring to
> preserve backward compatibility.

I do think that the doc for a minor mode should be accessible
in the same way as for other functions by a user: `C-h f'.
(It is also available from `C-h m'.)

I don't think the "toggle command" should get a different
doc string.  In particular, it should not get only the
generic minor-mode doc string (e.g. how to toggle).  It
should, as now, describe the mode.  And a user should not
need to use a different key sequence to get different
bits of the relevant doc.

What I was suggesting was a bit the other way around:
have the specific mode doc have a link to generic doc
about toggling etc.  Alternatively, include the generic
text (no link to it), with an indication that it is what
it is: description of the behavior of any minor mode.



      reply	other threads:[~2016-12-29  0:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 10:04 Making DOC argument of define-minor-mode optional Philipp Stephani
2016-11-23 15:50 ` Eli Zaretskii
2016-11-23 15:59   ` Nicolas Petton
2016-11-23 16:35     ` Drew Adams
2016-11-27 21:13       ` Philipp Stephani
2016-12-28 17:25         ` Philipp Stephani
2016-12-29  0:44           ` Drew Adams [this message]

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=7be41013-b0a8-4887-92c6-eb624ab87443@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=nicolas@petton.fr \
    --cc=p.stephani2@gmail.com \
    /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.