@url URL Open Hangs Leo-Editor for duration (and lesser URL problems)

Bug #944551 reported by SegundoBob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
High
Edward K. Ream

Bug Description

I tested @url nodes with the URL in the first line of the body doing the open with command double-click-icon-box.
Actually I usually used my shortcut Alt+F3 for double-click-icon-box, but this does not effect the results.

I tested 4 kinds of URL:

    Text file (Example, file:///home/bob/tmp/address.txt):
        Opens the text file with the default text file editor. Leo-Editor hangs till the text editor exits.
        About 2011-11-12 when I noticed that this kind of URL no longer worked as I expected, Leo-editor opened a text file with the default web browser; and Leo-Editor did not hang. So there have been changes, but more are needed.

    Directory (Example, file:///media/datw1/BobH/1/Leo):
        Opens the directory with the default file browser. Leo-Editor hangs till the file browser exits.
        About 2011-11-12 when I noticed that this kind of URL no longer worked as I expected, Leo-editor opened a directory with the default web browser; and Leo-Editor did not hang. So there have been changes, but more are needed.

    Leo-Editor outline (Example, file:///media/datw1/BobH/1/Leo/json.leo#@bookmarks-->Directed%20Graph%20Editor):
        Opens the outline in another tab. Does not hang Leo-Editor. But does not go to the node specified by the "extended URL."

    Web page (Example, http://writemonkey.com/index.php):
        Opens the URL with the default browser. Does not hang Leo-Editor. This works as expected. No problems.

The following bugs are related to this one in that they concern URL handling:
https://bugs.launchpad.net/leo-editor/+bug/893228
https://bugs.launchpad.net/leo-editor/+bug/893230
https://bugs.launchpad.net/leo-editor/+bug/893231

The following bug is related to this one in that the major problem reported by both is Leo-Editor hanging till a child process terminates:
https://bugs.launchpad.net/leo-editor/+bug/944009

I tested Leo-Editor Rev 5051 under Ubuntu with the Fluxbox window manager.

Leo Log Window
Leo 4.9.1 devel, build 5051, 2012-03-01 09:43:54
Python 2.7.2, qt version 4.7.3
linux2
setting leoID from os.getenv('USER'): 'bob'
load dir: /home/bob/bzr/LeoLatest/leo/core
global config dir: /home/bob/bzr/LeoLatest/leo/config
home dir: /home/bob
reading settings in /home/bob/bzr/LeoLatest/leo/config/leoSettings.leo
reading settings in /home/bob/.leo/myLeoSettings.leo
reading settings in /media/datw1/BobH/1/Leo/Leo.leo
reading: /media/datw1/BobH/1/Leo/Leo.leo
--- End Log Window ------------

Changed in leo-editor:
importance: Undecided → High
assignee: nobody → Edward K. Ream (edreamleo)
Changed in leo-editor:
milestone: none → 4.10-b1
Revision history for this message
Edward K. Ream (edreamleo) wrote :

Fixed on the trunk at rev 5088.

- Removed "significant" calls to os.system. os.system is deprecated, though it's alright to call os.system('cls').

- Added support for unit testing to g.os_startfile, g.recursiveUNLSearch & g.handleUrl

- Added new unit test. This test passes, as does hand tests pass. Both sets of tests are important.

Changed in leo-editor:
status: New → Fix Released
Revision history for this message
SegundoBob (bhossley) wrote :

Sorry. Bad news.

I see no change from the behavior I reported on 2012-03-02.

Current Test system:
Ubuntu 11.10 with Fluxbox window manager
Leo Log Window
Leo 4.9.1 devel, build 5089, 2012-03-07 17:16:32
Python 2.7.2, qt version 4.7.3
linux2
setting leoID from os.getenv('USER'): 'bob'
load dir: /home/bob/bzr/LeoLatest/leo/core
global config dir: /home/bob/bzr/LeoLatest/leo/config
home dir: /home/bob
reading settings in /home/bob/bzr/LeoLatest/leo/config/leoSettings.leo
reading settings in /home/bob/.leo/myLeoSettings.leo
reading settings in /home/bob/.leo/workbook.leo
reading: /home/bob/.leo/workbook.leo

Revision history for this message
Edward K. Ream (edreamleo) wrote : Re: [Bug 944551] Re: @url URL Open Hangs Leo-Editor for duration (and lesser URL problems)

On Wed, Mar 7, 2012 at 7:30 PM, SegundoBob <email address hidden> wrote:
> Sorry.  Bad news.

No big deal. I forgot to change g.os_startfile. At present, it calls
os.system on Linux. I'll fix this immediately.

Edward

Revision history for this message
Edward K. Ream (edreamleo) wrote :

Rev 5090 fixes g.os_startfile by calling the following on Linux:

    subprocess.call('xdg-open %s' % (fname),shell=True)

This works as expected for me on Linux.

Revision history for this message
SegundoBob (bhossley) wrote :

Thanks. Your fix works for me when I use Ubuntu 11.10 with Gnome Classic desktop.

Sadly for me, your fix has no effect on Ubuntu 11.10 with the Fluxbox window manager.

Leo Log Window
Leo 4.9.1 devel, build 5093, 2012-03-08 09:36:00
Python 2.7.2, qt version 4.7.3
linux2
setting leoID from os.getenv('USER'): 'bob'
load dir: /home/bob/bzr/LeoLatest/leo/core
global config dir: /home/bob/bzr/LeoLatest/leo/config
home dir: /home/bob
reading settings in /home/bob/bzr/LeoLatest/leo/config/leoSettings.leo
reading settings in /home/bob/.leo/myLeoSettings.leo
reading settings in /media/datw1/BobH/1/Leo/Leo.leo

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.