[Top][All Lists]

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

Re: [PATCH 1-2/2] Emacsy buffer.scm fixes, opt argument for `switch-to-b

From: Jan Nieuwenhuizen
Subject: Re: [PATCH 1-2/2] Emacsy buffer.scm fixes, opt argument for `switch-to-buffer'
Date: Fri, 28 Jun 2019 09:56:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Amar Singh writes:

>>Not yet, let's see.
>>> -        (mru-recall! buffer-stack buffer)
>>> +        (if recall? (mru-recall! buffer-stack buffer))
>>(please use `when' for an if without else clause).
>>I don't think that's what we want, I'm imagining this helps you to
>>achieve something so I'm curious what you want to do?
> We want to have commands like next-buffer, previous-buffer and
> other-buffer with Emacs-like semantics.


> Imagine we have buffers:
> Messages
> buffer-next!: Messages (assume it moves through buffers in 
> this direction)
> then,
> buffer-previous!: Messages
> but can you guess what happens when interactive versions of buffer-next! and 
> buffer-previous! are called?
> next-buffer: (keeps cycling between the two)
> prev-buffer: Messages

Ah, that's not good.

> this has to do with the fact that switch-to-buffer will call
> mru-recall!. This behaviour of switch-to-buffer is unexpected and
> should be optional i think.

...maybe or yes, but the default `switch-to-buffer' behaviour should still
use that default, right?

> but we may also want to have(Emacs-like other-buffer)
> other-buffer:
> other-buffer should look like something: (sry should have included this in 
> the patch as well)
> (mru-next! buffer-stack incr)
> (switch-to-buffer (mru-ref buffer-stack) t)

Ah, yes.  That's mainly what I was missing, there was no user for the
previous implementation.

> wdyt?

Sounds good, please update your patch.  If you have a public Git, I can
pull from there too.


Jan Nieuwenhuizen <address@hidden> | GNU LilyPond
Freelance IT | AvatarĀ®

reply via email to

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