unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mark Skilbeck <m@iammark.us>
To: Bastien <bzg@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Having browse-url-text-emacs open in other window
Date: Wed, 11 Jul 2012 15:35:18 +0100	[thread overview]
Message-ID: <20120711143518.GA19749@mark-laptop> (raw)
In-Reply-To: <87ehoidh3w.fsf@gnu.org>

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



      reply	other threads:[~2012-07-11 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 10:14 Having browse-url-text-emacs open in other window Mark Skilbeck
2012-07-10 10:23 ` Bastien
2012-07-10 10:41   ` Mark Skilbeck
2012-07-11  5:03     ` Bastien
2012-07-11 14:35       ` Mark Skilbeck [this message]

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20120711143518.GA19749@mark-laptop \
    --to=m@iammark.us \
    --cc=bzg@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).