Monday, March 28, 2011

Re: Missing output from echo command ?

Yesterday Ben Schmidt <mail_ben_schmidt@yahoo.com.au> wrote:
> Can you try to make a small test case with a particular file
> and exact steps which can be followed to demonstrate the problem?

Here is a test file and test instructions.
I am including the file in-line between lines of =============
delimiters.

After you extract the test file, you need to clean it up, as the mails
modify some content.
1. You need to remove the ' ' blank inserted in each 'From - ...'
line. :g/^ From - /s/^ // should take care of that.
2. You need to remove the null lines inserted right after the
'X-Mozila-Keys: ...' lines.
:g/^X-Mozilla-Keys: / .+1d should take care of that.

Now you should be ready to test.
I am on an Intel cpu, MS WIN 7 x 64 ultimate system, with (SP1).
My VIM is an unmodified installation of 7.3 as downloaded from vim.org.
I have stored the test file as t13.txt on my desktop
I start the edit by right clicking on the t13.txt icon and selecting
edit with vim.
1. :set number
2. :set so=999
3. :hi Visual guibg=#bbbbbb
4. :1
5. : let ln = 999 | echo ln | let ln = search('^From - ','W') | echo ln
As outcome I get:
999
2
and the cursor moves to line 2
6. Repeat step 5 by pressing : up-arrow and enter.
As outcome I get:
the cursor moves to line 69
(???). I expected.
999
69
and the cursor to move to line 69
7. Repeat step 6. and keep repeating.

Now you can play with your own variations.

================ begin test file ====================

From - Sun Mar 27 22:42:41 2011
X-Account-Key: account2
X-UIDL: AH9ck0UAAEeWTY+30g8vqWjc9eI
X-Mozilla-Status: 0012
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Message-ID: <4D8FB7CC.9000804@yahoo.com.au>
Date: Mon, 28 Mar 2011 09:18:52 +1100
From: Ben Schmidt <mail_ben_schmidt@yahoo.com.au>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB;
rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5
MIME-Version: 1.0
To: vim_use@googlegroups.com
CC: Rostyslaw Lewyckyj <urjlew@bellsouth.net>
Subject: Re: Missing output from echo command ?
References: <4D8FA8A5.5060700@bellsouth.net>
In-Reply-To: <4D8FA8A5.5060700@bellsouth.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

> I'm getting irreproducible/unexplainable results!

If they're not reproducible, we may have trouble helping!

> I set up a test file of ~400 lines of downloaded vim_use articles.
> Some lines: (100,200,250,350) begin with 'From - ...'
> Some lines: (150,230,270,390) are null. {End of header ...}
>
> @ line 150, I try
> :let ln = 999 | echo ln | let ln = ('^From - ','W') | echo ln

That must be missing something. Should there be 'search' before those
parentheses?

> Now I try @ 101
> :let ln = ('^$','W') | echo ln
> expecting to get
> 150
> and cursor moves to line 150
>
> I get the cursor motion, BUT not the expected :echo ln output of 150 !!
> After more playing around, @ 391 I get
> 0
> and no cursor movement

Mmm. This kind of thing is working for me. But if it's stopping working
at some point, we need to try to figure out what makes it stop.

> Also going back to the previous command line:
> :let ln = 999 | echo ln | let ln = ('^From - ','W') | echo ln
> I no longer get the echo outputs. But I do get the cursor moves
> to next ^From - line, UNTIL the last case i.e. @ 350
> Then I get
> 999
> 0
> no cursor movement. i.e. stay on line 350
> ???

That's correct, isn't it? There is no "From - " after line 350.

Can you try to make a small test case with a particular file and exact
steps which
can be followed to demonstrate the problem?

Ben.


From - Sun Mar 27 22:42:41 2011
X-Account-Key: account2
X-UIDL: AH1ck0UAACXXTY+87wDNtxuBf9o
X-Mozilla-Status: 0010
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Message-ID: <4D8FBCC5.5050000@yahoo.com.au>
Date: Mon, 28 Mar 2011 09:40:05 +1100
From: Ben Schmidt <mail_ben_schmidt@yahoo.com.au>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB;
rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5
MIME-Version: 1.0
To: vim_use@googlegroups.com, Malte Forkel <malte.forkel@berlin.de>
Subject: Re: Scrolling "by timestamp"
References:
<579b064e-41a6-4df3-903e-8ea006348b17@y31g2000vbp.googlegroups.com>
<im08dr$mgn$1@dough.gmane.org> <4D8419AE.3040306@bellsouth.net>
<im1u3b$6e6$1@dough.gmane.org> <4D849A2B.7050305@yahoo.com.au>
<im34ql$7po$1@dough.gmane.org> <4D859638.9030608@yahoo.com.au>
<4D88EB00.1000903@berlin.de> <4D89F91B.3070800@yahoo.com.au>
<4D8A657D.9020800@berlin.de> <20110324010038.GA5432@KCJs-Computer>
<imf56g$3fo$1@dough.gmane.org>
In-Reply-To: <imf56g$3fo$1@dough.gmane.org>
Reply-To: vim_use@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> As far as changing diff's strategy is concerned, I'm stuck. The only
> promising option for the diff that came with my Windows installation of
> vim is
> -H Assume large files and many scattered small changes
> But I still get
>

Maybe do a bit more preprocessing of your files before sending them to
diff, making the first line with any given timestamp unique so diff
'synchronises' on those. A little loop like this after your :s command
might do the trick (if it isn't too slow).


From - Sun Mar 27 22:42:42 2011
X-Account-Key: account2
X-UIDL: AGNck0UAARNETY/HYwu7HHZvKLc
X-Mozilla-Status: 0000
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Organization: China Pharmaceutical University
Subject: Curious about how to write vim help format txt.
To: vim_use@googlegroups.com
From: "Yue Wu" <vanopen@gmail.com>
Date: Mon, 28 Mar 2011 07:24:39 +0800
MIME-Version: 1.0
Message-ID: <op.vs0zbby3xg2sb1@ywuw2k>
User-Agent: Opera Mail/11.01 (Win32)
Reply-To: vim_use@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

I like vim help style, it has toc, tag support, nice alignment.

I know the syntax used in vim help, but I'm curious how the author to
generate toc, indent, align the whole help?


From - Sun Mar 27 22:42:42 2011
X-Account-Key: account2
X-UIDL: AG1ck0UAAKNqTY/KTAekXUJhDLE
X-Mozilla-Status: 0010
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Message-Id: <201103280337.04335@-zyx>
From: ZyX <zyx.vim@gmail.com>
Reply-To: vim_use@googlegroups.com
To: vim_use@googlegroups.com
Subject: Re: Curious about how to write vim help format txt.
Date: Mon, 28 Mar 2011 03:37:03 +0400
User-Agent: KMail/1.13.5 (Linux/2.6.36-zen1; KDE/4.5.5; x86_64; ; )
References: <op.vs0zbby3xg2sb1@ywuw2k>
In-Reply-To: <op.vs0zbby3xg2sb1@ywuw2k>
MIME-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Reply to message =ABCurious about how to write vim help format txt.=BB,=20
sent 03:24:39 28 March 2011, Monday
by Yue Wu:

I personally do it manually now. Though I do not thing that it will be too =
hard=20
to write perl script for it.

Original message:
> I like vim help style, it has toc, tag support, nice alignment.
>=20
> I know the syntax used in vim help, but I'm curious how the author to
> generate toc, indent, align the whole help?


From - Sun Mar 27 22:42:43 2011
X-Account-Key: account2
X-UIDL: AGVck0UAAH3kTY/eWganxVDjwSM
X-Mozilla-Status: 0010
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Date: Sun, 27 Mar 2011 21:02:44 -0400
Message-ID: <AANLkTikHU2LKMkQCGrMr=7uLO=CZRJ_5afkEr-y2zvh9@mail.gmail.com>
Subject: Re: Beta Colorscheme - Solarized
From: sigzero <sigzero@gmail.com>
To: "vim_use@googlegroups.com" <vim_use@googlegroups.com>
Reply-To: vim_use@googlegroups.com
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Awesome

On Sunday, March 27, 2011, Ethan Schoonover <es@ethanschoonover.com> wrote:
> For informational purposes I wanted to close out this thread, more or
les=
s by saying I did update the red. Changelog excerpt:
> * =A0 [global] Modified red from L\*a\*b lightness value 45 to 50 to
brin=
g it in=A0 =A0 line with the other accent colors and address bleed into dar=
k background on=A0=A0 =A0 some displays, as well as reducing shift of red a=
gainst base03 when viewed=A0=A0 =A0 with glasses (chromatic aberration). Al=
l instances of the colorscheme and=A0=A0 =A0 palettes updated to new red.


=============== End of test file ==================
-- Rostyk

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: