emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: keys and command name info


From: Andreas Röhler
Subject: Re: [Orgmode] Re: keys and command name info
Date: Thu, 29 Jul 2010 15:47:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

Am 29.07.2010 08:45, schrieb Tassilo Horn:
Andreas Röhler<address@hidden>  writes:

Hi Andreas,

what about delivering mnemonic command names alongside with its keys
in org-info?

That would be good practice, and I think it's more or less standard for
emacs packages.  For example, that is from Gnus:

,----[ (info "(gnus)Summary Post Commands") ]
| `S p'
| `a'
|      Prepare for posting an article (`gnus-summary-post-news').  By
|      default, post to the current group.  If given a prefix, disable
|      that.  If the prefix is 1, prompt for another group instead.
|
| `S f'
| `f'
|      Post a followup to the current article (`gnus-summary-followup').
`----

8.1. Agenda files

[ ... ]
`C-c ['
      Add current file to the list of agenda files.  The file is added to
      the front of the list.  If it was already in the list, it is moved
      to the front.  With prefix arg, file is added/moved to the end.

might be provided as

8.1. Agenda files

[ ... ]
`C-c [', org-agenda-file-to-front
      Add current file to the list of agenda files.  The file is added to
      the front of the list.  If it was already in the list, it is moved
      to the front.  With prefix arg, file is added/moved to the end.

I'd write it in parens with the usual function markup at the end of the
first sentence, just like it's done in Gnus.  The 2 Gnus entries above
have this definition:

--8<---------------cut here---------------start------------->8---
@table @kbd
@item S p
@itemx a
@kindex a (Summary)
@kindex S p (Summary)
@findex gnus-summary-post-news
@c @icon{gnus-summary-post-news}
Prepare for posting an article (@code{gnus-summary-post-news}).  By
default, post to the current group.  If given a prefix, disable that.
If the prefix is 1, prompt for another group instead.

@item S f
@itemx f
@kindex f (Summary)
@kindex S f (Summary)
@findex gnus-summary-followup
@c @icon{gnus-summary-followup}
Post a followup to the current article (@code{gnus-summary-followup}).
--8<---------------cut here---------------end--------------->8---

So basically, you only have to add the command name with @code{} at the
appropriate place and add an index item to the function index with
@findex{}.

IMHO it's useful for emacs-beginners, but for hackers too, as
remembering function names may precede remembering keys - which are to
change individually anyway.

Exactly, and using `C-h f' you can easily switch to *Help* to lookup the
exact docstring and signature.  And from *Help*, the function definition
is only one click away.

Should you be interested, I'll consider to take action with
texi-files.

I'd welcome such an enhancement to the docs, and I'm pretty sure nobody
will object. :-)

Bye,
Tassilo


Fine.

Attached a patch against latest org-texi, starting that kind of work.

Please not I signed the FSF-disclaimer but not the paper transferring copyright under US-law.

Andreas


Attachment: org-texi.patch
Description: Text Data


reply via email to

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