From: nobody@nowhere.invalid (Unknown)
To: Glenn Morris <rgm@gnu.org>
Cc: 8688@debbugs.gnu.org
Subject: bug#8688: 23.2; search-whitespace-regexp not working as documented
Date: Thu, 19 May 2011 07:29:54 +1200 \bFrom: Worik Stanton <worik.stanton@gmail.com> [thread overview]
Message-ID: <4DD41E32.8070305@gmail.com> (raw)
In-Reply-To: <6wzkmk5vje.fsf@fencepost.gnu.org>
On 18/05/11 19:15, Glenn Morris wrote:
> Worik Stanton wrote:
>
>> I set search-whitespace-regexp to [ \t\r\n]+ in customise as suggested
>> in the documentation but when I do a isearch-forward-regexp the space
>> character only matches a literal space.
>>
>> '(search-whitespace-regexp "[ \\t\\r\\n]+"))
>>
>> is the line from .emacs
> I think you're being confused by the way customize treats regexps (it
> confuses me as well; I'm not sure it is helpful). There is extra
> escaping in the setting of search-whitespace-regexp that is written to
> your .emacs. It should be:
>
> '(search-whitespace-regexp "[ \t\r\n]+"))
>
> The doc of search-whitespace-regexp says:
>
> In the Customization buffer, that is `[' followed by a space,
> a tab, a carriage return (control-M), a newline, and `]+'
>
> If you"literally use that input, does it work?
Yes. I copied the string direct from the documentation. Perhaps this
is a bug in the documentation?
Also I uncovered another bug, I guess it could be described as
aesthetic. I changed the "custom-set-variables" command to...
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(delete-by-moving-to-trash t)
'(save-place t nil (saveplace))
'(search-whitespace-regexp "[ \t\r\n]+"))
And executed it. (regex-search works as expected now).
But C-h v search-whitespace-regexp says it is set to.,.
search-whitespace-regexp's value is "[ ^M\n]+"
I was about to report that the custom-set-variables command did not work...
Thanks for your help, all the serious problems are solved.
cheers
Worik
> Oh, it's not possible to type a TAB, or ctrl-M, or newline, in a custom
> field, since it moves you out of the editable field... This is even more
> confusing.
>
next prev parent reply other threads:[~2011-05-18 19:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 23:36 bug#8688: 23.2; search-whitespace-regexp not working as documented Worik Stanton
2011-05-18 7:15 ` Glenn Morris
2011-05-18 8:08 ` Andreas Schwab
2011-05-18 16:20 ` Glenn Morris
2011-05-18 22:14 ` Stefan Monnier
2011-05-18 19:29 ` Unknown [this message]
2021-12-04 20:20 ` Lars Ingebrigtsen
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=4DD41E32.8070305@gmail.com \
--to=nobody@nowhere.invalid \
--cc=8688@debbugs.gnu.org \
--cc=rgm@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.