unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Harry Putnam <hgp@sbcglobal.net>
Subject: Re: multiple inserts within skeletons
Date: Tue, 29 Apr 2003 14:51:25 GMT	[thread overview]
Message-ID: <m2bryp1hn7.fsf@sbcglobal.net> (raw)
In-Reply-To: u3ck1aamo.fsf@ID-87814.user.dfncis.de

Oliver Scholz <alkibiades@gmx.de> writes:


> A skeleton may contain a sub-skeleton as an element. In this case it
> is repeated until the user hits RET without having anything
> entered. For example:
>
> (define-skeleton my-comment
>   "FIXME: documentation"
>   nil
>   "BEGIN NONSENSE" \n
>   > "Everything on the following lines" \n
>   > "is pure nonsense." \n
>   ("Type a silly word: " "lirum larum -- " str & \n | -15)
>   "END NONSENSE")

This is close to something I've tried to do a few times.  Maybe you
can coach me a little here.

I'd like to produce and insert that looks like:

# Keywords: Some Key words
# More commentary
# yet more comentary
# CURRENT_DATE
# &&

Trying to rework your example like this comes sort of close.:

(define-skeleton my-comment
  "Keywords formatted input"
  nil
  "# Keywords: " 
  ("Type descriptive comments: " "# " str & \n | -15)
  "END NONSENSE")

# Keywords: # some key words
# more commentary
# yet more commentary
# CURRENT_DATE
# &&

NOTE:  Current Date and closing ampersands added by hand but I'd like
the skeleton to do that for me.

1) How can I make the octothorpe begin to appear only after the
   keywords line, so it doesn't appear after `Keywords'.

2) Can I arrange the skeleton so that when I press C-g to break out,
   it inserts the CURRENT_DATE followed by `# &&' on a separate line?
   Or in some other way cause those last two items to be inserted
   automatically 

  parent reply	other threads:[~2003-04-29 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5300.1051558114.21513.help-gnu-emacs@gnu.org>
2003-04-29  9:58 ` multiple inserts within skeletons Oliver Scholz
2003-04-29 10:52   ` Oliver Lohmann
2003-04-29 14:51   ` Harry Putnam [this message]
2003-04-29 16:22     ` Oliver Scholz
2003-04-29 23:13       ` Harry Putnam
2003-04-30  9:23         ` Oliver Scholz
2003-05-07 20:24           ` Multibyte chars [was Re: multiple inserts within skeletons] Harry Putnam
2003-05-08  7:34             ` Multibyte chars Oliver Scholz
2003-05-09  4:33               ` Harry Putnam
2003-04-28 19:29 multiple inserts within skeletons Oliver Lohmann

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2bryp1hn7.fsf@sbcglobal.net \
    --to=hgp@sbcglobal.net \
    /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.
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).