From: Detlev Zundel <dzu@denx.de>
To: help-gnu-emacs@gnu.org
Subject: Re: delete-horizontal-space and NO-BREAK SPACE
Date: Mon, 23 Aug 2010 23:15:29 +0200 [thread overview]
Message-ID: <m24oel6nf2.fsf@ohwell.denx.de> (raw)
In-Reply-To: 4C72A19D.2040000@easy-emacs.de
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
next prev parent reply other threads:[~2010-08-23 21:15 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
2010-08-23 21:15 ` Detlev Zundel [this message]
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=m24oel6nf2.fsf@ohwell.denx.de \
--to=dzu@denx.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.