emacs-devel
[Top][All Lists]
Advanced

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

RE: next-error use cases


From: Drew Adams
Subject: RE: next-error use cases
Date: Sat, 23 May 2020 08:29:34 -0700 (PDT)

> Hopefully the following isn't too silly.  Right now we use C-x ` for
> two fairly different purposes:
> 
> 1. We have a list of locations (typically lines and columns), and we
> want jump from one to the next, opening files and buffers as needed
> (that's the grep, occur, and compilation-mode cases).
> 2. We have a buffer with interesting locations, and we want to cycle
> through them (that's the flyspell, flymake, flycheck cases).
> 
> This sounds quite similar to what happens with the global and the 
> local mark rings, actually.  To cycle through marks in the current 
> buffer you use C-u C-SPC; to cycle through global marks you use
> C-x C-SPC.  So I wonder if it would make sense to have C-x ` cycle 
> through locations that come from "location lists" (grep) and
> having, say, C-c ` cycle through locations that come from the
> current buffer (flyspell).
> 
> That doesn't fully solve the problem of picking which location
> list to cycle through, but it eliminates the confusion between
> local and global locations (as a logical consequence, I imagine
> C-c ` in a location list would most of the time just move to the
> next line, though in an occur or grep buffer with multiple lines
> of context it would jump to the next match)

Sorry to barge in here, especially having not read
the thread till here.

Just thought I'd mention what I do in Bookmark+ and
zones.el, in this regard.  There too you can cycle
among things: bookmarks, buffer zones (regions/areas).

In each case, you can have a list of same-buffer
thingies to cycle among or a list of multiple-buffer
thingies to cycle among.

In each case, there are default lists of same-buffer
and multiple-buffer thingies, and you can define
other, named lists.

In each case, it's easy to switch among such lists.
For navigation purposes (such lists/sets can be used
for other purposes too), call them "navigation lists".

So in each case there are various ways to choose a
navigation list, to make it current.

In the case of Bookmark+:

* You can pick a set of bookmarks that are all of a
  given type (e.g. Info, Dired, EWW)

* You can pick them by picking a bookmark-list bookmark.

* You can pick them by choosing the current bookmark
  list (as displayed: sorted, respecting omissions etc.).

* You can use the currently defined global bookmark
  list (ignoring what's in the displayed bookmark list).

* There are separate keys for cycling among bookmarks
  for the current file/buffer and for cycling among
  another chosen navigation list.  IOW, you can do the
  former without unchoosing the current navigation list.

In the case of zones.el, you choose a zone-set variable.
Such a variable can be buffer-local, so its zones are
only for the current buffer, or it can be global, i.e.,
across buffers.

So the ways of picking navigation lists are different
for bookmarks and zones, as they should be.  As I said,
such sets serve other purposes, besides just navigation,
and those purposes are very different for zones and
bookmarks.

Likewise, the keys for cycling are different for zones
and bookmarks.  The keys for each fit in with the other
keys (other zone keys, other bookmark keys).

Dunno whether this info helps at all, either as food
for thought (e.g., generalizing the view) or as an
argument that it does not necessarily make sense to
search for a single way to use such things (e.g. single
set of cycling keys, or even similar cycling keys).

Note: "not necessarily".  Other things being equal, of
course it helps users if the same or similar keys do
the same or similar things in different contexts.  But
other things might well not be equal (they are not
equal in the case of zones and bookmarks).  Different
kinds of thing-sets offer different possibilities.

Bookmark+ description of this:

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

zones.el description:

https://www.emacswiki.org/emacs/Zones



reply via email to

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