GNU bug report logs - #48179
bookmark-fontify [PATCH]

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Mon, 3 May 2021 00:15:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48179 in the body.
You can then email your comments to 48179 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 00:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boruch Baum <boruch_baum <at> gmx.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 03 May 2021 00:15:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Emacs Bug Reporting <bug-gnu-emacs <at> gnu.org>
Subject: bookmark-fontify [PATCH]
Date: Sun, 2 May 2021 20:13:58 -0400
[Message part 1 (text/plain, inline)]
The attached patch adds a feature to bookmark.el to colorize a
bookmark's line, making it easily observable. The idea was adopted from
package bm.el, available on MELPA. I was able to test this on Emacs 27,
but there seem to have been some changes in snapshot to make it
difficult to use that version of bookmark.el on my Emacs 27, so please
verify that I performed the migration properly.

OFF-TOPIC, but related: I've posted a pull-request to package bm.el
adding to it a feature to make context-based suggestions for default
bookmark annotations[1]. If Emacs wants that for package bookmark.el it
should be possible to submit a parallel patch.

[1] https://github.com/Boruch-Baum/emacs-bm/commit/dc1d8ad7eea64d94c345f3ed3885eefd8ec72d65

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
[bookmark-fontify.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 00:41:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Boruch Baum <boruch_baum <at> gmx.com>, "48179 <at> debbugs.gnu.org"
 <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Mon, 3 May 2021 00:40:21 +0000
> The attached patch adds a feature to bookmark.el to colorize a
> bookmark's line, making it easily observable. The idea was
> adopted from package bm.el, available on MELPA.

Yet another feature of Bookmark+.

https://www.emacswiki.org/emacs/BookmarkPlus#HighlightingBookmarkLocations

https://www.emacswiki.org/emacs/BookmarkPlus#UsingHighlightedBookmarks




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 01:21:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: Re: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Sun, 2 May 2021 21:20:02 -0400
On 2021-05-03 00:40, Drew Adams wrote:
> > The attached patch adds a feature to bookmark.el to colorize a
> > bookmark's line, making it easily observable. The idea was
> > adopted from package bm.el, available on MELPA.
>
> Yet another feature of Bookmark+.

After all these years, I'm still years behind...

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 01:26:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Mon, 3 May 2021 01:25:18 +0000
> > > The attached patch adds a feature to bookmark.el to colorize a
> > > bookmark's line, making it easily observable. The idea was
> > > adopted from package bm.el, available on MELPA.
> >
> > Yet another feature of Bookmark+.
> 
> After all these years, I'm still years behind...

Same here.  No shame in that.

Bookmark+ features haven't been accepted for Emacs.
You may have better luck.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 07:55:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Mon, 03 May 2021 09:54:16 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> The attached patch adds a feature to bookmark.el to colorize a
> bookmark's line, making it easily observable. The idea was adopted from
> package bm.el, available on MELPA. I was able to test this on Emacs 27,
> but there seem to have been some changes in snapshot to make it
> difficult to use that version of bookmark.el on my Emacs 27, so please
> verify that I performed the migration properly.

The patch is against Emacs 27, I guess?  (Because it didn't apply
cleanly on Emacs 28.)  We're not accepting new features for Emacs 27,
though, so can you respin it for Emacs 28?

Also -- it's slightly obscure what it's doing, but testing seems to
indicate that it just puts a face over the current line when you're
doing a `C-x r m' command?  That's nice, but I think it would also make
sense to restore these faces when jumping to a buffer from the bookmark
buffer -- otherwise it's just a bit confusing.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 09:13:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Mon, 3 May 2021 05:12:04 -0400
On 2021-05-03 09:54, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > The attached patch adds a feature to bookmark.el to colorize a
> > bookmark's line, making it easily observable. The idea was adopted from
> > package bm.el, available on MELPA. I was able to test this on Emacs 27,
> > but there seem to have been some changes in snapshot to make it
> > difficult to use that version of bookmark.el on my Emacs 27, so please
> > verify that I performed the migration properly.
>
> The patch is against Emacs 27, I guess?  (Because it didn't apply
> cleanly on Emacs 28.)  We're not accepting new features for Emacs 27,
> though, so can you respin it for Emacs 28?

I thought I did base the patch on yesterday's gnu.org cgit version...
Here's what the on-line log is showing me...

   Age                  Commit message (Expand)                    Author       Files Lines
2020-09-07 Use format-prompt in read-file-name calls that     Lars Ingebrigtsen 1     -3/+3
           have a default
2020-09-06 Use `format-prompt' when prompting with default    Lars Ingebrigtsen 1     -1/+1
           values

> Also -- it's slightly obscure what it's doing, but testing seems to
> indicate that it just puts a face over the current line when you're
> doing a `C-x r m' command?

Just. Yes, that is the entire point: "colorize a bookmark's line".

> That's nice, but I think it would also make sense to restore these
> faces when jumping to a buffer from the bookmark buffer -- otherwise
> it's just a bit confusing.

Yes. If someone deletes the buffer after creating the bookmark, the
overlay will be lost. What you're asking for is a simple two or three
lines to add to the jump function, but there's no sense if you can't
even apply the current patch. If you can figure out what the problem is
with that, I can add the trivial code for the jump.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 09:21:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Mon, 03 May 2021 11:19:52 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> I thought I did base the patch on yesterday's gnu.org cgit version...
> Here's what the on-line log is showing me...
>
>    Age                  Commit message (Expand)                    Author       Files Lines
> 2020-09-07 Use format-prompt in read-file-name calls that     Lars Ingebrigtsen 1     -3/+3
>            have a default

There's been half a dozen commits to bookmark.el after that one, so I
think your Emacs is out of date.  The latest is

commit f5b172fb6e41e9bf75acd1fd94325a13d75987bf
Author:     Stefan Kangas <stefan <at> marxist.se>
AuthorDate: Mon Feb 15 00:43:15 2021 +0100

>> Also -- it's slightly obscure what it's doing, but testing seems to
>> indicate that it just puts a face over the current line when you're
>> doing a `C-x r m' command?
>
> Just. Yes, that is the entire point: "colorize a bookmark's line".

It wasn't clear to me what that meant -- colourise the line in the
bookmark buffer?  Or somewhere else.

> Yes. If someone deletes the buffer after creating the bookmark, the
> overlay will be lost. What you're asking for is a simple two or three
> lines to add to the jump function, but there's no sense if you can't
> even apply the current patch. If you can figure out what the problem is
> with that, I can add the trivial code for the jump.

Great.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Mon, 03 May 2021 09:59:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Mon, 3 May 2021 05:58:28 -0400
[Message part 1 (text/plain, inline)]
On 2021-05-03 11:19, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > I thought I did base the patch on yesterday's gnu.org cgit version...
> > Here's what the on-line log is showing me...
> >
> >    Age                  Commit message (Expand)                    Author       Files Lines
> > 2020-09-07 Use format-prompt in read-file-name calls that     Lars Ingebrigtsen 1     -3/+3
> >            have a default
>
> There's been half a dozen commits to bookmark.el after that one, so I
> think your Emacs is out of date.  The latest is

It's not *my* emacs. I only have access to debian emacs locally; the
data I gave you was from the URL I had for the on-line cgit repository
for emacs, at gnu.org. Here's a second patch, based upon hopefully the
most current URL, and with the additional jump code.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
[bookmark-fontify-2.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 00:36:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Boruch Baum <boruch_baum <at> gmx.com>,
 "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Mon, 3 May 2021 19:35:53 -0500
Drew Adams <drew.adams <at> oracle.com> writes:

> Bookmark+ features haven't been accepted for Emacs.
> You may have better luck.

That's too bad, as I would really like to see some (but not all) of its
features in Emacs.

Which features are you talking about more specifically?  Could you show
us the corresponding bug reports?

Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 09:00:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Tue, 04 May 2021 10:59:22 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> It's not *my* emacs. I only have access to debian emacs locally; the
> data I gave you was from the URL I had for the on-line cgit repository
> for emacs, at gnu.org. Here's a second patch, based upon hopefully the
> most current URL, and with the additional jump code.

Thanks; applied to Emacs 28 without any problems.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 04 May 2021 09:00:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 48179 <at> debbugs.gnu.org and Boruch Baum <boruch_baum <at> gmx.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 04 May 2021 09:00:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 09:03:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Tue, 04 May 2021 11:02:41 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Thanks; applied to Emacs 28 without any problems.

One thought -- perhaps it should restore all the marked lines (if you
have several bookmarked lines in the same file)?  Hm...  or perhaps
not. 

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 09:59:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Boruch Baum <boruch_baum <at> gmx.com>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Tue, 04 May 2021 10:58:18 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Thanks; applied to Emacs 28 without any problems.
>
> One thought -- perhaps it should restore all the marked lines (if you
> have several bookmarked lines in the same file)?  Hm...  or perhaps
> not. 

If you 'C-x r m' more than once in the same file, the first overlay
remains even after deleting the bookmark.  Shouldn't the first overlay
be deleted when its bookmark position is overwritten?

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 16:38:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Boruch Baum <boruch_baum <at> gmx.com>,
 "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#48179: bookmark-fontify [PATCH]
Date: Tue, 4 May 2021 16:37:35 +0000
> > Bookmark+ features haven't been accepted for Emacs.
> > You may have better luck.
> 
> That's too bad, as I would really like to see some 
> (but not all) of its features in Emacs.
> 
> Which features are you talking about more specifically?

Take any features you like.  You're the one
saying you want some, but not all.  The library
is GPL and I've signed papers.  Be my guest -
have at it.

If you take features as is, with no substantive
changes, then I can remove them from Bookmark+
(for Emacs versions that have them).  If not,
so be it.

All of Bookmark+ could be included in Emacs,
superseding bookmark.el (incorporating the
functions Bookmark+ uses from that file).

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Tue, 04 May 2021 18:39:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Tue, 4 May 2021 14:38:16 -0400
On 2021-05-04 11:02, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
> > Thanks; applied to Emacs 28 without any problems.
>
> One thought -- perhaps it should restore all the marked lines (if you
> have several bookmarked lines in the same file)?  Hm...  or perhaps
> not.

It's do-able, but if Drew's contributions are going to be accepted, that
should take priority, and then if the addition is still necessary, it's
just a matter of iterating over the bookmark list at the point of
finding (re-loading) the file and applying overlays to all the bookmarks
in the file.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 08:14:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Boruch Baum <boruch_baum <at> gmx.com>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 05 May 2021 10:13:13 +0200
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> If you 'C-x r m' more than once in the same file, the first overlay
> remains even after deleting the bookmark.  Shouldn't the first overlay
> be deleted when its bookmark position is overwritten?

You mean when giving the bookmark the same name?  (You can have several
bookmarks in the same file with different names.)

Yes, that would make sense.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 08:16:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 05 May 2021 10:15:40 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> It's do-able, but if Drew's contributions are going to be accepted, that
> should take priority, 

If Drew submits patches, they'll be evaluated like any other patches,
but experience shows that that's unlikely to happen.  So it's best to
just ignore his comments about how foo+.el already does whatever it is
we're adding to Emacs -- he makes these comments about basically
everything, but virtually never submits anything.

> and then if the addition is still necessary, it's just a matter of
> iterating over the bookmark list at the point of finding (re-loading)
> the file and applying overlays to all the bookmarks in the file.

Sounds good.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 10:49:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 5 May 2021 06:48:16 -0400
On 2021-05-05 10:15, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > It's do-able, but if Drew's contributions are going to be accepted, that
> > should take priority,
>
> If Drew submits patches, they'll be evaluated like any other patches,

My reading of his email was that he was submitting an entire package.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 12:27:01 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Boruch Baum <boruch_baum <at> gmx.com>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 05 May 2021 13:26:18 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> If you 'C-x r m' more than once in the same file, the first overlay
>> remains even after deleting the bookmark.  Shouldn't the first overlay
>> be deleted when its bookmark position is overwritten?
>
> You mean when giving the bookmark the same name?

Yes, sorry, I meant multiple 'C-x r m RET' in the same buffer.

> (You can have several bookmarks in the same file with different
> names.)
>
> Yes, that would make sense.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 15:40:02 GMT) Full text and rfc822 format available.

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

From: Bastien <bzg <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Boruch Baum <boruch_baum <at> gmx.com>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 05 May 2021 17:39:43 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
>> It's not *my* emacs. I only have access to debian emacs locally; the
>> data I gave you was from the URL I had for the on-line cgit repository
>> for emacs, at gnu.org. Here's a second patch, based upon hopefully the
>> most current URL, and with the additional jump code.
>
> Thanks; applied to Emacs 28 without any problems.

Just a quick warning: Org contains two features called "capture" and
"refile".  "Capturing" adds notes or tasks to an Org buffer from other
Emacs buffers.  "Refiling" moves a Org headline under another one,
either in the current Org buffer or in another (declared) Org file.

With this change, the Org refiled/captured headlines get fontified and
it might surprise many users until they find out that fontification is
related to this bookmark feature.

There is also dired and, of course, normal bookmarked files: I guess
some users may be really confused--at least those who don't know to
M-x customize-face RET at point to guess what this is all about.

What do you think?  Shall we turn bookmark-fontify off by default?

I for one do like the feature and customized bookmark-face to suit
my needs, but I wonder about others.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 16:31:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 5 May 2021 12:30:38 -0400
On 2021-05-05 13:26, Basil L. Contovounesios wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> > "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> >
> >> If you 'C-x r m' more than once in the same file, the first overlay
> >> remains even after deleting the bookmark.  Shouldn't the first overlay
> >> be deleted when its bookmark position is overwritten?
> >
> > You mean when giving the bookmark the same name?
>
> Yes, sorry, I meant multiple 'C-x r m RET' in the same buffer.
>
> > (You can have several bookmarks in the same file with different
> > names.)
> >
> > Yes, that would make sense.
>
> Thanks,

Basil, I went to start doing more work on this and see you made a commit
in the interim so let me coordinate before we end up cross-commiting
(For me, this is especially important since I'm working with debian v27.1
locally and applying patches to v28 which you seem to using locally).

1) For function bookmark--unfontify

   If more than one buffer in the list can be acted upon, then variable
   'found' @line ~472 should be set nil at this point. If only one
   buffer in the list can be acted upon, then @line ~469 should either
   check variable 'found' or @line ~476 should set the list nil, both
   easier using the prior pop idiom than the dolist idiom.

2) For function bookmark-delete-all

   This seems to be a new function in v28, that I don't have locally. I
   see it when performing a diff. Because it takes a (reasonable and
   efficient) 'short-cut' method, it won't delete any fontified
   overlays, so it needs a variation of function bookmark--unfontify:

   (defun bookmark--unfontify-all ()
     "Remove all bookmarks' colorized overlays.
   This function is meant to be called by function
   `bookmark-delete-all'."
     (dolist (buf (buffer-list))
       (with-current-buffer buf
         (save-restriction
           (widen)
           (remove-overlays (point-min) (point-max) 'category 'bookmark)))))

3) For function bookmark-set-internal

   Additional logic is required in order to account for argument
   variable  'overwrite-or-push'. If I'm understanding those features
   correctly, @lines ~875-878 should be amended to something like:

            ((eq overwrite-or-push 'overwrite)
             (when (setq prior-bm (bookmark-get-bookmark str t))
               (bookmark--unfontify prior-bm))
             (bookmark-store str (cdr record) nil))
            ((eq overwrite-or-push 'push)
             (when (setq prior-bm (bookmark-get-bookmark str t))
               (bookmark--unfontify prior-bm))
             (bookmark-store str (cdr record) t))

   For the above snippet, variable 'prior-bm' should be defined locally
   scoped @line ~861

4) I was expecting to find some sort of bookmark hook function in
   variable 'find-file-hooks'. The idea would be thatd when a file is
   read it's stored bookmarks are immediately fontified.

   (defun bookmark--find-file-hook-function ()
     "Fontify all bookmarks in newly found file."
     (let (pos overlay)
       (dolist (bm  (mapcar 'cdr bookmark-alist))
         (when (and (equal buffer-file-name
                           (expand-file-name (or (cdr (assq 'filename bm)) "")))
                    (setq pos (cdr (assq 'position bm))))
           (save-excursion
             (goto-char pos)
             (setq overlay (make-overlay (point-at-bol)
                                         (min (point-max) (1+ (point-at-eol)))))
             (overlay-put overlay 'category 'bookmark)
             (overlay-put overlay 'face 'bookmark-face))))))

That should go some way to account for your catch and some other
scenarios. There may be others that crop up.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 16:45:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Boruch Baum <boruch_baum <at> gmx.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Wed, 5 May 2021 16:43:59 +0000
> > > It's do-able, but if Drew's contributions are going
> > > to be accepted, that should take priority,
> >
> > If Drew submits patches, they'll be evaluated like
> > any other patches,
> 
> My reading of his email was that he was submitting
> an entire package.

To be clear -

1. I've submitted plenty of patches in the past.
   They've usually been ignored.  I don't plan on
   submitting a patch along the lines of what you
   (Boruch) have done for this.

2. File `bookmark+-lit.el' provides the highlighting
   we're talking about wrt Bookmark+.  It depends on
   code in the other Bookmark+ files.  (But they
   don't depend on it, so if you don't want such
   highlighting then you need not load it.

   Someone other than I could either use code from
   `bookmark+-lit.el' to patch Emacs or use its
   features or implementation as inspiration or as
   food for thought.

3. If Emacs maintainers decide to replace
   `bookmark.el' with Bookmark+ then I'll be glad to
   (a) incorporate any `bookmark.el` code that's
   currently used by Bookmark+ into Bookmark+, and
   (b) clean up the Bookmark + code so it doesn't
   bother to be compatible with older Emacs versions
   and it doesn't try to accommodate 3rd-party
   libraries when they might be available.

   The resulting library would be renamed `bookmark',
   (same name we use now, for `bookmark.el') but it
   would comprise multiple files.  File `bookmark+.el'
   would be renamed `bookmark.el', replacing that
   existing file.

   The existing doc is plain-text (in file
   `bookmark+-doc.el').  It would need to be rewritten
   to some extent.  I could help with that.  And I'd
   make myself available to help with questions etc.

#3 would take a while.  But I doubt that maintainers
would agree to it anyway.  They have not, in the past
(though Stefan M. did say at one point that it would
be good for that to happen).

Hope things are clear now.  I'm open to Bookmark+
_replacing_ `bookmark.el', and in that case I'd do
the cleanup work needed for that.  (Someone else
would do the GIT fiddling, committing etc.)  And I'm
open to anyone grabbing and repurposing code from
Bookmark+ piecemeal for vanilla Emacs.  I won't be
doing that, however.

As for the replacement possibility, I'd need some
reassurance that it would actually happen, before
I'd bother to work to make it available.

I'm not going to waste time again working on stuff
that has no chance of inclusion.  Sorry.  Been there.
Contributing - yes, I'm open to that.

If that's not acceptable then, as I say, the code is
there; it's GPL; and I offer it.  You're free to
take any of it you like for Emacs, and I'll even help
you understand, if there are questions.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 17:10:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 5 May 2021 13:08:53 -0400
On 2021-05-05 13:26, Basil L. Contovounesios wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>...

Important follow-up:

5) Throughout my prior patches, I had been using variable
   'buffer-file-name' to compare against the value for the 'filename'
   key in bookmarks' alists. That is wrong, in the sense that it's only
   correct for buffers visiting files. The correct comparator seems to
   be the output of function (bookmark-buffer-file-name), see there,
   which will cover all cases of all buffers. With that change, it's
   probably wrong to perform 'expand-file-name' when performing any
   comparison.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 17:26:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Bastien <bzg <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 5 May 2021 13:25:08 -0400
On 2021-05-05 17:39, Bastien wrote:
> With this change, the Org refiled/captured headlines get fontified and
> it might surprise many users until they find out that fontification is
> related to this bookmark feature.

What are the steps to reproduce this? I don't use those org features, so
I would be starting at square one.

> There is also dired and, of course, normal bookmarked files: I guess
> some users may be really confused--at least those who don't know to
> M-x customize-face RET at point to guess what this is all about.

I don't understand the confusion scenario. The scenario I imagine is:

  a) User navigates POINT to location of desired bookmark

  b) User creates bookmark

  c) User gets immediate (and prominent) visual feedback

  d) User recalls dictum "Correlation is not causality", coughs
     deeply, and lights up another cigarette.

> What do you think?  Shall we turn bookmark-fontify off by default?

I understand the current emacs policy is not to surprise anyone with new
behavior, so I expect Eli Zaretskii would insist it be off by default.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Wed, 05 May 2021 18:55:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: bzg <at> gnu.org, larsi <at> gnus.org, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Wed, 05 May 2021 21:54:16 +0300
> Date: Wed, 5 May 2021 13:25:08 -0400
> From: Boruch Baum <boruch_baum <at> gmx.com>
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
> 
> > What do you think?  Shall we turn bookmark-fontify off by default?
> 
> I understand the current emacs policy is not to surprise anyone with new
> behavior, so I expect Eli Zaretskii would insist it be off by default.

As long as people are aware of the policy, I don't even need to
insist.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:50:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Bastien <bzg <at> gnu.org>
Cc: , Lars Ingebrigtsen <larsi <at> gnus.org>, Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 09:49:13 +0100
>>>>> Bastien  <bzg <at> gnu.org> writes:

    > Lars Ingebrigtsen <larsi <at> gnus.org> writes:
    >> Boruch Baum <boruch_baum <at> gmx.com> writes:
    >> 
    >>> It's not *my* emacs. I only have access to debian emacs locally;
    >>> the data I gave you was from the URL I had for the on-line cgit
    >>> repository for emacs, at gnu.org. Here's a second patch, based
    >>> upon hopefully the most current URL, and with the additional
    >>> jump code.
    >> 
    >> Thanks; applied to Emacs 28 without any problems.

    > Just a quick warning: Org contains two features called "capture"
    > and "refile".  "Capturing" adds notes or tasks to an Org buffer
    > from other Emacs buffers.  "Refiling" moves a Org headline under
    > another one, either in the current Org buffer or in another
    > (declared) Org file.

    > With this change, the Org refiled/captured headlines get fontified
    > and it might surprise many users until they find out that
    > fontification is related to this bookmark feature.

    > There is also dired and, of course, normal bookmarked files: I
    > guess some users may be really confused--at least those who don't
    > know to M-x customize-face RET at point to guess what this is all
    > about.

    > What do you think?  Shall we turn bookmark-fontify off by default?

    > I for one do like the feature and customized bookmark-face to suit
    > my needs, but I wonder about others.

I have turned bookmark-fontify off because I found it too confusing with
a feature of bm-bookmark <https://github.com/joodland/bm>, which I
use. I believe bm-bookmark is popular.

Best wishes,

Colin.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:54:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:53:06 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> My reading of his email was that he was submitting an entire package.

But Emacs is not going to replace foo.el with foo+.el, so it's not a
productive contribution to the discussion.  (We've been over this many
times before in many circumstances.)

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:56:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Bastien <bzg <at> gnu.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:54:53 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> I understand the current emacs policy is not to surprise anyone with new
> behavior, so I expect Eli Zaretskii would insist it be off by default.

There is no such policy.  We add new functionality to Emacs all the
time, and this new functionality changes behaviour, of course.

We only default behaviour to "off" if we think it's going to be
disruptive, and this bookmarking functionality is not disruptive.  (Or
at least it's not meant to be.)

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:57:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Colin Baxter <m43cap <at> yandex.com>
Cc: Bastien <bzg <at> gnu.org>, Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:55:57 +0200
Colin Baxter <m43cap <at> yandex.com> writes:

> I have turned bookmark-fontify off because I found it too confusing with
> a feature of bm-bookmark <https://github.com/joodland/bm>, which I
> use. I believe bm-bookmark is popular.

Can you describe the confusion in the interaction between this package
and the new fontification? 

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:58:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:57:32 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> Basil, I went to start doing more work on this and see you made a commit
> in the interim so let me coordinate before we end up cross-commiting
> (For me, this is especially important since I'm working with debian v27.1
> locally and applying patches to v28 which you seem to using locally).

Would it be possible for you to pull down a the git tree and work from
that?  That would be less work for everybody involved (including
yourself), I'd have thought?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 08:59:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:58:16 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> 5) Throughout my prior patches, I had been using variable
>    'buffer-file-name' to compare against the value for the 'filename'
>    key in bookmarks' alists. That is wrong, in the sense that it's only
>    correct for buffers visiting files. The correct comparator seems to
>    be the output of function (bookmark-buffer-file-name), see there,
>    which will cover all cases of all buffers. With that change, it's
>    probably wrong to perform 'expand-file-name' when performing any
>    comparison.

Right.  Can you submit a patch to fix that?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 09:43:02 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Bastien <bzg <at> gnu.org>, , Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 10:41:53 +0100
>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:

    > Colin Baxter <m43cap <at> yandex.com> writes:
    >> I have turned bookmark-fontify off because I found it too
    >> confusing with a feature of bm-bookmark
    >> <https://github.com/joodland/bm>, which I use. I believe
    >> bm-bookmark is popular.

    > Can you describe the confusion in the interaction between this
    > package and the new fontification?

As I understand it, both "bm-bookmark" and the bookmark-fontify feature
of the built-in "bookmark" use a colored bar in the bookmarked file to
indicate that the file has been bookmarked. Whereas bookmark-fontify
places the bar on the first line of the bookmarked file, bm-bookmark can
place it at any user-selected position. I use both bm-bookmark and the
built-in bookmark for different purposes and I prefer the colorising to
be restricted to the former.

Perhaps I should add in fairness that bm-bookmark does allow other means
of indicating the presence of a bookmark, but the colored bar is the
default.

Best wishes,

Colin.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 09:58:02 GMT) Full text and rfc822 format available.

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

From: Bastien <bzg <at> gnu.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 11:57:08 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> What are the steps to reproduce this? I don't use those org features, so
> I would be starting at square one.

1. C-x C-f test.org RET
2. C-c [ (to include test.org in the agenda files)
3. Add this contents to the buffer:

   * A headline to refile

   * A headline where to refile it

4. Put the point at the beginning of "A headline to refile"
5. C-c C-w (or M-x org-refile RET)
6. Select "* A headline where to refile it"

Now the refiled headline is fontified with bookmark-face because Org
adds a bookmark to help you go back to the refile location.

>> There is also dired and, of course, normal bookmarked files: I guess
>> some users may be really confused--at least those who don't know to
>> M-x customize-face RET at point to guess what this is all about.
>
> I don't understand the confusion scenario. The scenario I imagine is:
>
>   a) User navigates POINT to location of desired bookmark

I would say that the confusion arises because

1. The user does not do anything regarding bookmarking

2. The buffer get fontified but he does not know why

3. The user cannot guess why it has been fontified because he does not
   know to M-x customize-face RET

> I understand the current emacs policy is not to surprise anyone with new
> behavior, so I expect Eli Zaretskii would insist it be off by default.

I don't insist on anything.

I'm open to turning org-capture-bookmark to nil by default in Org to
solve the issue for Org.

But again, this is not just Org.  I think many people have bookmarks
they don't even remember, e.g. in dired buffers.  If they see such a
fontified file in dired, they will just wonder what happened.

My suggestion would be to interactively ask the user to customize
bookmarks-fontify on the first C-x r m hit, so that he knows what's
in there for him.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:13:02 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Bastien <bzg <at> gnu.org>
Cc: , Lars Ingebrigtsen <larsi <at> gnus.org>, Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 11:12:17 +0100
>>>>> Bastien  <bzg <at> gnu.org> writes:

    > Boruch Baum <boruch_baum <at> gmx.com> writes:
    >> What are the steps to reproduce this? I don't use those org
    >> features, so I would be starting at square one.

    > 1. C-x C-f test.org RET 2. C-c [ (to include test.org in the
    > agenda files) 3. Add this contents to the buffer:

    >    * A headline to refile

    >    * A headline where to refile it

    > 4. Put the point at the beginning of "A headline to refile" 5. C-c
    > C-w (or M-x org-refile RET) 6. Select "* A headline where to
    > refile it"

    > Now the refiled headline is fontified with bookmark-face because
    > Org adds a bookmark to help you go back to the refile location.

    >>> There is also dired and, of course, normal bookmarked files: I
    >>> guess some users may be really confused--at least those who
    >>> don't know to M-x customize-face RET at point to guess what this
    >>> is all about.
    >> 
    >> I don't understand the confusion scenario. The scenario I imagine
    >> is:
    >> 
    >> a) User navigates POINT to location of desired bookmark

    > I would say that the confusion arises because

    > 1. The user does not do anything regarding bookmarking

    > 2. The buffer get fontified but he does not know why

    > 3. The user cannot guess why it has been fontified because he does
    > not know to M-x customize-face RET

    >> I understand the current emacs policy is not to surprise anyone
    >> with new behavior, so I expect Eli Zaretskii would insist it be
    >> off by default.

    > I don't insist on anything.

    > I'm open to turning org-capture-bookmark to nil by default in Org
    > to solve the issue for Org.

    > But again, this is not just Org.  I think many people have
    > bookmarks they don't even remember, e.g. in dired buffers.  If
    > they see such a fontified file in dired, they will just wonder
    > what happened.

    > My suggestion would be to interactively ask the user to customize
    > bookmarks-fontify on the first C-x r m hit, so that he knows
    > what's in there for him.

Good idea +1.

Colin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:25:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Bastien <bzg <at> gnu.org>, Colin Baxter <m43cap <at> yandex.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 06:24:16 -0400
On 2021-05-06 10:55, Lars Ingebrigtsen wrote:
> Colin Baxter <m43cap <at> yandex.com> writes:
>
> > I have turned bookmark-fontify off because I found it too confusing with
> > a feature of bm-bookmark <https://github.com/joodland/bm>, which I
> > use. I believe bm-bookmark is popular.
>
> Can you describe the confusion in the interaction between this package
> and the new fontification?

I also use package bm.el. For me, it acts as a replacement of pacakge
bookmark.el (once modified with two features that I've submitted as PRs
to their upstream[1]. I can't speak for Robert, but I find the two
packages totally overlap and so confusing to have in parallel that I
unload one feature whenever I need to use the other libray.

[1] https://github.com/Boruch-Baum/emacs-bm

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:32:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 06:31:43 -0400
On 2021-05-06 10:57, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > Basil, I went to start doing more work on this and see you made a commit
> > in the interim so let me coordinate before we end up cross-commiting
> > (For me, this is especially important since I'm working with debian v27.1
> > locally and applying patches to v28 which you seem to using locally).
>
> Would it be possible for you to pull down a the git tree and work from
> that?

No. This has been something that I've discussed elsewhere on the Emacs forum.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:39:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 06:38:35 -0400
On 2021-05-06 10:58, Lars Ingebrigtsen wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > 5) Throughout my prior patches, I had been using variable
> >    'buffer-file-name' to compare against the value for the 'filename'
> >    key in bookmarks' alists. That is wrong, in the sense that it's only
> >    correct for buffers visiting files. The correct comparator seems to
> >    be the output of function (bookmark-buffer-file-name), see there,
> >    which will cover all cases of all buffers. With that change, it's
> >    probably wrong to perform 'expand-file-name' when performing any
> >    comparison.
>
> Right.  Can you submit a patch to fix that?

Basil has taken the lead on this, and I'm waiting on a response from him
with his integration patch before continuing. Once that happens, I'll
suggest to him that patch and one or two other ideas (eg. a setting change
should be respected immediately across all buffers, so it should be
controlled by a toggle or -mode command; popping a bookmark should
fontify the pop).

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:48:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Bastien <bzg <at> gnu.org>, , Lars Ingebrigtsen <larsi <at> gnus.org>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 11:46:57 +0100
>>>>> Boruch Baum <boruch_baum <at> gmx.com> writes:

    > On 2021-05-06 10:55, Lars Ingebrigtsen wrote:
    >> Colin Baxter <m43cap <at> yandex.com> writes:
    >> 
    >> > I have turned bookmark-fontify off because I found it too
    >> confusing with > a feature of bm-bookmark
    >> <https://github.com/joodland/bm>, which I > use. I believe
    >> bm-bookmark is popular.
    >> 
    >> Can you describe the confusion in the interaction between this
    >> package and the new fontification?

    > I also use package bm.el. For me, it acts as a replacement of
    > pacakge bookmark.el (once modified with two features that I've
    > submitted as PRs to their upstream[1]. I can't speak for Robert,
    > but I find the two packages totally overlap and so confusing to

I can't agree they overlap - bm-bookmark allows multiply bookmarks in
one file. I don't believe that that can be done via the built-in
bookmark.

Best wishes,

Colin.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 10:53:02 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 11:52:00 +0100
Set too hastily. I should have asked does the built-in bookmark allow
multiply bookmarks in a single file to the same degree as bm-bookmark?

Colin.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 11:01:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Bastien <bzg <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 06:59:58 -0400
On 2021-05-06 11:57, Bastien wrote:
> Boruch Baum <boruch_baum <at> gmx.com> writes:
>
> > What are the steps to reproduce this? I don't use those org features, so
> > I would be starting at square one.
>
> ...

Thanks, Bastien. I'll try it.

> Now the refiled headline is fontified with bookmark-face because Org
> adds a bookmark to help you go back to the refile location.

Is that behavior hidden from the user? What I mean is, does the user
know that what org-mode is doing is creating bookmarks? If yes, then the
user already associates the re-file process with creation of a bookmark.

> ....

> 3. The user cannot guess why it has been fontified because he does not
>    know to M-x customize-face RET

You write further down that "many people have bookmarks they don't even
remember". Is this a case of that? I agree with you that would be a
point of confusion. It speaks to a deficiency in my proposal in that it
doesn't include a clearly-identifiable bookmark icon on the fontified
line. The presence of the icon wouldn't help the user remember how or
when the line became bookmarked, but would clearly identify the line as
a bookmark (and if the user is surprised, it's probably called for to
delete the bookmark anyway).

Having a clearly identifiable icon would also mitigate any confusion in
the case of org-refile.

> But again, this is not just Org.  I think many people have bookmarks
> they don't even remember, e.g. in dired buffers.  If they see such a
> fontified file in dired, they will just wonder what happened.

Been there, done that. At some point, years ago, I changed my personal
policy, deleted all my bookmarks, and have since only used them for very
limited purposes. For me, it was the  accumulation of bookmarks that led
to confusion.

> My suggestion would be to interactively ask the user to customize
> bookmarks-fontify on the first C-x r m hit, so that he knows what's
> in there for him.

That would be a cool and very helpful idea for all new emacs features!


--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 11:04:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 07:03:07 -0400
On 2021-05-06 10:58, Lars Ingebrigtsen wrote:
> Right.  Can you submit a patch to fix that?

Also in the wings is a version of a feature that I've submitted to
package bm.el[1][2] to offer context-sensitive default suggestions for
bookmark identifiers when creating a bookmark[2].

[1] https://github.com/Boruch-Baum/emacs-bm
[2] https://github.com/joodland/bm/pull/38

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 18:53:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 19:52:07 +0100
Boruch Baum <boruch_baum <at> gmx.com> writes:

> On 2021-05-05 13:26, Basil L. Contovounesios wrote:
>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> > "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>> >
>> >> If you 'C-x r m' more than once in the same file, the first overlay
>> >> remains even after deleting the bookmark.  Shouldn't the first overlay
>> >> be deleted when its bookmark position is overwritten?
>> >
>> > You mean when giving the bookmark the same name?
>>
>> Yes, sorry, I meant multiple 'C-x r m RET' in the same buffer.
>>
>> > (You can have several bookmarks in the same file with different
>> > names.)
>> >
>> > Yes, that would make sense.
>
> Basil, I went to start doing more work on this and see you made a commit
> in the interim so let me coordinate before we end up cross-commiting

I wouldn't worry, since I only set out to fix a couple of typos - I
don't intend to work on bookmark.el any time soon.

> That should go some way to account for your catch and some other
> scenarios. There may be others that crop up.

Thanks, any chance of a patch? ;)

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 18:53:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 19:52:32 +0100
Boruch Baum <boruch_baum <at> gmx.com> writes:

> On 2021-05-06 10:57, Lars Ingebrigtsen wrote:
>> Boruch Baum <boruch_baum <at> gmx.com> writes:
>>
>> > Basil, I went to start doing more work on this and see you made a commit
>> > in the interim so let me coordinate before we end up cross-commiting
>> > (For me, this is especially important since I'm working with debian v27.1
>> > locally and applying patches to v28 which you seem to using locally).
>>
>> Would it be possible for you to pull down a the git tree and work from
>> that?
>
> No. This has been something that I've discussed elsewhere on the Emacs forum.

FWIW, even if you can't clone/build all of Emacs 28 locally, you can
still load/evaluate (most of) its version of bookmark.el without too
much trouble, if that helps you when modifying it.

Either way it's still possible to produce a clean patch against v28.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 18:54:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 19:53:18 +0100
Boruch Baum <boruch_baum <at> gmx.com> writes:

> On 2021-05-06 10:58, Lars Ingebrigtsen wrote:
>> Boruch Baum <boruch_baum <at> gmx.com> writes:
>>
>> > 5) Throughout my prior patches, I had been using variable
>> >    'buffer-file-name' to compare against the value for the 'filename'
>> >    key in bookmarks' alists. That is wrong, in the sense that it's only
>> >    correct for buffers visiting files. The correct comparator seems to
>> >    be the output of function (bookmark-buffer-file-name), see there,
>> >    which will cover all cases of all buffers. With that change, it's
>> >    probably wrong to perform 'expand-file-name' when performing any
>> >    comparison.
>>
>> Right.  Can you submit a patch to fix that?
>
> Basil has taken the lead on this,

He's not taken the lead on this, he's just a very naughty boy.

> and I'm waiting on a response from him
> with his integration patch before continuing.

??? :)

> Once that happens, I'll suggest to him that patch and one or two other
> ideas (eg. a setting change should be respected immediately across all
> buffers, so it should be controlled by a toggle or -mode command;
> popping a bookmark should fontify the pop).

I suggest that you suggest all of that to this list instead ;).

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 19:14:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 6 May 2021 15:13:05 -0400
On 2021-05-06 19:52, Basil L. Contovounesios wrote:
> I wouldn't worry, since I only set out to fix a couple of typos - I
> don't intend to work on bookmark.el any time soon.

Not what you did.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Thu, 06 May 2021 19:42:01 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Thu, 06 May 2021 20:41:36 +0100
Boruch Baum <boruch_baum <at> gmx.com> writes:

> On 2021-05-06 19:52, Basil L. Contovounesios wrote:
>> I wouldn't worry, since I only set out to fix a couple of typos - I
>> don't intend to work on bookmark.el any time soon.
>
> Not what you did.

No, that's exactly what I did: I set out to fix a couple of typos.

Once I'd set out to do that, I noticed that the new bookmark-face was
using an old-fashioned face spec syntax and two docstrings referenced
'defcustom' without quoting it where the English phrase "user option" is
more commonly used.

While there, I noticed that bookmark--fontify could use 1+ and
bookmark--unfontify could use dolist, to make it clearer to the next
reader what that loop is doing, and when it will terminate.

Just like the log message promises:

; Fix and simplify last change in bookmark.el.
7d0067f297 2021-05-04 10:54:24 +0100
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=7d0067f297b131c98a5198eb52d49891a83ac5aa

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Fri, 07 May 2021 11:23:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Colin Baxter <m43cap <at> yandex.com>
Cc: Bastien <bzg <at> gnu.org>, Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Fri, 07 May 2021 13:22:46 +0200
Colin Baxter <m43cap <at> yandex.com> writes:

> I can't agree they overlap - bm-bookmark allows multiply bookmarks in
> one file. I don't believe that that can be done via the built-in
> bookmark.

I may be misunderstanding something, but setting multiple bookmarks in
the same file works without problems with the built-in bookmark.el, as
far as I can tell?  (You just have to give the bookmarks different
names.)

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Fri, 07 May 2021 13:53:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Bastien <bzg <at> gnu.org>, , Boruch Baum <boruch_baum <at> gmx.com>,
 48179 <at> debbugs.gnu.org
Subject: Re: bug#48179: bookmark-fontify [PATCH]
Date: Fri, 07 May 2021 14:52:49 +0100
>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:

    > Colin Baxter <m43cap <at> yandex.com> writes:
    >> I can't agree they overlap - bm-bookmark allows multiply
    >> bookmarks in one file. I don't believe that that can be done via
    >> the built-in bookmark.

    > I may be misunderstanding something, but setting multiple
    > bookmarks in the same file works without problems with the
    > built-in bookmark.el, as far as I can tell?  (You just have to
    > give the bookmarks different names.)

That's true, but, as you wrote, the user has to come up new names. This
is done automatically in bm-bookmarks, which inserts the corresponding
line as the name. The disadvantage is that bm-bookmarks can't easily
bookmark blank lines.

It seems to me that all the bookmarks, bm, built-in (including
emacs-28), bookmark+, have disadvantages. Personally, I would use
bookmark+ if were not for the fact that it writes unprompted to ~/.emacs.

Best wishes,

Colin Baxter.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Fri, 07 May 2021 16:23:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Colin Baxter <m43cap <at> yandex.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Bastien <bzg <at> gnu.org>, Boruch Baum <boruch_baum <at> gmx.com>,
 "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Fri, 7 May 2021 16:22:09 +0000
>> setting multiple bookmarks in the same file works
>> without problems with the built-in bookmark.el,
>> as far as I can tell?  (You just have to give the
>> bookmarks different names.)

First, a correction of that, assuming I understand
what it wants to say.  You can have any number of
bookmarks in the same file, and even with the same
location in the file.  And they need _NOT_ have
different names.

[This is true for both vanilla bookmark.el and
 Bookmark+.  But in vanilla all but the first
 bookmark with the same name are unused/unavailable.
 With Bookmark+ you can use all bookmarks that have
 the same name.

 For instance, you can have two bookmarks named
 `foo.el', each named for a file named `foo.el',
 where those files are in different directories.
 That's the case for autofile bookmarks, for
 example.]

> That's true, but, as you wrote, the user has
> to come up new names.

See above - the names need NOT be different.

Secondly, if your point is about a user always
needing to come up with names whenever s?he
_wants_ different names (underlining "wants",
because that's not an Emacs requirement):

Sometimes you _want_ to name a bookmark.
Sometimes you might prefer not to have to do that,
and instead just hit a key to set a bookmark -
no prompting for a name, no need to even hit `RET'
to accept a default name at a prompt.

With Bookmark+, by default `C-x x RET' does that.
No prompting - autonaming.

(Bookmarking keys are on a keymap that's bound,
by default, to `C-x x'.  You can instead of course
put that command on a shorter key.)

That's `bmkp-toggle-autonamed-bookmark-set/delete':

  If there is an autonamed bookmark at point, delete
   it, else create one.

  The bookmark created has no region.  Its name is
  formatted according to option
  `bmkp-autoname-bookmark-function'.

  With a prefix arg, delete *ALL* autonamed bookmarks
  for this buffer.

  Non-interactively, act at POSITION, not point.
  If nil, act at point.

So one key to either create or delete an autonamed
bookmark at point.  And a prefix arg deletes all.

> This is done automatically in bm-bookmarks, which
> inserts the corresponding line as the name.

Bookmark+ lets users customize the autonaming, using
option `bmkp-autoname-bookmark-function':

  Function to automatically name a bookmark at point
   (cursor position).

  It should accept a buffer position as its (first)
   argument.
  The name returned should match the application of
  `bmkp-autoname-format' to the buffer name.

The default value of the option does this:

  Return a bookmark name using POSITION and the current
   buffer name.

  The name is composed as follows:
   POSITION followed by a space and then the buffer name.
   The position value is prefixed with zeros to comprise
     9 characters.
   For example, for POSITION value 31416 and current buffer
     `my-buffer', the name returned would be
     `000031416 my-buffer'.

It's trivial to define a function that returns any
kind of name you want, including using the text of
the current line as the name.

The name of an autonamed bookmark matches option
`bmkp-autoname-format', which is a format string.
By default, the format string accepts a buffer name.
The default value is "^[0-9]\\{9\\} %B".  So a
default bookmark name is the position followed by
the buffer name.

> The disadvantage is that bm-bookmarks can't 
> easily bookmark blank lines.

That's a problem only for BM's particular way of
naming.  The default Bookmark+ naming doesn't have
that problem, for example.

What's important is that users themselves can
easily define the automatic naming they want.  And
that they can create bookmarks both by autonaming
and by providing names explicitly.

> It seems to me that all the bookmarks, bm, built-in (including
> emacs-28), bookmark+, have disadvantages. Personally, I would use
> bookmark+ if were not for the fact that it writes unprompted to ~/.emacs.

I don't know what you mean by that.  Could you
elaborate?

1. It never writes to ~/.emacs, unless you've defined
   that as the bookmark file you want to write to.

2. It never writes to your bookmark file unprompted
   unless you've configured it to do so.  You do that
   in the same way as for vanilla bookmark.el: option
   `bookmark-save-flag'.  Set that option to `nil'
   and bookmarks will never be saved except when you
   explicitly ask to save, e.g. when using command
   `bookmark-save'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Fri, 07 May 2021 18:49:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Bastien <bzg <at> gnu.org>, , Lars Ingebrigtsen <larsi <at> gnus.org>,
 Boruch Baum <boruch_baum <at> gmx.com>,
 "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: Re: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Fri, 07 May 2021 19:48:29 +0100
>>>>> Drew Adams <drew.adams <at> oracle.com> writes:
    >> It seems to me that all the bookmarks, bm, built-in (including
    >> emacs-28), bookmark+, have disadvantages. Personally, I would use
    >> bookmark+ if were not for the fact that it writes unprompted to
    >> ~/.emacs.

    > I don't know what you mean by that.  Could you elaborate?

    > 1. It never writes to ~/.emacs, unless you've defined that as the
    > bookmark file you want to write to.

Well I can only say what I saw, and bookmark+ did indeed write to
custom-set-variables. It may be that something in ~/.emacs triggered it,
but I don't intend to pursue the matter further.

Best 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Sat, 08 May 2021 00:26:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Colin Baxter <m43cap <at> yandex.com>
Cc: Bastien <bzg <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Boruch Baum <boruch_baum <at> gmx.com>,
 "48179 <at> debbugs.gnu.org" <48179 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]
Date: Sat, 8 May 2021 00:25:40 +0000
>     >> It seems to me that all the bookmarks, bm, built-in (including
>     >> emacs-28), bookmark+, have disadvantages. Personally, I would use
>     >> bookmark+ if were not for the fact that it writes unprompted to
>     >> ~/.emacs.
> 
>     > I don't know what you mean by that.  Could you elaborate?
> 
>     > 1. It never writes to ~/.emacs, unless you've defined that as the
>     > bookmark file you want to write to.
> 
> Well I can only say what I saw, and bookmark+ did indeed write to
> custom-set-variables. It may be that something in ~/.emacs triggered it,
> but I don't intend to pursue the matter further.

(I mistakenly thought you meant that it writes your
_bookmarks_ to your init file.)

But I think I know what you might be referring to.
And it's a good point.

When your bookmarks are saved, if option
`bmkp-last-as-first-bookmark-file' is non-nil then
its value is updated to the current bookmark file.

Likewise, when you load a bookmark file with
overwriting (i.e. you switch bookmark files), if
that option is non-nil then it's updated to reflect
the new bookmark file.

You can customize that option, but it's also updated
when you save bookmarks or switch bookmark files.

So it's a particular kind of user option.  The doc
string tells you about this unusual behavior (in the
"NOTE" part):

`bmkp-last-as-first-bookmark-file':

  Whether to use the last-used bookmark file as the first used.
  If nil then Emacs always uses the value of `bookmark-default-file'
  as the initial bookmark file, in any given session.

  If non-nil, Emacs uses the last bookmark file you used, in the 
  last Emacs session.  If none was recorded then it uses
  `bookmark-default-file'.  The particular non-nil value must be an
  absolute file name (possibly containing `~') - it is not expanded).

  NOTE: A non-nil option value is overwritten by Bookmark+, so that
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  it becomes the last-used bookmark file.  A nil value is never
  overwritten.

  You can customize this variable.

This is a feature (i.e., by design), not a bug.
But if you customize it to nil then Bookmark+
should never update your init file with its new
value.
___

[It's really unrelated, but I recommend using a
separate `custom-file', and thus not letting
Customize (or code like what I just mentioned)
fiddle with your init file.  Code written by
code is better off relegated to a different file
from one you write code in.]





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Jun 2021 11:24:08 GMT) Full text and rfc822 format available.

bug unarchived. Request was from "Y. E." <yugenekr <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 06 Jun 2021 01:36:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Sun, 06 Jun 2021 01:37:01 GMT) Full text and rfc822 format available.

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

From: "Y. E." <yugenekr <at> gmail.com>
To: 48179 <at> debbugs.gnu.org
Subject: bug#48179 bookmark-fontify disable by default
Date: Sun, 6 Jun 2021 03:27:15 +0300
I _love_ the _idea_  behind the bookmark-fontify feature.
Unfortunately, for me - not-a-pro-emacs-user - it appeared
to be a source of confusion and frustration.
Because of this, I suggest having it disabled by default,
at least until its usability is improved.
That would also be along the lines:
> ... the current emacs policy is not to surprise anyone with new behavior

The following are the issues I encountered:

1. When typing near the colored line, the color doesn't stay
at the bookmarked line only, but spreads with the newly typed text.

2. It takes additional time and effort to understand why the line(s)
is/are there.
  - According to my experience, bookmarks would appear as side information.
  - Supposedly, a mark on a fringe could potentially be a better choice.

3. A mark on a fringe would also allow fixing the issue
of having a too bright default color
(orange with misterioso-theme in my case grabs all the attention).


Suggestions:

1. Disable bookmark-fontify by default
2. Probably not that easy to change, but maybe use fringe beside the
line instead.
3. Maybe, as Bastien suggested:
> ask the user to customize
> bookmarks-fontify on the first C-x r m hit, so that he knows what's
> in there for him.
4. Maybe to change default colors to something less bright.


Thanks




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48179; Package emacs. (Sun, 06 Jun 2021 03:32:01 GMT) Full text and rfc822 format available.

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

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#48179: bookmark-fontify disable by default
Date: Sun, 06 Jun 2021 09:00:54 +0530
> 2. Probably not that easy to change, but maybe use fringe beside the
> line instead.

Yes. I like this idea. For a glimpse may have a look at ‘cider’ package
for Clojure. All the compiled forms have marks in the fringe.

And if it is less intrusive, then we can keep it default-on.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 11:24:11 GMT) Full text and rfc822 format available.

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

Previous Next


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