all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Rogers <rogers-emacs@rgrjr.dyndns.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Bug: Unable to request replace-string of " \t"
Date: Sun, 16 Jul 2006 12:33:34 -0400	[thread overview]
Message-ID: <17594.27230.269123.272463@rgrjr.dyndns.org> (raw)
In-Reply-To: <44B9E95F.7010708@easy-emacs.de>

   From: Andreas Schwab <schwab@suse.de>
   Date: Sun, 16 Jul 2006 10:34:41 +0200

   Bob Rogers <rogers-emacs@rgrjr.dyndns.org> writes:

   >    2.  "M-x replace-string RET SPC TAB RET x RET".  It won't matter that
   > it doesn't replace anything.  Notice that the SPC and TAB are inserted
   > into the minibuffer normally,

   TAB runs the command indent-for-tab-command
      which is an interactive compiled Lisp function in `indent.el'.
   It is bound to TAB.
   (indent-for-tab-command &optional ARG)

OK, so it's nice that TAB canonicalizes preceding whitespace generally,
but why here?  Why should replace-string assume that I didn't really
mean what I literally typed?

   Furthermore, typing TAB also canonicalizes spaces in the *second*
argument to replace-string, which strikes me as clearly wrong:  " \t" is
not equivalent to "\t" in the replacement, which could start at any
column position.

   From: Andreas Roehler <andreas.roehler@easy-emacs.de>
   Date: Sun, 16 Jul 2006 09:23:11 +0200

   . . .

   BTW is this in the docu? At a first glance searching at
   `string-replace' I couldn't see it.

It does amount to a change in behavior from 21.3.  But I think it would
reduce the "surprise factor" (not to mention buggy behavior) by making
TAB insert itself for both replace-string arguments.  Is anyone actually
expecting TAB to have side effects here?

					-- Bob

  reply	other threads:[~2006-07-16 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-16  2:02 Bug: Unable to request replace-string of " \t" Bob Rogers
2006-07-16  8:34 ` Andreas Schwab
2006-07-16  7:23   ` [Fwd: Re: Bug: Unable to request replace-string of " \t"] Andreas Roehler
2006-07-16 16:33     ` Bob Rogers [this message]
2006-07-17  1:02       ` Bug: Unable to request replace-string of " \t" Stefan Monnier
2006-07-17  1:44         ` Drew Adams
2006-07-17  3:20           ` Stefan Monnier
2006-07-18  0:12             ` Richard Stallman
2006-07-17  1:40   ` Richard Stallman
2006-07-17  1:48     ` Drew Adams
2006-07-17  3:25     ` Stefan Monnier

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=17594.27230.269123.272463@rgrjr.dyndns.org \
    --to=rogers-emacs@rgrjr.dyndns.org \
    --cc=emacs-devel@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.