all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14724: 24.3.50; `isearch-open-necessary-overlays' handling of overlay property 'isearch-open-invisible'
@ 2013-06-26 16:24 Drew Adams
  2013-06-27  1:37 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2013-06-26 16:24 UTC (permalink / raw
  To: 14724

The code would be more robust if it would gracefully handle (1) an
non-functional value and perhaps also (2) a functional value where
invoking the function raises an error.  Here is the problematic code:

(funcall (overlay-get ov 'isearch-open-invisible)  ov)

For (1), the code could be like this:

(when (functionp (overlay-get ov 'isearch-open-invisible))
  (funcall (overlay-get ov 'isearch-open-invisible) ov))

For (1+2), that could be wrapped in `ignore-errors'.  Dunno whether (2)
is an important case to handle or whether it is really advisable to
ignore such an error.

Handling (1) seems to me reasonable, and with no downside.  The behavior
is to just do nothing additional with the overlay - e.g., leave the text
invisible.

Dunno know whether similar considerations apply to
`isearch-open-invisible-temporary'.  I'm guessing no - its value seems
to be provided only by the Isearch code (whereas code far from Isearch
sets the `isearch-open-invisible' overlay property).

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-06-20 on ODIEONE
Bzr revision: 113100 eliz@gnu.org-20130620173624-w9v620tog4yacftk
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'





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

end of thread, other threads:[~2013-06-27  3:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 16:24 bug#14724: 24.3.50; `isearch-open-necessary-overlays' handling of overlay property 'isearch-open-invisible' Drew Adams
2013-06-27  1:37 ` Stefan Monnier
2013-06-27  2:38   ` Drew Adams
2013-06-27  3:00     ` Stefan Monnier

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.