On Sat, Aug 07, 2010 at 10:23:30PM +0200, Vitaly S. wrote: > "John J. Foerch" <[email protected]> writes: > > > > 2) We don't store access times for buffers, but the 'buffers' property of > > each window is a list of buffers, stored in access order, so yes, the > > information is available. > > Sorry, I have only a very vague idea of how conkeror works and almost not JS > experience. I found that window.buffers.bufer_list is indeed a list of buffers > stored in decreasing access time order. > > So, the idea would be to modify switch-to-buffer such that the displayed > buffers > are in that exact order.I tried to modify "switch-to-buffer" by > supplying the $completer argument with explicit $completions, an array > window.buffers.buffer_list as bellow: > > interactive("switch-to-buffer-ordered", > "Switch to the most recent buffer.", > function (I) { > switch_to_buffer( > I.window, > (yield I.minibuffer.read_buffer( > $prompt = "Switch to buffer:", > $default = (I.window.buffers.count > 1 ? > I.window.buffers.buffer_list[1] : > I.buffer), > $completer = all_word_completer( > //<-this added > $completions = I.window.buffers.buffer_list, > //<-this is supposed to give the ordered buffers?? > $get_string = function (x) x.description, > $get_description = function (x) x.title))) > ); > }); > > I definitely do not understand how "all_word_completer" and other completers > work > and would appreciate any help. > > I fill like being very close to what I actually need, am I? > > Many thanks, > Vitaly.
Oh I see. I misunderstood your question originally. I'll play around with this and get back to you... don't have time right now. -- John Foerch _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
