#624 'nc -do "new()"' opens rarly on the current desktop

open
nobody
Program (402)
5
2008-02-21
2008-02-21
Bert Wesarg
No

two scenarios:

1st:
* start nedit on desktop 1
=> new Untitled
* switch to desktop 2
* execute 'nc -do "new()"'
=> new Untitled_1 in window from desktop 1

2nd:
* start nedit on desktop 1
=> new Untitled
* switch to desktop 2
* execute 'nc'
=> new Untitled_1 in window from desktop 2
* switch to desktop 1
* modify Untitled
* execute 'nc'
=> new Untitled_2 in window from desktop 1
* switch to desktop 2
* execute 'nc -do "new()"'
=> new Untitled_3 in window from desktop 1

Note: it doesn't matter, if you focus the window on the current window (if any), the -do macro is always executed from the last created document (I assume)

Discussion

  • Bert Wesarg

    Bert Wesarg - 2008-02-21

    Logged In: YES
    user_id=122956
    Originator: YES

    here is one idea to solve this:

    add a -desktop option to nedit/nc, and try to do all things on this desktop with the commands from the command line. nc can scan the command line and cann add a -desktop option with the current desktop if the option is missing

     
  • Tony Balinski

    Tony Balinski - 2008-02-22

    Logged In: YES
    user_id=618141
    Originator: NO

    I wouldn't add a new option to the command line. The principle of least surprise would open a new window on the current workspace: that is what should occur IMO. You type something in, you expect to see a result directly. If the command concerns a window in another workspace (you're not calling "new()"), that window should probably be brought into the current workspace too (especially with a raise_window() macro call) - though I can see more likelihood of this not being what you want...

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks