emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-sync doesn't work with recent org-element.el
@ 2012-12-10 15:53 Jonas Hörsch
  2012-12-12 14:42 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Jonas Hörsch @ 2012-12-10 15:53 UTC (permalink / raw)
  To: emacs-orgmode

hej list,

i've just now been playing around with org-sync [1] and want to start
using it for at least a github and eventually a redmine project.

the first thing which is making me stumble is that while org-sync works
fine with org-element from [2] a current (as in from head of master) one
fails to work at all.

as far as i could track the problem, i understand that the handling of
property drawers changed significantly: while in the former version a
property drawer was just represented by a simple plist, the latter now
introduced a new org-element-type node-property, so it also provides
access to information about f.ex. spacing of individual items in the
property drawer.

and org-sync hasn't been adapted to this yet.

am i correct? did someone start the work on updating org-sync yet?

thanks,
jonas

Footnotes:

[1] http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/org-sync/

[2] http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-element.el;hb=5057ae0fc2c0d551a83d3c3e9bd621b751db9f09

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

* Re: org-sync doesn't work with recent org-element.el
  2012-12-10 15:53 org-sync doesn't work with recent org-element.el Jonas Hörsch
@ 2012-12-12 14:42 ` Bastien
  2012-12-13  1:06   ` Aurélien Aptel
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2012-12-12 14:42 UTC (permalink / raw)
  To: Jonas Hörsch; +Cc: emacs-orgmode, Aurélien Aptel

Hi Jonas,

I'm copying Aurélien, the author of org-sync.

Aurélien, are you willing to maintain org-sync or shall we call for
a new maintainer?

Thanks for your answer!

Best,

-- 
 Bastien

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

* Re: org-sync doesn't work with recent org-element.el
  2012-12-12 14:42 ` Bastien
@ 2012-12-13  1:06   ` Aurélien Aptel
  2012-12-13 10:03     ` Bastien
  2012-12-14  8:13     ` Jonas Hörsch
  0 siblings, 2 replies; 7+ messages in thread
From: Aurélien Aptel @ 2012-12-13  1:06 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Jonas Hörsch

Hi all,

On Wed, Dec 12, 2012 at 3:42 PM, Bastien <bzg@altern.org> wrote:
> I'm copying Aurélien, the author of org-sync.

I saw the thread but thank you anyway.

> Aurélien, are you willing to maintain org-sync or shall we call for
> a new maintainer?

I have not given up on org-sync but I have too many things going on
right now. I know it's not the first time I say this but I will get
back to it eventually.

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

* Re: org-sync doesn't work with recent org-element.el
  2012-12-13  1:06   ` Aurélien Aptel
@ 2012-12-13 10:03     ` Bastien
  2012-12-14  8:13     ` Jonas Hörsch
  1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2012-12-13 10:03 UTC (permalink / raw)
  To: Aurélien Aptel; +Cc: emacs-orgmode, Jonas Hörsch

Aurélien Aptel <aurelien.aptel@gmail.com> writes:

> I have not given up on org-sync but I have too many things going on
> right now. I know it's not the first time I say this but I will get
> back to it eventually.

All right, thanks!

-- 
 Bastien

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

* Re: org-sync doesn't work with recent org-element.el
  2012-12-13  1:06   ` Aurélien Aptel
  2012-12-13 10:03     ` Bastien
@ 2012-12-14  8:13     ` Jonas Hörsch
  2012-12-14 13:34       ` retrieve value of a property from a property-drawer (was: org-sync doesn't work with recent org-element.el) Jonas Hörsch
  2012-12-16 12:45       ` org-sync doesn't work with recent org-element.el Jonas Hörsch
  1 sibling, 2 replies; 7+ messages in thread
From: Jonas Hörsch @ 2012-12-14  8:13 UTC (permalink / raw)
  To: emacs-orgmode

hi all, hi aurélien,

then, i suppose the answer to my main question, whether someone has started
updating org-sync, is a no and i'll thus try.

i'm not too proficient in elisp yet, so any hints of a clean transition
are appreciated. i plan to alter any parts, which read/write cons lists
(i mean those ( key . value ) pairs which used to go under the
:properties key) to node-property elements directly.

if you think a bit of that chore could be abstracted away in a function,
let me know.

cheers,
jonas

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

* retrieve value of a property from a property-drawer (was: org-sync doesn't work with recent org-element.el)
  2012-12-14  8:13     ` Jonas Hörsch
@ 2012-12-14 13:34       ` Jonas Hörsch
  2012-12-16 12:45       ` org-sync doesn't work with recent org-element.el Jonas Hörsch
  1 sibling, 0 replies; 7+ messages in thread
From: Jonas Hörsch @ 2012-12-14 13:34 UTC (permalink / raw)
  To: emacs-orgmode

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

Hej, org-element-wizards,

i found that the following use of org-element-map retrieves reliably
the value of a key from a property drawer.

is such a use, especially the temporary overriding of the headline's
type to org-data, to be considered allowed usage or rather a hack and
thus to be avoided?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test.org --]
[-- Type: text/x-org, Size: 619 bytes --]

* First headline
:PROPERTIES:
:url:      http://orgmode.org/
:END:

#+begin_src emacs-lisp
(defun retrieve-property-value (headlineitem key)
  (org-element-map (cons 'org-data (cdr headlineitem))
                   'node-property
                   (lambda (x) (and (string= (org-element-property :key x) key)
                               (org-element-property :value x)))
                   nil t 'headline))

(let* ((doc (org-element-parse-buffer))
       (firstheadline (org-element-map doc 'headline 'identity nil t)))
  (retrieve-property-value firstheadline "url"))
#+end_src

#+RESULTS:
: http://orgmode.org/


[-- Attachment #3: Type: text/plain, Size: 32 bytes --]


thanks for any comments,
jonas

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

* Re: org-sync doesn't work with recent org-element.el
  2012-12-14  8:13     ` Jonas Hörsch
  2012-12-14 13:34       ` retrieve value of a property from a property-drawer (was: org-sync doesn't work with recent org-element.el) Jonas Hörsch
@ 2012-12-16 12:45       ` Jonas Hörsch
  1 sibling, 0 replies; 7+ messages in thread
From: Jonas Hörsch @ 2012-12-16 12:45 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Florian Friesdorf

hej aurélien, list,

as hoped for i got it to work with the current org-element.el with only
few changes to org-sync. i pushed my changes to my github at [1]. please
feel free to comment and/or merge.

the commit

bdcbae os-github: use authentication data also for
os-github-fetch-json-page 

is optional and i wouldn't mind moving that to a separate feature branch
if you prefer.

cheers,
jonas



Footnotes:

[1] https://github.com/coroa/org-sync.git
    https://github.com/coroa/org-sync

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

end of thread, other threads:[~2012-12-16 12:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 15:53 org-sync doesn't work with recent org-element.el Jonas Hörsch
2012-12-12 14:42 ` Bastien
2012-12-13  1:06   ` Aurélien Aptel
2012-12-13 10:03     ` Bastien
2012-12-14  8:13     ` Jonas Hörsch
2012-12-14 13:34       ` retrieve value of a property from a property-drawer (was: org-sync doesn't work with recent org-element.el) Jonas Hörsch
2012-12-16 12:45       ` org-sync doesn't work with recent org-element.el Jonas Hörsch

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