GNU bug report logs - #56896
29.0.50; [PATCH] Make the bookmark fringe icon look like a bookmark

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Tue, 2 Aug 2022 19:14:02 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 56896 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 56896 <at> debbugs.gnu.org
Subject: Re: bug#56896: 29.0.50; [PATCHv3] Make the bookmark fringe icon look
 like a bookmark
Date: Sat, 13 Aug 2022 14:59:49 -0700
[Message part 1 (text/plain, inline)]
On 8/4/2022 9:41 PM, Jim Porter wrote:
> Ok, I figured out a way to do this. I added a proxy object 
> ('bookmark--fringe-mark') that I can dynamically set the 'fringe' 
> property on, and then the :set function will update that and the display 
> code will Just Work. Well, so long as a redisplay is triggered, but I 
> think happens when you set options via Customize? It worked in my tests, 
> anyway.
> 
> This method feels kind of hacky, but I can't think of a better way, and 
> it's certainly more feasible than trying to find all the fringe markers 
> manually. (Given that code can define custom bookmark handler functions, 
> I'm not even sure that would have been possible...)

Here's a better version of this patch. Rather than a proxy object, it 
just sets the 'fringe' property on the defcustom, which the rest of the 
bookmark code can then use like a "regular" fringe bitmap (essentially, 
it's just an alias to a real fringe bitmap). I also added a 
'fringe-custom-set-bitmap' function that anyone can use as a :set function.

This should be general enough that it could be used wherever anyone 
wants to allow users to use Customize to change the fringe bitmap that 
gets used for a particular purpose. Potentially, it could even be used 
for *every* use of a fringe bitmap. That would let users pick icons they 
like for a particular purpose based on their general description (e.g. 
'right-triangle'), but they could also independently adjust the bitmaps 
(e.g. redefining all the fringe bitmaps to be larger for high DPI 
monitors). For the latter case, maybe users could download a package 
from ELPA to do that.
[0001-Make-the-bookmark-fringe-icon-look-like-a-bookmark.patch (text/plain, attachment)]

This bug report was last modified 2 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.