mime handling / file associations for conkeror in mac os x

View: New views
6 Messages — Rating Filter:   Alert me  

mime handling / file associations for conkeror in mac os x

by Vinh Nguyen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

dear conkeror list (again),

sorry for another post.  i was wondering whether any mac user has this
problem.  i have the following in my .conkerorrc file:
//** mime
define_mime_type_external_handler("*", "open");
define_mime_type_external_handler("application/pdf", "preview");
define_mime_type_external_handler("application/msword", "open");

when i follow a pdf file or so, conkeror gives me the option to save,
open etc.  it does recognize that the mime type is application/pdf.
however, if i choose 'save', the minibuffer shows my home directory
and the command 'preview' -- i assume the home directory is the
working directory and it is attempting to use the command 'preview' to
open the file.  if i hit RETURN, conkeror downloads the file to a
temp;orary location, and nothing happens.  the file doesn't get open.

i'm guessing the correct thing that should happen is the file would
open in preview.  does anyone else have this issue?  i tried this with
'open' and 'xpdf' as long with 'doc' files.  no luck.

i'm guessing the error is coming from either
1.  PATH issue, when conkeror issues the command it doesn't see all
the commands.  However, i do have my PATH set up in environment.plist
just like in my .bashrc file.
2.  it issues the command correctly, but not to the correct filename
path (issues command in home directory rather than where the file was
saved), so the file isn't found.

i even tried this with everything else commented out.

any thoughts?  thanks.

vinh

--
This e-mail/fax message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply e-mail/fax and destroy all copies
of the original message.
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: mime handling / file associations for conkeror in mac os x

by Jeremy Maitin-Shepard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vinh Nguyen <vinhdizzo@...> writes:

> dear conkeror list (again),
> sorry for another post.  i was wondering whether any mac user has this
> problem.  i have the following in my .conkerorrc file:
> //** mime
> define_mime_type_external_handler("*", "open");
> define_mime_type_external_handler("application/pdf", "preview");
> define_mime_type_external_handler("application/msword", "open");

> when i follow a pdf file or so, conkeror gives me the option to save,
> open etc.  it does recognize that the mime type is application/pdf.
> however, if i choose 'save', the minibuffer shows my home directory

Are you actually talking about what happens if you choose "open", rather
than "save"?

> and the command 'preview' -- i assume the home directory is the
> working directory and it is attempting to use the command 'preview' to
> open the file.  if i hit RETURN, conkeror downloads the file to a
> temp;orary location, and nothing happens.  the file doesn't get open.

> i'm guessing the correct thing that should happen is the file would
> open in preview.  does anyone else have this issue?  i tried this with
> 'open' and 'xpdf' as long with 'doc' files.  no luck.

Does M-! work for launching preview or open or any of these other
programs?

Note that there is a separate issue: Conkeror normally deletes temporary
files as soon as the requested program exits.  If "preview" or "open"
are such that they just send some request to an already running program
and then exit immediately, the file may be deleted before it can be
opened.  In that case, first downloading it via save, then using the x
command from the download buffer, should work.

You can also use the open url command from the download prompt by using
the "O" key.  That will just invoke the specified program with the URL
as the argument, which may give better results for you.

--
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: mime handling / file associations for conkeror in mac os x

by Vinh Nguyen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I GOT IT working jeremy!

1.  i realize that when launching emacs or conkeror with spotlight,
environment variables doesn't get passed, even if i have them in
environment.plist (this only affects when programs are launched in
Finder).  after some googling, http://www.digitaledgesw.com/node/31
showed me that if i want global env vars in mac os x, i need to modify
 /etc/launchd.conf as something like:
setenv PATH /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin:/Users/vinh/Documents/bin/:/opt/local/bin:/opt/local/sbin:/usr/texbin
i got that path by doing echo $PATH in the shell.  restart and every
program launched on the mac will have that PATH.  This is useful if u
compiled emacs 23 yourself with --with-next-step option.

2.  i tried your M-!, and i got this error:
Error spawning process: conkeror-spawn-helper not found; try running "make"
googling this yielded http://conkeror.org/CommonProblems , and i
reinstalled conkeror by first running make in the source folder.

this did the trick and mime worked.  i don't know if step 1 is needed,
but those are the steps i did and things are working.  thanks jeremy
and everyone.

maybe we should edit the mac INSTALL wiki to mention running make before running
/Library/Frameworks/XUL.framework/xulrunner-bin --install-app /path/to/conkeror

Vinh
--
This e-mail/fax message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply e-mail/fax and destroy all copies
of the original message.



On Wed, Aug 12, 2009 at 5:50 PM, Jeremy
Maitin-Shepard<jeremy@...> wrote:

> Vinh Nguyen <vinhdizzo@...> writes:
>
>> dear conkeror list (again),
>> sorry for another post.  i was wondering whether any mac user has this
>> problem.  i have the following in my .conkerorrc file:
>> //** mime
>> define_mime_type_external_handler("*", "open");
>> define_mime_type_external_handler("application/pdf", "preview");
>> define_mime_type_external_handler("application/msword", "open");
>
>> when i follow a pdf file or so, conkeror gives me the option to save,
>> open etc.  it does recognize that the mime type is application/pdf.
>> however, if i choose 'save', the minibuffer shows my home directory
>
> Are you actually talking about what happens if you choose "open", rather
> than "save"?
>
>> and the command 'preview' -- i assume the home directory is the
>> working directory and it is attempting to use the command 'preview' to
>> open the file.  if i hit RETURN, conkeror downloads the file to a
>> temp;orary location, and nothing happens.  the file doesn't get open.
>
>> i'm guessing the correct thing that should happen is the file would
>> open in preview.  does anyone else have this issue?  i tried this with
>> 'open' and 'xpdf' as long with 'doc' files.  no luck.
>
> Does M-! work for launching preview or open or any of these other
> programs?
>
> Note that there is a separate issue: Conkeror normally deletes temporary
> files as soon as the requested program exits.  If "preview" or "open"
> are such that they just send some request to an already running program
> and then exit immediately, the file may be deleted before it can be
> opened.  In that case, first downloading it via save, then using the x
> command from the download buffer, should work.
>
> You can also use the open url command from the download prompt by using
> the "O" key.  That will just invoke the specified program with the URL
> as the argument, which may give better results for you.
>
> --
> Jeremy Maitin-Shepard
>
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: mime handling / file associations for conkeror in mac os x

by Jeremy Maitin-Shepard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vinh Nguyen <vinhdizzo@...> writes:

> [snip]

I'm glad that you got it working.

> maybe we should edit the mac INSTALL wiki to mention running make before running
> /Library/Frameworks/XUL.framework/xulrunner-bin --install-app /path/to/conkeror

The wiki installation page for OS X references the steps for building
conkeror-spawn-helper but it doesn't have quite the right language, so
it should be updated.  Actually I see now that all of the installation
wiki pages have somewhat incorrect language regarding
conkeror-spawn-helper.  In particular, they mention that it is needed
for editing web page text fields in an external editor, but fail to
mention that it is in fact needed for any invocation of external
programs from Conkeror at all.

--
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Parent Message unknown Re: mime handling / file associations for conkeror in mac os x

by Silvio Levy-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks Jeremy, so here is where we are:

> Perhaps try directly inspecting the value of mime_type_external_handlers
> to ensure that it is correct.

Please, how can do I this?  In http://conkeror.org/UserVariables it
doesn't say, and the search box at the top (looking for "inspect",
"list variables" etc.) didn't help.

> To make Conkeror forget about PDF plugins, you should simply ensure that
> wherever xulrunner is looking for plugins, the PDF plugin cannot be found.  

Yes, this now works!  Earlier I had tried this and then (1) conkeror
would hang on any pdf file; (2) other browsers wouldn't display the
file either (naturally).

Silvio


_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror

Re: mime handling / file associations for conkeror in mac os x

by Jeremy Maitin-Shepard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Silvio Levy <levy@...> writes:

> Thanks Jeremy, so here is where we are:
>> Perhaps try directly inspecting the value of mime_type_external_handlers
>> to ensure that it is correct.

> Please, how can do I this?  In http://conkeror.org/UserVariables it
> doesn't say, and the search box at the top (looking for "inspect",
> "list variables" etc.) didn't help.

M-: dumpln(mime_type_external_handlers);  maybe

>> To make Conkeror forget about PDF plugins, you should simply ensure that
>> wherever xulrunner is looking for plugins, the PDF plugin cannot be found.  

> Yes, this now works!  Earlier I had tried this and then (1) conkeror
> would hang on any pdf file; (2) other browsers wouldn't display the
> file either (naturally).

Good that at least that works.

--
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
Conkeror@...
https://www.mozdev.org/mailman/listinfo/conkeror