all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Subject: Invalid search bound (wrong side of point)
Date: Mon, 31 May 2004 19:33:38 +0300	[thread overview]
Message-ID: <878yf8lfoc.fsf@mail.jurta.org> (raw)

`perform-replace' signals an error even during normal operation such
as replacing a string in the active region with transient mark mode
enabled.  This bug can be reproduced by evaluating in the *scratch* buffer:

(progn
  (transient-mark-mode 1)
  (insert "\na\n\n\n")
  (perform-replace "^" " " nil t nil nil nil (- (point) 4) (- (point) 2)))

`perform-replace' uses nil value returned from `re-search-forward'
as a condition to terminate the loop, but when the value of point
becomes greater than limit, "Invalid search bound" error is signalled,
even though `noerror' argument of `re-search-forward' is t.

Generally, this error can be observed by evaluating in this buffer by C-x C-e:

(re-search-forward "abc" (point-min) t)

whereas evaluating the following expression simply returns nil:

(re-search-forward "def" (point-max) t)

It seems that `search_command' should be changed to not signal an
"Invalid search bound" error if its `noerror' argument is non-nil.

-- 
Juri Linkov
http://www.jurta.org/emacs/

             reply	other threads:[~2004-05-31 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-31 16:33 Juri Linkov [this message]
2004-05-31 17:02 ` Invalid search bound (wrong side of point) Andreas Schwab
2004-06-01 14:57 ` Richard Stallman

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=878yf8lfoc.fsf@mail.jurta.org \
    --to=juri@jurta.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.