unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Wrap around and comment function
Date: Tue, 29 Nov 2005 03:56:47 GMT	[thread overview]
Message-ID: <87y838xd9v.fsf@newsguy.com> (raw)

I'm hoping there is something that does what I describe below
somewhere in a repository.  Or at least something that is close enough
to allow a (seriously) lisp challenged emacs user to get this from it.

I'd like a function that acts on region by inserting a line like this
above region:

# [HP DATE - NOTE: <Here I get queried for a few words then <RET>>
# Then region is commented  
# with whatever  comment style 
# is dictated by mode.
# Finally insert a line below region like:
# ==*  END HP NOTE *== ]

If that isn't confusing enough I'll try to spell it out.

Write a commented line with some static info:
   [HP DATE - NOTE:
   (Where date is MMDDYY_HHMMSS)
Then the function queries me for a few words of my choice followed by
<RET>  Which is also written to the same line.

When I hit <RET> the function comments the region with whatever
comment is dictated by mode, and inserts a closing line:

   # ==*  END HP NOTE *== ]

             reply	other threads:[~2005-11-29  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-29  3:56 Harry Putnam [this message]
2005-11-29  4:21 ` Wrap around and comment function Chong Yidong
2005-11-30 13:55   ` Harry Putnam
2005-11-30 14:36   ` Harry Putnam

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=87y838xd9v.fsf@newsguy.com \
    --to=reader@newsguy.com \
    /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).