unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: pop-to-buffer and friends new behavior or bug?
Date: Sun, 19 Jun 2011 20:49:32 +0200	[thread overview]
Message-ID: <8739j51wsj.fsf@gmail.com> (raw)
In-Reply-To: <4DFDF921.5090407@gmx.at> (martin rudalics's message of "Sun, 19 Jun 2011 15:26:57 +0200")

[-- Attachment #1: Type: text/plain, Size: 2657 bytes --]

martin rudalics <rudalics@gmx.at> writes:

>> In anything, i can browse image directory without quitting anything.
>> This function `anything-find-files-persistent-action', use
>> `display-buffer' and then display image with image-dired function in
>> this buffer.This doesn't work anymore (display-buffer).
>> The image is displayed ...in minibuffer!!!
>> However it is working fine if i use `switch-to-buffer'.
>> I have commited a fix at:
>> http://repo.or.cz/w/anything-config.git
>> where you can read the code.
>>
>> To reproduce with old code (the one that use display-buffer):
>> M-x anything-find-files
>> navigate to an image directory.
>> hit C-u C-z on an image filename
>> You will have the image displayed in minibuffer and it is impossible to
>> quit.
>>
>> The last code is working fine.
>
> Sorry, I build without image support so I won't be able to test this.
> Could you please try to edebug `display-buffer-reuse-window' and find
> out whether the line
>
> 	(when (and (not (window-minibuffer-p window))
>
> is processed in this particular case?  If `window' is a minibuffer
> window, it should not be added to the set of candidate windows denoted
> by the variable `windows'.
This line return t for both windows, but the whole when clause return
nil for one of the 2 windows.
I will try to debug more (hard because i have to quit emacs at each
time) later.

Here the relevant piece of code:

--8<---------------cut here---------------start------------->8---
;; An image file and it is the second hit on C-z,
;; show the file in `image-dired'.
((string-match (image-file-name-regexp) candidate)
 (when (buffer-live-p image-dired-display-image-buffer)
   (kill-buffer image-dired-display-image-buffer))
 (image-dired-display-image candidate)
 (message nil)
 ;(switch-to-buffer image-dired-display-image-buffer) <<<< [1] 
 (display-buffer image-dired-display-image-buffer)    <<<< [2]
 (with-current-buffer image-dired-display-image-buffer
   (let ((exif-data (anything-ff-exif-data candidate)))
     (image-dired-update-property 'help-echo exif-data))))

--8<---------------cut here---------------end--------------->8---
See Capture-Emacs.png for [2]
See Capture-Emacs-1.png for [1]

Where [1] is what is expected.

After [2] C-g do nothing and i must quit Emacs.

> Thank you, martin
>
>
> PS: Basically, there would be already a bug if `window' were a minibuffer
> window in the test above because my first list is constructed by calling
>
> (window-list-1 nil 'nomini method-frame)
>
> where the 'nomini argument should filter out minibuffer windows.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

[-- Attachment #2: Capture-Emacs-1.png --]
[-- Type: image/png, Size: 1736960 bytes --]

[-- Attachment #3: Capture-Emacs.png --]
[-- Type: image/png, Size: 1535016 bytes --]

  reply	other threads:[~2011-06-19 18:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 18:02 pop-to-buffer and friends new behavior or bug? Thierry Volpiatto
2011-06-16 20:16 ` Thierry Volpiatto
2011-06-16 20:35   ` martin rudalics
2011-06-16 22:00     ` Thierry Volpiatto
2011-06-17 15:46       ` martin rudalics
2011-06-17 16:01     ` Thierry Volpiatto
2011-06-18 16:10       ` martin rudalics
2011-06-18 17:19         ` Thierry Volpiatto
2011-06-18 19:53         ` Thierry Volpiatto
2011-06-19 13:26           ` martin rudalics
2011-06-19 18:49             ` Thierry Volpiatto [this message]
2011-06-20  8:29             ` Thierry Volpiatto
2011-06-20  9:24               ` martin rudalics
2011-06-20  9:59                 ` Thierry Volpiatto
2011-06-21 13:25                 ` Thierry Volpiatto
2011-06-21 14:41                   ` martin rudalics
2011-06-21 15:11                     ` Thierry Volpiatto
2011-06-21 16:12                       ` martin rudalics
2011-06-21 17:23                         ` Thierry Volpiatto
2011-06-22 16:00                           ` martin rudalics
2011-06-22 16:23                             ` Thierry Volpiatto
2011-06-23  9:49                               ` martin rudalics
2011-06-23 10:15                                 ` Thierry Volpiatto
2011-06-23 11:07                                   ` martin rudalics
2011-06-23 15:56                                     ` Thierry Volpiatto
2011-06-23 16:07                                       ` martin rudalics
2011-06-23 17:22                                         ` Thierry Volpiatto
2011-06-23 18:51                                         ` Thierry Volpiatto
2011-06-24  7:01                                           ` martin rudalics
2011-06-24  7:10                                             ` Thierry Volpiatto
2011-06-16 21:10 ` David Koppelman
2011-06-17 15:46   ` martin rudalics
2011-06-19 13:27   ` martin rudalics
2011-06-20 19:17     ` David Koppelman

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=8739j51wsj.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).