From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TGx1w61z?= Subject: Re: [bug] org-insert-link in different frame Date: Wed, 07 Apr 2010 18:16:50 +0200 Message-ID: <8639z7s0el.wl%lluis@ginnungagap.pc.ac.upc.edu> References: <86k4stzq2h.wl%lluis@ginnungagap.pc.ac.upc.edu> <0469E0FC-C43F-4FDD-A3C6-C700029D7DA7@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Wed_Apr__7_18:16:50_2010-1" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzXw1-0006Ff-PV for emacs-orgmode@gnu.org; Wed, 07 Apr 2010 12:16:57 -0400 Received: from [140.186.70.92] (port=49150 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzXw0-0006CQ-9R for emacs-orgmode@gnu.org; Wed, 07 Apr 2010 12:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzXvy-00058E-1y for emacs-orgmode@gnu.org; Wed, 07 Apr 2010 12:16:55 -0400 Received: from mail.gmx.net ([213.165.64.20]:49776) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NzXvx-00057v-Mz for emacs-orgmode@gnu.org; Wed, 07 Apr 2010 12:16:54 -0400 In-Reply-To: <0469E0FC-C43F-4FDD-A3C6-C700029D7DA7@gmail.com> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org --Multipart_Wed_Apr__7_18:16:50_2010-1 Content-Type: text/plain; charset=US-ASCII > 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 --Multipart_Wed_Apr__7_18:16:50_2010-1 Content-Type: text/plain; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="org.el.patch" Content-Transfer-Encoding: 7bit --- /usr/share/emacs/site-lisp/org-mode/org.el 2010-03-05 11:28:54.000000000 +0100 +++ /tmp//org.el 2010-04-07 18:11:42.000000000 +0200 @@ -8023,7 +8023,8 @@ (if (nth 1 x) (concat (car x) " (" (nth 1 x) ")") (car x))) (reverse org-stored-links) "\n")))) (let ((cw (selected-window))) - (select-window (get-buffer-window "*Org Links*")) + ;; must also search on other frames in case of using `redirect-frame-focus' + (select-window (get-buffer-window "*Org Links*" 'visible)) (setq truncate-lines t) (unless (pos-visible-in-window-p (point-max)) (org-fit-window-to-buffer)) --Multipart_Wed_Apr__7_18:16:50_2010-1 Content-Type: text/plain; charset=US-ASCII -- "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 Phantom Tollbooth --Multipart_Wed_Apr__7_18:16:50_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Multipart_Wed_Apr__7_18:16:50_2010-1--