unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
@ 2021-05-18  6:20 Paul W. Rankin via Emacs development discussions.
  2021-05-18  6:58 ` Karl Fogel
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Paul W. Rankin via Emacs development discussions. @ 2021-05-18  6:20 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Ugh. Not sure how this slipped into master but it is not a 
good/considerate idea to set default value of bookmark-fontify to t.

If there are no reasonable objections I'll push this later today.

-- 
Paul W. Rankin
https://bydasein.com

The single best thing you can do for the world is delete your social 
media accounts.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-bookmark.el-make-bookmark-fontify-nil-by-defaul.patch --]
[-- Type: text/x-diff; name=0001-lisp-bookmark.el-make-bookmark-fontify-nil-by-defaul.patch, Size: 809 bytes --]

From eb34f1201d6518b3cad2b94085461ed16e263cbb Mon Sep 17 00:00:00 2001
From: "Paul W. Rankin" <pwr@bydasein.com>
Date: Tue, 18 May 2021 16:10:51 +1000
Subject: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default

Best not to force annoying things onto people
---
 lisp/bookmark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 64b467adfa..a4951b506f 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -173,7 +173,7 @@ bookmark-search-delay
   "Time before `bookmark-bmenu-search' updates the display."
   :type  'number)
 
-(defcustom bookmark-fontify t
+(defcustom bookmark-fontify nil
   "Whether to colorize a bookmarked line.
 If non-nil, setting a bookmark will colorize the current line with
 `bookmark-face'."
-- 
2.30.2


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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  6:20 [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Paul W. Rankin via Emacs development discussions.
@ 2021-05-18  6:58 ` Karl Fogel
  2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
  2021-05-18 10:49 ` Basil L. Contovounesios
  2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
  2 siblings, 1 reply; 39+ messages in thread
From: Karl Fogel @ 2021-05-18  6:58 UTC (permalink / raw)
  To: Emacs Devel; +Cc: Paul W. Rankin

On 18 May 2021, Paul W. Rankin" via "Emacs development 
discussions. wrote:
>Ugh. Not sure how this slipped into master but it is not a
>good/considerate idea to set default value of bookmark-fontify to 
>t.
>
>If there are no reasonable objections I'll push this later today.

I don't have a strong opinion either way, but if you're curious as 
to where this came from, it was here:

  commit ab6cb65cb2b6d11a7b690dfcea8d98611290fad9
  Author:     Boruch Baum <boruch_baum@gmx.com>
  AuthorDate: Tue May 4 10:58:52 2021 +0200
  Commit:     Lars Ingebrigtsen <larsi@gnus.org>
  CommitDate: Tue May 4 10:58:52 2021 +0200
  
      Fontify lines when setting a bookmark
      
      * lisp/bookmark.el (bookmark-fontify): New user option 
      (bug#48179).
      (bookmark-face): New face.
      (bookmark--fontify, bookmark--unfontify): New functions.
      (bookmark-set-internal, bookmark--jump-via, 
      bookmark-delete): Use
      them.

The discussion in 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48179 is quite long, 
so it might be worth reading before reverting.

Best regards,
-Karl



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  6:58 ` Karl Fogel
@ 2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
  2021-05-18  8:45     ` Eli Zaretskii
  2021-05-18 10:49     ` Basil L. Contovounesios
  0 siblings, 2 replies; 39+ messages in thread
From: Paul W. Rankin via Emacs development discussions. @ 2021-05-18  8:17 UTC (permalink / raw)
  To: Karl Fogel; +Cc: Emacs Devel

On 2021-05-18 16:58, Karl Fogel wrote:
> On 18 May 2021, Paul W. Rankin" via "Emacs development discussions. 
> wrote:
>> Ugh. Not sure how this slipped into master but it is not a
>> good/considerate idea to set default value of bookmark-fontify to t.
>> 
>> If there are no reasonable objections I'll push this later today.
> 
> I don't have a strong opinion either way, but if you're curious as to
> where this came from, it was here:
> 
> The discussion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48179
> is quite long, so it might be worth reading before reverting.

Hi Karl,

The discussion there only seems to account for compatibility with 
package bm.el, not the more general "avoid pushing your idea onto 
everyone" idea. And given the overlay is temporary, it's quite opaque 
for the average person to inspect it to see what's actually happening. 
It's so ugly my first thought was that something had broken rather than 
this was actually an intentional feature.

I'm going to commit this without further discussion -- which hopefully 
should remind others to take the more considerate route when introducing 
new features!



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
@ 2021-05-18  8:45     ` Eli Zaretskii
  2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
                         ` (2 more replies)
  2021-05-18 10:49     ` Basil L. Contovounesios
  1 sibling, 3 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-18  8:45 UTC (permalink / raw)
  To: Paul W. Rankin, Paul W. Rankin via Emacs development discussions.,
	Karl Fogel
  Cc: Emacs Devel

On May 18, 2021 11:17:04 AM GMT+03:00, "Paul W. Rankin via Emacs development discussions." <emacs-devel@gnu.org> wrote:
> On 2021-05-18 16:58, Karl Fogel wrote:
> > On 18 May 2021, Paul W. Rankin" via "Emacs development discussions. 
> > wrote:
> >> Ugh. Not sure how this slipped into master but it is not a
> >> good/considerate idea to set default value of bookmark-fontify to
> t.
> >> 
> >> If there are no reasonable objections I'll push this later today.
> > 
> > I don't have a strong opinion either way, but if you're curious as
> to
> > where this came from, it was here:
> > 
> > The discussion in
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48179
> > is quite long, so it might be worth reading before reverting.
> 
> Hi Karl,
> 
> The discussion there only seems to account for compatibility with 
> package bm.el, not the more general "avoid pushing your idea onto 
> everyone" idea. And given the overlay is temporary, it's quite opaque 
> for the average person to inspect it to see what's actually happening.
> 
> It's so ugly my first thought was that something had broken rather
> than 
> this was actually an intentional feature.
> 
> I'm going to commit this without further discussion -- which hopefully
> 
> should remind others to take the more considerate route when
> introducing 
> new features!

Please don't make this change until you hear from Lars, who examined the original patch and decided to install it.  It doesn't get more "considerate" than that.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  8:45     ` Eli Zaretskii
@ 2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
  2021-05-18 12:09         ` Eli Zaretskii
  2021-05-18 12:04       ` Eli Zaretskii
  2021-05-18 14:28       ` Lars Ingebrigtsen
  2 siblings, 1 reply; 39+ messages in thread
From: Paul W. Rankin via Emacs development discussions. @ 2021-05-18 10:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 2021-05-18 18:45, Eli Zaretskii wrote:
> 
> Please don't make this change until you hear from Lars, who examined
> the original patch and decided to install it.  It doesn't get more
> "considerate" than that.

Already done. Any objection to making this opt-in would just be 
contrarian. To quote your words from the aforelinked discussion -- it 
ought not have been introduced as t:

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

(Re the balance of what is considerate; that seems a bit like if one 
were to insist on not raising another's faux pas because this would in 
itself be a faux pas.)



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  6:20 [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Paul W. Rankin via Emacs development discussions.
  2021-05-18  6:58 ` Karl Fogel
@ 2021-05-18 10:49 ` Basil L. Contovounesios
  2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
  2 siblings, 0 replies; 39+ messages in thread
From: Basil L. Contovounesios @ 2021-05-18 10:49 UTC (permalink / raw)
  To: Paul W. Rankin via Emacs development discussions.; +Cc: Paul W. Rankin

"Paul W. Rankin" via "Emacs development discussions."
<emacs-devel@gnu.org> writes:

> From eb34f1201d6518b3cad2b94085461ed16e263cbb Mon Sep 17 00:00:00 2001
> From: "Paul W. Rankin" <pwr@bydasein.com>
> Date: Tue, 18 May 2021 16:10:51 +1000
> Subject: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default

Please in the future include a link to the relevant bug report or
discussion thread in the log message, for posterity.

TIA,

-- 
Basil



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
  2021-05-18  8:45     ` Eli Zaretskii
@ 2021-05-18 10:49     ` Basil L. Contovounesios
  2021-05-18 11:08       ` Paul W. Rankin via Emacs development discussions.
  2021-05-19 12:00       ` Bastien
  1 sibling, 2 replies; 39+ messages in thread
From: Basil L. Contovounesios @ 2021-05-18 10:49 UTC (permalink / raw)
  To: Paul W. Rankin via Emacs development discussions.
  Cc: Karl Fogel, Paul W. Rankin

"Paul W. Rankin" via "Emacs development discussions."
<emacs-devel@gnu.org> writes:

> On 2021-05-18 16:58, Karl Fogel wrote:
>> On 18 May 2021, Paul W. Rankin" via "Emacs development discussions. wrote:
>>> Ugh. Not sure how this slipped into master but it is not a
>>> good/considerate idea to set default value of bookmark-fontify to t.
>>> If there are no reasonable objections I'll push this later today.
>> I don't have a strong opinion either way, but if you're curious as to
>> where this came from, it was here:
>> The discussion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48179
>> is quite long, so it might be worth reading before reverting.
>
> Hi Karl,
>
> The discussion there only seems to account for compatibility with package bm.el,
> not the more general "avoid pushing your idea onto everyone" idea. And given the

The discussion there also raises concerns about some unintended
consequences of the new feature, such as with Org refile/capture[1] or
when overwriting an existing bookmark[2].

[1] https://bugs.gnu.org/48179#63
[2] https://bugs.gnu.org/48179#60

So I suggest you chime in there.

> overlay is temporary, it's quite opaque for the average person to inspect it to
> see what's actually happening. It's so ugly my first thought was that something
> had broken rather than this was actually an intentional feature.
>
> I'm going to commit this without further discussion -- which hopefully should
> remind others to take the more considerate route when introducing new features!

-- 
Basil



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 10:49     ` Basil L. Contovounesios
@ 2021-05-18 11:08       ` Paul W. Rankin via Emacs development discussions.
  2021-05-19 12:00       ` Bastien
  1 sibling, 0 replies; 39+ messages in thread
From: Paul W. Rankin via Emacs development discussions. @ 2021-05-18 11:08 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: emacs-devel

On 18 May 2021, at 8:49 pm, Basil L. Contovounesios <contovob@tcd.ie> wrote:
> 
> The discussion there also raises concerns about some unintended
> consequences of the new feature, such as with Org refile/capture[1] or
> when overwriting an existing bookmark[2].
> 
> [1] https://bugs.gnu.org/48179#63
> [2] https://bugs.gnu.org/48179#60
> 
> So I suggest you chime in there.

Yep, those are from where I pulled Eli's quote. There's a lot of discussion there but only briefly touching on whether this should be nil by default, where consensus  seemed to be nil by default is most appropriate, but then someone yolo'd it to t anyway.

The elephant in the room there that *of course* those with an existing understanding of the feature don't find it disruptive -- they already know exactly what's happening! For everyone else it's a WTF moment (which is now fixed by defaulting to nil; nothing more to see here, move along folks...).


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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  8:45     ` Eli Zaretskii
  2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
@ 2021-05-18 12:04       ` Eli Zaretskii
  2021-05-18 14:28       ` Lars Ingebrigtsen
  2 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-18 12:04 UTC (permalink / raw)
  To: pwr; +Cc: kfogel, emacs-devel

> Date: Tue, 18 May 2021 11:45:10 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: Emacs Devel <emacs-devel@gnu.org>
> 
> Please don't make this change until you hear from Lars, who examined
> the original patch and decided to install it.

I see that you already did, so I reverted your change.

There should be no rush to undo changes so quickly, let alone changes
done by the Emacs maintainers after careful consideration.  Please
don't do this, ever.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
@ 2021-05-18 12:09         ` Eli Zaretskii
  0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-18 12:09 UTC (permalink / raw)
  To: Paul W. Rankin; +Cc: emacs-devel

> Date: Tue, 18 May 2021 20:06:52 +1000
> From: "Paul W. Rankin" <pwr@bydasein.com>
> Cc: emacs-devel@gnu.org
> 
> On 2021-05-18 18:45, Eli Zaretskii wrote:
> > 
> > Please don't make this change until you hear from Lars, who examined
> > the original patch and decided to install it.  It doesn't get more
> > "considerate" than that.
> 
> Already done.

Please don't do this ever again.  It's an unfriendly thing to do, to
say the least.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  8:45     ` Eli Zaretskii
  2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
  2021-05-18 12:04       ` Eli Zaretskii
@ 2021-05-18 14:28       ` Lars Ingebrigtsen
  2021-05-18 14:38         ` Eli Zaretskii
                           ` (2 more replies)
  2 siblings, 3 replies; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-18 14:28 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: Karl Fogel, Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.

Eli Zaretskii <eliz@gnu.org> writes:

> Please don't make this change until you hear from Lars, who examined
> the original patch and decided to install it.  It doesn't get more
> "considerate" than that.

It does seem to be an unexpectedly (to me, at least) controversial
change, so perhaps it should be tweaked.  For instance, using fringe
markers (on frames that support that) instead of highlighting the entire
line, or something else that isn't that stark.

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



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:28       ` Lars Ingebrigtsen
@ 2021-05-18 14:38         ` Eli Zaretskii
  2021-05-18 14:40           ` Lars Ingebrigtsen
  2021-05-19 11:59           ` Bastien
  2021-05-18 14:43         ` Drew Adams
  2021-09-13  9:46         ` Stefan Kangas
  2 siblings, 2 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-18 14:38 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: kfogel, pwr, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 18 May 2021 16:28:44 +0200
> Cc: Karl Fogel <kfogel@red-bean.com>, "Paul W. Rankin" <pwr@bydasein.com>,
>  "Paul W. Rankin via Emacs development discussions." <emacs-devel@gnu.org>
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Please don't make this change until you hear from Lars, who examined
> > the original patch and decided to install it.  It doesn't get more
> > "considerate" than that.
> 
> It does seem to be an unexpectedly (to me, at least) controversial
> change, so perhaps it should be tweaked.  For instance, using fringe
> markers (on frames that support that) instead of highlighting the entire
> line, or something else that isn't that stark.

I guess so, yes.

I just don't like people rushing to make changes while the discussion
still rages.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:38         ` Eli Zaretskii
@ 2021-05-18 14:40           ` Lars Ingebrigtsen
  2021-05-19 11:59           ` Bastien
  1 sibling, 0 replies; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-18 14:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kfogel, pwr, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> I just don't like people rushing to make changes while the discussion
> still rages.

Yes, that's annoying.

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



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

* RE: [External] : Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:28       ` Lars Ingebrigtsen
  2021-05-18 14:38         ` Eli Zaretskii
@ 2021-05-18 14:43         ` Drew Adams
  2021-05-18 15:07           ` Eli Zaretskii
  2021-09-13  9:46         ` Stefan Kangas
  2 siblings, 1 reply; 39+ messages in thread
From: Drew Adams @ 2021-05-18 14:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Eli Zaretskii
  Cc: Karl Fogel, Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.

> It does seem to be an unexpectedly (to me, at least) controversial
> change, so perhaps it should be tweaked.  For instance, using fringe
> markers (on frames that support that) instead of highlighting the
> entire line, or something else that isn't that stark.

No such highlighting by default, please.
No fringe marks; nada.

And bookmark-location highlighting should be _much_
more user-configurable, IMO: where shown, when
shown, how shown, for what kinds of bookmarks, etc.

See the bug thread for much more about this.




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

* Re: [External] : Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:43         ` Drew Adams
@ 2021-05-18 15:07           ` Eli Zaretskii
  0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-18 15:07 UTC (permalink / raw)
  To: Drew Adams; +Cc: kfogel, larsi, pwr, emacs-devel

> From: Drew Adams <drew.adams@oracle.com>
> Date: Tue, 18 May 2021 14:43:35 +0000
> Cc: Karl Fogel <kfogel@red-bean.com>, "Paul W. Rankin" <pwr@bydasein.com>,
>  "Paul W. Rankin via Emacs development discussions." <emacs-devel@gnu.org>
> 
> > It does seem to be an unexpectedly (to me, at least) controversial
> > change, so perhaps it should be tweaked.  For instance, using fringe
> > markers (on frames that support that) instead of highlighting the
> > entire line, or something else that isn't that stark.
> 
> No such highlighting by default, please.
> No fringe marks; nada.

You already said that, more than once.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:38         ` Eli Zaretskii
  2021-05-18 14:40           ` Lars Ingebrigtsen
@ 2021-05-19 11:59           ` Bastien
  2021-05-19 13:55             ` Eli Zaretskii
  2021-05-24 22:32             ` Lars Ingebrigtsen
  1 sibling, 2 replies; 39+ messages in thread
From: Bastien @ 2021-05-19 11:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kfogel, Lars Ingebrigtsen, pwr, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Tue, 18 May 2021 16:28:44 +0200
>> Cc: Karl Fogel <kfogel@red-bean.com>, "Paul W. Rankin" <pwr@bydasein.com>,
>>  "Paul W. Rankin via Emacs development discussions." <emacs-devel@gnu.org>
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Please don't make this change until you hear from Lars, who examined
>> > the original patch and decided to install it.  It doesn't get more
>> > "considerate" than that.
>> 
>> It does seem to be an unexpectedly (to me, at least) controversial
>> change, so perhaps it should be tweaked.  For instance, using fringe
>> markers (on frames that support that) instead of highlighting the entire
>> line, or something else that isn't that stark.
>
> I guess so, yes.

FWIW I'd prefer a fringe marker than the current fontification.

One problem I've seen while testing this feature for the last weeks is
that editing text within the fontified region will (expectedly) expand
the fontified part, questioning the very idea of having an "area" for
indicating where the bookmark points.

A fringe marker for the line where this point is seems useful enough.

2 cents,

-- 
 Bastien



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18  6:20 [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Paul W. Rankin via Emacs development discussions.
  2021-05-18  6:58 ` Karl Fogel
  2021-05-18 10:49 ` Basil L. Contovounesios
@ 2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
  2021-05-19 14:15   ` Eli Zaretskii
  2 siblings, 1 reply; 39+ messages in thread
From: Paul W. Rankin via Emacs development discussions. @ 2021-05-19 12:00 UTC (permalink / raw)
  To: emacs-devel

> On 18 May 2021, at 4:20 pm, Paul W. Rankin <pwr@bydasein.com> wrote:
> 
> Ugh. Not sure how this slipped into master but it is not a good/considerate idea to set default value of bookmark-fontify to t.
> 
> If there are no reasonable objections I'll push this later today.

To recap the bookmark-fontify saga the takeaways appear to be:

Everyone in the thread seems to get the default should be nil not t. The fix has since been reverted. Whether this does get fixed now or after 28 (and the ensuing cascade of befuddled people asking/complaining about the appearance of an inexplicable error highlight thing) is left to the next brave soul.

It seems I hurt some people's feelings by pushing the fix without waiting for their "okay". I am aware but I'd be lying if I said I cared about this. The irony that pushing this feature out without caring about annoying anyone else, and that this fix was to avoid that happening, seems quite lost.

But you don't need to take my word for it! Here's some guy named Neal Stephenson saying the reason he uses Emacs is because it does not do this kind of thing:
https://youtu.be/0JDFd_BoN1k?t=2572

Let's be more like Neal.


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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 10:49     ` Basil L. Contovounesios
  2021-05-18 11:08       ` Paul W. Rankin via Emacs development discussions.
@ 2021-05-19 12:00       ` Bastien
  2021-05-19 12:58         ` Gregor Zattler
  1 sibling, 1 reply; 39+ messages in thread
From: Bastien @ 2021-05-19 12:00 UTC (permalink / raw)
  To: Basil L. Contovounesios
  Cc: Karl Fogel, Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> The discussion there also raises concerns about some unintended
> consequences of the new feature, such as with Org refile/capture[1] or
> when overwriting an existing bookmark[2].
>
> [1] https://bugs.gnu.org/48179#63
> [2] https://bugs.gnu.org/48179#60

FWIW I'm considering two changes for Org: one is to introduce an
option `org-refile-bookmark' (similar to `org-capture-bookmark' thus
separating concerns) and setting both to `nil' by default.  I suspect
many users don't even know they can jump to the last captured/refiled
headline using the bookmark anyway.

-- 
 Bastien



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-19 12:00       ` Bastien
@ 2021-05-19 12:58         ` Gregor Zattler
  0 siblings, 0 replies; 39+ messages in thread
From: Gregor Zattler @ 2021-05-19 12:58 UTC (permalink / raw)
  To: emacs-devel

Hi Bastien, emacs developers,
* Bastien <bzg@gnu.org> [2021-05-19; 14:00]:
> FWIW I'm considering two changes for Org: one is to introduce an
> option `org-refile-bookmark' (similar to `org-capture-bookmark' thus
> separating concerns) and setting both to `nil' by default.  I suspect
> many users don't even know they can jump to the last captured/refiled
> headline using the bookmark anyway.

may I present my user experience with this feature:

Only when I read this post from Bastien, I tested jumping
via bookmark to my last capture and realized this prominent
(in my case) orange highlighting in my org file which I
wondered about in the last few days.  It looks like a
warning to me and I felt stressed because I did not know
about its origin/reason.  Perhaps some light lavender would
have been less stressing.

For me this highlighting was totally confusing although I
actually use bookmarks (to jump to directories) but the
highlighting was there -- in my org files at leat -- without
me doing a bookmark jump and therefore I did not realize
what its for.

I think its a useful feature but default should be off
and/or a tooltip provided.


Ciao; Gregor
--
 -... --- .-. . -.. ..--.. ...-.-




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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-19 11:59           ` Bastien
@ 2021-05-19 13:55             ` Eli Zaretskii
  2021-05-24 22:32             ` Lars Ingebrigtsen
  1 sibling, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-19 13:55 UTC (permalink / raw)
  To: Bastien; +Cc: kfogel, larsi, pwr, emacs-devel

> From: Bastien <bzg@gnu.org>
> Date: Wed, 19 May 2021 13:59:04 +0200
> Cc: kfogel@red-bean.com, Lars Ingebrigtsen <larsi@gnus.org>, pwr@bydasein.com,
>  emacs-devel@gnu.org
> 
> FWIW I'd prefer a fringe marker than the current fontification.
> 
> One problem I've seen while testing this feature for the last weeks is
> that editing text within the fontified region will (expectedly) expand
> the fontified part, questioning the very idea of having an "area" for
> indicating where the bookmark points.
> 
> A fringe marker for the line where this point is seems useful enough.

But we need to find some replacement for TTY frames then.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
@ 2021-05-19 14:15   ` Eli Zaretskii
  0 siblings, 0 replies; 39+ messages in thread
From: Eli Zaretskii @ 2021-05-19 14:15 UTC (permalink / raw)
  To: Paul W. Rankin; +Cc: emacs-devel

> Feedback-ID: 791:353:null:purelymail
> Date: Wed, 19 May 2021 22:00:24 +1000
> From:  "Paul W. Rankin" via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> > On 18 May 2021, at 4:20 pm, Paul W. Rankin <pwr@bydasein.com> wrote:
> > 
> > Ugh. Not sure how this slipped into master but it is not a good/considerate idea to set default value of bookmark-fontify to t.
> > 
> > If there are no reasonable objections I'll push this later today.
> 
> To recap the bookmark-fontify saga the takeaways appear to be:
> 
> Everyone in the thread seems to get the default should be nil not t. The fix has since been reverted. Whether this does get fixed now or after 28 (and the ensuing cascade of befuddled people asking/complaining about the appearance of an inexplicable error highlight thing) is left to the next brave soul.

I'm certain that we will make the necessary changes when this
discussion reaches its conclusion.

> It seems I hurt some people's feelings by pushing the fix without waiting for their "okay". I am aware but I'd be lying if I said I cared about this. The irony that pushing this feature out without caring about annoying anyone else, and that this fix was to avoid that happening, seems quite lost.

Undoing someone's changes without hearing their opinion is very
unkind, and shouldn't have place in a friendly community, except in an
emergency (which this one isn't).  There was no reason to rush with
undoing the change; if the default value annoys so immensely, it is a
simple matter to turn it off on your machines, and then wait until the
discussion reaches some conclusion.

> But you don't need to take my word for it! Here's some guy named Neal Stephenson saying the reason he uses Emacs is because it does not do this kind of thing:
> https://youtu.be/0JDFd_BoN1k?t=2572

He must be talking about Emacs releases.  We don't promise that the
development version of Emacs will never annoy anyone, there could be
(hopefully, brief) times when it does.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-19 11:59           ` Bastien
  2021-05-19 13:55             ` Eli Zaretskii
@ 2021-05-24 22:32             ` Lars Ingebrigtsen
  2021-05-24 22:51               ` [External] : " Drew Adams
  1 sibling, 1 reply; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-24 22:32 UTC (permalink / raw)
  To: Bastien; +Cc: kfogel, Eli Zaretskii, pwr, emacs-devel

Bastien <bzg@gnu.org> writes:

> that editing text within the fontified region will (expectedly) expand
> the fontified part, questioning the very idea of having an "area" for
> indicating where the bookmark points.
>
> A fringe marker for the line where this point is seems useful enough.

Ah, yes -- good point.  So a fringe marker seems like the right thing
here, I think.

Eli Zaretskii <eliz@gnu.org> writes:

> But we need to find some replacement for TTY frames then.

Well, we could just say that this isn't supported on TTYs.  Or...  we
could use a text property on the single character where the bookmark is
(normally the first character on a line), but that'd look pretty odd.

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



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

* RE: [External] : Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-24 22:32             ` Lars Ingebrigtsen
@ 2021-05-24 22:51               ` Drew Adams
  0 siblings, 0 replies; 39+ messages in thread
From: Drew Adams @ 2021-05-24 22:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Bastien; +Cc: kfogel, Eli Zaretskii, pwr, emacs-devel

> Ah, yes -- good point.  So a fringe marker seems like 
> the right thing here, I think.
> 
> > But we need to find some replacement for TTY frames then.
> 
> Well, we could just say that this isn't supported on TTYs.  Or...  we
> could use a text property on the single character where the bookmark is
> (normally the first character on a line), but that'd look pretty odd.

Dunno why you don't check what's done in Bookmark+.
It might present some food for thought, at least.

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

Various kinds of highlighting are used.  Some of them
might be relevant for what you're trying to do.  Each
involves a style and possibly a face.

You've already started to consider fringe and buffer
position.

There are advantages to each kind of highlighting.
Those that use a face can (in principle) let users
tell the kind of bookmark from its face.  (That's
more important for Bookmark+, where you can have
different kinds of bookmark in the same buffer, for
different purposes.)

You might also check out the highlighting that bm.el
uses.

Just a suggestion.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-05-18 14:28       ` Lars Ingebrigtsen
  2021-05-18 14:38         ` Eli Zaretskii
  2021-05-18 14:43         ` Drew Adams
@ 2021-09-13  9:46         ` Stefan Kangas
  2021-09-13  9:58           ` Manuel Uberti
                             ` (3 more replies)
  2 siblings, 4 replies; 39+ messages in thread
From: Stefan Kangas @ 2021-09-13  9:46 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Karl Fogel, Eli Zaretskii, Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.

[That was in May.]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Please don't make this change until you hear from Lars, who examined
> > the original patch and decided to install it.  It doesn't get more
> > "considerate" than that.
>
> It does seem to be an unexpectedly (to me, at least) controversial
> change, so perhaps it should be tweaked.  For instance, using fringe
> markers (on frames that support that) instead of highlighting the entire
> line, or something else that isn't that stark.

This discussion sort of fizzled out with everyone, as far as I can
tell, mostly agreeing that a fringe marker or similar might be better
for the default behaviour.  On master, bookmark-fontify is still t,
and the highlighting is still done by changing the background colour.

In general, I think we are sometimes too cautious with turning on
so-called "bells and whistles", so I'm actually in one sense happy to
see that a useful new feature is enabled by default.  Yet I'm a little
surprised that this particular feature happened to pass the bar.

I personally find that highlighting the entire line is fairly
distracting, and I'm concerned that this is not a good new default
behavior.  If I'm wrong, and long-time users of bookmark.el thinks
this change is great, then that's fine of course.  But just in case
I'm right, perhaps we could wait with setting the default to t until
Emacs 29?  That way we have a chance to wait for the new less
intrusive fringe marker feature, which sounds harder to have many
reservations about.

WDYT?



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13  9:46         ` Stefan Kangas
@ 2021-09-13  9:58           ` Manuel Uberti
  2021-09-13 10:17             ` Stefan Kangas
  2021-09-13 10:12           ` Colin Baxter
                             ` (2 subsequent siblings)
  3 siblings, 1 reply; 39+ messages in thread
From: Manuel Uberti @ 2021-09-13  9:58 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

On 13/09/21 11:46, Stefan Kangas wrote:
> I personally find that highlighting the entire line is fairly
> distracting, and I'm concerned that this is not a good new default
> behavior.  If I'm wrong, and long-time users of bookmark.el thinks
> this change is great, then that's fine of course.  But just in case
> I'm right, perhaps we could wait with setting the default to t until
> Emacs 29?  That way we have a chance to wait for the new less
> intrusive fringe marker feature, which sounds harder to have many
> reservations about.
> 
> WDYT?

Sorry if I missed the previous conversation on this (and I don't know if I 
qualify as a long-time user of bookmark.el), but this new default took me a bit 
by surprise.

To give you more context, I mostly bookmark directories (usually remote ones). 
These bookmarks point to Dired buffers so at first I could not understand the 
highlighted line. Since it didn't give me any useful information I set the new 
option to nil.

-- 
Manuel Uberti
www.manueluberti.eu



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13  9:46         ` Stefan Kangas
  2021-09-13  9:58           ` Manuel Uberti
@ 2021-09-13 10:12           ` Colin Baxter
  2021-09-13 15:29             ` [External] : " Drew Adams
  2021-09-13 10:43           ` Adam Porter
  2021-09-13 11:36           ` Lars Ingebrigtsen
  3 siblings, 1 reply; 39+ messages in thread
From: Colin Baxter @ 2021-09-13 10:12 UTC (permalink / raw)
  To: Stefan Kangas
  Cc: , Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.,
	Karl Fogel, Lars Ingebrigtsen, Eli Zaretskii

>>>>> Stefan Kangas <stefan@marxist.se> writes:

    > [That was in May.]  Lars Ingebrigtsen <larsi@gnus.org> writes:

    >> Eli Zaretskii <eliz@gnu.org> writes:
    >> 
    >> > Please don't make this change until you hear from Lars, who
    >> examined > the original patch and decided to install it.  It
    >> doesn't get more > "considerate" than that.
    >> 
    >> It does seem to be an unexpectedly (to me, at least)
    >> controversial change, so perhaps it should be tweaked.  For
    >> instance, using fringe markers (on frames that support that)
    >> instead of highlighting the entire line, or something else that
    >> isn't that stark.

    > This discussion sort of fizzled out with everyone, as far as I can
    > tell, mostly agreeing that a fringe marker or similar might be
    > better for the default behaviour.  On master, bookmark-fontify is
    > still t, and the highlighting is still done by changing the
    > background colour.

    > In general, I think we are sometimes too cautious with turning on
    > so-called "bells and whistles", so I'm actually in one sense happy
    > to see that a useful new feature is enabled by default.  Yet I'm a
    > little surprised that this particular feature happened to pass the
    > bar.

    > I personally find that highlighting the entire line is fairly
    > distracting,

Me too. I use bookmark.el for a file, with bookmark-fontify set to nil,
but I use bm.el (<https://github.com/joodland/bm>) for a point in a
file. The advantage of bm.el is that the marker does not extend the
whole length of the line, which, for me, more than compensates the
inconvenience of using two different bookmark libraries.


Best wishes,



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13  9:58           ` Manuel Uberti
@ 2021-09-13 10:17             ` Stefan Kangas
  0 siblings, 0 replies; 39+ messages in thread
From: Stefan Kangas @ 2021-09-13 10:17 UTC (permalink / raw)
  To: Manuel Uberti; +Cc: emacs-devel

Manuel Uberti <manuel.uberti@inventati.org> writes:

> Sorry if I missed the previous conversation on this (and I don't know if I
> qualify as a long-time user of bookmark.el),

It was not my intention to imply that you must have been using
bookmark.el for N years to have a right to comment.  If you use it and
care, you should definitely feel welcome to add your perspective to
the discussion.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13  9:46         ` Stefan Kangas
  2021-09-13  9:58           ` Manuel Uberti
  2021-09-13 10:12           ` Colin Baxter
@ 2021-09-13 10:43           ` Adam Porter
  2021-09-13 11:36           ` Lars Ingebrigtsen
  3 siblings, 0 replies; 39+ messages in thread
From: Adam Porter @ 2021-09-13 10:43 UTC (permalink / raw)
  To: emacs-devel

Stefan Kangas <stefan@marxist.se> writes:

> [That was in May.]
>
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > Please don't make this change until you hear from Lars, who examined
>> > the original patch and decided to install it.  It doesn't get more
>> > "considerate" than that.
>>
>> It does seem to be an unexpectedly (to me, at least) controversial
>> change, so perhaps it should be tweaked.  For instance, using fringe
>> markers (on frames that support that) instead of highlighting the entire
>> line, or something else that isn't that stark.
>
> This discussion sort of fizzled out with everyone, as far as I can
> tell, mostly agreeing that a fringe marker or similar might be better
> for the default behaviour.  On master, bookmark-fontify is still t,
> and the highlighting is still done by changing the background colour.
>
> In general, I think we are sometimes too cautious with turning on
> so-called "bells and whistles", so I'm actually in one sense happy to
> see that a useful new feature is enabled by default.  Yet I'm a little
> surprised that this particular feature happened to pass the bar.
>
> I personally find that highlighting the entire line is fairly
> distracting, and I'm concerned that this is not a good new default
> behavior.  If I'm wrong, and long-time users of bookmark.el thinks
> this change is great, then that's fine of course.  But just in case
> I'm right, perhaps we could wait with setting the default to t until
> Emacs 29?  That way we have a chance to wait for the new less
> intrusive fringe marker feature, which sounds harder to have many
> reservations about.
>
> WDYT?

FWIW, I'm against enabling this feature by default.  In my testing with
Emacs 28, it's been distracting and jarring.

This is especially so for me, having written a couple of packages that
use bookmark records internally and `bookmark-jump' to go to them,
Burly.el and Dogears.el.  When I jump to or "open" a bookmark made with
Burly, the highlighted line isn't generally useful or meaningful.  It
could be in Dogears, but I'd rather enable the feature in that package's
code or its bookmark records rather than universally.

(That's another issue, and forgive me if I haven't seen it mentioned
before: could this setting be controlled by a setting inside a bookmark
record?  That could be very useful, because it could be enabled just for
ones for which highlighting the line would be meaningful.)

Anyway, maybe I could let-bind `bookmark-fontify' to nil around my calls
to `bookmark-jump', but it still seems like an awkward, unexpected
default.  I can imagine seeing many questions asking something like, "I
upgraded to Emacs 28 and something in my config broke.  What are these
yellow lines in my buffers?"

I wouldn't object as much to a fringe marker being enabled by default,
although I would still wonder if it's a good default.




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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13  9:46         ` Stefan Kangas
                             ` (2 preceding siblings ...)
  2021-09-13 10:43           ` Adam Porter
@ 2021-09-13 11:36           ` Lars Ingebrigtsen
  2021-09-13 19:36             ` Matthias Meulien
  3 siblings, 1 reply; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-13 11:36 UTC (permalink / raw)
  To: Stefan Kangas
  Cc: Karl Fogel, Eli Zaretskii, Paul W. Rankin,
	Paul W. Rankin via Emacs development discussions.

Stefan Kangas <stefan@marxist.se> writes:

> This discussion sort of fizzled out with everyone, as far as I can
> tell, mostly agreeing that a fringe marker or similar might be better
> for the default behaviour.

I've now changed it to use a fringe marker.

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



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

* RE: [External] : Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13 10:12           ` Colin Baxter
@ 2021-09-13 15:29             ` Drew Adams
  0 siblings, 0 replies; 39+ messages in thread
From: Drew Adams @ 2021-09-13 15:29 UTC (permalink / raw)
  To: Colin Baxter, Stefan Kangas
  Cc: Karl Fogel, Lars Ingebrigtsen, Paul W. Rankin, Eli Zaretskii,
	Paul W. Rankin via Emacs development discussions.

https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg01116.html

There are different reasons to highlight bookmark
locations, and different reasons not to do so.

There are different times and situations when it
can be appropriate to do so (when setting, when
jumping, etc.).

There are different ways to attach highlighting
(on hooks etc.).

There are different ways to show bookmark locations.

Bookmark+ has long considered these things, and
gives users a way to specify what they want in these
regards.

NIH?



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13 11:36           ` Lars Ingebrigtsen
@ 2021-09-13 19:36             ` Matthias Meulien
  2021-09-14  5:40               ` Colin Baxter
  2021-09-14 11:15               ` Lars Ingebrigtsen
  0 siblings, 2 replies; 39+ messages in thread
From: Matthias Meulien @ 2021-09-13 19:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Karl Fogel, Eli Zaretskii, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've now changed it to use a fringe marker.

Thank you, the fringe marker is less intrusive.

I am a heavy user of bookmarks that point to *vc-dir* buffers (one
bookmark per project) and I am not sure the overlay works well with such
bookmarks pointing to buffers going through the uniquify machinery. See
the following attachment where two bookmark-fringe-mark are visible in
the fringe (I just opened multiple bookmarks to *vc-dir* buffers where
one bookmark doesn't point to the first line of the buffer):


[-- Attachment #2: Capture d’écran du 2021-09-13 21-27-35.png --]
[-- Type: image/png, Size: 73851 bytes --]

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]

-- 
Matthias

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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13 19:36             ` Matthias Meulien
@ 2021-09-14  5:40               ` Colin Baxter
  2021-09-14 11:15               ` Lars Ingebrigtsen
  1 sibling, 0 replies; 39+ messages in thread
From: Colin Baxter @ 2021-09-14  5:40 UTC (permalink / raw)
  To: Matthias Meulien
  Cc: , Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.,
	Karl Fogel, Lars Ingebrigtsen, Eli Zaretskii

>>>>> Matthias Meulien <orontee@gmail.com> writes:

    > Lars Ingebrigtsen <larsi@gnus.org> writes:
    >> I've now changed it to use a fringe marker.

    > Thank you, the fringe marker is less intrusive.

For users with a tight left-fringe setting, the fringe marker will be
problematic. For me, with fringes set as (3 . 2), the marker appears as
a barely visible smudge. I have to increase to (10 . 2) to make it
properly visible. I have therefore switched the marker off altogether.

Best wishes,



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-13 19:36             ` Matthias Meulien
  2021-09-14  5:40               ` Colin Baxter
@ 2021-09-14 11:15               ` Lars Ingebrigtsen
  2021-09-14 11:46                 ` Eli Zaretskii
  2021-09-14 11:52                 ` miha
  1 sibling, 2 replies; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-14 11:15 UTC (permalink / raw)
  To: Matthias Meulien
  Cc: Karl Fogel, Eli Zaretskii, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.

Matthias Meulien <orontee@gmail.com> writes:

> See the following attachment where two bookmark-fringe-mark are
> visible in the fringe (I just opened multiple bookmarks to *vc-dir*
> buffers where one bookmark doesn't point to the first line of the
> buffer):

So the problem seems to be that a `revert-buffer' doesn't keep overlays
where they were, I guess?  (Or remove the overlays, at least.)

Do we have some machinery to handle overlays like this, or conventions
about what to do with overlays when doing a `revert-buffer' actions?

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



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 11:15               ` Lars Ingebrigtsen
@ 2021-09-14 11:46                 ` Eli Zaretskii
  2021-09-14 11:54                   ` Lars Ingebrigtsen
  2021-09-14 11:52                 ` miha
  1 sibling, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2021-09-14 11:46 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: kfogel, stefan, pwr, orontee, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Karl Fogel <kfogel@red-bean.com>,  Eli Zaretskii <eliz@gnu.org>,  "Paul
>  W. Rankin" <pwr@bydasein.com>,  Stefan Kangas <stefan@marxist.se>,  "Paul
>  W. Rankin via Emacs development discussions." <emacs-devel@gnu.org>
> Date: Tue, 14 Sep 2021 13:15:53 +0200
> 
> Matthias Meulien <orontee@gmail.com> writes:
> 
> > See the following attachment where two bookmark-fringe-mark are
> > visible in the fringe (I just opened multiple bookmarks to *vc-dir*
> > buffers where one bookmark doesn't point to the first line of the
> > buffer):
> 
> So the problem seems to be that a `revert-buffer' doesn't keep overlays
> where they were, I guess?  (Or remove the overlays, at least.)

Are they removed, or do they move/evaporate because their markers
move?

> Do we have some machinery to handle overlays like this, or conventions
> about what to do with overlays when doing a `revert-buffer' actions?

AFAIK, we already try to preserve the buffer markers, if possible.
And revert-buffer-with-fine-grain tries harder.  So if the issue is
that the overlays' markers moved, we already try.



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 11:15               ` Lars Ingebrigtsen
  2021-09-14 11:46                 ` Eli Zaretskii
@ 2021-09-14 11:52                 ` miha
  2021-09-14 11:56                   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 39+ messages in thread
From: miha @ 2021-09-14 11:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Matthias Meulien
  Cc: Karl Fogel, Eli Zaretskii, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Matthias Meulien <orontee@gmail.com> writes:
>
>> See the following attachment where two bookmark-fringe-mark are
>> visible in the fringe (I just opened multiple bookmarks to *vc-dir*
>> buffers where one bookmark doesn't point to the first line of the
>> buffer):
>
> So the problem seems to be that a `revert-buffer' doesn't keep overlays
> where they were, I guess?  (Or remove the overlays, at least.)
>
> Do we have some machinery to handle overlays like this, or conventions
> about what to do with overlays when doing a `revert-buffer' actions?

IMO, the responsibility of code that creates overlays is to clean them
up in change-major-mode-hook.
>
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 11:46                 ` Eli Zaretskii
@ 2021-09-14 11:54                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-14 11:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kfogel, stefan, pwr, orontee, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> So the problem seems to be that a `revert-buffer' doesn't keep overlays
>> where they were, I guess?  (Or remove the overlays, at least.)
>
> Are they removed, or do they move/evaporate because their markers
> move?

These overlays are zero-length, so they don't evaporate.  But...
perhaps they shouldn't be, and be marked with `evaporate'?  That should
make them go away in this case, at least.  (I haven't really worked much
with fringe markers before...)

>> Do we have some machinery to handle overlays like this, or conventions
>> about what to do with overlays when doing a `revert-buffer' actions?
>
> AFAIK, we already try to preserve the buffer markers, if possible.
> And revert-buffer-with-fine-grain tries harder.  So if the issue is
> that the overlays' markers moved, we already try.

But perhaps this doesn't work with zero-length overlays?  (Those are
handled specially in many circumstances.)

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



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 11:52                 ` miha
@ 2021-09-14 11:56                   ` Lars Ingebrigtsen
  2021-09-14 14:44                     ` miha
  0 siblings, 1 reply; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-14 11:56 UTC (permalink / raw)
  To: miha
  Cc: Matthias Meulien, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.,
	Karl Fogel, Eli Zaretskii

miha@kamnitnik.top writes:

>> Do we have some machinery to handle overlays like this, or conventions
>> about what to do with overlays when doing a `revert-buffer' actions?
>
> IMO, the responsibility of code that creates overlays is to clean them
> up in change-major-mode-hook.

I don't think `revert-buffer' calls that hook?

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



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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 11:56                   ` Lars Ingebrigtsen
@ 2021-09-14 14:44                     ` miha
  2021-09-15  7:59                       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 39+ messages in thread
From: miha @ 2021-09-14 14:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Matthias Meulien, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.,
	Karl Fogel, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> miha@kamnitnik.top writes:
>
>>> Do we have some machinery to handle overlays like this, or conventions
>>> about what to do with overlays when doing a `revert-buffer' actions?
>>
>> IMO, the responsibility of code that creates overlays is to clean them
>> up in change-major-mode-hook.
>
> I don't think `revert-buffer' calls that hook?

I believe that revert-buffer--default does end up calling this hook
(through `normal-mode'), but I see that the original post was about a
vc-dir buffer, which has its own revert-buffer-function and it indeed
seems like it doesn't call that hook.

I guess my idea was the following: we want at most one bookmark overlay
per buffer, so it's natural to put this overlay in a buffer local
variable. We then call move-overlay instead of make-overlay if it
already exists.

However, kill-all-local-variables would kill this variable but not
delete the overlay. We have to either make this variable permanent or
delete this overlay in change-major-mode-hook. I tend to prefer the
later solution.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

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

* Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
  2021-09-14 14:44                     ` miha
@ 2021-09-15  7:59                       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 39+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-15  7:59 UTC (permalink / raw)
  To: miha
  Cc: Matthias Meulien, Paul W. Rankin, Stefan Kangas,
	Paul W. Rankin via Emacs development discussions.,
	Karl Fogel, Eli Zaretskii

<miha@kamnitnik.top> writes:

> I guess my idea was the following: we want at most one bookmark overlay
> per buffer, so it's natural to put this overlay in a buffer local
> variable. We then call move-overlay instead of make-overlay if it
> already exists.

I've now put an `evaporate' on the fringe overlay, and that seems to fix
the issue in vc buffers.

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



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

end of thread, other threads:[~2021-09-15  7:59 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  6:20 [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Paul W. Rankin via Emacs development discussions.
2021-05-18  6:58 ` Karl Fogel
2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
2021-05-18  8:45     ` Eli Zaretskii
2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
2021-05-18 12:09         ` Eli Zaretskii
2021-05-18 12:04       ` Eli Zaretskii
2021-05-18 14:28       ` Lars Ingebrigtsen
2021-05-18 14:38         ` Eli Zaretskii
2021-05-18 14:40           ` Lars Ingebrigtsen
2021-05-19 11:59           ` Bastien
2021-05-19 13:55             ` Eli Zaretskii
2021-05-24 22:32             ` Lars Ingebrigtsen
2021-05-24 22:51               ` [External] : " Drew Adams
2021-05-18 14:43         ` Drew Adams
2021-05-18 15:07           ` Eli Zaretskii
2021-09-13  9:46         ` Stefan Kangas
2021-09-13  9:58           ` Manuel Uberti
2021-09-13 10:17             ` Stefan Kangas
2021-09-13 10:12           ` Colin Baxter
2021-09-13 15:29             ` [External] : " Drew Adams
2021-09-13 10:43           ` Adam Porter
2021-09-13 11:36           ` Lars Ingebrigtsen
2021-09-13 19:36             ` Matthias Meulien
2021-09-14  5:40               ` Colin Baxter
2021-09-14 11:15               ` Lars Ingebrigtsen
2021-09-14 11:46                 ` Eli Zaretskii
2021-09-14 11:54                   ` Lars Ingebrigtsen
2021-09-14 11:52                 ` miha
2021-09-14 11:56                   ` Lars Ingebrigtsen
2021-09-14 14:44                     ` miha
2021-09-15  7:59                       ` Lars Ingebrigtsen
2021-05-18 10:49     ` Basil L. Contovounesios
2021-05-18 11:08       ` Paul W. Rankin via Emacs development discussions.
2021-05-19 12:00       ` Bastien
2021-05-19 12:58         ` Gregor Zattler
2021-05-18 10:49 ` Basil L. Contovounesios
2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
2021-05-19 14:15   ` Eli Zaretskii

Code repositories for project(s) associated with this 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 NNTP newsgroup(s).