emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Neil Cherry <ncherry@linuxha.com>
To: Tim Cross <theophilusx@gmail.com>, Jude DaShiell <jdashiel@panix.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode setting the browser with options
Date: Wed, 29 Apr 2020 18:49:25 -0400	[thread overview]
Message-ID: <89a27cb6-b793-421c-7ac6-7bc55ec31963@linuxha.com> (raw)
In-Reply-To: <87k11yrklj.fsf@gmail.com>

On 4/29/20 6:30 PM, Tim Cross wrote:
> 
> Jude DaShiell <jdashiel@panix.com> writes:
> 
>> Two different scripts one yproxy and the other nproxy.
>> Put the necessary running code in each.
>>
>> On Wed, 29 Apr 2020, Neil Cherry wrote:
>>
>>> Date: Wed, 29 Apr 2020 13:36:50
>>> From: Neil Cherry <ncherry@linuxha.com>
>>> To: Org Mode <emacs-orgmode@gnu.org>
>>> Subject: org-mode setting the browser with options
>>>
>>> I need to use 2 different Windows browser (proxy and no-proxy is the reason).
>>>
>>> What I want to do is that if it's example.com use firefox (no options). If it's
>>> example.org use chrome --no-proxy-server. I'm not exacly sure how to approach this.
>>>
>>> Thanks
>>>
>>>
> 
> I would look at browse-url built-in package. With browse-url you can set
> a function that will determine which browser to use based on the url and
> you can set the options for each supported browser. 
> 

Thanks, that got me thinking and search-fu found:

(setq
 browse-url-browser-function
 '(
  ("example\\.com" . browse-url-chrome)
  ("example\\.org" . browse-url-chrome)
  ("." . browse-url-default-browser)
  ))

Which works perfect!

Thanks
-- 
Linux Home Automation         Neil Cherry       ncherry@linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies


  reply	other threads:[~2020-04-29 22:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 17:36 org-mode setting the browser with options Neil Cherry
2020-04-29 19:45 ` Jude DaShiell
2020-04-29 22:30   ` Tim Cross
2020-04-29 22:49     ` Neil Cherry [this message]
2020-04-30 13:07       ` Neil Cherry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89a27cb6-b793-421c-7ac6-7bc55ec31963@linuxha.com \
    --to=ncherry@linuxha.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jdashiel@panix.com \
    --cc=theophilusx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).