[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Default Editor option
From: |
Thomas Dickey |
Subject: |
Re: [Lynx-dev] Default Editor option |
Date: |
Wed, 7 Dec 2016 20:20:39 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Dec 07, 2016 at 05:34:28AM -0800, address@hidden wrote:
> This is my first post. I have joined the list to ask a question about Lynx
> rather than get involved in its development - I hope that’s alright! I
> should mention that I’m using a cygwin64 version of Lynx (2.8.7rel.1) for the
> SSL support, on Windows 10 x64.
>
> Although I’m embarrassed to ask something so basic, here it is: how shall I
> go about using the “Default Editor” option to open the currently displayed
> document with notepad, or another external editor, as the Default Editor
> (specified on the Options page and in lynx.cfg), instead of a blank temp
> file? The following may be clearer:
>
> As a starting point I’ve entered “notepad” in the appropriate field of the
> options page, and notepad does open, but not with the current document
> loaded. Instead it opens a new blank file. I’ve tried adding things like
> “%1“, “$1”, “%f”, “$file” etc., to the end of the line, but to no avail.
> Unfortunately I’m out of ideas, so thanks in advance to anyone that answers
> my boring question!
Lynx is supposed to add the filename, and is supposed to quote it
when the name contains blanks.
But things don't always work. I'd take a look at the trace log
to see what the actual command is. Here's a quick example showing
the lines to look for, in particular the one with "LYEdit":
HTParse: result:`/tmp/file%20name'
PARAM-EXP:vile
PARAM-ADD:vile '/tmp/file name'
PARAM-END:vile '/tmp/file name'
LYEdit: vile '/tmp/file name'
stop_curses: done.
LYSystem(vile '/tmp/file name')
start_curses: done.
edit_current_file returns 1
Given that line (which should use double-quotes on Windows), you
should be able to run the same text as a batch-file command.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature