41379Re: exception creation oddities
- Jul 1, 2003Hari Krishna Dara wrote:
> > > Talking about :echoerr, I just remembered another aspect of :echoerrDon't hold your breath. I don't expect to have much time for working on
> > > that I observed recently. Normally, :echoerr would print a context
> > > around the message, which is very useful both for debugging as well as
> > > for its intended purpose of reporting bugs. I wanted to capture this
> > > message and extract this context out, as a substitute for missing :where
> > > command in debugging. But it looks like this doesn't work. If I use the
> > > following command:
> > >
> > > :redir @z | silent! echoerr "Dummy" | redir END
> > >
> > > then, I just get the message, no context. If I remove the ! for silent
> > > as,
> > >
> > > :redir @z | silent echoerr "Dummy" | redir END
> > >
> > > then, I get the context, but I see it on screen as well. It will be
> > > great (and useful to me) if this works the same as other message
> > > generating commands.
> > Yes, this is inconsistent. It was done this way for implementation
> > reasons (need to skip flushing buffers when ":silent!" is used). You
> > don't get the same message. I'll add a remark in the todo list.
> Thanks for adding it into the todo list, I will wait for it to be fixed.
> I have couple of ideas on using this output for breakpoints.
Vim the coming weeks. But perhaps someone else can make a patch for
this. It's all in the emsg() function.
hundred-and-one symptoms of being an internet addict:
269. You receive an e-mail from the wife of a deceased president, offering
to send you twenty million dollar, and you are not even surprised.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
- << Previous post in topic Next post in topic >>