emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [feature request] org-capture-window-setup to stop capture windo


From: Xebar Saram
Subject: Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame
Date: Thu, 18 Jun 2015 14:52:01 +0300

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 <address@hidden> wrote:
On 2015-06-18 13:16, Xebar Saram <address@hidden> 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₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm


reply via email to

[Prev in Thread] Current Thread [Next in Thread]