Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#425 Send to browser not working...

closed
nobody
None
5
2004-10-13
2004-04-30
Pat Niemeyer
No

Unless there is some trick to it, opening a URL in the
default browser isn't working in 0.8. When I command
click on a a URL I only get the character or the
contiguous word under the pointer sent to the browser.
Sometimes the browser will not open at all unless I
randomly play with the UI for a while. I've tried
highlighting the text, not highlighting it, etc...

thanks,
Pat

Discussion

  • Logged In: YES
    user_id=171129

    Command-click on a word goes looking for the beginning and end of the
    word and sends the word to the browser. Characters normally included
    are just letters. If you want non-letters to be included as part of the
    word, you need to se the preference "Characters considered part of
    word" under Preferences->General. For example, in my settings, I have:

    /*_-~@&.

    That has been quite successful for me in grabbing most URLs. In the
    latest CVS code, there have been some improvements, but you need to
    commnd-double-click.

     
  • Pat Niemeyer
    Pat Niemeyer
    2004-05-01

    Logged In: YES
    user_id=18885

    Ok, thanks - so I see the "characters considered part of word" setting...
    But I still must be a little confused - what possible use could it be to send
    a plain word to the browser? Also, the char set you sent doesn't match
    URLs because it doesnt' include :. It is a pretty easy thing to match a
    URL, I hope the new code you mentioned looks for the protocol://host/
    path[?&] pattern itself... because it would be *very* useful.

    Perhaps I should shut up and get the code to have a look... but I'd have
    to put my C/C++ hat on again...

    Thanks,
    Pat

     
  • Logged In: YES
    user_id=171129

    Of course, just a word is no good for a browser. It behaves like that
    because it does first:

    1. find word under click
    2. then tries to match found word to a URL protocol.

    for example foo@bar.org (without the mailto://) needs to be recognized
    as a mail URL and needs to be sent to the mailer rather than browser.
    The protocol prefix is not always present, e.g. developer.apple.com is a
    URL that you might want to click on.

    I am sure this thing can be implemented better; we are kind of using a
    homebrewed version.

    In previous iTerm versions, you could use ICeCoffEE which did the job
    pretty well, but since we implemented a custom text view, that stopped
    working, so we had to roll our own.

    And lastly, you are absolutely correct about having to include the ':'
    character. My bad.

     
    • status: open --> closed