Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Bastien
Georg C. F. Greve [EMAIL PROTECTED] writes:

 Moving email is trivial -- you just need to call

  gnus-summary-move-article

 to move things to the place you want to archive them. But that function
 does not return the URL of the moved article (as one might hope).

I think there is another solution:

1. Make C-c l (org-store-link) store message-id so that org-insert-link
   will insert something like:

  [[gnus:nnml:mail.compas#[EMAIL PROTECTED]][Message description]

  intead of the current format:

  [[gnus:nnml:mail.compas#2306][Message description]]

2. If `gnus-registry.el' is in use, rely on it to double-check in which
   group the message is. If it's not in use, rely on the link infos.

   It's straightforward to get the group from a message-id with
   gnus-registry.el: 
 
 (cddr (assoc message-id gnus-registry-alist)) 

   Then with the group and the message-id you'll find the email.

I don't go further because this method relies on org-store-link being
aware of message-id, but that should not be hard to turn this on, maybe
as an option.

Anyway, i think gnus-registry comes in handy here.

Cheers,

-- 
Bastien


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Integration of Org mode and Gnus

2007-07-18 Thread Tassilo Horn
Georg C. F. Greve [EMAIL PROTECTED] writes:

Hi Georg,

 Moving email is trivial -- you just need to call

  gnus-summary-move-article

 to move things to the place you want to archive them. But that
 function does not return the URL of the moved article (as one might
 hope).

Would that help?

This could be implemented very easy. As far as I can see nothing depends
on the current return value of `gnus-summary-move-article'.

Bye,
Tassilo
-- 
A morning without coffee is like something without something else.



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Integration of Org mode and Gnus

2007-07-18 Thread Georg C. F. Greve
On Wed, 18 Jul 2007 12:20:06 +0200
Tassilo Horn [EMAIL PROTECTED] wrote: 

  to move things to the place you want to archive them. But that
  function does not return the URL of the moved article (as one might
  hope).

 th Would that help?

Yes, I think so.

Although I think the function supports moving several marked articles,
so the return value should technically be a list.

But otherwise yes: This would help me solve my immediate problem. :)


 th This could be implemented very easy.

If you could do that and submit it back to Gnus, that would be great.

Regards,
Georg

-- 
Georg C. F. Greve [EMAIL PROTECTED]
Free Software Foundation Europe  (http://fsfeurope.org)
Join the Fellowship and protect your freedom! (http://www.fsfe.org)
What everyone should know about DRM   (http://DRM.info)


pgpLVXo0vGjh2.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Georg C. F. Greve
On Wed, 18 Jul 2007 12:04:52 +0200
Bastien [EMAIL PROTECTED] wrote: 

 b I think there is another solution:

 b 1. Make C-c l (org-store-link) store message-id so that
 b org-insert-link will insert something like:

 b   [[gnus:nnml:mail.compas#[EMAIL PROTECTED]][Message
 b   description]

 b   intead of the current format:

 b   [[gnus:nnml:mail.compas#2306][Message description]]

Yes, this would also solve the problem.

I guess that this will also require an update of the follow link
function in Org?

If I try to add a link with message ID such as the one above by hand, I
cannot follow it (it seems to try to interpret the message ID as article
number in the group).

Since I know which group I am asking to move things to, being able to
link to the message ID directly would definitely solve the problem, and
maybe even more elegantly, as it should be robust against resorting the
mail group.

Regards,
Georg

-- 
Georg C. F. Greve [EMAIL PROTECTED]
Free Software Foundation Europe  (http://fsfeurope.org)
Join the Fellowship and protect your freedom! (http://www.fsfe.org)
What everyone should know about DRM   (http://DRM.info)


pgpdlEI39NcYA.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Jason F. McBrayer
Bastien [EMAIL PROTECTED] writes:

 Anyway, i think gnus-registry comes in handy here.

It looks like that may indeed be the way forward, if it will let you
follow a link by message-id rather than group.  I'm not clear on the
specifics of how you'd set it up, though.

-- 
+---+
| Jason F. McBrayer[EMAIL PROTECTED]  |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors.  --- The Dhammapada|


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Integration of Org mode and Gnus

2007-07-18 Thread Tassilo Horn
Georg C. F. Greve [EMAIL PROTECTED] writes:

Hi Georg,

  th Would that help?

 Yes, I think so.

 Although I think the function supports moving several marked articles,
 so the return value should technically be a list.

As far as I can see it can only move several articles to exactly one
group.

  th This could be implemented very easy.

 If you could do that and submit it back to Gnus, that would be great.

I just found out that this is not needed. You can use the
`gnus-summary-article-move-hook'. Each function of that hook will be run
with the arguments

- action: move/copy/respool/crosspost
- Some data vector, dunno its use...
- original group
- destination group
- select method

So you could write a delegate function that first add-hooks a function
that sets a custom variable to the destination group. Then it calls
`gnus-summary-move-article'. When that returns you can create the
org-link and remove the function from the hook again.

Bye,
Tassilo
-- 
No person,  no idea, and no  religion deserves to be  illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Bastien
[EMAIL PROTECTED] (Jason F. McBrayer) writes:

 Bastien [EMAIL PROTECTED] writes:

 Anyway, i think gnus-registry comes in handy here.

 It looks like that may indeed be the way forward, if it will let you
 follow a link by message-id rather than group.  I'm not clear on the
 specifics of how you'd set it up, though.

Not fully tested yet, but this patch is a first attempt to implement
this.

It uses message-id instead of message number to store Gnus links. If
gnus-registry is on, it fetches location of the article depending on
gnus-registry-alist.  It's compatible with old Gnus links.

The problem is gnus-registry-alist can be huge, and access to article
might be somewhat slow.

--- org.el.orig	2007-07-13 15:10:47.0 +0200
+++ org.el	2007-07-18 13:48:38.0 +0200
@@ -10509,7 +10509,7 @@
 		   (format http://groups.google.com/groups?as_umsgid=%s;
 			   (org-fixup-message-id-for-http message-id
 	  (setq link (org-make-link gnus: group
-# (number-to-string article))
+# (org-remove-angle-brackets message-id))
 
  ((eq major-mode 'w3-mode)
   (setq cpltxt (url-view-url t)
@@ -11444,8 +11444,14 @@
   (funcall (cdr (assq 'gnus org-link-frame-setup)))
   (if gnus-other-frame-object (select-frame gnus-other-frame-object))
   (cond ((and group article)
+	 (if (string-match @ article)
+	 (when (boundp 'gnus-registry-alist)
+	   (gnus-registry-initialize)
+	   (setq group (caddr (assoc (concat  article )
+	 gnus-registry-alist
+	   (setq article (string-to-number article)))
 	 (gnus-group-read-group 1 nil group)
-	 (gnus-summary-goto-article (string-to-number article) nil t))
+	 (gnus-summary-goto-article article nil t))
 	(group (gnus-group-jump-to-group group
 
 (defun org-follow-vm-link (optional folder article readonly)

Let me know if this is convenient.

-- 
Bastien
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Integration of Org mode and Gnus

2007-07-18 Thread Georg C. F. Greve
On Wed, 18 Jul 2007 13:55:30 +0200
Tassilo Horn [EMAIL PROTECTED] wrote: 

  Although I think the function supports moving several marked
  articles, so the return value should technically be a list.

 th As far as I can see it can only move several articles to exactly
 th one group.

Yes, exactly.


  If you could do that and submit it back to Gnus, that would be
  great.

 th I just found out that this is not needed. You can use the
 th `gnus-summary-article-move-hook'. Each function of that hook will
 th be run with the arguments

 th - action: move/copy/respool/crosspost
 th - Some data vector, dunno its use...
 th - original group
 th - destination group
 th - select method

 th So you could write a delegate function that first add-hooks a
 th function that sets a custom variable to the destination group. Then
 th it calls `gnus-summary-move-article'. When that returns you can
 th create the org-link and remove the function from the hook again.

I think I don't quite understand how this solves the problem.

This sounds like I should set the target group dynamically in the hook
when moving the article. But I can determine the group simply by calling

   (gnus-summary-move-article nil GROUP)

So I know which group the articles end up in, but I don't know which
article number they got in that group -- but that is the basic
prerequisite to be able to link to them.

I'm sorry to ask a question that may be stupid, but how would I get the
article number(s) of the message(s) that have been moved by doing the
above?

Regards,
Georg

-- 
Georg C. F. Greve [EMAIL PROTECTED]
Free Software Foundation Europe  (http://fsfeurope.org)
Join the Fellowship and protect your freedom! (http://www.fsfe.org)
What everyone should know about DRM   (http://DRM.info)


pgpMkBFBuiSj5.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Integration of Org mode and Gnus

2007-07-18 Thread Tassilo Horn
Georg C. F. Greve [EMAIL PROTECTED] writes:

   If you could do that and submit it back to Gnus, that would be
   great.

  th I just found out that this is not needed. You can use the
  th `gnus-summary-article-move-hook'. Each function of that hook will
  th be run with the arguments

  th - action: move/copy/respool/crosspost
  th - Some data vector, dunno its use...
  th - original group
  th - destination group
  th - select method

  th So you could write a delegate function that first add-hooks a
  th function that sets a custom variable to the destination
  th group. Then it calls `gnus-summary-move-article'. When that
  th returns you can create the org-link and remove the function from
  th the hook again.

 I think I don't quite understand how this solves the problem.

 This sounds like I should set the target group dynamically in the hook
 when moving the article. But I can determine the group simply by
 calling

(gnus-summary-move-article nil GROUP)

But `gnus-summary-move-article' is the one who asks you for the group
name when you do `B m' with some articles.

 So I know which group the articles end up in, but I don't know which
 article number they got in that group -- but that is the basic
 prerequisite to be able to link to them.

Uh, yes. I think I got you wrong. I thought you only needed the group
where the article was moved to.

Maybe you can use that and the message-id to link to the message without
requiring the registry. Have a look at Bastien's patch.

 I'm sorry to ask a question that may be stupid, but how would I get
 the article number(s) of the message(s) that have been moved by doing
 the above?

I don't have any clue. :-)

Bye,
Tassilo



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Bastien
Georg C. F. Greve [EMAIL PROTECTED] writes:

 I see this in *Messages*:

   Retrieving newsgroup: nnml:gnu.ml.emacs.orgmode...
   Fetching headers for nnml:gnu.ml.emacs.orgmode...done
   Suppressing duplicates...done
   Scoring...done
   Generating summary...done
   No more unread articles
   Couldn't fetch article [EMAIL PROTECTED]

 So it seems to look into the wrong group.

I found out that the registry is not up-to-date until you save the
~/gnus.registry.el.  

Replace `gnus-registry-initialize' by `gnus-registry-save' in the patch
before. It should be okay - unless there are special issues with virtual
groups.

 Considering that gnus-registry-alist can slow down Gnus considerably
 and I normally don't use it, I'd ask to always ensure it does not
 depend on it. Please. :)

I still think using gnus-registry might be a good solution, even if it
requires making access to `gnus-registry-alist' more efficient.

Best,

-- 
Bastien


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Bastien
Georg C. F. Greve [EMAIL PROTECTED] writes:

 But doesn't this require for the article to be in the registry, still?

Yes it does. 

 What happens if the article has been pushed out of the registry?

If you set `gnus-registry-max-entries' to a reasonably large number (say
5000) the registry will keep track of these 5000 articles. Beyond this
number I suppose it makes more sense to use the nnir.el interface.

Yet another solution would be to have an Org registry.

All links in an Org project would be stored in this registry (so that
being on a mail, you can ask yourself Is it somewhere in one of my org
file?) and moving articles in Gnus would help syncing the registry and
the org file.

But er.. that's more than a small patch :)

Best,

PS: i wrote a registry for planner, and already suggested it for org
here: http://article.gmane.org/gmane.emacs.orgmode/1534/match=registry

-- 
Bastien


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-mode to LaTeX export

2007-07-18 Thread Charles Cave
There have been a few discussions on a facility for org-mode to export a buffer
into LaTeX. I was wondering what is the planned scope of this work?

I would like to be able to write an article in org-mode then create a LaTeX 
document
using the following transformations which should be configurable:

Headings
* 
**
***
and so on should be converted to the appropriate {chapter} {section} tags

*bold* /italic/ markup should be tagged

Lists, numbered and unnumbered be converted into the appropriate LaTeX
structures.


I wrote a Perl script to do most of this work but I don't know enough Lisp to
write a similar program.

Who is doing the work on LaTeX export? 
What features will you support?
How configurable will it be?

Many thanks
Charles

P.S. I am working on an update to my org-mode and GTD article.

---
Charles Cave
Sydney, NSW, Australia
Email:  [EMAIL PROTECTED]
---


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Integration of Org mode and Gnus

2007-07-18 Thread Carsten Dominik

Hi Bastien,

I'd like to accept a patch that does this and keeps the old links
working.  After this discussion has converged, could you send me the
final patch against a 5.xx version or org-mode?

Thanks a lot.

- Carsten

On Jul 18, 2007, at 17:39, Bastien wrote:


Georg C. F. Greve [EMAIL PROTECTED] writes:


I see this in *Messages*:

  Retrieving newsgroup: nnml:gnu.ml.emacs.orgmode...
  Fetching headers for nnml:gnu.ml.emacs.orgmode...done
  Suppressing duplicates...done
  Scoring...done
  Generating summary...done
  No more unread articles
  Couldn't fetch article [EMAIL PROTECTED]

So it seems to look into the wrong group.


I found out that the registry is not up-to-date until you save the
~/gnus.registry.el.

Replace `gnus-registry-initialize' by `gnus-registry-save' in the patch
before. It should be okay - unless there are special issues with 
virtual

groups.


Considering that gnus-registry-alist can slow down Gnus considerably
and I normally don't use it, I'd ask to always ensure it does not
depend on it. Please. :)


I still think using gnus-registry might be a good solution, even if it
requires making access to `gnus-registry-alist' more efficient.

Best,

--
Bastien


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




--
Carsten Dominik
Sterrenkundig Instituut Anton Pannekoek
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] Abbreviated links export

2007-07-18 Thread Carsten Dominik


On Jul 17, 2007, at 16:39, Bastien wrote:


Hi Carsten,

There's a bug with abbreviated links export (since 5.01 if i remember
correctly). For example:

 #+LINK: org-mode-manual 
http://staff.science.uva.nl/~dominik/Tools/org/org.html#%s

 [[org-mode-manual:Dynamic-blocks][More on dynamic blocks]]

will be exported as:

 a href=#org-mode-manual:Dynamic-blocksMore on dynamic blocks/a


Currently, the key of a link abbreviation must be all letters.
I am not sure how much we should widen this up.  I guess I could add
numbers, dashes, maybe underscore.  Will do so for 5.04.

- Carsten



--
Carsten Dominik
Sterrenkundig Instituut Anton Pannekoek
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [c]ompute property value ?

2007-07-18 Thread Carsten Dominik


On Jul 16, 2007, at 11:30, Bastien wrote:


Carsten Dominik [EMAIL PROTECTED] writes:


The problem is that the summary type is a property of the
column view format, not of the property itself.


Yes, i inferred that from the fact that the summary type is
automatically updated when changing the property value from
the column view.


So it is not entirely obvious how and with what scope this command
should be interpreted - even though I think we should have it.


So far as C-c C-x C-c does the updating job by computing the summary, i
guess we just need a function that replaces the values of the 
properties

when they exist (in parent and children).


In fact, constructing the column view *does* replace the property
value where it exists.  Still, an independent function, callable
from hooks would be good.

- Carsten



--
Carsten Dominik
Sterrenkundig Instituut Anton Pannekoek
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-mode to LaTeX export

2007-07-18 Thread Xavier Maillard
Charles Cave charles_cave at optusnet.com.au writes:

 
 There have been a few discussions on a facility for org-mode to export a 
 buffer
 into LaTeX. I was wondering what is the planned scope of this work?

Bastien has written an org-mode to latex export module which works perfectly
well.  I have tested it on several occasions and you can expect Bastien will
release soon.

Xavier





___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode