quickly edit doesn't open GEdit as a background process

Bug #425305 reported by Jono Bacon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly
Fix Released
High
Didier Roche-Tolomelli

Bug Description

In the new release of Quickly (0.2.2), running 'quickly edit' does not return to the prompt when running gedit, not running it as a background process. Shell output:

jono@forge:~/source/flarebook$ quickly edit
gedit ./flarebook/PreferencesFlarebookDialog.py ./flarebook/Kindle.py ./flarebook/AboutFlarebookDialog.py ./flarebook/flarebookconfig.py bin/flarebook

Pressing enter does not bring back a prompt, and Ctrl-C kills GEdit.

I am running this on a up to date Karmic system.

Revision history for this message
Jono Bacon (jonobacon) wrote :

One other note, 'quickly glade' works as normal - running glade as a background process.

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Confirmed for me as well.

Quickly 0.2.2

Changed in quickly:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

didrocks ... looks like the fix you made to support default editors caused this to regress.

Perhaps we should consider gedit is *the* editor to use for quickly? Would sure simplify things.

Changed in quickly:
assignee: nobody → Didier Roche (didrocks)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hum, remembered that you bump "Medium" a bug to enable vim to use in Quickly? ;)
It may not be possible to support interactive editor with sending software in background, though.

Well, also, not launching gedit in background enables us to add some post-treatment to cleanup some files. For instance, we can imagine that we change every <tab> by 4 spaces once gedit is closed.

Reminder: we already launch glade as a background process.

So, I'm not sure if we should do something on this (understand: not sure we should consider it as a bug)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Ok, so, after having talked with Rick, we launch gedit in background (not other editors specified with EDITOR or sensible-editor) and invalidate bug 42810.

Changed in quickly:
status: Confirmed → Fix Committed
milestone: none → 0.2.3
Changed in quickly:
status: Fix Committed → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

I got pointed to this bug by Tony, when I questioned why we had this block of code. I don't think that this bug is fixed like we think it is. Both subprocess.call and os.system block on program exit. The difference is actually on the gedit side.

If a gedit process is already running, the new process will return immediately. But if it's the first to be run, the gedit process will stay running until the window is closed.

So we'd need some extra logic to guarantee special behavior for gedit. Do we still care about doing this? (i.e. should we re-open this?)

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

I'm seeing this on maverick now. I work around it by doing $quickly edit &

I think when I originally wrote $quickly edit, I used "&", fwiw.

Changed in quickly:
status: Fix Released → Confirmed
Revision history for this message
Tony Byrne (tony-badwolf) wrote :

This "bug" is not real (or fixable). All gui editors, there is nothing special about gedit, *might* like "&" and all non-gui editors, e.g. vim, don't want it. The comparison with $quickly glade is bogus, the "&" backgrounding seems to have disappeared, perhaps when $quickly design was introduced.

$quickly edit and $quickly design are currently consistent, the user needs to use & if he needs to reuse the terminal. What is the "high" priority use case here? Anyone can type &, if you forget and need a terminal, gnome-terminal can provide another one. I vote to kill the "bug" (even though I don't have a vote). One bug report in 18 months looks like nobody is bothered by this.

It can be fixed of course, query the deb where the editor came from, look for X window dependency, use & for gui editor. repeat for design, and maintain this pointless complexity.

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

I don't think the complexity is pointless. In Quickly, we design for the experience of our users, not for ourselves as maintainers and authors.

It's quite annoying for users when you do $quickly edit, and you can no longer use the $ to do $quickly run and such. I think we should check to see if Gedit is the configured editor (which it is by default) and launch it in the background. I think it's also a bug that $quickly design does not launch with &, so we should fix that as well.

Revision history for this message
Tony Byrne (tony-badwolf) wrote :

I suppose anyone who uses gedit as an IDE needs all the help they can get !

Another couple of defaults, consistent with this choice, could be to turn on debug logging while running from source i.e. $quickly run -v and something similar for $quickly create. I routinely $quickly create, then close immediately in order to $quickly run -v. The merge of preferences-dialog2 automatically turns on logging, at default warn level, via couchdb anyway.

Revision history for this message
Tony Byrne (tony-badwolf) wrote :

The gedit solution supports gedit users and command line editor users but does not support most IDE users. My preferred partial solution is attached. **Note** this patch needs fixing because gedit tries to open a file called &

Revision history for this message
Tony Byrne (tony-badwolf) wrote :

Here is the fix. Bug introduced in revision 519 enhance API with a real case usage: nautilus extension (still experimental)

Revision history for this message
Tony Byrne (tony-badwolf) wrote :

Here is the background design fix. Bug introduced in revision 519 enhance API with a real case usage: nautilus extension (still experimental)

Revision history for this message
Michael Terry (mterry) wrote :

Tony, I merged your design patch and used its same logic for edit. Thanks!

Changed in quickly:
milestone: 0.2.3 → none
status: Confirmed → Fix Committed
Michael Terry (mterry)
Changed in quickly:
milestone: none → 11.03.0
Michael Terry (mterry)
Changed in quickly:
status: Fix Committed → Fix Released
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.