lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Default Editor option


From: Tim Chase
Subject: Re: [Lynx-dev] Default Editor option
Date: Wed, 7 Dec 2016 20:35:01 -0600

On 2016-12-07 20:20, Thomas Dickey wrote:
> > 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.
> 
> 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

Could it be a race condition since I seem to recall that Windows forks
the process?  The events could possibly transpire something like

 lynx spawns "notepad $FILENAME"

 notepad execs as a separate process

 control returns to lynx

 lynx cleans up the tmp file

 notepad binary has loaded

 notepad goes to open $FILENAME but can't find it, leaves window empty

Is it possible to spawn notepad with some sort of "wait" directive?
Maybe something like described at

http://superuser.com/questions/908664/have-the-command-prompt-launch-an-application-like-notepad-and-block-until-it-is

I don't have a Windows box at hand currently to test the theory, but
perhaps someone else here can bang at the idea.

-tim






reply via email to

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