emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-refile failing
@ 2012-09-05 23:25 Marcelo de Moraes Serpa
  2012-09-05 23:43 ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-05 23:25 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

Hi guys,

When trying to run org-refile on an org entry, I'm getting the following
error:

while: Invalid regexp: "Invalid content of \\{\\}"

Any ideas?

Cheers,

- Marcelo.

[-- Attachment #2: Type: text/html, Size: 321 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:25 org-refile failing Marcelo de Moraes Serpa
@ 2012-09-05 23:43 ` Bastien
  2012-09-05 23:59   ` Marcelo de Moraes Serpa
  2012-09-06  0:35   ` Nick Dokos
  0 siblings, 2 replies; 12+ messages in thread
From: Bastien @ 2012-09-05 23:43 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Org Mode

Hi Marcelo,

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

> When trying to run org-refile on an org entry, I'm getting the
> following error:
>
> while: Invalid regexp: "Invalid content of \\{\\}"

Can you give us your Org version, your Emacs version and a recipe
to reproduce this problem?  Refiling works fine here.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:43 ` Bastien
@ 2012-09-05 23:59   ` Marcelo de Moraes Serpa
  2012-09-06  0:14     ` Marcelo de Moraes Serpa
                       ` (2 more replies)
  2012-09-06  0:35   ` Nick Dokos
  1 sibling, 3 replies; 12+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-05 23:59 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Sorry Bastien, should have included it before.

Emacs:
GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
2012-01-29 on bob.porkrind.org

Org:
Org-mode version 7.9.1 (release_7.9.1-145-g0a6165-git @ mixed installation!
/Applications/Emacs.app/Contents/Resources/lisp/org/ and
/Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)

To reproduce it, I just move the cursor to the beginning of  a headline
like this:

* TODO Do something

And then M-x org-refile

Cheers,

- Marcelo.



On Wed, Sep 5, 2012 at 6:43 PM, Bastien <bzg@altern.org> wrote:

> Hi Marcelo,
>
> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>
> > When trying to run org-refile on an org entry, I'm getting the
> > following error:
> >
> > while: Invalid regexp: "Invalid content of \\{\\}"
>
> Can you give us your Org version, your Emacs version and a recipe
> to reproduce this problem?  Refiling works fine here.
>
> Thanks,
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 1652 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:59   ` Marcelo de Moraes Serpa
@ 2012-09-06  0:14     ` Marcelo de Moraes Serpa
  2012-09-06  0:57       ` Nick Dokos
  2012-09-06  6:53     ` Brian van den Broek
  2012-09-12 14:12     ` Bastien
  2 siblings, 1 reply; 12+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-06  0:14 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode

[-- Attachment #1: Type: text/plain, Size: 6531 bytes --]

Here's the backtrace (debug-on-error set to t):

debugger entered--Lisp error: (invalid-regexp "Invalid content of \\{\\}")
  re-search-forward("^\\*\\{1,0\\}[ ]" nil t)
  (while (re-search-forward descre nil t) (goto-char (setq pos0 ...))
(catch (quote next) (when org-refile-target-verify-function ...) (when ...
... ... ...)) (when (= ... pos0) (goto-char ...)))
  (save-restriction (widen) (goto-char (point-min)) (while
(re-search-forward descre nil t) (goto-char ...) (catch ... ... ...) (when
... ...)))
  (save-excursion (save-restriction (widen) (goto-char ...) (while ... ...
... ...)))
  (progn (if (bufferp f) (setq f ...)) (setq f (and f ...)) (if (eq
org-refile-use-outline-path ...) (push ... tgs)) (save-excursion
(save-restriction ... ... ...)))
  (or (setq tgs (org-refile-cache-get ... descre)) (progn (if ... ...)
(setq f ...) (if ... ...) (save-excursion ...)))
  (save-current-buffer (set-buffer (if ... f ...)) (or (setq tgs ...)
(progn ... ... ... ...)) (when org-refile-use-cache (org-refile-cache-put
tgs ... descre)) (setq targets (append tgs targets)))
  (with-current-buffer (if (bufferp f) f (org-get-agenda-file-buffer f))
(or (setq tgs ...) (progn ... ... ... ...)) (when org-refile-use-cache
(org-refile-cache-put tgs ... descre)) (setq targets (append tgs targets)))
  (while (setq f (pop files)) (with-current-buffer (if ... f ...) (or ...
...) (when org-refile-use-cache ...) (setq targets ...)))
  (while (setq entry (pop entries)) (setq files (car entry) desc (cdr
entry)) (setq fast-path-p nil) (cond (... ...) (... ...) (... ...) (...
...)) (if (stringp files) (setq files ...)) (cond (... ...) (... ...) (...
...) (... ...) (... ... ...) (t ...)) (while (setq f ...)
(with-current-buffer ... ... ... ...)))
  (save-current-buffer (set-buffer (or default-buffer ...)) (while (setq
entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
... ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
  (with-current-buffer (or default-buffer (current-buffer)) (while (setq
entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
... ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
  (let ((case-fold-search nil) (entries ...) targets tgs txt re files f
desc descre fast-path-p level pos0) (message "Getting targets...")
(with-current-buffer (or default-buffer ...) (while ... ... ... ... ... ...
...)) (message "Getting targets...done") (nreverse targets))
  org-refile-get-targets(nil (#("OneLogin MX Office" 0 8 (fontified t
org-category "gtd" face org-level-1 org-no-flyspell t) 8 18 (fontified t
org-category "gtd" face org-level-1)) #("A/C Quote + Room isolation quote"
0 32 (fontified t org-category "gtd" face org-level-2)) #("Write to Thomas
with quote + isolation quote, explaining the situation" 0 70 (fontified t
org-category "gtd" face org-level-3)) #("Headsets" 0 8 (fontified t
org-category "gtd" face org-level-2)) #("Alartm System quote" 0 19
(fontified t org-category "gtd" face org-level-2))))
  (setq org-refile-target-table (org-refile-get-targets default-buffer
excluded-entries))
  (let ((org-refile-targets org-refile-targets)
(org-refile-use-outline-path org-refile-use-outline-path) excluded-entries)
(when (and ... ... ...) (org-map-tree ...)) (setq org-refile-target-table
(org-refile-get-targets default-buffer excluded-entries)))
  org-refile-get-location("Refile subtree \"OneLogin MX Office\" to" nil
nil nil)
  (save-excursion (unless goto (org-back-to-heading t) (setq heading-text
...)) (org-refile-get-location (cond ... ... ...) default-buffer (and ...
org-refile-allow-creating-parent-nodes) goto))
  (let (heading-text) (save-excursion (unless goto ... ...)
(org-refile-get-location ... default-buffer ... goto)))
  (or rfloc (let (heading-text) (save-excursion ... ...)))
  (setq it (or rfloc (let ... ...)))
  (or (and (equal goto 2) org-clock-hd-marker (marker-buffer
org-clock-hd-marker) (prog1 ... ...)) (setq it (or rfloc ...)))
  (if (or (and ... org-clock-hd-marker ... ...) (setq it ...)) (progn (setq
file ... re ... pos ...) (if ... ...) (setq nbuf ...) (if goto ... ... ...
... ... ... ...)))
  (when (or (and ... org-clock-hd-marker ... ...) (setq it ...)) (setq file
(nth 1 it) re (nth 2 it) pos (nth 3 it)) (if (and ... pos ... ...) (error
"Cannot refile to position inside the tree or region")) (setq nbuf (or ...
...)) (if goto (progn ... ... ...) (if regionp ... ...)
(with-current-buffer ... ... ...) (if regionp ... ...) (when ... ...) (setq
org-markers-to-move nil) (message "Refiled to \"%s\" in file %s" ... file)))
  (if (equal goto (quote ...)) (org-refile-goto-last-stored) (when (or ...
...) (setq file ... re ... pos ...) (if ... ...) (setq nbuf ...) (if goto
... ... ... ... ... ... ...)))
  (let* ((cbuf ...) (regionp ...) (region-start ...) (region-end ...)
(region-length ...) (filename ...) pos it nbuf file re level reversed)
(setq last-command nil) (when regionp (goto-char region-start) (or ... ...)
(setq region-start ...) (unless ... ...)) (if (equal goto ...)
(org-refile-goto-last-stored) (when ... ... ... ... ...)))
  (if (member goto (quote ...)) (org-refile-cache-clear) (let* (... ... ...
... ... ... pos it nbuf file re level reversed) (setq last-command nil)
(when regionp ... ... ... ...) (if ... ... ...)))
  org-refile(nil)
  call-interactively(org-refile t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)


On Wed, Sep 5, 2012 at 6:59 PM, Marcelo de Moraes Serpa <celoserpa@gmail.com
> wrote:

> Sorry Bastien, should have included it before.
>
> Emacs:
> GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
> 2012-01-29 on bob.porkrind.org
>
> Org:
> Org-mode version 7.9.1 (release_7.9.1-145-g0a6165-git @ mixed
> installation! /Applications/Emacs.app/Contents/Resources/lisp/org/ and
> /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)
>
> To reproduce it, I just move the cursor to the beginning of  a headline
> like this:
>
> * TODO Do something
>
> And then M-x org-refile
>
> Cheers,
>
> - Marcelo.
>
>
>
> On Wed, Sep 5, 2012 at 6:43 PM, Bastien <bzg@altern.org> wrote:
>
>> Hi Marcelo,
>>
>> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>>
>> > When trying to run org-refile on an org entry, I'm getting the
>> > following error:
>> >
>> > while: Invalid regexp: "Invalid content of \\{\\}"
>>
>> Can you give us your Org version, your Emacs version and a recipe
>> to reproduce this problem?  Refiling works fine here.
>>
>> Thanks,
>>
>> --
>>  Bastien
>>
>
>

[-- Attachment #2: Type: text/html, Size: 8130 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:43 ` Bastien
  2012-09-05 23:59   ` Marcelo de Moraes Serpa
@ 2012-09-06  0:35   ` Nick Dokos
  2012-09-12 14:13     ` Bastien
  1 sibling, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2012-09-06  0:35 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode, Marcelo de Moraes Serpa

Bastien <bzg@altern.org> wrote:

> Hi Marcelo,
> 
> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
> 
> > When trying to run org-refile on an org entry, I'm getting the
> > following error:
> >
> > while: Invalid regexp: "Invalid content of \\{\\}"
> 
> Can you give us your Org version, your Emacs version and a recipe
> to reproduce this problem?  Refiling works fine here.
> 

... and a backtrace, please.

Didn't somebody else run into a refiling problem earlier today? I was
skimming like crazy at the time, so I didn't stop to look at it and I
don't remember anything else other than "org-refile" :-(

Nick

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-06  0:14     ` Marcelo de Moraes Serpa
@ 2012-09-06  0:57       ` Nick Dokos
  2012-09-06  1:32         ` Marcelo de Moraes Serpa
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Dokos @ 2012-09-06  0:57 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Bastien, Org Mode

Marcelo de Moraes Serpa <celoserpa@gmail.com> wrote:

> Here's the backtrace (debug-on-error set to t):
> 

Thanks for that! I sent mail requesting the same just a second
before I got your mail, so I was wondering if the speed of light limit
had been violated, but I guess not :-)

Looks like the calculation of descre in org-refile-get-location is
wrong:

,----
| 	  (setq descre (concat "^\\*\\{1," (number-to-string
| 					    (if org-odd-levels-only
| 						(1- (* 2 (cdr desc)))
| 					      (cdr desc)))
| 			       "\\}[ \t]")))
`----

The subexpression gives 0 and re-search-forward does not like things
like "^\\*\\{1,0\\}[ ]". But why that is is not clear to me: it depends
on what (cdr desc) is (presumably 0 in order to get the result you get -
and org-odd-levels-only is false, correct?).  In turn, that comes from
org-refile-targets. Have you customized org-refile-targets by any
chance? If so, please send the value.

Nick

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-06  0:57       ` Nick Dokos
@ 2012-09-06  1:32         ` Marcelo de Moraes Serpa
  2012-09-06  1:48           ` Nick Dokos
  0 siblings, 1 reply; 12+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-06  1:32 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien, Org Mode

[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

Hi Nick, thanks for the reply.

I don't remember customizing the org-refile-targets var. When I evaluate
it, I get the following:

((org-agenda-files :maxlevel . 0))

- Marcelo.

On Wed, Sep 5, 2012 at 7:57 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Marcelo de Moraes Serpa <celoserpa@gmail.com> wrote:
>
> > Here's the backtrace (debug-on-error set to t):
> >
>
> Thanks for that! I sent mail requesting the same just a second
> before I got your mail, so I was wondering if the speed of light limit
> had been violated, but I guess not :-)
>
> Looks like the calculation of descre in org-refile-get-location is
> wrong:
>
> ,----
> |         (setq descre (concat "^\\*\\{1," (number-to-string
> |                                           (if org-odd-levels-only
> |                                               (1- (* 2 (cdr desc)))
> |                                             (cdr desc)))
> |                              "\\}[ \t]")))
> `----
>
> The subexpression gives 0 and re-search-forward does not like things
> like "^\\*\\{1,0\\}[ ]". But why that is is not clear to me: it depends
> on what (cdr desc) is (presumably 0 in order to get the result you get -
> and org-odd-levels-only is false, correct?).  In turn, that comes from
> org-refile-targets. Have you customized org-refile-targets by any
> chance? If so, please send the value.
>
> Nick
>

[-- Attachment #2: Type: text/html, Size: 1986 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-06  1:32         ` Marcelo de Moraes Serpa
@ 2012-09-06  1:48           ` Nick Dokos
  0 siblings, 0 replies; 12+ messages in thread
From: Nick Dokos @ 2012-09-06  1:48 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Bastien, Org Mode

Marcelo de Moraes Serpa <celoserpa@gmail.com> wrote:

> Hi Nick, thanks for the reply.
> 
> I don't remember customizing the org-refile-targets var. When I evaluate it, I get the following:
> 
> ((org-agenda-files :maxlevel . 0))
> 

You must have customized it since the original value is nil. I have
customized it too and C-h v on it gives me:

,----
| org-refile-targets is a variable defined in `org.el'.
| Its value is ((org-agenda-files :level . 1))
| Original value was nil
`----

The difference probably accounts for the error you are getting (even
though you are setting maxlevel and I'm setting level), so try changing
the 0 to 1 or larger. Note that if you set maxlevel to 1 that means that
only top-level headlines are eligible as refiling targets.

Nick

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:59   ` Marcelo de Moraes Serpa
  2012-09-06  0:14     ` Marcelo de Moraes Serpa
@ 2012-09-06  6:53     ` Brian van den Broek
  2012-09-06 13:43       ` Marcelo de Moraes Serpa
  2012-09-12 14:12     ` Bastien
  2 siblings, 1 reply; 12+ messages in thread
From: Brian van den Broek @ 2012-09-06  6:53 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Bastien, Org Mode

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

On 5 Sep 2012 19:59, "Marcelo de Moraes Serpa" <celoserpa@gmail.com> wrote:
>
> Sorry Bastien, should have included it before.
>
> Emacs:
> GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
2012-01-29 on bob.porkrind.org
>
> Org:
> Org-mode version 7.9.1 (release_7.9.1-145-g0a6165-git @ mixed
installation! /Applications/Emacs.app/Contents/Resources/lisp/org/ and
/Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)

Hi all,

I don't have any specific light to shed on the OP's issue. But i did notice
the discussion seemed to miss the above which itself can many problems
cause.

Best,

Brian vdB

[-- Attachment #2: Type: text/html, Size: 808 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-06  6:53     ` Brian van den Broek
@ 2012-09-06 13:43       ` Marcelo de Moraes Serpa
  0 siblings, 0 replies; 12+ messages in thread
From: Marcelo de Moraes Serpa @ 2012-09-06 13:43 UTC (permalink / raw)
  To: Brian van den Broek; +Cc: Bastien, Org Mode

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

HI Nick,

Looks like the 0 was causing the issue. Changing it to any non-zero value
solves it. I don't remember how it ended up there though - I might have
setup it by accident.

Thanks!

- Marcelo.

On Thu, Sep 6, 2012 at 1:53 AM, Brian van den Broek <
brian.van.den.broek@gmail.com> wrote:

>
> On 5 Sep 2012 19:59, "Marcelo de Moraes Serpa" <celoserpa@gmail.com>
> wrote:
> >
> > Sorry Bastien, should have included it before.
> >
> > Emacs:
> > GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of
> 2012-01-29 on bob.porkrind.org
> >
> > Org:
> > Org-mode version 7.9.1 (release_7.9.1-145-g0a6165-git @ mixed
> installation! /Applications/Emacs.app/Contents/Resources/lisp/org/ and
> /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)
>
> Hi all,
>
> I don't have any specific light to shed on the OP's issue. But i did
> notice the discussion seemed to miss the above which itself can many
> problems cause.
>
> Best,
>
> Brian vdB
>

[-- Attachment #2: Type: text/html, Size: 1504 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-05 23:59   ` Marcelo de Moraes Serpa
  2012-09-06  0:14     ` Marcelo de Moraes Serpa
  2012-09-06  6:53     ` Brian van den Broek
@ 2012-09-12 14:12     ` Bastien
  2 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2012-09-12 14:12 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Org Mode

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

> Org-mode version 7.9.1 (release_7.9.1-145-g0a6165-git @ mixed
> installation! /Applications/Emacs.app/Contents/Resources/lisp/org/
> and /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)

(Check the "mixed installation!" warning above, it means you don't 
have a clean install -- probably autoloading from another directory 
than the one from which you are loading.)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: org-refile failing
  2012-09-06  0:35   ` Nick Dokos
@ 2012-09-12 14:13     ` Bastien
  0 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2012-09-12 14:13 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode, Marcelo de Moraes Serpa

Nick Dokos <nicholas.dokos@hp.com> writes:

> Didn't somebody else run into a refiling problem earlier today?

The refile interface didn't really change in 7.9 -- but if there is
anything weird, let's fix it.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-09-12 15:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 23:25 org-refile failing Marcelo de Moraes Serpa
2012-09-05 23:43 ` Bastien
2012-09-05 23:59   ` Marcelo de Moraes Serpa
2012-09-06  0:14     ` Marcelo de Moraes Serpa
2012-09-06  0:57       ` Nick Dokos
2012-09-06  1:32         ` Marcelo de Moraes Serpa
2012-09-06  1:48           ` Nick Dokos
2012-09-06  6:53     ` Brian van den Broek
2012-09-06 13:43       ` Marcelo de Moraes Serpa
2012-09-12 14:12     ` Bastien
2012-09-06  0:35   ` Nick Dokos
2012-09-12 14:13     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).