From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [bug] org-insert-link in different frame Date: Thu, 8 Apr 2010 09:18:59 +0200 Message-ID: <171C4424-36C6-4E08-8A7E-471549788F4F@gmail.com> References: <86k4stzq2h.wl%lluis@ginnungagap.pc.ac.upc.edu> <0469E0FC-C43F-4FDD-A3C6-C700029D7DA7@gmail.com> <8639z7s0el.wl%lluis@ginnungagap.pc.ac.upc.edu> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzmkW-0007DC-4D for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 04:06:04 -0400 Received: from [140.186.70.92] (port=33334 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzmkU-0007D0-5t for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 04:06:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzmkS-0003Ac-G3 for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 04:06:01 -0400 Received: from mail-fx0-f212.google.com ([209.85.220.212]:50270) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzmkS-0003AP-BL for emacs-orgmode@gnu.org; Thu, 08 Apr 2010 04:06:00 -0400 Received: by fxm4 with SMTP id 4so1892206fxm.26 for ; Thu, 08 Apr 2010 01:05:57 -0700 (PDT) In-Reply-To: <8639z7s0el.wl%lluis@ginnungagap.pc.ac.upc.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?ISO-8859-1?Q?Llu=EDs?= Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Apr 7, 2010, at 6:16 PM, Llu=EDs wrote: >> Hi Lluis, would you like to make a patch for me to fix this? > > Here it goes. > > Note that I've found some weirdness that I don't know how to solve, > and might well be a systemic problem of the current implementation of > `framepop' (or either a lack of elisp knowledge from my part): > > - Bind an org-mode buffer to framepop from "frame0" > (`framepop-display-buffer'); this creates "framefp" and calls > `redirect-frame-focus', redirecting "framefp" to "frame0" > - Create a new frame "frame1". > - Call `suspend-frame' on "frame0" > - Switch to "framefp" and call `org-insert-link' > > This has the unfortunate effect of showing the "*Org Links*" buffer in > "frame1", and then raising "frame0" for the user input in the > minibuffer. > > Result? If both "frame0" and "frame1" were on the same screen, the > former is on top of the latter, thus preventing the useer to see the > "*Org Links*" buffer. > > After some tests, I've also found that `get-buffer-window' prefers > "frame1" even when `org-completing-read' later on uses "frame0" for > the minibuffer, so this is still confusing to use (now without having > `suspend-frame' on "frame0"). > > My elisp knowledge is too limited to find a solution to this, but the > patch at least works in the simple case of "frame0"+"framefp" (which > is the schenario that raised the initial error). > > > Read you, > Lluis > > > > > -- > "And it's much the same thing with knowledge, for whenever you learn > something new, the whole world becomes that much richer." > -- The Princess of Pure Reason, as told by Norton Juster in The =20 > Phantom > Tollbooth - Carsten