[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29110: 25.2; Should push-mark allow duplicates?

From: Drew Adams
Subject: bug#29110: 25.2; Should push-mark allow duplicates?
Date: Thu, 2 Nov 2017 06:34:35 -0700 (PDT)

> > What part of "visiting them in order" wasn't clear?
> Why visiting in order?

Why not?  You asked for a possible use case.  To me that
is one.  You mark spots to visit, then you cycle among
them.  The order of marking determines the (default)
order of cycling.  Duplicates determine when and how
often you visit a particular node in the cycle.

The point is this: If Emacs automatically always removes
duplicates then, well, you cannot take advantage of
anything that duplicates can give you.  But if Emacs
does not remove duplicates then you can - and you can
always remove/prevent duplicates.

A sequence with duplicates gives you more possibilities
than a sequence without duplicates, simply because you
can always remove duplicates but you cannot easily add
them.  That is, you cannot add them if Emacs keeps
automatically removing/preventing them.  Why impose that?

> I understand why rings should preserve the order in general, but what is
> the user's intention when visiting marks in order?  Why does order
> matter in this specific case?  Why going A-B-A?

T-U-V-a-B-C-D-a-E-F-G-H-I lets you visit `a' more
easily, more often, and quicker.  Whatever.  Whatever
use someone or some code might put duplicates to.  Why
should Emacs prevent such a possibility out of the box,
especially since it is so easy for anyone or any code
to not allow duplicates.

> Maybe the problem is that I see marks as "bookmarked
> position in text", and in this case it makes little
> sense to have a bookmark order.

I too see them that way.  And there is every reason
to have a bookmark order - that can be very useful.

Multiple bookmarks in a buffer, in buffer order,
let you cycle among them in buffer order.  In alpha
order by, say, the thingie definitions that they
mark gives you alpha-order navigation.  Any number
of orders are possible.  Different orders for
different purposes and different users.

Isn't that what Helm & Ivy give you: easy ways to
navigate among the markers in different orders?
If they don't let you easily switch navigation
orders then they should (IMHO).  (In Icicles, at
lease, it it is simple and immediate to change to
a different order.)

_Cycling_ navigation is in fact largely about
_order_.  Put differently: order makes a big
difference if you need to cycle to get to something.

Order can impose inconvenience.  Imagine cycling
through every name in the phone book (remember
phone books?), in alphabetic order starting at A,
just to get to the name Neidhardt.  Not fun,
especially if it is a large phone book.

That's why interfaces such as Icicles, Helm, etc.
also let you _filter_, to reduce the sequence to
cycle through.  And it's why they also let you
go _directly_ to a given element in the
navigation list, e.g., by name.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]