From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: org-refile works but dosent work from within a capture window (org-capture-refile) Date: Wed, 15 Jun 2016 21:18:39 +0200 Message-ID: References: <87eg8mo0nq.fsf@saiph.selenimh> <87shx0msyn.fsf@saiph.selenimh> Reply-To: fabrice.popineau@centralesupelec.fr Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d3a885a8198053555fe40 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDGLH-0002on-3m for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 15:19:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDGLC-0003Ny-OI for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 15:19:10 -0400 Received: from smtp2.supelec.fr ([160.228.120.31]:60998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDGLC-0003Nd-4i for emacs-orgmode@gnu.org; Wed, 15 Jun 2016 15:19:06 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp2.supelec.fr (Postfix) with ESMTP id AFD1C801FB for ; Wed, 15 Jun 2016 21:19:02 +0200 (CEST) Received: from smtp2.supelec.fr ([127.0.0.1]) by localhost (smtp2.supelec.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MezVwxrTlxC8 for ; Wed, 15 Jun 2016 21:19:01 +0200 (CEST) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by smtp2.supelec.fr (Postfix) with ESMTPSA id C90918020B for ; Wed, 15 Jun 2016 21:19:00 +0200 (CEST) Received: by mail-ob0-f178.google.com with SMTP id wj2so1447562obc.0 for ; Wed, 15 Jun 2016 12:19:00 -0700 (PDT) In-Reply-To: <87shx0msyn.fsf@saiph.selenimh> 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" To: Xebar Saram , org mode --001a113d3a885a8198053555fe40 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I don't know what is the minimal setup to reproduce the problem. Basically: - call capture from Chrome (in my case) - select n for note - select C-c C-w for org-capture-refile Here is a backtrace. The advice around call-interactively is set up by ido-ubiquitous. Regards, Fabrice Debugger entered--Lisp error: (wrong-type-argument arrayp nil) replace-regexp-in-string("\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]= " "\\3" nil) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-heading-components)))) (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-heading-components))))) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-heading-components))))) (org-refile-get-location (cond ((and arg (listp arg)) "Goto") (regionp (concat actionmsg " region to")) (t (concat actionmsg " subtree \"" heading-text "\" to"))) default-buffer (and (not (equal (quote (4)) arg)) org-refile-allow-creating-parent-nodes))) (let (heading-text) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-heading-components))))) (org-refile-get-location (cond ((and arg (listp arg)) "Goto") (regionp (concat actionmsg " region to")) (t (concat actionmsg " subtree \"" heading-text "\" to"))) default-buffer (and (not (equal (quote (4)) arg)) org-refile-allow-creating-parent-nodes)))) (or rfloc (let (heading-text) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-heading-components))))) (org-refile-get-location (cond ((and arg (listp arg)) "Goto") (regionp (concat actionmsg " region to")) (t (concat actionmsg " subtree \"" heading-text "\" to"))) default-buffer (and (not (equal (quote ...) arg)) org-refile-allow-creating-parent-nodes))))) (setq it (or rfloc (let (heading-text) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 ...)))) (org-refile-get-location (cond ((and arg ...) "Goto") (regionp (concat actionmsg " region to")) (t (concat actionmsg " subtree \"" heading-text "\" to"))) default-buffer (and (not (equal ... arg)) org-refile-allow-creating-parent-nodes)))))) (or (and (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list (or org-clock-heading "running clock") (buffer-file-name (marker-buffer org-clock-hd-marker)) "" (marker-position org-clock-hd-marker))) (setq arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "\\3" ...))) (org-refile-get-location (cond (... "Goto") (regionp ...) (t ...)) default-buffer (and (not ...) org-refile-allow-creating-parent-nodes))))))) (if (or (and (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list (or org-clock-heading "running clock") (buffer-file-name (marker-buffer org-clock-hd-marker)) "" (marker-position org-clock-hd-marker))) (setq arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion (if (and arg ...) nil (org-back-to-heading t) (setq heading-text ...)) (org-refile-get-location (cond ... ... ...) default-buffer (and ... org-refile-allow-creating-parent-nodes))))))) (progn (setq file (nth 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal (buffer-file-name) file) (if regionp (and (>=3D pos region-start) (<=3D pos region-end)) (and (>=3D pos (point)) (< pos (save-excursion ...))))) (progn (error "Cannot refile to position inside the tree or region"))) (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if (and arg (not (equal arg 3))) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context (quote org-goto))) (if regionp (progn (org-kill-new (buffer-substring region-start region-end)) (org-save-markers-in-region region-start region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file)))) (setq reversed (org-notes-order-reversed-p)) (save-excursion (save-restriction (widen) (if pos (progn ... ... ... ...) (setq level 1) (if ... ... ... ...)) (if (bolp) nil (newline)) (org-paste-subtree level nil nil t) (if org-log-refile (progn ... ...)) (and org-auto-align-tags (let ... ...)) (let (...) (if bookmark-name ...)) (if (and ... org-capture-is-refiling) (progn ... ...)) (if (fboundp ...) (progn ...)) (run-hooks (quote org-after-refile-insert-hook))))) (if org-refile-keep nil (if regionp (delete-region (point) (+ (point) (- region-end region-start))) (delete-region (and (org-back-to-heading t) (point)) (min (1+ ...) (org-end-of-subtree t t) (point))))) (if (featurep (quote org-inlinetask)) (progn (org-inlinetask-remove-END-maybe))) (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\" in file %s: done") (car it) file)))) (if (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list (or org-clock-heading "running clock") (buffer-file-name ...) "" (marker-position org-clock-hd-marker))) (setq arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion (if ... nil ... ...) (org-refile-get-location ... default-buffer ...)))))) (progn (setq file (nth 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal (buffer-file-name) file) (if regionp (and (>=3D pos region-start) (<=3D pos region-end)) (and (>=3D pos ...) (< pos ...)))) (progn (error "Cannot refil= e to position inside the tree or region"))) (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if (and arg (not (equal arg 3))) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context (quote org-goto))) (if regionp (progn (org-kill-new (buffer-substring region-start region-end)) (org-save-markers-in-region region-start region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq nbuf (or ... ...))) (setq reversed (org-notes-order-reversed-p)) (save-excursion (save-restriction (widen) (if pos ... ... ...) (if ... nil ...) (org-paste-subtree level nil nil t) (if org-log-refile ...) (and org-auto-align-tags ...) (let ... ...) (if ... ...) (if ... ...) (run-hooks ...)))) (if org-refile-keep nil (if regionp (delete-region (point) (+ ... ...)) (delete-region (and ... ...) (min ... ... ...)))) (if (featurep (quote org-inlinetask)) (progn (org-inlinetask-remove-END-maybe))) (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\" in file %s: done") (car it) file))))) (let* ((actionmsg (cond (msg msg) ((equal arg 3) "Refile (and keep)") (t "Refile"))) (regionp (org-region-active-p)) (region-start (and regionp (region-beginning))) (region-end (and regionp (region-end))) (org-refile-keep (if (equal arg 3) t org-refile-keep)) pos it nbuf file level reversed) (setq last-command nil) (if regionp (progn (goto-char region-start) (or (bolp) (goto-char (point-at-bol))) (setq region-start (point)) (if (or (org-kill-is-subtree-p (buffer-substring region-start region-end)) (prog1 org-refile-active-region-within-subtree (let (...) (org-toggle-heading) (setq region-end ...)))) nil (user-error "The region is not a (sequence of) subtree(s)")))) (if (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list ... ... "" ...)) (setq arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion ... ...))))) (progn (setq file (nth 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal (buffer-file-name) file) (if regionp (and ... ...) (and ... ...))) (progn (error "Cannot refile to position inside the tree or region"))) (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if (and arg (not (equal arg 3))) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context (quote org-goto))) (if regionp (progn (org-kill-new ...) (org-save-markers-in-region region-start region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq nbuf ...)) (setq reversed (org-notes-order-reversed-p)) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...))) (if org-refile-keep nil (if regionp (delete-region ... ...) (delete-region ... ...))) (if (featurep (quote org-inlinetask)) (progn (org-inlinetask-remove-END-maybe))) (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\" in file %s: done") (car it) file)))))) (if (member arg (quote (0 (64)))) (org-refile-cache-clear) (let* ((actionmsg (cond (msg msg) ((equal arg 3) "Refile (and keep)") (t "Refile"))) (regionp (org-region-active-p)) (region-start (and regionp (region-beginning))) (region-end (and regionp (region-end))) (org-refile-keep (if (equal arg 3) t org-refile-keep)) pos it nbuf file level reversed) (setq last-command nil) (if regionp (progn (goto-char region-start) (or (bolp) (goto-char (point-at-bol))) (setq region-start (point)) (if (or (org-kill-is-subtree-p (buffer-substring region-start region-end)) (prog1 org-refile-active-region-within-subtree (let ... ... ...))) nil (user-error "The region is not a (sequence of) subtree(s)")))) (if (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it ...) (setq arg nil))) (setq it (or rfloc (let ... ...)))) (progn (setq file (nth 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal ... file) (if regionp ... ...)) (progn (error "Cannot refile to position inside the tree or region"))) (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file))) (if (and arg (not ...)) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context ...)) (if regionp (progn ... ...) (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer ...) (setq reversed ...) (save-excursion ...)) (if org-refile-keep nil (if regionp ... ...)) (if (featurep ...) (progn ...)) (setq org-markers-to-move nil) (message (concat actionmsg " to \"%s\" in file %s: done") (car it) file))))))) org-refile(nil) funcall-interactively(org-refile nil) #(org-refile nil nil) ad-Advice-call-interactively(# org-refile) apply(ad-Advice-call-interactively # org-refile) call-interactively(org-refile) (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile)))) (save-current-buffer (set-buffer (or base (current-buffer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile))))) (progn (save-current-buffer (set-buffer (or base (current-buffer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile)))))) (unwind-protect (progn (save-current-buffer (set-buffer (or base (current-buffer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile)))))) (set-window-configuration wconfig)) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (save-current-buffer (set-buffer (or base (current-buffer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively (quote org-refile)))))) (set-window-configuration wconfig))) (let ((pos (point)) (base (buffer-base-buffer (current-buffer))) (org-capture-is-refiling t) (kill-buffer (org-capture-get :kill-buffer (quote local)))) (org-capture-put :kill-buffer nil) (org-capture-finalize) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (save-current-buffer (set-buffer (or base (current-buffer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-interactively ...))))) (set-window-configuration wconfig))) (if kill-buffer (progn (kill-buffer base)))) org-capture-refile() funcall-interactively(org-capture-refile) #(org-capture-refile nil nil) ad-Advice-call-interactively(# org-capture-refile nil nil) apply(ad-Advice-call-interactively # (org-capture-refile nil nil)) call-interactively(org-capture-refile nil nil) command-execute(org-capture-refile) 2016-05-29 23:53 GMT+02:00 Nicolas Goaziou : > Hello, > > Xebar Saram writes: > > > do you mind guiding me on how to produce the backtrace and ECM, im not > very > > technical ;-) > > The backtrace is easy: M-x toggle-debug-on-error. > > Just make sure you're using an un-compiled Org (you can call > `org-reload' with a C-u prefix). > > The ECM is a minimal document that enables me to reproduce the error. It > may not be needed if the backtrace is obvious enough, but it doesn't > hurt to provide it either, if it is simple to create. > > Regards, > > -- > Nicolas Goaziou > > --=20 Fabrice Popineau ----------------------------- SUPELEC D=C3=A9partement Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 ------------------------------ --001a113d3a885a8198053555fe40 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I don't know what is the minima= l setup to reproduce the problem.
Basically:

-= call capture from Chrome (in my case)
- select n for note
<= div>- select C-c C-w for org-capture-refile

Here is a ba= cktrace.

The advice around call-interactively is s= et up by ido-ubiquitous.

Regards,

Fabrice

Debugger entered--Lisp error= : (wrong-type-argument arrayp nil)
=C2=A0 replace-regexp-in-strin= g("\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]" "\\3&q= uot; nil)
=C2=A0 (setq heading-text (replace-regexp-in-string org= -bracket-link-regexp "\\3" (nth 4 (org-heading-components))))
=C2=A0 (if (and arg (listp arg)) nil (org-back-to-heading t) (setq h= eading-text (replace-regexp-in-string org-bracket-link-regexp "\\3&quo= t; (nth 4 (org-heading-components)))))
=C2=A0 (save-excursion (if= (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-text (repl= ace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4 (org-he= ading-components))))) (org-refile-get-location (cond ((and arg (listp arg))= "Goto") (regionp (concat actionmsg " region to")) (t (= concat actionmsg " subtree \"" heading-text "\" to= "))) default-buffer (and (not (equal (quote (4)) arg)) org-refile-allo= w-creating-parent-nodes)))
=C2=A0 (let (heading-text) (save-excur= sion (if (and arg (listp arg)) nil (org-back-to-heading t) (setq heading-te= xt (replace-regexp-in-string org-bracket-link-regexp "\\3" (nth 4= (org-heading-components))))) (org-refile-get-location (cond ((and arg (lis= tp arg)) "Goto") (regionp (concat actionmsg " region to"= ;)) (t (concat actionmsg " subtree \"" heading-text "\&= quot; to"))) default-buffer (and (not (equal (quote (4)) arg)) org-ref= ile-allow-creating-parent-nodes))))
=C2=A0 (or rfloc (let (headin= g-text) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading = t) (setq heading-text (replace-regexp-in-string org-bracket-link-regexp &qu= ot;\\3" (nth 4 (org-heading-components))))) (org-refile-get-location (= cond ((and arg (listp arg)) "Goto") (regionp (concat actionmsg &q= uot; region to")) (t (concat actionmsg " subtree \"" he= ading-text "\" to"))) default-buffer (and (not (equal (quote= ...) arg)) org-refile-allow-creating-parent-nodes)))))
=C2=A0 (s= etq it (or rfloc (let (heading-text) (save-excursion (if (and arg (listp ar= g)) nil (org-back-to-heading t) (setq heading-text (replace-regexp-in-strin= g org-bracket-link-regexp "\\3" (nth 4 ...)))) (org-refile-get-lo= cation (cond ((and arg ...) "Goto") (regionp (concat actionmsg &q= uot; region to")) (t (concat actionmsg " subtree \"" he= ading-text "\" to"))) default-buffer (and (not (equal ... ar= g)) org-refile-allow-creating-parent-nodes))))))
=C2=A0 (or (and = (equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog= 1 (setq it (list (or org-clock-heading "running clock") (buffer-f= ile-name (marker-buffer org-clock-hd-marker)) "" (marker-position= org-clock-hd-marker))) (setq arg nil))) (setq it (or rfloc (let (heading-t= ext) (save-excursion (if (and arg (listp arg)) nil (org-back-to-heading t) = (setq heading-text (replace-regexp-in-string org-bracket-link-regexp "= \\3" ...))) (org-refile-get-location (cond (... "Goto") (reg= ionp ...) (t ...)) default-buffer (and (not ...) org-refile-allow-creating-= parent-nodes)))))))
=C2=A0 (if (or (and (equal arg 2) org-clock-h= d-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list (or org-= clock-heading "running clock") (buffer-file-name (marker-buffer o= rg-clock-hd-marker)) "" (marker-position org-clock-hd-marker))) (= setq arg nil))) (setq it (or rfloc (let (heading-text) (save-excursion (if = (and arg ...) nil (org-back-to-heading t) (setq heading-text ...)) (org-ref= ile-get-location (cond ... ... ...) default-buffer (and ... org-refile-allo= w-creating-parent-nodes))))))) (progn (setq file (nth 1 it) pos (nth 3 it))= (if (and (not arg) pos (equal (buffer-file-name) file) (if regionp (and (&= gt;=3D pos region-start) (<=3D pos region-end)) (and (>=3D pos (point= )) (< pos (save-excursion ...))))) (progn (error "Cannot refile to = position inside the tree or region"))) (setq nbuf (or (find-buffer-vis= iting file) (find-file-noselect file))) (if (and arg (not (equal arg 3))) (= progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-contex= t (quote org-goto))) (if regionp (progn (org-kill-new (buffer-substring reg= ion-start region-end)) (org-save-markers-in-region region-start region-end)= ) (org-copy-subtree 1 nil t)) (save-current-buffer (set-buffer (setq nbuf (= or (find-buffer-visiting file) (find-file-noselect file)))) (setq reversed = (org-notes-order-reversed-p)) (save-excursion (save-restriction (widen) (if= pos (progn ... ... ... ...) (setq level 1) (if ... ... ... ...)) (if (bolp= ) nil (newline)) (org-paste-subtree level nil nil t) (if org-log-refile (pr= ogn ... ...)) (and org-auto-align-tags (let ... ...)) (let (...) (if bookma= rk-name ...)) (if (and ... org-capture-is-refiling) (progn ... ...)) (if (f= boundp ...) (progn ...)) (run-hooks (quote org-after-refile-insert-hook))))= ) (if org-refile-keep nil (if regionp (delete-region (point) (+ (point) (- = region-end region-start))) (delete-region (and (org-back-to-heading t) (poi= nt)) (min (1+ ...) (org-end-of-subtree t t) (point))))) (if (featurep (quot= e org-inlinetask)) (progn (org-inlinetask-remove-END-maybe))) (setq org-mar= kers-to-move nil) (message (concat actionmsg " to \"%s\" in = file %s: done") (car it) file))))
=C2=A0 (if (equal arg (quo= te (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) org-cloc= k-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list (or o= rg-clock-heading "running clock") (buffer-file-name ...) "&q= uot; (marker-position org-clock-hd-marker))) (setq arg nil))) (setq it (or = rfloc (let (heading-text) (save-excursion (if ... nil ... ...) (org-refile-= get-location ... default-buffer ...)))))) (progn (setq file (nth 1 it) pos = (nth 3 it)) (if (and (not arg) pos (equal (buffer-file-name) file) (if regi= onp (and (>=3D pos region-start) (<=3D pos region-end)) (and (>=3D= pos ...) (< pos ...)))) (progn (error "Cannot refile to position i= nside the tree or region"))) (setq nbuf (or (find-buffer-visiting file= ) (find-file-noselect file))) (if (and arg (not (equal arg 3))) (progn (org= -pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context (quote o= rg-goto))) (if regionp (progn (org-kill-new (buffer-substring region-start = region-end)) (org-save-markers-in-region region-start region-end)) (org-cop= y-subtree 1 nil t)) (save-current-buffer (set-buffer (setq nbuf (or ... ...= ))) (setq reversed (org-notes-order-reversed-p)) (save-excursion (save-rest= riction (widen) (if pos ... ... ...) (if ... nil ...) (org-paste-subtree le= vel nil nil t) (if org-log-refile ...) (and org-auto-align-tags ...) (let .= .. ...) (if ... ...) (if ... ...) (run-hooks ...)))) (if org-refile-keep ni= l (if regionp (delete-region (point) (+ ... ...)) (delete-region (and ... .= ..) (min ... ... ...)))) (if (featurep (quote org-inlinetask)) (progn (org-= inlinetask-remove-END-maybe))) (setq org-markers-to-move nil) (message (con= cat actionmsg " to \"%s\" in file %s: done") (car it) f= ile)))))
=C2=A0 (let* ((actionmsg (cond (msg msg) ((equal arg 3) = "Refile (and keep)") (t "Refile"))) (regionp (org-regio= n-active-p)) (region-start (and regionp (region-beginning))) (region-end (a= nd regionp (region-end))) (org-refile-keep (if (equal arg 3) t org-refile-k= eep)) pos it nbuf file level reversed) (setq last-command nil) (if regionp = (progn (goto-char region-start) (or (bolp) (goto-char (point-at-bol))) (set= q region-start (point)) (if (or (org-kill-is-subtree-p (buffer-substring re= gion-start region-end)) (prog1 org-refile-active-region-within-subtree (let= (...) (org-toggle-heading) (setq region-end ...)))) nil (user-error "= The region is not a (sequence of) subtree(s)")))) (if (equal arg (quot= e (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) org-clock= -hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it (list ... ..= . "" ...)) (setq arg nil))) (setq it (or rfloc (let (heading-text= ) (save-excursion ... ...))))) (progn (setq file (nth 1 it) pos (nth 3 it))= (if (and (not arg) pos (equal (buffer-file-name) file) (if regionp (and ..= . ...) (and ... ...))) (progn (error "Cannot refile to position inside= the tree or region"))) (setq nbuf (or (find-buffer-visiting file) (fi= nd-file-noselect file))) (if (and arg (not (equal arg 3))) (progn (org-pop-= to-buffer-same-window nbuf) (goto-char pos) (org-show-context (quote org-go= to))) (if regionp (progn (org-kill-new ...) (org-save-markers-in-region reg= ion-start region-end)) (org-copy-subtree 1 nil t)) (save-current-buffer (se= t-buffer (setq nbuf ...)) (setq reversed (org-notes-order-reversed-p)) (sav= e-excursion (save-restriction ... ... ... ... ... ... ... ... ... ...))) (i= f org-refile-keep nil (if regionp (delete-region ... ...) (delete-region ..= . ...))) (if (featurep (quote org-inlinetask)) (progn (org-inlinetask-remov= e-END-maybe))) (setq org-markers-to-move nil) (message (concat actionmsg &q= uot; to \"%s\" in file %s: done") (car it) file))))))
<= div>=C2=A0 (if (member arg (quote (0 (64)))) (org-refile-cache-clear) (let*= ((actionmsg (cond (msg msg) ((equal arg 3) "Refile (and keep)") = (t "Refile"))) (regionp (org-region-active-p)) (region-start (and= regionp (region-beginning))) (region-end (and regionp (region-end))) (org-= refile-keep (if (equal arg 3) t org-refile-keep)) pos it nbuf file level re= versed) (setq last-command nil) (if regionp (progn (goto-char region-start)= (or (bolp) (goto-char (point-at-bol))) (setq region-start (point)) (if (or= (org-kill-is-subtree-p (buffer-substring region-start region-end)) (prog1 = org-refile-active-region-within-subtree (let ... ... ...))) nil (user-error= "The region is not a (sequence of) subtree(s)")))) (if (equal ar= g (quote (16))) (org-refile-goto-last-stored) (if (or (and (equal arg 2) or= g-clock-hd-marker (marker-buffer org-clock-hd-marker) (prog1 (setq it ...) = (setq arg nil))) (setq it (or rfloc (let ... ...)))) (progn (setq file (nth= 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal ... file) (if regionp = ... ...)) (progn (error "Cannot refile to position inside the tree or = region"))) (setq nbuf (or (find-buffer-visiting file) (find-file-nosel= ect file))) (if (and arg (not ...)) (progn (org-pop-to-buffer-same-window n= buf) (goto-char pos) (org-show-context ...)) (if regionp (progn ... ...) (o= rg-copy-subtree 1 nil t)) (save-current-buffer (set-buffer ...) (setq rever= sed ...) (save-excursion ...)) (if org-refile-keep nil (if regionp ... ...)= ) (if (featurep ...) (progn ...)) (setq org-markers-to-move nil) (message (= concat actionmsg " to \"%s\" in file %s: done") (car it= ) file)))))))
=C2=A0 org-refile(nil)
=C2=A0 funcall-int= eractively(org-refile nil)
=C2=A0 #<subr call-interactively>= ;(org-refile nil nil)
=C2=A0 ad-Advice-call-interactively(#<su= br call-interactively> org-refile)
=C2=A0 apply(ad-Advice-call= -interactively #<subr call-interactively> org-refile)
=C2= =A0 call-interactively(org-refile)
=C2=A0 (save-restriction (wide= n) (goto-char pos) (call-interactively (quote org-refile)))
=C2= =A0 (save-excursion (save-restriction (widen) (goto-char pos) (call-interac= tively (quote org-refile))))
=C2=A0 (save-current-buffer (set-buf= fer (or base (current-buffer))) (save-excursion (save-restriction (widen) (= goto-char pos) (call-interactively (quote org-refile)))))
=C2=A0 = (progn (save-current-buffer (set-buffer (or base (current-buffer))) (save-e= xcursion (save-restriction (widen) (goto-char pos) (call-interactively (quo= te org-refile))))))
=C2=A0 (unwind-protect (progn (save-current-b= uffer (set-buffer (or base (current-buffer))) (save-excursion (save-restric= tion (widen) (goto-char pos) (call-interactively (quote org-refile)))))) (s= et-window-configuration wconfig))
=C2=A0 (let ((wconfig (current-= window-configuration))) (unwind-protect (progn (save-current-buffer (set-bu= ffer (or base (current-buffer))) (save-excursion (save-restriction (widen) = (goto-char pos) (call-interactively (quote org-refile)))))) (set-window-con= figuration wconfig)))
=C2=A0 (let ((pos (point)) (base (buffer-ba= se-buffer (current-buffer))) (org-capture-is-refiling t) (kill-buffer (org-= capture-get :kill-buffer (quote local)))) (org-capture-put :kill-buffer nil= ) (org-capture-finalize) (let ((wconfig (current-window-configuration))) (u= nwind-protect (progn (save-current-buffer (set-buffer (or base (current-buf= fer))) (save-excursion (save-restriction (widen) (goto-char pos) (call-inte= ractively ...))))) (set-window-configuration wconfig))) (if kill-buffer (pr= ogn (kill-buffer base))))
=C2=A0 org-capture-refile()
= =C2=A0 funcall-interactively(org-capture-refile)
=C2=A0 #<subr= call-interactively>(org-capture-refile nil nil)
=C2=A0 ad-Adv= ice-call-interactively(#<subr call-interactively> org-capture-refile = nil nil)
=C2=A0 apply(ad-Advice-call-interactively #<subr call= -interactively> (org-capture-refile nil nil))
=C2=A0 call-inte= ractively(org-capture-refile nil nil)
=C2=A0 command-execute(org-= capture-refile)
2016-05-29 23:53 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
Hello,

Xebar Saram <zeltakc@gmail.com&= gt; writes:

> do you mind guiding me on how to produce the b= acktrace and ECM, im not very
> technical ;-)

The backtrace is easy: M-x toggle-debug-on-error.

Just make sure you're using an un-compiled Org (you can call
`org-reload' with a C-u prefix).

The ECM is a minimal document that enables me to reproduce the error. It may not be needed if the backtrace is obvious enough, but it doesn't hurt to provide it either, if it is simple to create.

Regards,

--
Nicolas Goaziou




--
Fabrice= Popineau
-----------------------------
SUPELEC
D= =C3=A9partement Informatique
3, rue Joliot Curie
91192 = Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standar= d : +33 (0) 169851212
------------------------------
--001a113d3a885a8198053555fe40--