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: Tue, 24 Aug 2010 08:16:51 +0200 [thread overview]
Message-ID: <4C7363D3.2060000@easy-emacs.de> (raw)
In-Reply-To: <m24oel6nf2.fsf@ohwell.denx.de>
Am 23.08.2010 23:15, schrieb Detlev Zundel:
> 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
>
Hi,
some questions remain:
Can't see an (ascii 160).
Assume you got some character, whose meaning in other context is formatting.
Then it's just a character, who doesn't belong to the mode, you use.
'delete-horizontal-space' is an edit-function, not designed to cure
encoding-errors.
Presumable you got chars into a text-mode buffer, which are not text.
That may indicate a bug, but must not.
Andreas
prev parent reply other threads:[~2010-08-24 6:16 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
2010-08-23 22:11 ` Drew Adams
2010-08-24 6:16 ` Andreas Röhler [this message]
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=4C7363D3.2060000@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.