all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Robert Thorpe" <rthorpe@realworldtech.com>
Subject: Re: How to delete until the first displayable character in a line?
Date: 13 Dec 2006 03:19:42 -0800	[thread overview]
Message-ID: <1166008782.048257.72200@79g2000cws.googlegroups.com> (raw)
In-Reply-To: <elnacp$42q$1@news.yaako.com>

Ronald wrote:
> > A prefix argument determines how many, so ..
> > C-u 2 C-k kills the next two, C-u -1 C-k text from point back to the
> > start of the line.
> > C-u C-k kills the next 4 lines.
>
> It's hard to count how many spaces there are, even harder with tabs.
> What's easy is that do that in one line is enough for me.

But why do you want to count spaces and tabs?

> >> On the hand, to delete characters until the first undisplayable
> >> character.
> > Don't know how to do that.  Possibly you could use zap-to-char.
> > Why on earth do you want to do that anyway?
>
> Because if the previous deleting can be done, I think it is a good
> companion. :-)

Right, I think I'm still not seeing what you're trying to do.  (By the
way, most Emacs people consider "undisplayable" characters to be ones
in international characters sets that can't be displayed with their
current font.)

To delete stuff that is not whitespace can also be done using regexp.

M-x replace-regexp RET \w RET RET will remove all words leaving only
punctuation and space.  M-x replace-regexp \S SPC RET RET will remove
all words and punctuation leaving only space.  If you use
query-replace-regexp for the commands above then Emacs will ask you
about each occurance, meaning you can do it only once, then escape by
pressing C-g.

  reply	other threads:[~2006-12-13 11:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-12 15:35 How to delete until the first displayable character in a line? Ronald
2006-12-12 15:52 ` More general Ronald
2006-12-12 18:55   ` Kevin Rodgers
     [not found]   ` <mailman.1798.1165949787.2155.help-gnu-emacs@gnu.org>
2006-12-12 22:20     ` Ronald
2006-12-12 17:21 ` How to delete until the first displayable character in a line? Robert Thorpe
2006-12-12 22:27   ` Ronald
2006-12-13 11:19     ` Robert Thorpe [this message]
2006-12-13  0:12 ` Dieter Wilhelm
2006-12-23 12:47   ` Dieter Wilhelm
2006-12-13 12:21 ` Mathias Dahl

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=1166008782.048257.72200@79g2000cws.googlegroups.com \
    --to=rthorpe@realworldtech.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.