unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* categorized list of EMACS LISP functions
@ 2007-11-18 13:57 zeb7k
  2007-11-18 14:46 ` Joost Kremers
  2007-11-18 19:54 ` Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: zeb7k @ 2007-11-18 13:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, I'm writing my first functions for GNU EMACS.  I would like to
find a categorized list of functions so that I
can program cookbook style.  M-x apropos isn't enough.

The categories should be something like:

string handling functions...
buffer handling functions...
output functions...
functions to query the user...
conversion functions...
file handling functions...
etc...

Surely someone has made such a list.  Where might I find it?

--zeb

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

* Re: categorized list of EMACS LISP functions
  2007-11-18 13:57 categorized list of EMACS LISP functions zeb7k
@ 2007-11-18 14:46 ` Joost Kremers
  2007-11-18 17:31   ` apatheticagnostic
  2007-11-18 19:54 ` Drew Adams
  1 sibling, 1 reply; 4+ messages in thread
From: Joost Kremers @ 2007-11-18 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

zeb7k@hotmail.com wrote:
> Surely someone has made such a list.  Where might I find it?

type C-h i m Elisp RET

in other words, the emacs lisp manual groups topics together, and gives the
relevant functions for each topic.

-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

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

* Re: categorized list of EMACS LISP functions
  2007-11-18 14:46 ` Joost Kremers
@ 2007-11-18 17:31   ` apatheticagnostic
  0 siblings, 0 replies; 4+ messages in thread
From: apatheticagnostic @ 2007-11-18 17:31 UTC (permalink / raw)
  To: help-gnu-emacs

On Nov 18, 9:46 am, Joost Kremers <joostkrem...@yahoo.com> wrote:
> ze...@hotmail.com wrote:
> > Surely someone has made such a list.  Where might I find it?
>
> type C-h i m Elisp RET
>
> in other words, the emacs lisp manual groups topics together, and gives the
> relevant functions for each topic.
>
> --
> Joost Kremers                                      joostkrem...@yahoo.com
> Selbst in die Unterwelt dringt durch Spalten Licht
> EN:SiS(9)

Also, hitting s and typing out the name of the concept you're trying
to look up while hitting tab or space can be really useful, as there's
quite a bit of documentation.

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

* RE: categorized list of EMACS LISP functions
  2007-11-18 13:57 categorized list of EMACS LISP functions zeb7k
  2007-11-18 14:46 ` Joost Kremers
@ 2007-11-18 19:54 ` Drew Adams
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2007-11-18 19:54 UTC (permalink / raw)
  To: zeb7k, help-gnu-emacs

> Hi, I'm writing my first functions for GNU EMACS.  I would like to
> find a categorized list of functions so that I
> can program cookbook style.  M-x apropos isn't enough.
>
> The categories should be something like:
>
> string handling functions...
> buffer handling functions...
> output functions...
> functions to query the user...
> conversion functions...
> file handling functions...
> etc...
>
> Surely someone has made such a list.  Where might I find it?

I don't know of such a list, but the suggestions others made regarding the
manual (Info) should help. In addition to that, perhaps some of the
following will help:

It is very often the case that existing Emacs-Lisp functions include the
types of the objects they manipulate in the function name. Often, the name
starts with the type of the target object: `buffer-live-p', `buffer-size',
`file-attributes', `file-readable-p', and so on. This means that you can use
`C-h f <type> TAB' with such a type name as prefix to see all such
functions.

Sometimes, the object type is part of the name, but it is not a prefix. If
you use Icicles, you can see all function names that contain the object type
as a substring, using `C-h f <type> S-TAB'. And you can type a regexp to
match, instead of a substring. And you can use multiple regexps or
substrings to match parts irrespective of order ("progressive completion",
`M-*'). And you can see the doc of each matching function name in turn by
repeating `C-M-next'. You can of course convert buffer *Completions* to a
list of the matching functions.

See also Icicles command `a' (alias `what-which-how'), which lets you
examine Emacs objects of a particular type (e.g. a buffer) and apply a
function to them. It also lets you manipulate variables whose values are
objects of a particular type - in particular, if you choose type
`functionp', then you can manipulate variables whose values are functions.

Another thing that might help you are the Icicles commands for matching
input against not only function names but doc strings as well: `icicle-doc',
`icicle-vardoc', `icicle-fundoc'.

* main entry and TOC:
http://www.emacswiki.org/cgi-bin/wiki/Icicles

* `a' command:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Object-Action_Interaction

* doc-string matching:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Multi-Completions

Probably none of this will help you a great deal with some of what you
request, however - for example, lists of functions to query the user,
conversion functions, or output functions. However, it might still help a
little there, since some output functions have `print' or `write' or `put'
as part of their name, and some query functions have `query' or `ask' or
`confirm' in their name, and some conversion functions have `convert' or
`transform' in their name. You will have to reflect a bit, to come up with
synonyms that might be used in function names.

In general, I think you'll need to do a bit of fishing to get what you want.

If you are indeed trying to write your first Emacs-Lisp functions, then I'd
say your best bet is to start by studying the manual "Emacs Lisp
Introduction". That will give you better understanding and help you form
good Lisp coding habits.

After that, if you want models of function definitions, dive into the Emacs
code itself, starting with `C-h f' and clicking on the library that defines
the function. Not all of the code represents the best coding practices, of
course, but much of it does, since it has been reworked by many programmers
over the years. Although the quality is variable, you can usually find a
good model of whatever you want.

HTH.

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

end of thread, other threads:[~2007-11-18 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 13:57 categorized list of EMACS LISP functions zeb7k
2007-11-18 14:46 ` Joost Kremers
2007-11-18 17:31   ` apatheticagnostic
2007-11-18 19:54 ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).