Gnus development mailing list
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] message-elide-region.
Date: Tue, 23 Apr 2002 13:28:44 +0200	[thread overview]
Message-ID: <vpq3cxmy7pv.fsf@montrose.imag.fr> (raw)

Hi ! 

You  all should  know the  C-c  C-e shortcut  to elide  a region  when
replying. 

it works when the region is a set of full lines, but if I call it with
regions beginning in the middle of a line, everything goes wrong:

Example :

> it works when  the region is a set  of full lines, but if  I call it
> with  regions beginning  in the  middle of  a line,  everything goes
> wrong:

Now, I want to elide `beginning'. I get this.


> it works when  the region is a set  of full lines, but if  I call it
> with  regions 
[...]

 in the  middle of  a line,  everything goes
> wrong:


What I want is this :


> it works when  the region is a set  of full lines, but if  I call it
> with  regions 

[...]

> in the middle of a line, everything goes wrong:


The function to accomplish this is this one:

;;;###autoload
(defun message-elide-region (b e)
  "Elide the text in the region.
An ellipsis (from `message-elide-ellipsis') will be inserted where the
text was killed."
  (interactive "r")
  (kill-region b e)
  (message-newline-and-reformat)
  (delete-region
   (progn (previous-line 1) (point))
   (progn (next-line 3) (point)))
  (insert message-elide-ellipsis))

Anyone to commit this ?

-- 
Matthieu

By  the  way,  I've  just  discovered   M-RET  to  cut  a  line  in  a
citation. It's very usefull.



             reply	other threads:[~2002-04-23 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-23 11:28 Matthieu Moy [this message]
2002-04-23 13:45 ` Kai Großjohann
2002-04-23 13:58   ` Matthieu Moy
2002-04-23 18:53   ` Karl Pflästerer
2002-04-24 11:17     ` Kai Großjohann

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=vpq3cxmy7pv.fsf@montrose.imag.fr \
    --to=matthieu.moy@imag.fr \
    /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 NNTP newsgroup(s).