emacs-devel
[Top][All Lists]
Advanced

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

Re: next-error use cases


From: Clément Pit-Claudel
Subject: Re: next-error use cases
Date: Fri, 22 May 2020 22:26:09 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 22/05/2020 21.58, Dmitry Gutov wrote:
> On 23.05.2020 04:48, Clément Pit-Claudel wrote:
>> On 22/05/2020 21.27, Dmitry Gutov wrote:
>>> On 23.05.2020 04:22, Clément Pit-Claudel wrote:
>>>> On 22/05/2020 15.10, Vladimir Sedach wrote:
>>>>> Clément Pit-Claudel<address@hidden>  writes:
>>>>>> Does this mean that Flycheck should override M-g l too, or will
>>>>>> that work automatically (how will M-g l know which one to pick?)
>>>>> next-error-last-buffer, if I understand things correctly.
>>>> That doesn't sound right: next-error-last-buffer should be the source 
>>>> buffer, not the error list, shouldn't it?
>>> Not if we try to streamline the next-error navigation and try to make it 
>>> work (almost) the same way across different next-error sources.
>> Ah, so I think I don't understand this part — I thought this was only about 
>> deciding which buffer to show in M-g l.  I think I missed the earlier parts 
>> of the tread maybe?  I can only see it from 05/18.
> 
> Oh, its beginning was only a tiny bit earlier:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00207.html

Thanks a lot.  I think I understand the issue better.

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)

Does this make sense?



reply via email to

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