help-emacs-windows
[Top][All Lists]
Advanced

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

[h-e-w] Elisp structures?


From: Bill Pringlemeir
Subject: [h-e-w] Elisp structures?
Date: 27 Feb 2002 12:02:42 -0500
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

I have both Emacs info and elisp info nodes.  I have read both.  I can
do small things like write hooks.  However, I often stumple around
trying to figure out how to do somethings.  This might be related to
the fact that I don't seem to be able to use the debugger; My fault
most likely.  In most cases, I wish to use mail/Usenet posts to do
something.  I will give two cases,

Case one
========

An annoying person is posting to a Usenet group, spouting of
racial/ethnic slurs and generally degenerating the group.  I made the 
following function,

(defun psychoanalyze-uenal ()
  "buffer goes to the analyst."
  (interactive)
  (let ((uenal-text (buffer-substring (point) (mark))))
    (doctor)                            ; start the psychotherapy
    (message "")
    (switch-to-buffer "*doctor*")
    (insert-string uenal-text)
    (insert-string "\n")))

I have run the elisp doctor on his text and posted the reply.  For
some reason, this seems to stop trolls.  I wanted to have this
function execute and complete the email whenever I called one function
via "M-x".  Maybe this is not the best way to structure things.

I had also tried many variation to get the "uenal-text" variable and
kept getting weird error message that I don't really understand.  How
are you suppose to figure them out?  I guess read, read and read...
It just seems a little discouraging to have to be a master before you
can write something mid-sized.

Case two
========

I receive emails like,

     > Subject: Xyz review and demo
     > X-MS-TNEF-Correlator: <address@hidden>
...
     > When: February 27, 2002 2:00 PM-3:00 PM (GMT-05:00) Eastern Time
     > Where: 5th MainBoard room

I would like to run this command,

 at \\bill 1:55pm /INTERACTIVE cmd /k echo Xyz reiew and demo.

It would also be nice to put stuff in the calendar.  I can think how
to parse the `X-MS-TNEF-Correlator' and put this in some Gnus browsing
hook.  I just have a bunch of stuff to do and don't know how to divide
and conquer the problems and how to debug such stuff.  Everytime I try
to use functions weird things start to happen.

I can look at Elisp function distributed with Emacs.  However, most of
them are pretty hairy and they don't show how they have been
developed.  It is like saying "Here is a Ferrari.  Can you build
one?".  I would prefer to see a Vespa and even better the design and
development methods.  Do you use gud, "Lisp Interaction mode", "M-e",
etc?  Which is the most productive to use.  I guess I am wondering if
there is a walk-through development of two-four function pieces of
eLisp code anywhere.  Every time I use this I get some lambda lambda
lambda.

Regards,
Bill Pringlemeir.






reply via email to

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