all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: William Case <billlinux@rogers.com>
To: "Joel J. Adamson" <jadamson@partners.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: newbie elisp help ??
Date: Wed, 15 Aug 2007 22:30:17 -0400	[thread overview]
Message-ID: <1187231417.17619.39.camel@CASE> (raw)
In-Reply-To: <87k5rwimrm.fsf@W0053328.mgh.harvard.edu>

Thanks for your comments Joel;

On Wed, 2007-08-15 at 16:08 -0400, Joel J. Adamson wrote:
> William Case <billlinux@rogers.com> writes:
> 
> > I suppose I am asking for the programming equivalent of 'C-u n'.
> 
> Well yeah: my question is "why do you want to program this?"  Whenever
> I want such a divider, I just enter "M-7 M-0 *", like this:
> 
> **********************************************************************
> 
> That took three keystrokes.  If you want to repeat it a bunch of
> times, you can make it a macro, and name the macro.  However, either
> making it a macro and calling it by name, or programming it as an
> interactive function takes more keystrokes (unless you give it a
> one-letter name or bind it to a key, e.g., C-c *).
> 
> If you want to call this from inside a function, or make it part of a
> mode, I'd suggest looking at the code for major modes, such as sh-mode
> or message-mode.

To respond to your curiosity, I want to build a function that inserts
lines as I have described for several reasons.

     1. I called it a section a divider in my posts because there are
        file header programs in the emacs wiki and elsewhere.  They are
        all too big and complex for what I need.  They are more suited
        to a professional programmer who is building a major project
        with the expectation that those files will be widely
        distributed.  Perhaps, one day I will need something like that.
        For now, I wanted to avoid debate and just create a simple
        header for files that are tantamount to practise or sample
        files, using 'C', elisp or bash. File name, Purpose of program,
        Author's name, programming date will do for me.
     2. I have tried to use something like you suggest, but find the use
        of a solid line of characters too dense, drawing attention away
        from the actual programming, and, thus would like to alternate
        character with a space.
     3. It seemed like building a function and sub-functions, was a good
        self-imposed exercise to practise some of the lisp I had picked
        up in the tutorial.
     4. I wanted to avoid the need for variable arguments, parameters
        and hooks by writing a simple set of functions where I could
        copy and manually substitute ';' and '#' for '/*  */' commenting
        out symbols.  Hooks, buffer/file names, etc. might come later.
     5. I did not ask for advice on the emacs mailing list lightly.  I
        did my due diligence with manuals, info, wiki, archives, google
        and trial and error.  I thought that after several hours of
        frustration it would be appropriate to ask for guidance.

My understanding was that this emacs mailing list is for beginners and
experienced people alike.

-- 
Regards Bill,
Emacs 22.0.990.1  Fedora 7 

  reply	other threads:[~2007-08-16  2:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4824.1187198869.32220.help-gnu-emacs@gnu.org>
2007-08-15 18:02 ` newbie elisp help ?? Pascal Bourguignon
2007-08-15 19:04   ` William Case
2007-08-17 20:44   ` Thien-Thi Nguyen
2007-08-15 20:08 ` Joel J. Adamson
2007-08-16  2:30   ` William Case [this message]
     [not found]   ` <mailman.4845.1187231410.32220.help-gnu-emacs@gnu.org>
2007-08-16 14:09     ` Joel J. Adamson
2007-08-15 17:27 William Case
2007-08-15 17:48 ` Lennart Borgman (gmail)
2007-08-15 18:16   ` William Case
2007-08-15 18:24     ` Lennart Borgman (gmail)
     [not found] ` <46C342F9.8070808@gmail.com>
2007-08-15 19:07   ` William Case

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=1187231417.17619.39.camel@CASE \
    --to=billlinux@rogers.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jadamson@partners.org \
    /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.