unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19333: 25.0.50; isearch : don't close overlay ending at point
@ 2014-12-10  6:04 Nicolas Richard
  2014-12-13 16:16 ` Nicolas Richard
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Richard @ 2014-12-10  6:04 UTC (permalink / raw)
  To: 19333; +Cc: samologist

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

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?),


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-isearch.el-isearch-open-necessary-overlays-Open-over.patch --]
[-- Type: text/x-diff, Size: 1391 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 237 bytes --]



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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#19333: 25.0.50; isearch : don't close overlay ending at point
  2014-12-10  6:04 bug#19333: 25.0.50; isearch : don't close overlay ending at point Nicolas Richard
@ 2014-12-13 16:16 ` Nicolas Richard
  2014-12-14  4:45   ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Richard @ 2014-12-13 16:16 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: 19333-done, samologist

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
> For the first, I think the following trivial patch is a fix (if ok to
> apply, should it be on the emacs-24 branch?),

I pushed the change to master, and am closing the bug. In case that was
wrong, please advice.

-- 
Nicolas Richard





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#19333: 25.0.50; isearch : don't close overlay ending at point
  2014-12-13 16:16 ` Nicolas Richard
@ 2014-12-14  4:45   ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-12-14  4:45 UTC (permalink / raw)
  To: 19333; +Cc: theonewiththeevillook

> I pushed the change to master, and am closing the bug. In case that was
> wrong, please advice.

I think that was right, thanks,


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-14  4:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10  6:04 bug#19333: 25.0.50; isearch : don't close overlay ending at point Nicolas Richard
2014-12-13 16:16 ` Nicolas Richard
2014-12-14  4:45   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).