[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19333: 25.0.50; isearch : don't close overlay ending at point
From: |
Nicolas Richard |
Subject: |
bug#19333: 25.0.50; isearch : don't close overlay ending at point |
Date: |
Wed, 10 Dec 2014 07:04:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hi,
TL;DR: the patch being trivial, maybe it's quicker to just skip to that.
Samuel Wales (X-Debbugs-CC'd) reported a problem with a recipe :
http://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00795.html
For the record, here's the message:
> === call
> emacs -Q --geometry -0+0 --geometry 80x30 --eval '(setq load-path
> (append (list (substitute-in-file-name "$delorgsrc/lisp")
> (substitute-in-file-name "$delorgsrc/contrib/lisp")) load-path))'
> bug-isearch.org
> ===
> here is the org file to use:
> === bug-isearch.org
> * NAKA lorem
> *** REF lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> lorem
> *** NAKA lorem
> ***** reproduce isearch bug
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf asdfasfdasdfasdfasdf
> search for lightly org
> ===
> all those asdf lines should be concatenated into a single line in case
> gmail corrupted it.
(Additionnal note : the "search for lightly org" should be on that line too.)
>From there, hit C-s lightly org RET, then you your window should
consist of just the ellipsis, instead of showing the text you just
searched for.
IMO this recipe shows two problems :
- one is in isearch
- the other was reported as bug#18197 and I'm still not sure what to do
with it.
For the first, I think the following trivial patch is a fix (if ok to
apply, should it be on the emacs-24 branch?),
>From 37506a922382fe1e4806ee8ae9de3aab0a7ade8d Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Fri, 5 Dec 2014 13:56:31 +0100
Subject: [PATCH] isearch.el (isearch-open-necessary-overlays): Open overlay
ending at point.
---
lisp/ChangeLog | 5 +++++
lisp/isearch.el | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 445a461..6af9adb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-05 Nicolas Richard <theonewiththeevillook@yahoo.fr>
+
+ * isearch.el (isearch-open-necessary-overlays): Open overlay
+ ending at point.
+
2014-12-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* files.el (directory-files-recursively): Use
diff --git a/lisp/isearch.el b/lisp/isearch.el
index c3e473a..ef0c4a7 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2734,7 +2734,7 @@ (defun isearch-open-overlay-temporary (ov)
;; in any of these overlays, se we are safe in this case too.
(defun isearch-open-necessary-overlays (ov)
(let ((inside-overlay (and (> (point) (overlay-start ov))
- (< (point) (overlay-end ov))))
+ (<= (point) (overlay-end ov))))
;; If this exists it means that the overlay was opened using
;; this function, not by us tweaking the overlay properties.
(fct-temp (overlay-get ov 'isearch-open-invisible-temporary)))
--
2.0.4
In GNU Emacs 25.0.50.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2014-11-28 on localhost
Repository revision: 692322388c9f5bdebf2e8c4f7434c1d4769a04cc
System Description: Gentoo Base System release 2.2
--
Nicolas Richard
- bug#19333: 25.0.50; isearch : don't close overlay ending at point,
Nicolas Richard <=