guile-user
[Top][All Lists]
Advanced

[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).
>>
>>janneke
>
>>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.

Yes

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

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: gnu.org 127.0.0.1 gnu.org
>
> 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.

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

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