vimpulse C-o not using global marks ?!?

Vegard Øye vegard_oye at hotmail.com
Tue Aug 3 17:53:56 CEST 2010


On 2010-08-02 13:37, Štěpán Němec wrote:

> Vegard Øye <vegard_oye at hotmail.com> writes:
>
>> I've added a /rough/ sketch in commit [70e470f6fe], which utilizes
>> both the global mark ring and the ordinary, buffer-local one.
>
> AFAICS it doesn't consider any of what I wrote above (and tried to
> implement).

It currently doesn't restore buffers, which it should. One way to
implement that would be for the advice of `push-mark' to "monitor"
newly pushed markers and record the visited file in an association
list. Then, when "C-o" encounters a marker in no buffer, it looks up
the marker in the list and reopens the associated file, if any.

> If you don't like what I wrote or the way I went about
> implementing it, that's fine, but I'd like to know _what_ you
> don't like and _why_.

I prefer making use of an existing convention (that of calling
`push-mark') to introducing a new convention (that of calling
`vimpulse-record-jump'). The latter requires more Vimpulse knowledge
on the part of extension writers.

Then again, the cost of Vimpulse specifics may be justified if the
main goal is maximum Vim fidelity. There's something of a
philosophical debate here: should Vimpulse emulate Vim as faithfully
as possible, or should it just provide a modal interface to Emacs'
facilities? Vimpulse's integration with isearch is an example of the
latter, since it's not a pixel perfect emulation of Vim's search, but
provides functionality which Vim does not. I think it's better, but a
"purist" may disagree.

>> Although, when I come to think of it, wouldn't a separate Git
>> branch be better for testy things?
>
> I think it definitely would, yeah.

Okay; I've created a "global-marks" branch where "C-o" is global by
default (i.e., no need to rebind it).

-- 
Vegard



More information about the implementations-list mailing list