[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pop-to-buffer and friends new behavior or bug?
From: |
Thierry Volpiatto |
Subject: |
Re: pop-to-buffer and friends new behavior or bug? |
Date: |
Thu, 23 Jun 2011 12:15:09 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
martin rudalics <address@hidden> writes:
>>> If a user changes that setting, this mechanism won't work as intended.
>> Which different setting a user could use here for example?
>> pop-up-frames?
>
> The user could have made the window dedicated in which case
> `same-window' won't work. You should use a fallback in that case.
Ok thanks, i will try to fix this.
> Anyway, testing things with anything.el revealed three bugs in my code
> so this was a very fruitful experience for me. Please try your original
> code with the latest sources and tell me whether it works.
I will.
Here another one:
Use C-t while in anything.
=> byte-code: Attempt to split minibuffer window
Here relevant code in anything.el:
#+BEGIN_SRC lisp
;; Original function that fail
(defun anything-toggle-resplit-window ()
"Toggle resplit anything window, vertically or horizontally."
(interactive)
(with-anything-window
(let ((before-height (window-height)))
(delete-window)
(set-window-buffer
(select-window (if (= (window-height) before-height)
(split-window-vertically)
(split-window-horizontally)))
anything-buffer))))
;; A quick fix that fix it (not fully tested, just write quickly now)
(defun anything-toggle-resplit-window ()
"Toggle resplit anything window, vertically or horizontally."
(interactive)
(let (before-height)
(with-anything-window
(setq before-height (window-height))
(delete-window))
(with-selected-window (get-buffer-window anything-current-buffer)
(set-window-buffer
(select-window (if (= (window-height) before-height)
(split-window-vertically)
(split-window-horizontally)))
anything-buffer))))
#+END_SRC
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- Re: pop-to-buffer and friends new behavior or bug?, (continued)
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/20
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/20
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/21
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/21
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/21
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/21
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/21
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/22
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/22
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?,
Thierry Volpiatto <=
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/23
- Re: pop-to-buffer and friends new behavior or bug?, martin rudalics, 2011/06/24
- Re: pop-to-buffer and friends new behavior or bug?, Thierry Volpiatto, 2011/06/24
Re: pop-to-buffer and friends new behavior or bug?, David Koppelman, 2011/06/16