From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.help Subject: Re: multiple inserts within skeletons Date: Tue, 29 Apr 2003 14:51:25 GMT Organization: Still searching... Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051628213 7224 80.91.224.249 (29 Apr 2003 14:56:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2003 14:56:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 29 16:56:52 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19AWXL-0001sN-00 for ; Tue, 29 Apr 2003 16:56:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19AWX7-0005Ca-08 for gnu-help-gnu-emacs@m.gmane.org; Tue, 29 Apr 2003 10:56:37 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr15.news.prodigy.com.POSTED!cbca52ab!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:zMPjaPz1p7/HrbHYdqSZFT8MUxs= Original-Lines: 52 Original-NNTP-Posting-Host: 63.202.233.138 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr15.news.prodigy.com 1051627885 ST000 63.202.233.138 (Tue, 29 Apr 2003 10:51:25 EDT) Original-NNTP-Posting-Date: Tue, 29 Apr 2003 10:51:25 EDT X-UserInfo1: OH[]BVGAFRVURUXXARKFOPLI[B]NQHQHDY^L\UQHWIWDUWYADNVOPCKZBL\NX_KHV^GY[KVMG^ZPNHSCZNS[^UXFJVWYXVXKBH[XRWWBBDTN@AX\JSBVH]_@T\EKJHBMZ\_WZJFNRY]YWKSPED_U^NC\HSZ\WS[KEAYI@DO@\K@BP\LD[\GTMPLDFVU]ASJM Original-Xref: shelby.stanford.edu gnu.emacs.help:112512 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9006 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9006 Oliver Scholz 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