From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: [feature request] org-capture-window-setup to stop capture window taking up whole frame Date: Thu, 18 Jun 2015 14:52:01 +0300 Message-ID: References: <87zj4ate9f.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c22de080d2750518c96fc9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5YMX-0005oZ-NW for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5YMV-0003Nh-7Q for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:52:05 -0400 Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]:35318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5YMU-0003NF-Ss for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 07:52:03 -0400 Received: by pdbci14 with SMTP id ci14so6653777pdb.2 for ; Thu, 18 Jun 2015 04:52:01 -0700 (PDT) In-Reply-To: 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: Alan Schmitt , org mode --001a11c22de080d2750518c96fc9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable thx again Alan i do get an error if i eval (org-capture nil "t") the error is: Debugger entered--Lisp error: (error "No capture template referred to by \"t\" keys") signal(error ("No capture template referred to by \"t\" keys")) error("No capture template referred to by \"%s\" keys" "t") org-capture-select-template("t") org-capture(nil "t") eval((org-capture nil "t") nil) eval-expression((org-capture nil "t") nil) call-interactively(eval-expression nil nil) command-execute(eval-expression) any ideas? thx Z On Thu, Jun 18, 2015 at 2:45 PM, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > 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-letf'. > > 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? > > - if you evaluate ( M-: ) "(org-capture nil "t")", does it start > a capture? > - 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) > - if it still works like this, then the problem is in the flet, and > I don't know what to do. > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 pp= m > --001a11c22de080d2750518c96fc9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thx again Alan

i do get an error if i e= val=C2=A0(org-capture nil &quo= t;t")
the error is:

Debugger entered--Lisp error: (error "No capture template referred t= o by \"t\" keys")
=C2=A0 signal(error ("No ca= pture template referred to by \"t\" keys"))
=C2=A0= error("No capture template referred to by \"%s\" keys"= "t")
=C2=A0 org-capture-select-template("t")=
=C2=A0 org-capture(nil "t")
=C2=A0 eval((org= -capture nil "t") nil)
=C2=A0 eval-expression((org-capt= ure nil "t") nil)
=C2=A0 call-interactively(eval-expres= sion nil nil)
=C2=A0 command-execute(eval-expression)
=

any ideas?

thx

<= /div>
Z


On Thu, Jun 18, 2015 at 2:45 PM, Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
On 2015-06-18 13:16, Xebar Saram <zeltakc@gmail.com> 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 ev= aled
> your code it said:
> `flet' is an obsolete macro (as of 24.3); use either `cl-flet'= or `cl-letf'.
> 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?

- if you evaluate ( M-: ) "(org-capture nil "t")"= ;, does it start
=C2=A0 a capture?
- if yes, can you get rid of the flet and just have (org-capture nil
=C2=A0 "t") instead (it should create a frame a split the window = in two with
=C2=A0 a capture buffer)
- if it still works like this, then the problem is in the flet, and
=C2=A0 I don't know what to do.

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm<= br>

--001a11c22de080d2750518c96fc9--