all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Tom Regner <thomas.regner@fb-research.de>
Cc: 28634@debbugs.gnu.org, David Engster <deng@randomsample.de>
Subject: bug#28634: 25.2; minimap.el: next-single-property-change returns `nil`
Date: Mon, 15 Jul 2019 11:34:03 +0200	[thread overview]
Message-ID: <87blxvej5g.fsf@mouse.gnus.org> (raw)
In-Reply-To: <83lgkyc2bu.fsf@fb-research.de> (Tom Regner's message of "Thu, 28 Sep 2017 16:41:57 +0200")

Tom Regner <thomas.regner@fb-research.de> writes:

> Hello,
>
> in version 1.2 of minimap.el as distributed via elpa, in line 771 the
> call to `next-single-property-change`, intended to set `pos`, returns
> `nil` for a file I tried to activate it for, resulting in a
> 'minimap-enlarge-faces: Wrong type argument: integer-or-marker-p, nil '
> error. Checking for this outcome and leaving pos alone in that case, by
> changing the line 771 from
>
>                 (setq pos (next-single-property-change pos 'face))))
>
> to (wrapping the call with `or`)
>
>                 (setq pos (or (next-single-property-change pos 'face) pos))))
>
> fixes this for me.

Thanks; I've now applied the patch below to the package in ELPA.
Perhaps David will want to bump the version number (or not).

diff --git a/packages/minimap/minimap.el b/packages/minimap/minimap.el
index 231c04900..e6f2b727b 100644
--- a/packages/minimap/minimap.el
+++ b/packages/minimap/minimap.el
@@ -768,7 +768,7 @@ You can specify those properties with
 	(with-current-buffer minimap-buffer-name
 	  (setq ov
 		(make-overlay pos
-			      (setq pos (next-single-property-change pos 'face))))
+			      (setq pos (or (next-single-property-change pos 'face) pos))))
 	  (overlay-put ov 'face `(:family ,(face-font 'default)))
 	  (overlay-put ov 'priority 5)))
       (setq pos (next-single-property-change pos 'face)))))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-07-15  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 14:41 bug#28634: 25.2; minimap.el: next-single-property-change returns `nil` Tom Regner
2019-07-15  9:34 ` Lars Ingebrigtsen [this message]

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=87blxvej5g.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=28634@debbugs.gnu.org \
    --cc=deng@randomsample.de \
    --cc=thomas.regner@fb-research.de \
    /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.