all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bitterspetey <business@stevepetersen.net>
To: Help-gnu-emacs@gnu.org
Subject: Re: Search in filled text does not work correctly
Date: Sun, 26 Feb 2012 11:41:46 -0800 (PST)	[thread overview]
Message-ID: <33395942.post@talk.nabble.com> (raw)
In-Reply-To: <86k43a1hik.fsf@dbn66.laserlab.com>


Certainly you can learn to do it - but I found it a bit remarkable that such
a sophisticated regexp was required to allow for the possibility of breaking
over lines (and catch the other usual whitespace).  I'm not a power user by
a longshot (like I very rarely do any lisp) - but I've been a user for over
a decade, and I picked up some amount of regular expression stuff, and it
still took me some time to figure out that '\s-' does not match line feeds,
contrary to explicit statement in 
http://www.emacswiki.org/emacs/RegularExpression the manual :

Note also that \s- matches space, tab, newline and carriage return. This can
be handy in a [^ … ] construct.
If I had this trouble, I'm guessing a totally new user, curious about the
power of emacs, is going to be totally at sea.
So I think if the emacs community cares about new users, this is a default
that should be changed.  You should have the option to search for an
explicit space, of course, but the default in searches should be a
whitespace of any of the generic sorts.


gregben wrote:
> 
> I happened to want to convert a list like this:
> 
> "apple" "banana" "cherry"
> 
> to this format:
> 
> apple
> banana
> cherry
> 
> the other day. I started our with 'replace-regexp' and learned about
> C-q C-j in a matter of minutes after first trying \n, \\n, C-j,
> etc. before googling. 
> 
> Perhaps it would be better to educate rather than change emacs'
> behavior. The built-in tutorial could have a few words added about
> using C-q C-j with respect to searching and replacing, or the single
> tutorial now provided could be broken into several, with one dedicated
> to searching, replacing, highlighting, displaying only the lines
> containing a pattern, etc.
> 

-- 
View this message in context: http://old.nabble.com/Search-in-filled-text-does-not-work-correctly-tp33390451p33395942.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




  reply	other threads:[~2012-02-26 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25 12:59 Search in filled text does not work correctly linuxfever
2012-02-25 14:10 ` Peter Dyballa
2012-02-25 14:54   ` linuxfever
2012-02-25 15:03     ` linuxfever
2012-02-25 23:17       ` bitterspetey
2012-02-25 23:22         ` Drew Adams
2012-02-26  0:30         ` linuxfever
2012-02-26  1:05           ` linuxfever
2012-02-26  1:18             ` Drew Adams
2012-02-26  1:31               ` Drew Adams
2012-02-26  1:59 ` Gregory (Greg) Benjamin
2012-02-26 19:41   ` bitterspetey [this message]
2012-02-26 19:58     ` bitterspetey
2012-02-27 13:26       ` Ludwig, Mark

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=33395942.post@talk.nabble.com \
    --to=business@stevepetersen.net \
    --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.