Re: patch to allow locking/unlocking the jump list

2015-07-21 Fir de Conversatie Bram Moolenaar
Carlo Baldassi wrote: I just realized that the keepjumps! patch I sent is not working correctly under some circumstances. A single backup list is not sufficient, it really needs to keep a stack of them in order to work properly. I'll make a new patch in a short while (unless I'm told it has

Re: patch to allow locking/unlocking the jump list

2015-06-09 Fir de Conversatie Charles Campbell
Carlo Baldassi wrote: Yes, I had that thought as well. However, as also clearly stated in the documentation of lockmarks, the major drawbacks of this model are 1) not adjusting for line insertions / deletions 2) the possibility of making the command you're calling non-functional, it that

Re: patch to allow locking/unlocking the jump list

2015-06-09 Fir de Conversatie Carlo Baldassi
Hello! I'm wondering about how the patch(es) work -- is it a saverestore or is it a prevent-any-modification? I'm in favor of saverestore; prevent-any-modification is certainly going to cause problems. Hi! The lockjumps patch (filename: lkjcmd_patch.txt) does a prevent-any-modification

Re: patch to allow locking/unlocking the jump list

2015-06-09 Fir de Conversatie Charles Campbell
Carlo Baldassi wrote: Hello! I'm wondering about how the patch(es) work -- is it a saverestore or is it a prevent-any-modification? I'm in favor of saverestore; prevent-any-modification is certainly going to cause problems. Hi! The lockjumps patch (filename: lkjcmd_patch.txt) does a

Re: patch to allow locking/unlocking the jump list

2015-06-09 Fir de Conversatie Carlo Baldassi
I just realized that the keepjumps! patch I sent is not working correctly under some circumstances. A single backup list is not sufficient, it really needs to keep a stack of them in order to work properly. I'll make a new patch in a short while (unless I'm told it has zero chance of getting

Re: patch to allow locking/unlocking the jump list

2015-06-08 Fir de Conversatie Carlo Baldassi
On Monday, June 8, 2015 at 10:18:23 PM UTC+2, Bram Moolenaar wrote: Ben Fritz wrote: On Sunday, June 7, 2015 at 8:57:38 AM UTC-5, Bram Moolenaar wrote: Carlo Baldassi wrote: Ok, here is my attempt at a recursive version of the keepjumps command. It's called lockjumps, and works

Re: patch to allow locking/unlocking the jump list

2015-06-08 Fir de Conversatie Bram Moolenaar
Ben Fritz wrote: On Sunday, June 7, 2015 at 8:57:38 AM UTC-5, Bram Moolenaar wrote: Carlo Baldassi wrote: Ok, here is my attempt at a recursive version of the keepjumps command. It's called lockjumps, and works in the same way as keepjumps except that: 1) it's recursive 2) it

Re: patch to allow locking/unlocking the jump list

2015-06-08 Fir de Conversatie Ben Fritz
On Sunday, June 7, 2015 at 8:57:38 AM UTC-5, Bram Moolenaar wrote: Carlo Baldassi wrote: Ok, here is my attempt at a recursive version of the keepjumps command. It's called lockjumps, and works in the same way as keepjumps except that: 1) it's recursive 2) it only locks the jumplist, it

Re: patch to allow locking/unlocking the jump list

2015-06-07 Fir de Conversatie Bram Moolenaar
Carlo Baldassi wrote: Ok, here is my attempt at a recursive version of the keepjumps command. It's called lockjumps, and works in the same way as keepjumps except that: 1) it's recursive 2) it only locks the jumplist, it does not affect the marks list Again, it seems to work as intended,

Re: patch to allow locking/unlocking the jump list

2015-05-27 Fir de Conversatie Justin M. Keyes
On May 27, 2015 2:28 AM, Carlo Baldassi carlobalda...@gmail.com wrote: On Tuesday, May 26, 2015 at 3:50:06 AM UTC+2, Justin M. Keyes wrote: In your implementation, you could save the './'^/jumplist/changelist and then restore it after the script ends. This would allow plugins to use marks

Re: patch to allow locking/unlocking the jump list

2015-05-27 Fir de Conversatie Carlo Baldassi
On Wednesday, May 27, 2015 at 8:00:30 PM UTC+2, Justin M. Keyes wrote: I thought about alternative ways to achieve the same effect but I can't see any simpler way to keep that guarantee (which is essential in my opinion). This is the major point on which I'd like to have feedback. Is

Re: patch to allow locking/unlocking the jump list

2015-05-27 Fir de Conversatie Carlo Baldassi
On Tuesday, May 26, 2015 at 3:50:06 AM UTC+2, Justin M. Keyes wrote: In your implementation, you could save the './'^/jumplist/changelist and then restore it after the script ends. This would allow plugins to use marks et. al. as needed but the user can use :keepjumps! to prevent side effects

Re: patch to allow locking/unlocking the jump list

2015-05-25 Fir de Conversatie Carlo Baldassi
On Saturday, May 23, 2015 at 10:52:16 PM UTC+2, Justin M. Keyes wrote: But why can't keepjumps be made recursive instead? That's the first thing I thought too. Of course it would break existing code, so it should be something else, perhaps keepjumps!. But it also seemed a more complicated and

Re: patch to allow locking/unlocking the jump list

2015-05-25 Fir de Conversatie Justin M. Keyes
On Mon, May 25, 2015 at 3:44 PM, Carlo Baldassi carlobalda...@gmail.com wrote: On Saturday, May 23, 2015 at 10:52:16 PM UTC+2, Justin M. Keyes wrote: But why can't keepjumps be made recursive instead? That's the first thing I thought too. Of course it would break existing code, so it should

Re: patch to allow locking/unlocking the jump list

2015-05-25 Fir de Conversatie Carlo Baldassi
Ok, here is my attempt at a recursive version of the keepjumps command. It's called lockjumps, and works in the same way as keepjumps except that: 1) it's recursive 2) it only locks the jumplist, it does not affect the marks list Again, it seems to work as intended, make test passes and valgrind

Re: patch to allow locking/unlocking the jump list

2015-05-23 Fir de Conversatie Justin M. Keyes
On Fri, May 22, 2015 at 7:42 PM, Carlo Baldassi carlobalda...@gmail.com wrote: For example, I have some code[1] which uses the matchit.vim plugin, which: 1) doesn't use keepjumps internally (this may be seen as a plugin bug, and I sent a patch[2] to the author to do that). 2) calls m' on the

patch to allow locking/unlocking the jump list

2015-05-22 Fir de Conversatie Carlo Baldassi
Hi, First, my use case: I'd like to be able to invoke functions or commands (particularly some which I didn't write, e.g. from other people plug-ins/scripts) and not have them update the jump list. The keepjumps command is not sufficient in this regard, because it does not act recursively.