From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Fitzgerald Subject: Re: Bug: org-capture Does not take user to any new buffer Date: Tue, 5 Jun 2012 09:22:45 -0500 Message-ID: References: <1414.1338868583@alphaville> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6dee7746941fa04c1ba62e3 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbuet-0002Tp-Tk for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 10:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sbuem-0007x4-EP for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 10:22:55 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:35925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbuem-0007wW-2Y for emacs-orgmode@gnu.org; Tue, 05 Jun 2012 10:22:48 -0400 Received: by wgbds1 with SMTP id ds1so3820209wgb.30 for ; Tue, 05 Jun 2012 07:22:46 -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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org --0016e6dee7746941fa04c1ba62e3 Content-Type: text/plain; charset=ISO-8859-1 Took the suggestion to run edebug. A couple of observations: 1) CAPTURE-journal buffer opens around line 485 but is is killed shortly after without the user (me) doing anything (just spacebar to step thru the code) (if (and (buffer-base-buffer (current-buffer)) (string-match "\\`CAPTURE-" (buffer-name))) (kill-buffer (current-buffer))) ;killed here 2) Then later The defen stops around line 491 of org-capture.el (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) Any insight? Thanks Mike On Tue, Jun 5, 2012 at 9:07 AM, Mike Fitzgerald wrote: > This part works as described: > > "start capture, I get another window where > I'm presented with an "*Org Select*" buffer that offers me the available > choices" > > However, this part does not work as expected: > "when I select one of those I select one of those, I get a > "CAPTURE-foo.org" buffer" > > I would expect: > A) new buffer would be created > and > B) EMACS would switch to it > and > C) Some message with value to the user > > B and C do not happen. A happens but I need to manually switch to it > > I get a message that has little value: > "Capture template `j': org-called-interactively-p" > > I have never used the working version of capture (this is it), but I have > used > remember a little and seem to recall it gives a message something > like "C-c C-c" to finish. I don't get any thing like this. > > This makes me think that a defun stopped somewhere that it was > non designed to. > > The buffer that is created is and I an able to switch to is journal.org. > This does not seem like a temp buffer, rather it seems like the final > destination. > > Whatever defun sends "Capture template `j': org-called-interactively-p" > seems to have stopped abnormally. > > This is my org setup near the top of my .emacs > > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/") > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/") > (require 'org-install) > (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) > (define-key global-map "\C-cl" 'org-store-link) > (define-key global-map "\C-ca" 'org-agenda) > (setq org-log-done t) > > (setq org-capture-templates > > '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") > "* TODO %?\n %i\n %a") > ("j" "Journal" entry (file+datetree "~/org/journal.org") > "* %?\nEntered on %U\n %i\n %a"))) > > ;org-capture binding > ;(global-set-key "\C-c-c" 'org-capture) > (global-set-key [(control c) (c)] 'org-capture) > > > Does this look OK? > > Thanks > > Mike > > > On Mon, Jun 4, 2012 at 10:56 PM, Nick Dokos wrote: > >> Mike Fitzgerald wrote: >> >> > To duplicate: >> > >> >> I haven't tried specifically to duplicate your setup but org-capture >> seems to work fine here. >> >> > 1) Run org-capture with C-c c >> > 2) User is Promoted with the two templates expected >> > (copied the templates from the org-mode site) >> > >> > 3) Enter j for journal >> > 4) Expect switch to new buffer >> > 5) No switch occurs >> >> So what happens instead? If I start capture, I get another window where >> I'm presented with an "*Org Select*" buffer that offers me the available >> choices and when I select one of those, I get a "CAPTURE-foo.org" buffer >> for some value of "foo". This is actually an indirect buffer and the >> text should be inserted into the target location already, so you can >> look at ~/org/journal.org (or whatever) and see that it contains the >> partial entry just started. See the description of org-capture: C-h f >> org-capture RET. >> >> If I were you, I'd probably use edebug to step through the org-capture >> function (and I'd forget about byte compiling anything until whatever >> problem you have is identified and solved). >> >> HTH, >> Nick >> >> > Note that journal.org is open, but I need to switch to it >> > >> > I expected EMACS to switch to a new buffer after choosing >> > the template. >> > >> > Running GNU EMACS 23.3 on Win7 >> > >> > Org mode update byte compiled by hand (without make) using >> > >> > (defun my/compile-org(&optional directory) >> > "Compile all *.el files that come with org-mode." >> > (interactive) >> > ;Found on a org-mode related page. >> > >> > Thanks >> > >> > Mike >> > >> > Remember to cover the basics, that is, what you expected to happen and >> > what in fact did happen. You don't know how to make a good report? See >> > >> > http://orgmode.org/manual/Feedback.html#Feedback >> > >> > Your bug report will be posted to the Org-mode mailing list. >> > ------------------------------------------------------------------------ >> > >> > Emacs : GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600) >> > of 2011-03-10 on 3249CTO >> > Package: Org-mode version 7.8.11 >> > >> > current state: >> > ============== >> > (setq >> > org-log-done 'time >> > org-export-latex-after-initial-vars-hook >> '(org-beamer-after-initial-vars) >> > org-speed-command-hook '(org-speed-command-default-hook >> org-babel-speed-command-hook) >> > org-metaup-hook '(org-babel-load-in-session-maybe) >> > org-capture-templates '(("t" "Todo" entry (file+headline "~/org/ >> gtd.org" "Tasks") >> > "* TODO %?\n %i\n %a") >> > ("j" "Journal" entry (file+datetree "~/org/journal.org") >> > "* %?\nEntered on %U\n %i\n %a") >> > ) >> > org-after-todo-state-change-hook '(org-clock-out-if-current) >> > org-export-latex-format-toc-function >> 'org-export-latex-format-toc-default >> > org-tab-first-hook '(org-hide-block-toggle-maybe >> org-src-native-tab-command-maybe >> > org-babel-hide-result-toggle-maybe) >> > org-src-mode-hook '(org-src-babel-configure-edit-buffer >> org-src-mode-configure-edit-buffer) >> > org-confirm-shell-link-function 'yes-or-no-p >> > org-export-first-hook '(org-beamer-initialize-open-trackers) >> > org-agenda-before-write-hook '(org-agenda-add-entry-text) >> > org-babel-pre-tangle-hook '(save-buffer) >> > org-cycle-hook '(org-cycle-hide-archived-subtrees >> org-cycle-hide-drawers org-cycle-show-empty-lines >> > org-optimize-window-after-visibility-change) >> > org-export-preprocess-before-normalizing-links-hook >> '(org-remove-file-link-modifiers) >> > org-mode-hook '(#[nil "\300\301\302\303\304$\207" >> > [org-add-hook change-major-mode-hook org-show-block-all >> append local] 5] >> > #[nil "\300\301\302\303\304$\207" >> > [org-add-hook change-major-mode-hook >> org-babel-show-result-all append local] 5] >> > org-babel-result-hide-spec org-babel-hide-all-hashes) >> > org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point >> org-babel-execute-safely-maybe) >> > org-confirm-elisp-link-function 'yes-or-no-p >> > org-export-interblocks '((src org-babel-exp-non-block-elements)) >> > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) >> > org-occur-hook '(org-first-headline-recenter) >> > org-export-preprocess-before-selecting-backend-code-hook >> '(org-beamer-select-beamer-code) >> > org-export-latex-final-hook '(org-beamer-amend-header >> org-beamer-fix-toc >> > org-beamer-auto-fragile-frames >> > org-beamer-place-default-actions-for-lists) >> > org-metadown-hook '(org-babel-pop-to-session-maybe) >> > org-export-blocks '((src org-babel-exp-src-block nil) >> > (export-comment org-export-blocks-format-comment t) >> > (ditaa org-export-blocks-format-ditaa nil) (dot >> org-export-blocks-format-dot nil)) >> > ) >> > >> > >> > ---------------------------------------------------- >> > Alternatives: >> > >> > ---------------------------------------------------- >> > > > --0016e6dee7746941fa04c1ba62e3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Took the suggestion to run edebug.
A couple of observations:

1) C= APTURE-journal buffer opens around line 485 but is is killed shortly after<= br>without the user (me) doing anything (just spacebar to step thru the cod= e)

=A0=A0=A0 =A0=A0=A0=A0 (if (and (buffer-base-buffer (current-buffer))=A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 (string-match "\\`CAPTURE-"= (buffer-name)))
=A0=A0=A0 =A0=A0=A0 =A0(kill-buffer (current-buffer))) = ;killed here

2) Then later
The defen stops around line 491 of org= -capture.el
=A0=A0=A0 =A0=A0=A0=A0 (error "Capture template `%s': %s"
= =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 (org-capture-get :key)
=A0=A0=A0 =A0=A0=A0= =A0=A0=A0 (nth 1 error))))

Any insight?

Thanks

Mike
On Tue, Jun 5, 2012 at 9:07 AM, Mike Fitzg= erald <mikef656@gmail.com> wrote:
This part works as described:

"start ca= pture, I get another window where
I'm presented with an "*Org Select*" buffer that offers me th= e available choices"

However, this part does not work as= expected:
"when I select one of those I select one of those, I get= a "CAPTURE-foo.org" buffer"

I would expect:
A) new buffer would be created
and
B) EMACS= would switch to it
and
C) Some message with value to the user
B and C do not happen.=A0 A happens but I need to manually switch to it
I get a message that has little value:
=A0=A0=A0 "Capture templ= ate `j': org-called-interactively-p"

I have never used the = working version of capture (this is it), but I have used
remember a litt= le and seem to recall it gives a message something
like "C-c C-c" to finish.=A0 I don't get any thing like this.=

This makes me think that a defun stopped somewhere that it was
n= on designed to.

The buffer that is created is and I an able to switc= h to is journal.org.= =A0
This does not seem like a temp buffer, rather it seems like the final desti= nation.

Whatever defun sends "Capture template `j': org-cal= led-interactively-p"
seems to have stopped abnormally.

This is my org setup near the top of my .emacs

(add-to-list = 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
(add= -to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
(require 'org-install)
(add-to-list 'auto-mode-alist '("= ;\\.org$" . org-mode))
(define-key global-map "\C-cl" = 9;org-store-link)
(define-key global-map "\C-ca" 'org-agen= da)
(setq org-log-done t)

(setq org-capture-templates

=A0=A0=A0= =A0=A0 '(("t" "Todo" entry (file+headline "~/o= rg/gtd.org" "Tas= ks")
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "* TODO %?\n=A0 %i\n=A0 %a")=
=A0=A0=A0=A0=A0=A0=A0 ("j" "Journal" entry (file+datetr= ee "~/org/journal.org= ")
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "* %?\nEnter= ed on %U\n=A0 %i\n=A0 %a")))

;org-capture binding
;(global-set-key "\C-c-c" 'org-capture)
(global-set-key [(= control c) (c)] 'org-capture)


Does this look OK?

Thanks

Mike


On Mon, Jun 4, 2012 at 10:56 PM, Nick = Dokos <nicholas.dokos@hp.com> wrote:
Mike Fitzgerald <mikef656@gmail.com> wrote:

> To duplicate:
>

I haven't tried specifically to duplicate your setup but org-capture seems to work fine here.

> 1) Run org-capture with C-c c
> 2) User is Promoted with the two templates expected=A0
> (copied the templates from the org-mode site)
>
> 3) Enter j for journal
> 4) Expect switch to new buffer
> 5) No switch occurs

So what happens instead? If I start capture, I get another window whe= re
I'm presented with an "*Org Select*" buffer that offers me th= e available
choices and when I select one of those, I get a "CAPTURE-foo.org"= buffer
for some value of "foo". =A0This is actually an indirect buffer a= nd the
text should be inserted into the target location already, so you can
look at ~/org/journal.org<= /a> (or whatever) and see that it contains the
partial entry just started. =A0See the description of org-capture: C-h f org-capture RET.

If I were you, I'd probably use edebug to step through the org-capture<= br> function (and I'd forget about byte compiling anything until whatever problem you have is identified and solved).

HTH,
Nick

> Note that
journal.org= is open, but I need to switch to it
>
> I expected EMACS to switch to a new buffer after choosing
> the template.
>
> Running GNU EMACS 23.3 on Win7
>
> Org mode update byte compiled by hand (without make) using
> =A0
> =A0=A0 (defun my/compile-org(&optional directory)
> =A0=A0=A0=A0 "Compile all *.el files that come with org-mode.&quo= t;
> =A0 =A0=A0 (interactive)
> =A0=A0 ;Found on a org-mode related page.
>
> Thanks
>
> Mike
>
> Remember to cover the basics, that is, what you expected to happen and=
> what in fact did happen.=A0 You don't know how to make a good repo= rt?=A0 See
>
> =A0=A0=A0=A0 http://orgmode.org/manual/Feedback.html#Feedback<= br> >
> Your bug report will be posted to the Org-mode mailing list.
> ----------------------------------------------------------------------= --
>
> Emacs=A0 : GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600)
> =A0of 2011-03-10 on 3249CTO
> Package: Org-mode version 7.8.11
>
> current state:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> (setq
> =A0org-log-done 'time
> =A0org-export-latex-after-initial-vars-hook '(org-beamer-after-ini= tial-vars)
> =A0org-speed-command-hook '(org-speed-command-default-hook org-bab= el-speed-command-hook)
> =A0org-metaup-hook '(org-babel-load-in-session-maybe)
> =A0org-capture-templates '(("t" "Todo" entry (= file+headline "~/org/gtd.= org" "Tasks")
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 "* TODO %?\n=A0 %i\n=A0 %a"= ;)
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0("j" "Journal" en= try (file+datetree "~/org/journal.org")
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 "* %?\nEntered on %U\n=A0 %i\n= =A0 %a")
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0)
> =A0org-after-todo-state-change-hook '(org-clock-out-if-current) > =A0org-export-latex-format-toc-function 'org-export-latex-format-t= oc-default
> =A0org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native= -tab-command-maybe
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 org-babel-hide-result-toggle-maybe= )
> =A0org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src= -mode-configure-edit-buffer)
> =A0org-confirm-shell-link-function 'yes-or-no-p
> =A0org-export-first-hook '(org-beamer-initialize-open-trackers) > =A0org-agenda-before-write-hook '(org-agenda-add-entry-text)
> =A0org-babel-pre-tangle-hook '(save-buffer)
> =A0org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hid= e-drawers org-cycle-show-empty-lines
> =A0=A0=A0 =A0=A0=A0 =A0 org-optimize-window-after-visibility-change) > =A0org-export-preprocess-before-normalizing-links-hook '(org-remov= e-file-link-modifiers)
> =A0org-mode-hook '(#[nil "\300\301\302\303\304$\207"
> =A0=A0=A0 =A0=A0=A0 =A0=A0 [org-add-hook change-major-mode-hook org-sh= ow-block-all append local] 5]
> =A0=A0=A0 =A0=A0=A0 =A0#[nil "\300\301\302\303\304$\207"
> =A0=A0=A0 =A0=A0=A0 =A0=A0 [org-add-hook change-major-mode-hook org-ba= bel-show-result-all append local] 5]
> =A0=A0=A0 =A0=A0=A0 =A0org-babel-result-hide-spec org-babel-hide-all-h= ashes)
> =A0org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-exec= ute-safely-maybe)
> =A0org-confirm-elisp-link-function 'yes-or-no-p
> =A0org-export-interblocks '((src org-babel-exp-non-block-elements)= )
> =A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> =A0org-occur-hook '(org-first-headline-recenter)
> =A0org-export-preprocess-before-selecting-backend-code-hook '(org-= beamer-select-beamer-code)
> =A0org-export-latex-final-hook '(org-beamer-amend-header org-beame= r-fix-toc
> org-beamer-auto-fragile-frames
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0=A0 org-beamer-place-defa= ult-actions-for-lists)
> =A0org-metadown-hook '(org-babel-pop-to-session-maybe)
> =A0org-export-blocks '((src org-babel-exp-src-block nil)
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0 (export-comment org-export-blocks-for= mat-comment t)
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0 (ditaa org-export-blocks-format-ditaa= nil) (dot org-export-blocks-format-dot nil))
> =A0)
>
>
> ----------------------------------------------------
> Alternatives:
>
> ----------------------------------------------------



--0016e6dee7746941fa04c1ba62e3--