Closed Bug 454022 Opened 16 years ago Closed 16 years ago

external editor functionality doesn't work on Mac

Categories

(Toolkit :: View Source, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: Gavin, Assigned: Gavin)

References

Details

Attachments

(1 file)

You need to point the view_source.editor.path pref to the executable rather than the .app, because that's what nsIProcess knows how to deal with, but isExecutable returns false for the executable on Mac due to bug 322865, so we fail to initialize the editor in getExternalViewSourceEditor (and fail silently because we silently ignore getExternalViewSourceEditor returning null and fall back to the internal viewer).

I think we should just remove the isExecutable check and let nsIProcess::run throw in those cases.
Attached patch patchSplinter Review
Remove some of the checks and just report exceptions (people using this pref should be able to figure out why it isn't working based on the code).
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #337250 - Flags: review?(zeniko)
Target Milestone: --- → mozilla1.9.1b1
Comment on attachment 337250 [details] [diff] [review]
patch

Right, silently failing isn't really helpful. r=me
Attachment #337250 - Flags: review?(zeniko) → review+
http://hg.mozilla.org/mozilla-central/rev/94be66642c62
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
view_source.editor.path is not working in the latest official beta, Firefox 3.1 Beta 2.  does this need reopening?

(Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2)
Are you sure you're setting the pref correctly? Note that you can't point to a .app bundle, you need to point to the executable file inside it. If you still can't get it to work, please file a new bug and include output from the error console with javascript.options.showInConsole set to true using about:config.
What's an example of how to point to the executable?  (for example, using TextEdit.app as an example).  Pointing to .app seems more intuitive, but I suppose that's for another day.
(In reply to comment #7)
> What's an example of how to point to the executable?  (for example, using
> TextEdit.app as an example).  Pointing to .app seems more intuitive, but I
> suppose that's for another day.

/Applications/TextEdit.app/Contents/MacOS/TextEdit
Confirmed as working in Firefox 3.1b2.  Thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: