From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: marc0 Newsgroups: gmane.emacs.help Subject: Re: detect if line has only white space? Date: Mon, 10 Nov 2003 18:51:00 +0100 Organization: individual Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87r80gdse3.fsf@despammed.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068488150 17797 80.91.224.253 (10 Nov 2003 18:15:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2003 18:15:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 10 19:15:47 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJGZn-0007n3-00 for ; Mon, 10 Nov 2003 19:15:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJHWF-0003nd-E4 for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Nov 2003 14:16:11 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!news-FFM2.ecrc.net!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: host136-0.pool80183.interbusiness.it Original-X-Trace: quimby.gnus.org 1068486928 28357 80.183.0.136 (10 Nov 2003 17:55:28 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Mon, 10 Nov 2003 17:55:28 +0000 (UTC) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:FkAVC5Nd9x4N1Z/FOXN4uSr2a58= Original-Xref: shelby.stanford.edu gnu.emacs.help:118063 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14002 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14002 Miguel Frasson on 10 Nov 2003 18:42:56 +0100 writes: > I would like to have a elisp function that detects if the current line > contains only white space. Some idea? matching the current line content with the regexp ^[ ]*$ ? > Aditionally, I would like to remove all space at the end of the > lines at once (e-lisp code). How? M-x replace-regexp RET [ ]*$ RET RET -- marc0@autistici.org - 0x4E8899C2