unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: 19333@debbugs.gnu.org
Cc: samologist@gmail.com
Subject: bug#19333: 25.0.50; isearch : don't close overlay ending at point
Date: Wed, 10 Dec 2014 07:04:18 +0100	[thread overview]
Message-ID: <87388ohwgt.fsf@yahoo.fr> (raw)

[-- 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

             reply	other threads:[~2014-12-10  6:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  6:04 Nicolas Richard [this message]
2014-12-13 16:16 ` bug#19333: 25.0.50; isearch : don't close overlay ending at point Nicolas Richard
2014-12-14  4:45   ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87388ohwgt.fsf@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=19333@debbugs.gnu.org \
    --cc=samologist@gmail.com \
    /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 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).