From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert Thorpe" Newsgroups: gmane.emacs.help Subject: Re: How to delete until the first displayable character in a line? Date: 13 Dec 2006 03:19:42 -0800 Organization: http://groups.google.com Message-ID: <1166008782.048257.72200@79g2000cws.googlegroups.com> References: <1165944112.459711.154410@80g2000cwy.googlegroups.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1166010060 2078 80.91.229.10 (13 Dec 2006 11:41:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 11:41:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 13 12:40:59 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuSTp-0006Fq-Af for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 12:40:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuSTo-0000Zh-Ob for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 06:40:56 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!79g2000cws.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 213.94.228.210 Original-X-Trace: posting.google.com 1166008788 7765 127.0.0.1 (13 Dec 2006 11:19:48 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 13 Dec 2006 11:19:48 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 EMF3ASPROXY03 Complaints-To: groups-abuse@google.com Injection-Info: 79g2000cws.googlegroups.com; posting-host=213.94.228.210; posting-account=hWoAPxMAAAAnBKSBz1ZivwUPPjEuve7bvVCHZQ8rhrluPfwcBJd92w Original-Xref: shelby.stanford.edu gnu.emacs.help:143898 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39502 Archived-At: 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.