GNOME Bugzilla – Bug 169039
view source appears broken
Last modified: 2005-03-13 03:59:46 UTC
I've changed my text handler from gedit to emacs, but with both, ctl+u seems to bring up a blank editor. Any idea on debugging? This worked a week or two ago; I'm updating regularly with ubuntu so it seems something in there broke it recently.
View Source should create a file /tmp/epiphany-$user-$random/viewsource$random.html, and open that in the text/plain handler. Does that file get created, and does it have the right content? Does opening it directly in gedit work? Does it work if you gnome-open it? (The file is deleted when ephy exits, so you have to keep ephy running.) Which gedit version? Is XDG_DATA_DIRS set correctly? Is there a gedit.desktop file somewhere in $dir/applications/ for some $dir in $XDG_DATA_DIRS? Does it have a "Exec=gedit %U" line ?
>/tmp/epiphany-$user-$random/viewsource$random.html, and open that in the >text/plain handler. Does that file get created, and does it have the right >content? It does get created and it does have the right content. Well, sort of; it appears that we've regressed to the 'attempt to download again instead of using the version I'm currently browsing' behavior, but I guess that is probably a different bug. > Does opening it directly in gedit work? Yes. Or emacs. > Does it work if you gnome-open it? gnome-open attempts to open it in ephy. > Is XDG_DATA_DIRS set correctly? It is unset, but all my mime types appear to be handled correctly, if that is what you mean. The other questions imply this is gedit-specific, when it isn't, or that the problem is a mime-handler problem, when it isn't. If I make emacs the handler for text/plain using nautilus, then ephy opens emacs as expected. gedit is also opened as expected if that is the text/plain handler. The problem is not which app launches, or whether or not the app launches, but what content is in the app when it launches- i.e., 'none'.
Created attachment 38214 [details] [review] add some debugging messages Can you please try with this patch and report the output on going View->Page Source ? Thanks.
Created attachment 38331 [details] [review] proposed patch Go back to using gnome-vfs to launch the text/plain handler. It doesn't use libstartup-notification; instead I made the minimal patch, just manually generating the DESKTOP_STARTUP_ID to forward the timestamp to the app, and using gnome_vfs_mime_application_launch_with_env().
Created attachment 38361 [details] [review] use libstartup-notification alternative patch, preserve startup notification too
Created attachment 38362 [details] [review] remove some copied code, since we always already have a timestamp
Fixed in gnome-2-10 and HEAD. I couldn't reproduce the "it appears that we've regressed to the 'attempt to download again instead of using the version I'm currently browsing' behavior" part; if you can reproduce this please open another bug.