From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Detlev Zundel Newsgroups: gmane.emacs.help Subject: Re: delete-horizontal-space and NO-BREAK SPACE Date: Mon, 23 Aug 2010 23:15:29 +0200 Organization: Church of Emacs - Missionary division Message-ID: References: <4C72A19D.2040000@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282598178 1323 80.91.229.12 (23 Aug 2010 21:16:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Aug 2010 21:16:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 23 23:16:16 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OneNL-000897-Hu for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 23:16:15 +0200 Original-Received: from localhost ([127.0.0.1]:47158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OneNK-0003Nf-SZ for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Aug 2010 17:16:14 -0400 Original-Received: from [140.186.70.92] (port=59503 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OneMw-0003Na-Gb for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 17:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OneMv-0003xM-JJ for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 17:15:50 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41340) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OneMv-0003xB-BA for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 17:15:49 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OneMn-0007gq-KP for help-gnu-emacs@gnu.org; Mon, 23 Aug 2010 23:15:41 +0200 Original-Received: from p4ff0672f.dip.t-dialin.net ([79.240.103.47]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Aug 2010 23:15:41 +0200 Original-Received: from dzu by p4ff0672f.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Aug 2010 23:15:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p4ff0672f.dip.t-dialin.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:5Zu73R4KnRiI7XCWEeudSEizYAE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:74780 Archived-At: Hi Andreas, [...] > to get rid of nasty single chars, I use forms like this: > > (defun delete-zero-fourteen () > "Delete chars ascii octal \\014 " > (interactive "*") > (let ((beg (cond ((region-active-p) > (region-beginning)) > (t (point-min)))) > (end (cond ((region-active-p) > (region-end)) > (t (point-max))))) > (save-excursion > (goto-char beg) > (while (re-search-forward (concat (list 12)) end t 1) > (replace-match ""))))) > HTH Thanks for the code but what I really wanted to know is how Emacs itself handles this. I have a feeling that this should not need custom code to handle. There is a function 'delete-horizontal-space' and I wanted to know if and how it applies to this specific 'space' also. When I encounter a problem not too specific to the special case, I usually try to find out how other people cope with it before inventing "yet another wheel(tm)". If nobody else points me to a already supported way of handling my case I'll follow Drews advise and pose the question to a wider audience. Thanks! Detlev -- NAN - No Acronym Neccessary