From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: [feature request] org-capture-window-setup to stop capture window taking up whole frame Date: Thu, 18 Jun 2015 13:45:19 +0200 Message-ID: References: <87zj4ate9f.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5YGF-0005Te-Vd for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:45:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5YGC-0007Cu-Q4 for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:45:35 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:38372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5YGC-0007CK-Jc for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:45:32 -0400 In-Reply-To: (Xebar Saram's message of "Thu, 18 Jun 2015 14:16:46 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Xebar Saram Cc: org mode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-06-18 13:16, Xebar Saram writes: > Hi Alan > > your code seems very intersting and i have been looking for something like > this for a while. yet for me it opens a new frame without org capture. i = use > linux (arch) and put in the following code. please note that when i evaled > your code it said: > `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-let= f'. > so i changed flet to cl-flet and it still didnt work :) I don't know how to change this code to not use flet, so I live with the warning. > > here is the code > > (defun make-orgcapture-frame () > "Create a new frame and run org-capture." > (interactive) > (make-frame '((name . "remember") (width . 80) (height . 16) > (top . 400) (left . 300) > (font . "Pragmata Pro-16") > )) > (select-frame-by-name "remember") > (delete-other-windows) > (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf))) > (org-capture nil "t"))) > > ;; delete the frame in that case > (add-hook 'org-capture-after-finalize-hook > (lambda () > (when (equal > (cdr (assoc 'name (frame-parameters (selected-frame)))) > "remember") > (delete-frame)))) > > any ideas? =2D if you evaluate ( M-: ) "(org-capture nil "t")", does it start a capture? =2D if yes, can you get rid of the flet and just have (org-capture nil "t") instead (it should create a frame a split the window in two with a capture buffer) =2D if it still works like this, then the problem is in the flet, and I don't know what to do. Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJVgq9PAAoJEAQNCjtO0uXHDvsH/RLMbj3fGX87ol0Xdfw2kZb7 XrwhCJvKyxnSaw4Sl+K8ZHkSC9ceW9vRx1DjcVG2kkudpCMliKtRU6rf83HvsD1Q pYP2SaD/I4N5REj8d5auzB8EsK40xl2GIAok4wALZViZoSwQyboXeNOUooFzcDv5 i939EC5KxyRaAFq4gKsdzSNrZxwy9clbVAJkXaKEbmMfTX4KllMEgrr8CL7wwP/q Ngc3jH/8tPw5uVZNIXrsjQCE6B5C6q8Gw7zDt7nR8JP+1ZO1Uz78r6EHRtBrogoe kDdIsdVboTdta/hHD9+Of2KHxJhhzz8/K9uWya5R3mRmUxG1/0Kbg6Tt0XN9p+s= =5v3d -----END PGP SIGNATURE----- --=-=-=--