From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: delete-horizontal-space and NO-BREAK SPACE
Date: Mon, 23 Aug 2010 18:28:13 +0200 [thread overview]
Message-ID: <4C72A19D.2040000@easy-emacs.de> (raw)
In-Reply-To: <m2fwy5a1y9.fsf@ohwell.denx.de>
Am 23.08.2010 15:33, schrieb Detlev Zundel:
> Hi,
>
> more and more often I get emails with NO-BREAK SPACE characters (ascii
> 160) in them which are used for alignment purposes. When replying to
> such e-mails, I usually have to edit this a lot and wish 'M-\' would
> erase the whole stretch of the characters.
>
> Looking up the definition of delete-horizontal-space, it is obvious that
> it doesn't do this as it only erases " \t".
>
> Is there another nice function really erasing all space characters
> (i.e. chars belonging to the "space" category) or should the funtion be
> improved?
>
> Thanks
> Detlev
>
Hi,
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
Andreas
next prev parent reply other threads:[~2010-08-23 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 13:33 delete-horizontal-space and NO-BREAK SPACE Detlev Zundel
2010-08-23 15:50 ` Drew Adams
2010-08-23 16:28 ` Andreas Röhler [this message]
2010-08-23 21:15 ` Detlev Zundel
2010-08-23 22:11 ` Drew Adams
2010-08-24 6:16 ` Andreas Röhler
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=4C72A19D.2040000@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/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.