[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Transferring page text from lynx to vim

From: Graham Lawrence
Subject: Re: [Lynx-dev] Transferring page text from lynx to vim
Date: Mon, 3 Oct 2011 07:12:29 -0700

Thank you for your responses, I should have given you more information.  I have no professional background in IT, just personal use; of lynx < 2 years, linux < 1 year, vim < 1 month.  Mostly what I do with my computer is write notes concerning the use of the linux apps I use.  Currently most of my notes are about vim.

In lynx, I google my question, choose the response that speaks to my level of expertise and either copy and paste some text from lynx to vim or in xterm issue the command
lynx -dump url > file
then in vim I do
:r file

My most recent discovery in vim is :map and so I immediately wanted to do something like
:map ln :!lynx -dump url > file<CR>:r file<CR>

The sticking point is the value of url, how do I get it programmatically, hence my question about a global variable.

On Sun, Oct 2, 2011 at 10:15 AM, Thomas Dickey <address@hidden> wrote:
On Sun, 2 Oct 2011, Graham Lawrence wrote:

Does lynx happen to put the address of the current page in some global
variable?   So then I could create a key mapping in vim that would cause
lynx to dump the page to a constant filename, and insert that file's text
where I want it in the vim buffer.

yes/no - it's a member of a structure.  GridText.c (which is the file
that formats the current document into a display).  Its notion of the
current document is an HText (structure) named HTMainText.  The address is in an HTAnchor named HTParentAnchor.  HTAnchor's contain addresses and

But dumping is a special case of display - it bypasses most of GridText.c

However - to your point - when you're telling lynx to dump a file, that
goes to the standard output.  Redirecting that with a script should be
simple.  (That doesn't require knowing anything about the variables that
lynx uses).

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]