unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Delete every other line
@ 2009-09-26 12:39 James
  2009-09-26 20:01 ` Juanma Barranquero
  2009-09-26 22:34 ` Peter Dyballa
  0 siblings, 2 replies; 5+ messages in thread
From: James @ 2009-09-26 12:39 UTC (permalink / raw)
  To: Help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

Is there a way to deleting blank unnecessarily double spaced blank lines in
a buffer. "delete-blank-lines" doesn't do what I want.

Cheers,
James

[-- Attachment #2: Type: text/html, Size: 174 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Delete every other line
  2009-09-26 12:39 Delete every other line James
@ 2009-09-26 20:01 ` Juanma Barranquero
  2009-09-26 22:34 ` Peter Dyballa
  1 sibling, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2009-09-26 20:01 UTC (permalink / raw)
  To: James; +Cc: Help-gnu-emacs

On Sat, Sep 26, 2009 at 14:39, James <ja.lira0@gmail.com> wrote:

> Is there a way to deleting blank unnecessarily double spaced blank lines in
> a buffer. "delete-blank-lines" doesn't do what I want.

It is not clear what you want IMO, but perhaps flush-lines or
replace-string will help. Could you give an example?

    Juanma




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Delete every other line
  2009-09-26 12:39 Delete every other line James
  2009-09-26 20:01 ` Juanma Barranquero
@ 2009-09-26 22:34 ` Peter Dyballa
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-09-26 22:34 UTC (permalink / raw)
  To: James; +Cc: Help-gnu-emacs


Am 26.09.2009 um 14:39 schrieb James:

> Is there a way to deleting blank unnecessarily double spaced blank  
> lines in
> a buffer.

Do you mean replace-regexp ^[<TAB><SPC>]+C-qC-j with nothing?

--
Greetings

   Pete

"What do you think of Western Civilisation?"
"I think it would be a good idea!"
				– Mohandas Karamchand Gandhi







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Delete every other line
       [not found] <mailman.7580.1253994955.2239.help-gnu-emacs@gnu.org>
@ 2009-09-27 12:37 ` Colin S. Miller
  2009-09-30 19:53   ` Alexander Katovsky
  0 siblings, 1 reply; 5+ messages in thread
From: Colin S. Miller @ 2009-09-27 12:37 UTC (permalink / raw)
  To: help-gnu-emacs

James wrote:
> Is there a way to deleting blank unnecessarily double spaced blank lines 
> in a buffer. "delete-blank-lines" doesn't do what I want.
> 
> Cheers,
> James
James,
Ctrl-Home
M-x replace-regexp RET
C-q C-j C-q C-j + RET
C-q C-j RET

will replace two-or-more end-of-line characters with
a single end-of-line, for the entire buffer.

C-q allows a special character to be entered literally (from the keyboard),
C-j is end-of-line. + means one-or-more of the previous character (here the last
C-j).

HTH,
Colin S. Miller

-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Delete every other line
  2009-09-27 12:37 ` Colin S. Miller
@ 2009-09-30 19:53   ` Alexander Katovsky
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Katovsky @ 2009-09-30 19:53 UTC (permalink / raw)
  To: Colin S. Miller; +Cc: help-gnu-emacs

M-x flush-lines <RET> ^$ <RET>




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-30 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-26 12:39 Delete every other line James
2009-09-26 20:01 ` Juanma Barranquero
2009-09-26 22:34 ` Peter Dyballa
     [not found] <mailman.7580.1253994955.2239.help-gnu-emacs@gnu.org>
2009-09-27 12:37 ` Colin S. Miller
2009-09-30 19:53   ` Alexander Katovsky

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).