[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Having browse-url-text-emacs open in other window
From: |
Mark Skilbeck |
Subject: |
Re: Having browse-url-text-emacs open in other window |
Date: |
Wed, 11 Jul 2012 15:35:18 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jul 11, 2012 at 07:03:31AM +0200, Bastien wrote:
> Hi Mark,
>
> Mark Skilbeck <m@iammark.us> writes:
>
> > Indeed, I saw this while browsing the documentation. However, it
> > doesn't do as it says-on-the-tin, at least not in my experience.
>
> Sorry I misread the documentation myself.
>
> I would advise the function like this:
>
> (defadvice browse-url (before browse-url-other-window activate)
> (switch-to-buffer-other-window (get-buffer-create "*Browser*")))
>
> HTH,
>
Cool! That works almost perfectly. However, there is a dangling
*Browser* buffer when I leave the browser process. I got around this
by doing:
(defadvice browse-url (before browse-url-other-window activate)
(switch-to-buffer-other-window nil t))
However, this isn't *entirely* desirable. If I have two windows, A and
B, split vertically with a buffer C not displayed, using the above
advice, either A or B (depending on which window is switched-into) is
changed to the C buffer on exiting the browser. It's not a show
stopper, in fact it's much better than the default behaviour of
opening the browser in the same window!
Thanks for your help.
--
- mgs.
if all you young men / were fish in the water
how many young girls / would undress and dive after