* org-mode setting the browser with options
@ 2020-04-29 17:36 Neil Cherry
2020-04-29 19:45 ` Jude DaShiell
0 siblings, 1 reply; 5+ messages in thread
From: Neil Cherry @ 2020-04-29 17:36 UTC (permalink / raw)
To: Org Mode
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
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: org-mode setting the browser with options
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
0 siblings, 1 reply; 5+ messages in thread
From: Jude DaShiell @ 2020-04-29 19:45 UTC (permalink / raw)
To: Neil Cherry, Org Mode
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
>
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: org-mode setting the browser with options
2020-04-29 19:45 ` Jude DaShiell
@ 2020-04-29 22:30 ` Tim Cross
2020-04-29 22:49 ` Neil Cherry
0 siblings, 1 reply; 5+ messages in thread
From: Tim Cross @ 2020-04-29 22:30 UTC (permalink / raw)
To: Jude DaShiell; +Cc: emacs-orgmode, Neil Cherry
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.
--
Tim Cross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: org-mode setting the browser with options
2020-04-29 22:30 ` Tim Cross
@ 2020-04-29 22:49 ` Neil Cherry
2020-04-30 13:07 ` Neil Cherry
0 siblings, 1 reply; 5+ messages in thread
From: Neil Cherry @ 2020-04-29 22:49 UTC (permalink / raw)
To: Tim Cross, Jude DaShiell; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: org-mode setting the browser with options
2020-04-29 22:49 ` Neil Cherry
@ 2020-04-30 13:07 ` Neil Cherry
0 siblings, 0 replies; 5+ messages in thread
From: Neil Cherry @ 2020-04-30 13:07 UTC (permalink / raw)
To: Org Mode
On 4/29/20 6:49 PM, Neil Cherry wrote:
> 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!
Slight amendment, I think this code also helped:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(browse-url-browser-function (quote browse-url-default-browser))
'(browse-url-chrome-arguments (quote ("--no-proxy-server")))
'(browse-url-chrome-program "chrome")
)
Note that the extra lines I'm referring to are the 3 browse-url-... lines in the
custom-set-variables
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-30 13:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-04-30 13:07 ` Neil Cherry
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).