Re: Problem with example in :help complete()
Tony Mechelynck wrote: > Gerald Lai wrote: > > Hi all, > > > > [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] > > I'm having trouble getting the example in > > > > :help complete() > > > > to work. When I hit in Insert mode, I get this: > > > > Error detected while processing function ListMonths: > > line 1: > > E523: Not allowed here > > > > I have :set nosecure. > > Having this instead fixes the problem: > > > > inoremap =ListMonths() > > > > Looks like a bug. I wasn't sure if this has been fixed. > > -- > > Gerald > > > > > Looks to me like a documentation bug. I believe you got it right, and > the helpfile got it wrong. The problem with the expression mapping is that it can't change the text, and that is what is being attempted by complete(). This protection was added after discovering that expression mappings could cause trouble. Using CTRL-R = works. But I'll see if it can also be made to work as documented. -- If I tell you "you have a beautiful body", would you hold it against me? /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Problem with example in :help complete()
Gerald Lai wrote: On Mon, 12 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: On Sun, 11 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line 1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald Looks to me like a documentation bug. I believe you got it right, and the helpfile got it wrong. Best regards, Tony. Does this mean that isn't allowed for complete()? It mentioned at the top of ":help complete()" that both :map- and = were allowed. Isn't imap MyFunction() and imap =MyFunction() pretty much the same? Or at the very least, the same in terms of security (see :help E523)? -- Gerald Sorry, the in the given example had escaped me. They /ought to/ be synonymous, but the = mechanism is older; is new in version 7, which means perhaps it hasn't yet got all its bugs ironed out. ":help E523" is the same as ":help 'secure'". Are you sure this option isn't set unbeknownst to you? When the error happens, what does ":verbose set secure?" (without the quotes but with the question mark) reply? If it does return "nosecure" then I guess it's a bug. Yes, it does return "nosecure". Everything unchanged, when I tried the = version, it works. It looks like a bug from my side. Do you notice the same? Anybody else? -- Gerald I see the bug, using VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 4 2006 08:37:52) Included patches: 1-17 Compiled by [EMAIL PROTECTED] Huge version with GTK2 GUI. Features included (+) or not (-): [...] Best regards, Tony.
Re: Problem with example in :help complete()
On Mon, 12 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: On Sun, 11 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line 1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald Looks to me like a documentation bug. I believe you got it right, and the helpfile got it wrong. Best regards, Tony. Does this mean that isn't allowed for complete()? It mentioned at the top of ":help complete()" that both :map- and = were allowed. Isn't imap MyFunction() and imap =MyFunction() pretty much the same? Or at the very least, the same in terms of security (see :help E523)? -- Gerald Sorry, the in the given example had escaped me. They /ought to/ be synonymous, but the = mechanism is older; is new in version 7, which means perhaps it hasn't yet got all its bugs ironed out. ":help E523" is the same as ":help 'secure'". Are you sure this option isn't set unbeknownst to you? When the error happens, what does ":verbose set secure?" (without the quotes but with the question mark) reply? If it does return "nosecure" then I guess it's a bug. Yes, it does return "nosecure". Everything unchanged, when I tried the = version, it works. It looks like a bug from my side. Do you notice the same? Anybody else? -- Gerald
Re: Problem with example in :help complete()
Gerald Lai wrote: On Sun, 11 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line 1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald Looks to me like a documentation bug. I believe you got it right, and the helpfile got it wrong. Best regards, Tony. Does this mean that isn't allowed for complete()? It mentioned at the top of ":help complete()" that both :map- and = were allowed. Isn't imap MyFunction() and imap =MyFunction() pretty much the same? Or at the very least, the same in terms of security (see :help E523)? -- Gerald Sorry, the in the given example had escaped me. They /ought to/ be synonymous, but the = mechanism is older; is new in version 7, which means perhaps it hasn't yet got all its bugs ironed out. ":help E523" is the same as ":help 'secure'". Are you sure this option isn't set unbeknownst to you? When the error happens, what does ":verbose set secure?" (without the quotes but with the question mark) reply? If it does return "nosecure" then I guess it's a bug. Best regards, Tony.
Re: Problem with example in :help complete()
On Sun, 11 Jun 2006, A.J.Mechelynck wrote: Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line 1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald Looks to me like a documentation bug. I believe you got it right, and the helpfile got it wrong. Best regards, Tony. Does this mean that isn't allowed for complete()? It mentioned at the top of ":help complete()" that both :map- and = were allowed. Isn't imap MyFunction() and imap =MyFunction() pretty much the same? Or at the very least, the same in terms of security (see :help E523)? -- Gerald
Re: Problem with example in :help complete()
Gerald Lai wrote: Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line 1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald Looks to me like a documentation bug. I believe you got it right, and the helpfile got it wrong. Best regards, Tony.
Problem with example in :help complete()
Hi all, [On Windows Vim 7.0, binary at ftp://ftp.vim.org/pub/vim/pc/gvim70.exe] I'm having trouble getting the example in :help complete() to work. When I hit in Insert mode, I get this: Error detected while processing function ListMonths: line1: E523: Not allowed here I have :set nosecure. Having this instead fixes the problem: inoremap =ListMonths() Looks like a bug. I wasn't sure if this has been fixed. -- Gerald