emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-elements-parse-buffer and weird property drawers
@ 2014-08-30 17:56 Eike
  2014-08-30 19:02 ` Eike
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eike @ 2014-08-30 17:56 UTC (permalink / raw)
  To: org-mode


Hello all,

I'm playing with the functions in org-elements.el and the following
effect seems strange to me:

I have a few propery drawers with empty propertys, like

#+BEGIN_EXAMPLE
:PROPERTIES:
:date:     [2014-08-29 Fr]
:chf:      21.76
:eur:
:END:
#+END_EXAMPLE

If I do org-elements-parse-buffer, the empty one is not there, but the
first one is duplicated. At least, there are two node-property
elements in the tree like that:

#+BEGIN_EXAMPLE
(node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
(node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
#+END_EXAMPLE

The function call was this:

#+begin_src emacs-lisp
(with-current-buffer "test-exp.org"
  (org-element-parse-buffer))
#+end_src

And here is the "test-exp.org" org file:

#+BEGIN_EXAMPLE
* Sonstiges
** Pizza
   :PROPERTIES:
   :chf:      21.76
   :eur:
   :END:
#+END_EXAMPLE

Am I missing something, or are empty properties not supported?

Kind regards,
Eike

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-08-30 17:56 org-elements-parse-buffer and weird property drawers Eike
@ 2014-08-30 19:02 ` Eike
  2014-08-30 19:46 ` Thorsten Jolitz
  2014-08-31  9:46 ` Nicolas Goaziou
  2 siblings, 0 replies; 9+ messages in thread
From: Eike @ 2014-08-30 19:02 UTC (permalink / raw)
  To: org-mode


forgot to mention org version:
Org-mode version 8.3beta (release_8.3beta-296-g851b77 @
/home/eike/.emacs.d/src/org-mode/lisp/)

Kind regards,
Eike

Eike writes:

> Hello all,
>
> I'm playing with the functions in org-elements.el and the following
> effect seems strange to me:
>
> I have a few propery drawers with empty propertys, like
>
> #+BEGIN_EXAMPLE
> :PROPERTIES:
> :date:     [2014-08-29 Fr]
> :chf:      21.76
> :eur:
> :END:
> #+END_EXAMPLE
>
> If I do org-elements-parse-buffer, the empty one is not there, but the
> first one is duplicated. At least, there are two node-property
> elements in the tree like that:
>
> #+BEGIN_EXAMPLE
> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
> #+END_EXAMPLE
>
> The function call was this:
>
> #+begin_src emacs-lisp
> (with-current-buffer "test-exp.org"
>   (org-element-parse-buffer))
> #+end_src
>
> And here is the "test-exp.org" org file:
>
> #+BEGIN_EXAMPLE
> * Sonstiges
> ** Pizza
>    :PROPERTIES:
>    :chf:      21.76
>    :eur:
>    :END:
> #+END_EXAMPLE
>
> Am I missing something, or are empty properties not supported?
>
> Kind regards,
> Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-08-30 17:56 org-elements-parse-buffer and weird property drawers Eike
  2014-08-30 19:02 ` Eike
@ 2014-08-30 19:46 ` Thorsten Jolitz
  2014-08-31  9:46 ` Nicolas Goaziou
  2 siblings, 0 replies; 9+ messages in thread
From: Thorsten Jolitz @ 2014-08-30 19:46 UTC (permalink / raw)
  To: emacs-orgmode

Eike <news@eknet.org> writes:

> Hello all,
>
> I'm playing with the functions in org-elements.el and the following
> effect seems strange to me:
>
> I have a few propery drawers with empty propertys, like
>
> #+BEGIN_EXAMPLE
> :PROPERTIES:
> :date:     [2014-08-29 Fr]
> :chf:      21.76
> :eur:
> :END:
> #+END_EXAMPLE
>
> If I do org-elements-parse-buffer, the empty one is not there, but the
> first one is duplicated. At least, there are two node-property
> elements in the tree like that:
>
> #+BEGIN_EXAMPLE
> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
> #+END_EXAMPLE


Indeed, I get

,----
| (property-drawer (:begin 24 :end 78 :contents-begin 40 :contents-end 69
| :post-blank 0 :post-affiliated 24 :parent #3) (node-property (:key "chf"
| :value "21.76" :begin 40 :end 60 :post-blank 0 :parent #4))
| (node-property (:key "chf" :value "21.76" :begin 60 :end 69 :post-blank
| 0 :parent #4)))
`----

too when parsing this 

,----
| * ORG SCRATCH
| ** Pizza
|    :PROPERTIES:
|    :chf:      21.76
|    :eur:
|    :END:
`----

looks like a bug to me.

-- 
cheers,
Thorsten

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-08-30 17:56 org-elements-parse-buffer and weird property drawers Eike
  2014-08-30 19:02 ` Eike
  2014-08-30 19:46 ` Thorsten Jolitz
@ 2014-08-31  9:46 ` Nicolas Goaziou
  2014-08-31 12:59   ` Eike
  2 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2014-08-31  9:46 UTC (permalink / raw)
  To: Eike; +Cc: org-mode

Hello,

Eike <news@eknet.org> writes:

> I'm playing with the functions in org-elements.el and the following
> effect seems strange to me:
>
> I have a few propery drawers with empty propertys, like
>
> #+BEGIN_EXAMPLE
> :PROPERTIES:
> :date:     [2014-08-29 Fr]
> :chf:      21.76
> :eur:
> :END:
> #+END_EXAMPLE
>
> If I do org-elements-parse-buffer, the empty one is not there, but the
> first one is duplicated. At least, there are two node-property
> elements in the tree like that:
>
> #+BEGIN_EXAMPLE
> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
> #+END_EXAMPLE
>
> The function call was this:
>
> #+begin_src emacs-lisp
> (with-current-buffer "test-exp.org"
>   (org-element-parse-buffer))
> #+end_src
>
> And here is the "test-exp.org" org file:
>
> #+BEGIN_EXAMPLE
> * Sonstiges
> ** Pizza
>    :PROPERTIES:
>    :chf:      21.76
>    :eur:
>    :END:
> #+END_EXAMPLE

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-08-31  9:46 ` Nicolas Goaziou
@ 2014-08-31 12:59   ` Eike
  2014-09-02  9:42     ` Daimrod
  0 siblings, 1 reply; 9+ messages in thread
From: Eike @ 2014-08-31 12:59 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Eike, org-mode


Hello,

Nicolas Goaziou writes:
> Eike <news@eknet.org> writes:
>
>> I'm playing with the functions in org-elements.el and the following
>> effect seems strange to me:
>>
>> I have a few propery drawers with empty propertys, like
>>
>> #+BEGIN_EXAMPLE
>> :PROPERTIES:
>> :date:     [2014-08-29 Fr]
>> :chf:      21.76
>> :eur:
>> :END:
>> #+END_EXAMPLE
>>
>> If I do org-elements-parse-buffer, the empty one is not there, but the
>> first one is duplicated. At least, there are two node-property
>> elements in the tree like that:
>>
>> #+BEGIN_EXAMPLE
>> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
>> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
>> #+END_EXAMPLE
>>
>> The function call was this:
>>
>> #+begin_src emacs-lisp
>> (with-current-buffer "test-exp.org"
>>   (org-element-parse-buffer))
>> #+end_src
>>
>> And here is the "test-exp.org" org file:
>>
>> #+BEGIN_EXAMPLE
>> * Sonstiges
>> ** Pizza
>>    :PROPERTIES:
>>    :chf:      21.76
>>    :eur:
>>    :END:
>> #+END_EXAMPLE
>
> This should be fixed. Thank you for reporting it.

Many thanks! It works here now.

Regards,
Eike

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-08-31 12:59   ` Eike
@ 2014-09-02  9:42     ` Daimrod
  2014-09-02 10:35       ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Daimrod @ 2014-09-02  9:42 UTC (permalink / raw)
  To: Eike; +Cc: Eike, org-mode, Nicolas Goaziou

Eike <eike@eknet.org> writes:

> Hello,
>
> Nicolas Goaziou writes:
>> Eike <news@eknet.org> writes:
>>
>>> I'm playing with the functions in org-elements.el and the following
>>> effect seems strange to me:
>>>
>>> I have a few propery drawers with empty propertys, like
>>>
>>> #+BEGIN_EXAMPLE
>>> :PROPERTIES:
>>> :date:     [2014-08-29 Fr]
>>> :chf:      21.76
>>> :eur:
>>> :END:
>>> #+END_EXAMPLE
>>>
>>> If I do org-elements-parse-buffer, the empty one is not there, but the
>>> first one is duplicated. At least, there are two node-property
>>> elements in the tree like that:
>>>
>>> #+BEGIN_EXAMPLE
>>> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4))
>>> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4))
>>> #+END_EXAMPLE
>>>
>>> The function call was this:
>>>
>>> #+begin_src emacs-lisp
>>> (with-current-buffer "test-exp.org"
>>>   (org-element-parse-buffer))
>>> #+end_src
>>>
>>> And here is the "test-exp.org" org file:
>>>
>>> #+BEGIN_EXAMPLE
>>> * Sonstiges
>>> ** Pizza
>>>    :PROPERTIES:
>>>    :chf:      21.76
>>>    :eur:
>>>    :END:
>>> #+END_EXAMPLE
>>
>> This should be fixed. Thank you for reporting it.
>
> Many thanks! It works here now.

Hi,

Since the change to `org-re-property' I have problems to display org
files. My *Message* buffer is spammed with the following error:

Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 in highlight (3 (quote org-property-value) t)")
                                           ^^^^ this number changes

I know the problem lies in org-re-property because if I revert the
change, it works as it did before.

Test file:
* TODO Test
  :PROPERTIES:
  :TEST:     test
  :END:


Best,

--
Daimrod/Greg

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-09-02  9:42     ` Daimrod
@ 2014-09-02 10:35       ` Nicolas Goaziou
  2014-09-02 11:14         ` Daimrod
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2014-09-02 10:35 UTC (permalink / raw)
  To: Daimrod; +Cc: Eike, org-mode, Eike

Hello,

Daimrod <daimrod@gmail.com> writes:

> Since the change to `org-re-property' I have problems to display org
> files. My *Message* buffer is spammed with the following error:
>
> Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 in highlight (3 (quote org-property-value) t)")
>                                            ^^^^ this number changes

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-09-02 10:35       ` Nicolas Goaziou
@ 2014-09-02 11:14         ` Daimrod
  2014-09-02 18:58           ` Will Monroe
  0 siblings, 1 reply; 9+ messages in thread
From: Daimrod @ 2014-09-02 11:14 UTC (permalink / raw)
  To: Eike; +Cc: Eike, org-mode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Daimrod <daimrod@gmail.com> writes:
>
>> Since the change to `org-re-property' I have problems to display org
>> files. My *Message* buffer is spammed with the following error:
>>
>> Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 in highlight (3 (quote org-property-value) t)")
>>                                            ^^^^ this number changes
>
> Fixed. Thank you.

It works, thanks.

> Regards,

-- 
Daimrod/Greg

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

* Re: org-elements-parse-buffer and weird property drawers
  2014-09-02 11:14         ` Daimrod
@ 2014-09-02 18:58           ` Will Monroe
  0 siblings, 0 replies; 9+ messages in thread
From: Will Monroe @ 2014-09-02 18:58 UTC (permalink / raw)
  Cc: org-mode

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

Hello,

I'm not as adept at troubleshooting as others on this list, but I believe
I've encountered this problem as well.  After updating my org-mode version
this morning, I opened some of my org files and encountered some strange
display behaviors:

- The "TODO" keywords did not seem to have the usual faces applied to
them.  I expected to see bold text and different colors on some of them but
I did not.

- I also saw that notes and some of the properties were not indented
anymore.

- In addition, I discovered that some actions (e.g., clocking in/out) no
longer seemed to work.

None of these were problems before updating.  And I am able to open the
same org files without any problems on other machines that have not been
updated.

The error report information from org is below.  If there's any more detail
I can provide, I'd be glad to do so.  If anyone has ideas about how to:  1)
resolve the problem and/or 2) revert to a prior version using basic
installation methods (ie, M-x package install), I would greatly appreciate
it.

Thanks,

Will

***
Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-12 on bob.porkrind.org
Package: Org-mode version 8.2.7c (8.2.7c-57-g37bf05-elpa @
/Users/wmonro1/.emacs.d/elpa/
org-20140901/)

current state:
==============
(setq
 org-export-backends '(ascii html icalendar latex md odt freemind)
 org-hide-leading-stars t
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
              org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-log-done t
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-pdf-process '("pdflatex -shell-escape -shell-escape -interaction
nonstopmode -output-directory %o %f" "pdflatex -shell-escape -shell-escape
-interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape
-shell-escape -interaction nonstopmode -output-directory %o %f")
 org-export-date-timestamp-format "%Y-%m-%d"
 org-agenda-custom-commands '(("w" todo "WAITING") ("n" todo "NEXT") ("S"
tags-todo "@SILENCE")
                  ("e" tags-todo "@EMAIL") ("E" tags-todo "@ERRAND")
                  ("W" "calendar cd-"
                   ((agenda "Work"
                 ((org-agenda-files
                   (quote
                    ("~/Dropbox/org/workx.org" "~/Dropbox/org/prodevx.org"
                     "~/Dropbox/org/writingx.org")
                    )
                   )
                  )
                 )
                )
                   )
                  ("H" "calendar cd-"
                   ((agenda "Home"
                 ((org-agenda-files
                   (quote
                    ("~/Dropbox/org/homex.org" "~/Dropbox/org/cookingx.org"
                     "~/Dropbox/org/errandsx.org")
                    )
                   )
                  )
                 )
                )
                   )
                  ("P" "calendar cd-"
                   ((agenda "Personal"
                 ((org-agenda-files
                   (quote
                    ("~/Dropbox/org/fitnessx.org" "~/Dropbox/org/socialx.org
"
                     "~/Dropbox/org/musicx.org")
                    )
                   )
                  )
                 )
                )
                   )
                  ("h" "Daily habits" ((agenda "habits"))
                   ((org-agenda-show-log t) (org-agenda-ndays 1)
                (org-agenda-log-mode-items (quote (state)))
                (org-agenda-skip-function
                 (quote (org-agenda-skip-entry-if (quote notregexp)
":HABIT:")))
                )
                   )
                  )
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-default-notes-file "~/Dropbox/org/inbox.org"
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current
mm/org-insert-trigger)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-odt-format-headline-function 'ignore
 org-loop-over-headlines-in-active-region "t"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-global-properties '(("Effort_ALL" . "0:05 0:15 0:25 0:45 1:00 2:00"))
 org-export-copy-to-kill-ring t
 org-trigger-hook '(org-depend-trigger-todo)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
before-save-hook org-encrypt-entries nil t]
           5]
         #[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-journal-update-auto-mode-alist)
 org-export-with-tags 'not-in-toc
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-odt-format-inlinetask-function 'ignore
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-directory "~/Dropbox/org/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks
          org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-tags-exclude-from-inheritance '("crypt")
 org-journal-dir "~/Dropbox/journal/"
 org-crypt-key nil
 org-export-with-drawers nil
 org-todo-keywords '((type "TODO(t)" "NEXT(n)" "|" "WAITING(w)" "DONE(d)"))
 org-modules '(org-habit org-w3m org-bbdb org-bibtex org-docview org-gnus
org-info org-irc org-mhe org-rmail)
 org-latex-packages-alist '(("" "minted"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-log-into-drawer t
 org-odt-format-drawer-function '(lambda (name contents) contents)
 org-latex-listings 'minted
 org-blocker-hook '(org-depend-block-todo)
 org-html-format-headline-function 'ignore
 org-babel-load-languages '((ledger . t))
 org-reveal-start-hook '(org-decrypt-entry)
 org-velocity-bucket "~/Dropbox/org"
 org-html-format-inlinetask-function 'ignore
 org-agenda-files '("~/Dropbox/org/cookingx.org" "~/Dropbox/org/errandsx.org"
"~/Dropbox/org/homex.org"
            "~/Dropbox/org/fitnessx.org" "~/Dropbox/org/maintenancex.org"
"~/Dropbox/org/musicx.org"
            "~/Dropbox/org/prodevx.org" "~/Dropbox/org/socialx.org"
"~/Dropbox/org/techx.org"
            "~/Dropbox/org/workx.org" "~/Dropbox/org/writingx.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-src-fontify-natively t
 org-tag-alist '(("@SILENCE" . 115) ("@CALLS" . 99) ("@HOME" . 104)
("@OFFICE" . 111) ("@COMPUTER" . 117)
         ("@EMAIL" . 101) ("@READ" . 114) ("@ERRAND" . 69) ("@PLAN" . 112)
("@BRAINSTORM" . 98)
         ("@WAITING" . 119) ("@ISAAC" . 105) ("@JASMAINE" . 106) ("@KATY" .
107) ("PROJECT" . 80)
         ("HABIT" . 72))
 )


On Tue, Sep 2, 2014 at 6:14 AM, Daimrod <daimrod@gmail.com> wrote:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
> > Hello,
> >
> > Daimrod <daimrod@gmail.com> writes:
> >
> >> Since the change to `org-re-property' I have problems to display org
> >> files. My *Message* buffer is spammed with the following error:
> >>
> >> Error during redisplay: (jit-lock-function 1119) signaled (error "No
> match 3 in highlight (3 (quote org-property-value) t)")
> >>                                            ^^^^ this number changes
> >
> > Fixed. Thank you.
>
> It works, thanks.
>
> > Regards,
>
> --
> Daimrod/Greg
>
>

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

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

end of thread, other threads:[~2014-09-02 18:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-30 17:56 org-elements-parse-buffer and weird property drawers Eike
2014-08-30 19:02 ` Eike
2014-08-30 19:46 ` Thorsten Jolitz
2014-08-31  9:46 ` Nicolas Goaziou
2014-08-31 12:59   ` Eike
2014-09-02  9:42     ` Daimrod
2014-09-02 10:35       ` Nicolas Goaziou
2014-09-02 11:14         ` Daimrod
2014-09-02 18:58           ` Will Monroe

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).