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

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

Re: About `name' in loadup.el


From: Thien-Thi Nguyen
Subject: Re: About `name' in loadup.el
Date: Wed, 13 Mar 2013 11:35:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

() Xue Fuqiao <xfq.free@gmail.com>
() Sun, 10 Mar 2013 21:02:49 +0800

   As I said in this thread, I usually do many things before asking a
   questions:
   http://lists.gnu.org/archive/html/help-gnu-emacs/2013-01/msg00076.html

One thing that you can add to that list is to try executing code (that
you feel is safe), to see how it behaves in reality.  If the snippet is
small and relatively self-contained (as in this particular case), it can
be fun to wrap it in a command and edebug it.  For example, in *scratch*:

 (defun ttn-try ()
   (interactive)
   (... some code ...))
 
 (global-set-key [(meta f1)] 'ttn-try)

Then:
- Place point on the ‘defun’ and do ‘M-x edebug-defun RET’.
- Invoke (via ‘M-f1’), step through (via ‘SPC’), eval (via ‘e’), etc.

There is also ‘edebug-eval-top-level-form’, which is easier to work with
(less preparation required).  I use ‘edebug-defun’ out of habit, mostly.

   > Adopting this approach is beneficial in another way: You will no
   > longer need to ask the somewhat pointless question "Can anybody
   > help?".  The answer to that question is always "yes".  (Likewise,
   > the answer to "Who can help?" must necessarily include "Xue
   > Fuqiao". :-D)

   I won't close my request for help with semantically-null questions
   like “Can anyone help?” any more, because they are superfluous and
   annoying — like what you said.

Well, the truth is i have a lot of practice being superfluous and
annoying.  You could say i'm an expert on this subject!  :-D

Anyway, Emacs is cool because you can study it also "from the inside".

-- 
Thien-Thi Nguyen
GPG key: 4C807502

Attachment: pgp1qngydkZhb.pgp
Description: PGP signature


reply via email to

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