GNU bug report logs - #1806
dired-pop-to-buffer in wrong place

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Tue, 6 Jan 2009 15:40:04 UTC

Severity: normal

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #275 received at 1806 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Juri Linkov <juri <at> jurta.org>, 1806 <at> debbugs.gnu.org
Subject: Re: bug#1806: dired-pop-to-buffer in wrong place
Date: Thu, 30 Apr 2009 14:29:06 -0400
>> Why would it override it?  It would of course bind
>> split-window-preferred-function to a function that selects the right
>> window and then calls the previous value.

> Maybe you can come up with some advanced technique to do that but here I
> would have to define a variable to save the current (user provided)
> `split-window-preferred-function' and call the function I save there
> within the body of the function provided by dired.

I'd use something like

  (lexical-let ((oldfun split-window-preferred-function))
    (let ((split-window-preferred-function
           (lambda () (with-selected-window TOTO (funcall oldfun)))))
      BLABLA))

> Hence an extra variable would be needed anyway and I suppose it's
> easier to define that in window.el rather than in all packages that
> want to change the window to split (IIRC Calendar was one of these).

The above coding should be close to "standard practice" for locally
rebinding a *-function variable.  The "extra variable" doesn't matter,
it's not like we count variables.

Maybe what you're getting at is that we should make a hook to influence
the window-choice.  Maybe so.  But it doesn't seem urgent.


        Stefan




This bug report was last modified 12 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.