[O] Import efforts

2011-10-13 Thread Ulf Stegemann
Dear all,

I'm looking for an easy way to incorporate efforts from other, non-org
users into an org file.

Assume you do project accounting using org.  Recording and displaying the
efforts /you/ have spent on the different items is no problem thanks to the
clocking mechanism.  However, I'd like to incorporate efforts that have
been spent on delegated tasks, as well.  Co-workers not using org can
usually give me something like `It took me n hours to complete task x on
day y' or `I've spent n hours between day y and z on task x' (unless
they use a time-tracking tool with export function, but that's a
different story).

Is there a better solution to import this kind of data than to create
`fake' logbook entries, may it be manually or with help of functions?

Ulf





[O] [PATCH] Incorrect HTML entity for `degree'

2011-06-06 Thread Ulf Stegemann
The degree symbol (`deg') has an incorrect HTML entity in org-entities.el.

Ulf

diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index 609173a..c6ace61 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -304,7 +304,7 @@ loaded, add these packages to `org-export-latex-packages-alist'.
 (prod \\prod t prod; [product] [n-ary product] ∏)
 (micro \\textmu{} nil micro; micro µ µ)
 (macr \\textasciimacron{} nil macr; [macron] ¯ ¯)
-(deg \\textdegree{} nil deg degree ° °)
+(deg \\textdegree{} nil deg; degree ° °)
 (prime \\prime t prime; ' ' ′)
 (Prime \\prime{}\\prime t Prime; '' '' ″)
 (infin \\propto t infin; [infinity] [infinity] ∞)


Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Ulf Stegemann
Leo sdl@gmail.com wrote:

 On 2011-05-04 21:14 +0800, Ulf Stegemann wrote:
 The idea behind `org-store-link' (which is triggered by `org-capture')
 in message mode is to store a link to a /sent/ message even though the
 message has not been sent by the time you call `org-store-link'.  This
 currently works only with Gnus and only if there's a Gcc header present
 in the message you are working on.  `org-gnus-store-link' needs the Gcc
 header to determine where the message would go once it has been sent (in
 order to create a link to it).  The error you've encountered means that
 there hasn't been a Gcc header in your message when you've called
 `org-capture'.

 I think org-gnus-store-link is too aggressive.

Hmmm, is it? Suppose that linking to a message yet to be archived
wouldn't be there, then `org-store-link' will tell you `org-store-link:
Cannot link to a buffer which is not visiting a file' when called in a
message buffer (like in any other non-file buffer).

 I also dislike the fact that it inserts the Message-Id header.

As the org link to Gnus messages consists of the group and the message
id the latter one is need (as is the first one, the Gcc header).  No
reliable message id, no org link.  One may argue if it's a good idea to
generate the message id when calling `org-store-link' but I think it's a
fair tradeoff to accept this in order to get the link to the message yet
to be archived.

 Also, the stored link may be useless unless it is referenced in the
 template chosen by the user.

Hmmm, I'm not quite sure what your scenario is here.  If you dislike the
behaviour of `org-store-link' in message mode and furthermore do not
want to store a link at all since your template does not use it, why do
you call `org-capture' from the message mode buffer at all?

Ulf




Re: [O] org-capture in message-mode buffer

2011-05-05 Thread Ulf Stegemann
Leo sdl@gmail.com wrote:

 On 2011-05-05 15:02 +0800, Ulf Stegemann wrote:
 Hmmm, is it? Suppose that linking to a message yet to be archived
 wouldn't be there, then `org-store-link' will tell you `org-store-link:
 Cannot link to a buffer which is not visiting a file' when called in a
 message buffer (like in any other non-file buffer).

 When I call org-capture in any buffer not visiting any file except in
 message mode, I don't get any error.

I see.  That seems to be the very real problem, no?

 I also dislike the fact that it inserts the Message-Id header.

 As the org link to Gnus messages consists of the group and the message
 id the latter one is need (as is the first one, the Gcc header).  No
 reliable message id, no org link.  One may argue if it's a good idea to
 generate the message id when calling `org-store-link' but I think it's a
 fair tradeoff to accept this in order to get the link to the message yet
 to be archived.

 If that depends on the Gcc header being available, it should check it
 and do nothing when users does not use one.

We are really talking about `org-gnus-store-link' here.  The whole
purpose of that function is to create an org link.  I do not agree that
this function should silently do nothing when there's no Gcc header
present.  If the function fails to do what it is meant to do, it should
throw an error.

Another story is if `org-capture' should fail only because
`org-gnus-store-link' (which it called) fails.  There are pros and cons.
I agree that it may be annoying to not be able to org-capture something
from within a message buffer.  OTOH, there may be scenarios where an
error message is helpful because you otherwise would think you've
created a link with your capture but in fact haven't.

 Also, the stored link may be useless unless it is referenced in the
 template chosen by the user.

 Hmmm, I'm not quite sure what your scenario is here.  If you dislike the
 behaviour of `org-store-link' in message mode and furthermore do not
 want to store a link at all since your template does not use it, why do
 you call `org-capture' from the message mode buffer at all?

 That seems like a very strange question. The only reason to have a
 global keybinding to org-capture is so that one can invoke it anywhere
 anytime. For example, while composing a new mail I might have a great
 idea I want to add to my Notes but I don't care where I invoke
 org-capture as illustrated by the template I use:

  (n Notes entry (file Notes.org) * %?\n  %i :prepend t)

Okay, I see.  This does not address the real problem but as a workaround
you could have something like

--8--cut herestart8---
emacsclient -e '(org-capture nil n)'
--8--cut here-end-8---

and bind it to a window manager shortcut.  This will allow you to take a
note even when you're not in emacs ... and of course also when in
emacs/message mode.

 BTW, the reason I have stopped using Gcc (long ago) is that I have gmail
 to do archiving for me. It is accessible anytime anywhere and not tied
 to a specific machine.

This sounds interesting (at least for those that use gmail).  Is the URL
where the archived message will be available predictable, i.e. is it
possible to know it while still composing the message?  If yes, it would
be great to expand `org-gnus-store-link' to either use a Gnus archive
group (Gcc) or a gmail one.

Leo sdl@gmail.com wrote:

 On 2011-05-05 15:59 +0800, Leo wrote:
 I believe the following patch is due.

 Think about it some more, there is a reason to signal an error when
 calling org-store-link interactively but it should not when invoked by
 org-capture. Otherwise it will get in the way.

I tend to agree but am not completely sure (s.a.).

Ulf




Re: [O] org-capture in message-mode buffer

2011-05-04 Thread Ulf Stegemann
Leo sdl@gmail.com wrote:

 I am running orgmode from git 2011-04-29 on Emacs 23.3.50.

 In a message mode buffer, M-x org-capture to get the following error:

 Debugger entered--Lisp error: (error Can not create link: No Gcc header 
 found.)
   signal(error (Can not create link: No Gcc header found.))
   error(Can not create link: No Gcc header found.)
   org-gnus-store-link()
   run-hook-with-args-until-success(org-gnus-store-link)
   org-store-link(nil)
   org-capture(nil)
   call-interactively(org-capture nil nil)

The idea behind `org-store-link' (which is triggered by `org-capture')
in message mode is to store a link to a /sent/ message even though the
message has not been sent by the time you call `org-store-link'.  This
currently works only with Gnus and only if there's a Gcc header present
in the message you are working on.  `org-gnus-store-link' needs the Gcc
header to determine where the message would go once it has been sent (in
order to create a link to it).  The error you've encountered means that
there hasn't been a Gcc header in your message when you've called
`org-capture'.

Ulf





[O] Re: org-src-fontify-natively makes things very, very slow

2011-03-22 Thread Ulf Stegemann
Hi Sébastien, Eric,

I'm experiencing the same performance problems with recent org-mode.  My
observations are ...

Sébastien Vauban wxhgmqzgw...@spammotel.com wrote:

 Eric S Fraga wrote:

 From these timings, the font locking doesn't seem to be the issue but maybe
 the overlays are. However, commenting out the code that Sébastien Vauban
 indicated:

 Maybe this is (partly?) due to the overlay I added:

 #+begin_src emacs-lisp
 (overlay-put (make-overlay beg1 block-end)
  'face 'org-block-background))
 #+end_src

 See http://patchwork.newartisans.com/patch/581/ for a full diff. You can see I
 only add *one* overlay: for the background face.

 (well, commenting out the whole condition that includes this code) makes no
 difference at all.

That's true. It does not make any difference performance-wise.

 So, I turned off =org-src-fontify-natively= and things are back to
 normal: next-line is as fast as previous-line.  I can put up without the
 fontification so this is what I am doing now.

It's true that setting `org-src-fontify-natively' to nil boosts
performance but it's only half the story.  Editing something inside
blocks also has a significant negative influence on display performance.
Removing things like `#+BEGIN_letter' / `#+END_letter' from the file
gets things back to normal for me.

Ulf





Re: [O] Re: customising org-latex-to-pdf-process for bibtex

2011-03-02 Thread Ulf Stegemann
Carsten Dominik carsten.domi...@gmail.com wrote:

 On 1.3.2011, at 18:26, Thomas S. Dye wrote:

 Does Org-mode use the wasysym package for its integral symbols? If
 not, potential clashes with the amsmath package could be avoided by
 loading it with the nointegrals option:
 \loadpackage[nointegrals]{wasysym}. This is a fairly standard way to
 load wasysym (which I should have recalled for Suvayu's recent
 problem, thanks Eric for remembering).

 Sounds good to me, but this is a question to Ulf Stegemann who
 implemented many special characters in Org and who likely has an
 opinion on this.

AFAIR, wasysym was introduced because of the smileys it provides.  As
none of wasysym's integrals symbols is used by org-entities it's
okay to load the package with the `nointegrals' option.

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link in message mode

2011-02-09 Thread Ulf Stegemann
Bastien bastien.gue...@wikimedia.fr wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 If you think --despite of those issues-- it's worth adding the creation
 of gnus links while in message mode I could provide a patch.

 FWIW, I think it would be useful.

 I'd probably add the functionality to `org-gnus-store-link' but I'm
 not an org code expert and a different location may be more
 appropriate.  What do you think?

 Such a change belongs to `org-gnus-store-link' -- I'd be glad to apply a
 patch to this effect.

Please find a patch attached. I works for me with latest Emacs, Org,
Gnus from bzr/git but with all the limitations mentioned earlier in this
thread.

The patch includes the generation of the `Message-ID' header if none is
present.  It also removes the `message-deletable' property from that
header to prevent Gnus from re-generating the message id and thus
breaking the org link.  This should (hopefully) work regardless of the
value of `message-generate-headers-first', `message-deletable-headers'
et al.

Ulf

--- org-gnus.el.orig	2011-02-09 10:20:37.003314968 +0100
+++ org-gnus.el	2011-02-09 14:50:55.320440970 +0100
@@ -186,7 +186,35 @@
 	link (org-gnus-article-link
 		  group	newsgroups message-id x-no-archive))
   (org-add-link-props :link link :description desc)
-  link
+  link))
+   ((eq major-mode 'message-mode)
+(setq org-store-link-plist nil)  ; reset
+(save-excursion
+  (save-restriction
+(message-narrow-to-headers)
+(and (not (message-fetch-field Message-ID))
+ (message-generate-headers '(Message-ID)))
+(goto-char (point-min))
+(re-search-forward ^Message-ID: *.*$ nil t)
+(put-text-property (match-beginning 0) (match-end 0) 'message-deletable nil)
+(let ((gcc (car (last
+ (message-unquote-tokens
+  (message-tokenize-header (mail-fetch-field gcc nil t)  ,)
+  (id (org-remove-angle-brackets (mail-fetch-field Message-ID)))
+  (to (mail-fetch-field To))
+  (from (mail-fetch-field From))
+  (subject (mail-fetch-field Subject))
+  desc link
+  newsgroup xarchive)   ; those are always nil for gcc
+  (and (not gcc)
+   (error Can not create link: No Gcc header found.))
+  (org-store-link-props :type gnus :from from :subject subject
+:message-id id :group gcc :to to)
+  (setq desc (org-email-link-description)
+link (org-gnus-article-link
+  gcc newsgroup id xarchive))
+  (org-add-link-props :link link :description desc)
+  link))
 
 (defun org-gnus-open-nntp (path)
   Follow the nntp: link specified by PATH.
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] HTML export and absolute file names

2011-01-24 Thread Ulf Stegemann
With commit 330fb540 export of file links to HTML in
`org-html-make-link' changed insofar that file links with absolute paths
are now prepended with `file://'.  This seems to make it virtually
impossible to create HTML code like `a href=/abs/path.html'.

However, creating HTML links with an absolute path (and without host
name) is often desirable, especially when publishing to a site (where
`file://' links are rather seldom needed).

Would it be reasonable to address this and what would be the best way of
doing so (new export var, new link type ...)?

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2011-01-05 Thread Ulf Stegemann
Hi Bastien,

Bastien bastien.gue...@wikimedia.fr wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 (defun ulf-message-send-and-org-gnus-store-link (optional arg)

 This is something I've been trying to achieve for very long! Great you
 found a solution. A minor suggestion: the function should make sure
 the buffer is not killed after the message is sent.

 I added (message-kill-buffer-on-exit nil) like this:

good point, thanks for adding it.

 I also added an entry in org-hacks.org.

Okay, thanks!

Ulf

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Store link in message mode

2010-11-15 Thread Ulf Stegemann
After it's now possible for me to store an org link upon sending a
message[1] I thought it might be even better to approach this problem in
a more general way.  The idea is to use `org-store-link' in message mode
to create a link for the (yet to come) copy of the message.

Currently `org-store-link' seems to be rather pointless in message mode
as it creates a link to a draft (temporary) message file.  Extending
`org-gnus-store-link' to let it create a gnus link to the copy of the
message when in message mode seems to be more reasonable.

However, there are some, er, `issues' with this.

1) This will only work with Gnus.  Message mode is in principle
   independent of Gnus but non-Gnus users will not benefit from
   `org-store-link' in message mode.

2) Storing a link in message mode effectively creates a link to
   something (the mail copy) that's (still) inexistent.  This means that
   the link remains invalid until the message is actually sent (or more
   precisely: the copy is created upon sending).

   Furthermore, the link will be invalid if

   - the message is not sent;
   - the Gcc header is modified to point to a different group;
   - the message id is changed.

   And of course, the link description will be incorrect if Subject,
   From and/or To headers are changed between calling `org-store-link'
   and creating the message's copy.

If you think --despite of those issues-- it's worth adding the creation
of gnus links while in message mode I could provide a patch.  I'd
probably add the functionality to `org-gnus-store-link' but I'm not an
org code expert and a different location may be more appropriate.  What
do you think?

Ulf

References:
[1]  see http://thread.gmane.org/gmane.emacs.orgmode/31280


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bastien is going to become the maintainer of Org mode in January

2010-11-15 Thread Ulf Stegemann
Thank you, Carsten, thank you, thank you, thank you for creating this
project and putting so much excellent work into it.  Also, thanks to all
Carsten clones; I'm still not convinced there's only one Carsten ;)

And of course a warm welcome to Bastien as new maintainer!

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link in message mode

2010-11-15 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn tass...@member.fsf.org wrote:

 If you think --despite of those issues-- it's worth adding the
 creation of gnus links while in message mode I could provide a patch.

 I'm curious how you are able to determine where a message will be filed
 after sending it off.  I mean, you neither have the Message-Id at that
 point (unless that's added to `message-generate-headers-first'),

Touché, good point.  I had set `message-generate-headers-first' to t
ages ago, so obviously I didn't realise that this is not the default.
You are absolutely right that generating the Message-ID during message
setup is a perquisite for creating a link.

It's probably better, to grab all necessary headers after the message
has been sent (and that's what I originally did).  But this means we
cannot use `org-store-link' in message mode and is also impractical when
using `gnus-delay-article'.

Hmmm, thinking about it, maybe `org-store-link' could create the
Message-ID and insert it if it's not already present.  I should have a
look.

 nor do you know the correct group, at least if there are more than one
 in the Gcc header.

With multiple groups in Gcc I currently use the last one ... but it
could also be the first one, all, a user specified or whatever else
seems feasible.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2010-11-12 Thread Ulf Stegemann
I came back to the matter of storing an org link to a copy of a message
upon sending that message.  The function below does just that and proves
to be quite useful together with a sensible key binding (if you use Gnus
and Gcc that is).

--8--cut herestart8---

(defun ulf-message-send-and-org-gnus-store-link (optional arg)
  Send message with `message-send-and-exit' and store org link to message copy.
If multiple groups appear in the Gcc header, the link refers to
the copy in the last group.
  (interactive P)
  (save-excursion
(save-restriction
  (message-narrow-to-headers)
  (let ((gcc (car (last
   (message-unquote-tokens
(message-tokenize-header
 (mail-fetch-field gcc nil t)  ,)
(buf (current-buffer))
id to from subject desc link newsgroup xarchive)
(message-send-and-exit arg)
(or
 ;; gcc group found ...
 (and gcc
  (save-current-buffer
(progn (set-buffer buf)
   (setq id (org-remove-angle-brackets
 (mail-fetch-field Message-ID)))
   (setq to (mail-fetch-field To))
   (setq from (mail-fetch-field From))
   (setq subject (mail-fetch-field Subject
  (org-store-link-props :type gnus :from from :subject subject
:message-id id :group gcc :to to)
  (setq desc (org-email-link-description))
  (setq link (org-gnus-article-link
  gcc newsgroup id xarchive))
  (setq org-stored-links
(cons (list link desc) org-stored-links)))
 ;; no gcc group found ...
 (message Can not create Org link: No Gcc header found.))

(define-key message-mode-map [(control c) (control meta c)]
  'ulf-message-send-and-org-gnus-store-link)

--8--cut here-end-8---

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2010-11-12 Thread Ulf Stegemann
Eric S. Fraga ucec...@ucl.ac.uk wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 I came back to the matter of storing an org link to a copy of a message
 upon sending that message.  The function below does just that and proves
 to be quite useful together with a sensible key binding (if you use Gnus
 and Gcc that is).

 Very nice!  Works very well.  Thanks.

 Instead of binding this to a command sequence, is there any hook we can
 attach the function to so that it's invoked for every message I send
 (I'm somewhat of a gnus noob unfortunately although I'm learning...)?  I
 ask because I alternative between =C-c C-c= and =C-c C-j= for sending
 emails and I would need to provide two alternatives to incorporate your
 function.

hmmm, never thought of this, probably because I never use
`gnus-delay-article'.  You could try to put the function into
`message-send-hook' (but you should remove the call to
`message-send-and-exit' first).  I don't know if this would work as I
don't know if the Gcc magic (incl. removal of Gcc header) is done before
or after that hook.  If the Gcc header has been removed when
`message-send-hook' is called than you'll have to look for a different
hook to use.  If the Gcc header is still present, it should probably
work as expected but note that in that case the org link will be created
before the actual copying of the message took place. If something goes
wrong with the latter this will leave you with a bogus org link (which,
however, is probably not much of a problem).

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2010-11-12 Thread Ulf Stegemann
Ulf Stegemann ulf-n...@zeitform.de wrote:

 Eric S. Fraga ucec...@ucl.ac.uk wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 I came back to the matter of storing an org link to a copy of a message
 upon sending that message.  The function below does just that and proves
 to be quite useful together with a sensible key binding (if you use Gnus
 and Gcc that is).

 Very nice!  Works very well.  Thanks.

 Instead of binding this to a command sequence, is there any hook we can
 attach the function to so that it's invoked for every message I send
 (I'm somewhat of a gnus noob unfortunately although I'm learning...)?  I
 ask because I alternative between =C-c C-c= and =C-c C-j= for sending
 emails and I would need to provide two alternatives to incorporate your
 function.

 hmmm, never thought of this, probably because I never use
 `gnus-delay-article'.  You could try to put the function into
 `message-send-hook' (but you should remove the call to
 `message-send-and-exit' first).  I don't know if this would work as I
 don't know if the Gcc magic (incl. removal of Gcc header) is done before
 or after that hook.  If the Gcc header has been removed when
 `message-send-hook' is called than you'll have to look for a different
 hook to use.  If the Gcc header is still present, it should probably
 work as expected but note that in that case the org link will be created
 before the actual copying of the message took place. If something goes
 wrong with the latter this will leave you with a bogus org link (which,
 however, is probably not much of a problem).

If the hook approach does not work you could also advise
`gnus-inews-do-gcc', the function that actually creates the message
copies ...

... or you could replace `gnus-inews-do-gcc', e.g. replace the
call to `message-send-and-exit' in
`ulf-message-send-and-org-gnus-store-link' with something like
`gnus-inews-do-gcc-orig' and save it as e.g.
`my-gnus-gcc-and-org-store-link'.  Then you could do something like

(fset 'gnus-inews-do-gcc-orig (symbol-function 'gnus-inews-do-gcc))
(fset 'gnus-inews-do-gcc 'my-gnus-gcc-and-org-store-link)

... but that's all untested ;)

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2010-11-12 Thread Ulf Stegemann
Eric S. Fraga ucec...@ucl.ac.uk wrote:

 Thanks.  I realised after sending my earlier message that this is going
 to be quite complicated.  There's no point in storing a link when the
 message is actually sent (after all, that will be sometime later).  I
 would want to store the link when I send the message to the delay queue
 (so that I can do something with the link, of course) so there really
 need to be two versions of your function.

 Should be doable.  I'll think about it some more.

ah, now I seem to understand.  With your scenario I'd probably remove the
call to `message-send-and-exit' from
`ulf-message-send-and-org-gnus-store-link' and advise both
`message-send-and-exit' and `gnus-delay-article' to run the modified
function before execution.  This would leave you with a stored link
right after a `C-c C-c' and `C-c C-j'.  But in case of the latter, the
org link will be bogus until the message has actually been sent.  Could
that be a way to go for you?

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Store link upon sending a message

2010-10-01 Thread Ulf Stegemann
It often happens to me that I send a message (Gnus) and need to keep a
reference of the mail just sent as link in an org file.  In Gnus copies
of sent messages can be store in one or more groups using the `Gcc'
header.  So I usually select the group where the copy went right after
sending and do an `org-store-link' on the newly created copy.

It would of course be much nicer if the org link could be stored
automagically upon sending the message (or more precisely upon creating
the copy of the message).  Such functionality could certainly be
introduced in `gnus-inews-do-gcc' where group and article number of the
copy are determined and the actual copy is written.  But that would mean
to actually modify Gnus code which is probably not a good and clean
approach.

As I'm not very familiar with the Gnus code I'll probably have to ask at
the Gnus towers if it's possible to get hold of the group and article
number of the last Gcc message created.  But maybe someone around here
has a partly or completely different idea how to achieve the described
behaviour?

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Store link upon sending a message

2010-10-01 Thread Ulf Stegemann
It often happens to me that I send a message (Gnus) and need to keep a
reference of the mail just sent as link in an org file.  In Gnus copies
of sent messages can be store in one or more groups using the `Gcc'
header.  So I usually select the group where the copy went right after
sending and do an `org-store-link' on the newly created copy.

It would of course be much nicer if the org link could be stored
automagically upon sending the message (or more precisely upon creating
the copy of the message).  Such functionality could certainly be
introduced in `gnus-inews-do-gcc' where group and article number of the
copy are determined and the actual copy is written.  But that would mean
to actually modify Gnus code which is probably not a good and clean
approach.

As I'm not very familiar with the Gnus code I'll probably have to ask at
the Gnus towers if it's possible to get hold of the group and article
number of the last Gcc message created.  But maybe someone around here
has a partly or completely different idea how to achieve the described
behaviour?

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Store link upon sending a message

2010-10-01 Thread Ulf Stegemann
Łukasz Stelmach lukasz.stelm...@iem.pw.edu.pl wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

[snipped 15 lines]

 AFAIR, message-id is used for org links rather than the articla
 number.

ah, right, that's at least what raw gnus-article links look like.  I
remember vaguely that this was different in the past and I obviously
hadn't checked again.

 of the last Gcc message created.  But maybe someone around here
 has a partly or completely different idea how to achieve the described
 behaviour?

 Which simplifies the problem quite a lot because we need to be able to
 see the buffer just before sending or copying it to Gcc folder. All the
 information is there.

Yes, this makes things a lot easier :)
IIUC we just need to parse the Gcc header for the group(s), grab the
message-id and put things together.  We should however keep in mind that
we need to parse the Gcc header _before_ `gnus-inews-do-gcc' copies the
message as the Gcc header is removed in the process.  But the org link
should probably be built _after_ `gnus-inews-do-gcc' to avoid bogus org
links in case the Gcc fails.

Additionally, it's probably not necessary to create a link for every
group in Gcc but only for one (first one?).  Furthermore, storing an org
link should only happen when somehow requested by the user and not on
every send.  Although prefix args of `message-send' and friends already
serve a different purpose that nevertheless seems to be trivial.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: bug: images always inlined when exporting to HTML

2010-07-22 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 please pull and check if this is fixed now.

works again here :) Thanks for fixing!

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: bug: images always inlined when exporting to HTML

2010-07-20 Thread Ulf Stegemann
Eric S. Fraga ucec...@ucl.ac.uk wrote:

 It would appear that the handling of images in HTML export has changed
 sometime recently and does not match the documentation (12.5.5 Images
 in HTML export).  Specifically, whether a link to an image file has a
 description or not is ignored and all my images are being inlined.

 Attached are a simple org file that illustrates the problem and the
 resulting HTML.  I think I'm up to date with org, although the
 version number I get is a bit strange:

 : Org-mode version 7.01trans (release_6.36.718.g78ef)
 : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 :  of 2010-05-16 on raven, modified by Debian

Same behaviour here with a slightly different version (Org-mode version
7.01trans (release_6.36.714.g7a6e)). Even with
`org-export-html-inline-images' set to nil, images are /always/ exported
inline.

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org-Mode button

2010-07-20 Thread Ulf Stegemann
Hi Eric,

Eric S. Fraga ucec...@ucl.ac.uk wrote:

 On Mon, 19 Jul 2010 14:57:33 +0200, Ulf Stegemann ulf-n...@zeitform.de
 wrote:
 
 Advocating Org-Mode is always a noble cause. In order to do so, I've put
 together a created with Org-Mode button which is displayed on my
 website. Although I'm far from being a designer type of guy, you may
 want to have a look at http://ulf.zeitform.de/images/org-mode.png. Of
 course you are very welcome to use that button yourself or come up with
 an improved version.

 Excellent!  I like it and would like to use it for my web pages.  Can
 we get it placed somewhere static, like maybe on Worg?

You mean a common URL where the button can be included from? Well, why
not. Could someone with Worg write access do it? If more people are
interested the image could also be placed in the contrib directory.
Whoever wishes to do so, just go ahead.

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org-Mode button

2010-07-19 Thread Ulf Stegemann
Advocating Org-Mode is always a noble cause. In order to do so, I've put
together a created with Org-Mode button which is displayed on my
website. Although I'm far from being a designer type of guy, you may
want to have a look at http://ulf.zeitform.de/images/org-mode.png. Of
course you are very welcome to use that button yourself or come up with
an improved version.

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [Patch] New implementation of the Org remember process ready for comments and testing

2010-06-24 Thread Ulf Stegemann
Sebastian Rose sebastian_r...@gmx.de wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 I have not tested it, but I think this problem should be fixed now as well.

 - Carsten

 It works for me.

   Sebastian

and for me, too. Thanks a lot :)

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [Patch] New implementation of the Org remember process ready for comments and testing

2010-06-23 Thread Ulf Stegemann
Hi Carsten, Sebastian,

just tried the new capture mechanism and it works quiet fine. I like it
a lot. Thanks for the work :)

However ...

Sebastian Rose sebastian_r...@gmx.de wrote:

 Here's the tested and working patch for org-protocol.el.

... it seems that with `org-protocol-capture' the place holders
`%:link', `%:description' and `%:initial' do not work anymore as they
are inserted literally. I must admit that I haven't looked at my
templates for a very long time and that those place holders may be
outdated, but with `org-protocol-remember' at least `%:description'
still works.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [Patch] New implementation of the Org remember process ready for comments and testing

2010-06-23 Thread Ulf Stegemann
Hi Sebastian,

Sebastian Rose sebastian_r...@gmx.de wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 ... it seems that with `org-protocol-capture' the place holders
 `%:link', `%:description' and `%:initial' do not work anymore as they
 are inserted literally. I must admit that I haven't looked at my
 templates for a very long time and that those place holders may be
 outdated, but with `org-protocol-remember' at least `%:description'
 still works.

 Did those placeholders ever work through org-protocol?

I re-tried with `org-protocol-remember' and yes, all of the placeholders
work there.

 How exactly where they meant to work?

In exactly the way they are described in the documentation, e.g. at
http://orgmode.org/worg/org-contrib/org-protocol.php#sec-6_2.

My (remember) template looks like ...

--8--snip--8---

(URLs ?u * TODO %:description\n  (created: %U)\n\n  %c\n\n  %i
todo.org bottom) 

--8--snap--8---

 Did you convert your remember-templates before testing?
 Or did you just copy/rename your `org-remeber-templates' variable to
 `org-capture-templates'?

No, I used `org-capture-import-remember-templates' to get the initial
set of templates. All other templates work without problems.

 In the new variable `org-capture-templates', these placeholders are not
 guarantied to work (at least not documented).

 Use
%c - this will be a link to the page in your browser

%c is working as expected, i.e. it creates a link with the page title as
label. BTW, %x contains exactly the same and not (as I thought) the
selected text.

%i - this will be the selected text in your browser, if any. This is,
 what `%:initial' was I guess.
%a - same as %c

Those two do not output anything.

Currently, I use a minimal template with more or less only %c. However,
it would be nice to have access to

- page title (w/o link)
- page URL
- selected text

Do you need some more information? Should I do some further testing?

Ulf


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-entities-user

2010-05-20 Thread Ulf Stegemann
Dear Nathaniel,

Nathaniel Flath flat0...@gmail.com wrote:

 I've been setting up org-entities-user with a few custom symbols, and
 managed to get a few aliases for items already in org-entities, but i'm a
 bit stuck on adding new items - specifically, the mathbb versions of Z and R
 (the symbols for the sets of integers and reals).  I can't seem to find the
 UTF-8, latin-1, or HTML encodings of these entities - and I'm not sure how
 to input the utf-8 or latin-1 even if I do.  Does anyone know how to do
 this?

there's nothing like a blackboard or double-struck R and Z in latin-1
(and ASCII) so you will need to live with a transcription like `R' or
`REALS' c.

In unicode these characters are called `double-struck capital r' and
`double-struck capital z' and they have the hex values 211d and 2124
respectively. In Emacs you can enter them with `C-x 8 RET 211d RET' or
`C-x 8 RET double-struck capital r RET'.

The corresponding XML (XHTML) entities are `reals;' or `Ropf;' and
`integers;' or `Zopf;' respectively. However, at least latest firefox
does not know how to render these and outputs these entities literally so
you might prefer to go for a transcription as well or use a unicode page
encoding with the appropriate unicode characters.

In case you are interested in further blackboard characters, w3c has a
nice page about double-struck entities. Find it at
http://www.w3.org/TR/xml-entity-names/double-struck.html.

HTH,

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug: LaTeX export and LaTeX environment

2010-05-19 Thread Ulf Stegemann
With

Org-mode version 6.36trans (release_6.36.80.gbdfd)
GNU Emacs 24.0.50.3 (i686-pc-linux-gnu, GTK+ Version 2.18.6)

the LaTeX exporter seems to cease to work when encountering a LaTeX
environment. Suppose this minimal org file:

--8--snip--8---

#+TITLE: Wrapping in Env

/foo/

#+BEGIN_LaTeX
\begin{center}
#+END_LaTeX

/bar/

#+BEGIN_LaTeX
\end{center}
#+END_LaTeX

/baz/

--8--snap--8---

When exported to LaTeX the relevant part looks like this:

--8--snip--8---

\emph{foo}

\begin{center}

/bar/

\end{center}

\emph{baz}

--8--snap--8---

As far as I can see, this happens only if an environment is defined in
the BEGIN/END_LaTeX blocks. Everything between such blocks is exported
literally. I'm pretty sure this once had worked but I'm not sure when
org stopped to export correctly.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Poll: Who is using these commands

2010-05-10 Thread Ulf Stegemann
Carsten Dominik carsten.domi...@gmail.com wrote:

 How many of your are using these keys

 C-c C-f
 C-c C-b
 C-c C-n
 C-c C-p

 for navigation through the outline?

I use them all the time but I don't mind if they'd change.

 Another question:

 C-c C-v   currently make the TODO sparse tree.

dto.


Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Exporting to single LaTeX file and multiple HTML files

2010-05-10 Thread Ulf Stegemann
Hi David, Eric, all,

David Maus dm...@ictsoc.de wrote:

 The function below could be a starting point of a more general
 functionality: It takes a file and splits copys all headlines with a
 certain level to a separate output file.

Eric Schulte schulte.e...@gmail.com wrote:

 Possibly one of these...
 - http://eschulte.github.com/babel-dev/publish.html
 - http://orgmode.org/worg/org-tutorials/org-jekyll.php

thank you both for the pointers, they all look interesting and I'll have
a closer look at it soon.

Originally, I've asked the question because of a forthcoming project
with a rather large documentation where I'd like to advocate org as
documentation system. However, since the whole thing has been postponed,
the matter is less pressing.

Nevertheless, I think that having a functionality to split files on
export would be a nice improvement of org mode. If I would really need
this some day, I'd probably write something to achieve it but certainly
not in elisp as it would take me far too long due to lack of skill. I'd
rather go for a ruby, perl or even shell script for post-processing the
export.

However, such post-processing would certainly not be the very best
solution, an implementation in elisp would be much better.

Regarding the split criteria, I'd say that splitting by section level is
probably the most common case, although keeping track of the section
numbering may pose a problem as David has already mentioned. Splitting
by tag may be also useful. Ideally, section level or tag could be
defined as export option.

As said, the topic has been currently put on hold for me, but I'd
nevertheless appreciate any hints and pointers regarding it.

Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Exporting to single LaTeX file and multiple HTML files

2010-04-22 Thread Ulf Stegemann
I'm wondering what's the best way to export a single org file to a
/single/ LaTeX file but also to /multiple/ HTML files. Think of lengthy
manuals and things like that where such a strategy may be sensible. What
came to my mind were include commands or publishing functions that
post-process the export but this seems all rather cumbersome. Has anyone
a better idea?

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Exporting to single LaTeX file and multiple HTML files

2010-04-22 Thread Ulf Stegemann
Hi Sebastian,

Sebastian Rose sebastian_r...@gmx.de wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:
 I'm wondering what's the best way to export a single org file to a
 /single/ LaTeX file but also to /multiple/ HTML files. Think of lengthy
 manuals and things like that where such a strategy may be sensible. What
 came to my mind were include commands or publishing functions that
 post-process the export but this seems all rather cumbersome. Has anyone
 a better idea?

  - http://orgmode.org/worg/code/org-info-js/

yes, this is a nice one but sometimes separate files are really needed.

  - pdftohtml

Ah, a clever one, too ;)
Sure, it's possible to create a PDF and convert it to HTML later on but
this still seems a bit cumbersome and I'm not quite sure about the
reliability of the tool. When I used it last (some time ago) it
desperately failed on some PDFs.

Originally, I thought I could somehow achieve some sort of `split'
behaviour (e.g. like in texi2html) where you can specify to create a
separate file on export for every first (second, third ...) level
headline. But that's probably a bit tricky.

Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: IMPORTANT: (possibly) incompatible Change

2010-04-07 Thread Ulf Stegemann
Karsten Heymann karsten.heym...@blue-cable.net wrote:

 Not as far as I know. hyperref and microtype will run with reduced
 features, but apart from that, there should be no problem. Regarding
 microtype, I do not know what happens when it is used with the old TeX
 or eTeX compiler that was used to created dvi's before pdftex was used
 for this too, but that should largely be an academic problem as pdftex
 is now used anywhere.

No problems here, regarding the inclusion of microtype when using latex
compiler.

However, I'd strongly oppose to the claim that compatibility to the
latex compiler (vs. pdftex) is an academic problem. I know about several
LaTeX based systems that have to use the latex compiler simply because
pdftex can't handle eps graphics and converting those images isn't
feasible. So, while in the current case there's no compatibility issue,
I think it's reasonable to support both compilers.

Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bug: export latex bug [6.34trans]

2010-02-26 Thread Ulf Stegemann
Hi Chris,

Chris Gray chrismg...@gmail.com wrote:

 When exporting to LaTeX, I get the error void-variable
 org-on-heading-p.

 The following patch fixes the problem.

I encounter the same problem, but I think the following is closer to
what was originally intended ...

--- org-latex.el.orig	2010-02-26 13:54:20.792505535 +0100
+++ org-latex.el	2010-02-26 13:55:05.637505030 +0100
@@ -2045,10 +2045,10 @@
 		 (add-text-properties (1- (length footnote-rpl))
   (length footnote-rpl)
   '(org-protected t) footnote-rpl)
-		 (if org-on-heading-p)
-		 (setq footnote-rpl
-		   (concat (org-export-latex-protect-string \\protect)
-			   footnote-rpl))
+		 (if (org-on-heading-p)
+ (setq footnote-rpl
+   (concat (org-export-latex-protect-string \\protect)
+   footnote-rpl)))
 		 (insert footnote-rpl)))
 	 )
 

Ulf
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: textareas in HTML export

2010-02-25 Thread Ulf Stegemann
Dear Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 Applied, thanks.

thanks for that :)

 But I did move the overflow:x property into the css section (default
 style), because I think it is important *functionality* that should be
 there out off the box.

Just as a suggestion: Wouldn't it be better to set `overflow-x' to
`auto' instead of `scroll'? This leaves it up to the user agent how to
render boxes with overflows. Major browsers (FF, IEs, Opera, Chrome) do
what you expect: display a scroll bar if it's necessary (text goes
beyond box border) or leave it out whenever it's not needed.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Literal HTML export and paragraphs

2010-02-23 Thread Ulf Stegemann
Hi,

not quite sure if that's a bug but I've just noticed that literal HTML
export with `#+HTML' or `#+BEGIN_HTML ...' suppresses paragraph markups
whenever literal export appears at the end of a paragraph.  An org file
like this

,
| line 1
| line 2
|
| line 3
`

is exported to

,
| p
| line 1
| line 2
| /p
| p
| line 3
| /p
`

while an org file like this

,
| line 1
| #+HTML: strongline 2/strong
|
| line 3
`

is exported to

,
| p
| line 1
| strongline 2/strong
|
| line 3
| /p
`

This is probably not a major thing but it may lead to invalid HTML code.
Suppose `line 3' is replaced by e.g. an example block (which inserts its
own p element) then a p element would appear inside another p element
which is not allowed.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-17 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 On Dec 3, 2009, at 4:22 PM, Ulf Stegemann wrote:

 Carsten Dominik carsten.domi...@gmail.com wrote:

 it was my understanding that the caption command in longtable is different
 from the caption command in normal tables, in that it is a  line that is
 printed over the table on each page - so I thought it  always needs to be
 there.  Is that not correct?

 yes, treatment is different but nevertheless the caption is not
 mandatory for longtable. I never had any problems with longtable tables
 without \caption{}.

 sorry for being so slow to process this request.

 I believe this works now as you requested, please verify.

thanks for having a look at it (no need to apologise for the delay, it's
certainly not an urgent matter).

Captions are now suppressed for longtables without caption definition.
However, I've noticed that the extra linebreak (\\) is still inserted in
longtable environments regardless of the presence of a caption. That
linebreak leads to undesired effects when using longtable without a
caption but with vertical lines.

This should fix it:

--- org-latex.el.orig	2009-12-17 08:10:19.0 +0100
+++ org-latex.el	2009-12-17 08:49:02.0 +0100
@@ -1538,7 +1538,7 @@
  \\caption{%s%s}
  (if label (concat \\\label{ label }) )
  (or caption )))
-(if longtblp \n \n)
+(if (and longtblp caption) \n \n)
 (if (and org-export-latex-tables-centered (not longtblp))
 \\begin{center}\n)
 (if (not longtblp) (concat \\begin{tabular}{ align }\n))

Ulf
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Org Entities (was: Add \EUR to `org-html-entities')

2009-12-17 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 I have added your symbols.

thanks, works great.

I was wondering if there's a more general problem lurking behind this
(thus the change of subject): the problem of encoding entities in org
for various export formats, namely HTML, LaTeX, plain ASCII text (and
maybe plain unicode text).

As an example, let's assume we have an org file that should eventually
be available as HTML, PDF and plain text. Let's assume further, that for
whatever reasons (e.g. ugly double quotes in the needed font) the
document should use French quoting. Ideally
`\SomeMagicOrgEncoding{}Quote\AnotherMagicOrgEncoding{}' in the org file
would export to

  HTML   - laquo;Quoteraquo;
  LaTeX  - \flqq{}Quote\frqq{}
  ASCII  - Quote
 (Unicode- «Quote»)

Resorting to `org-html-entities' we could use

--8--snip--8---

#+LATEX_HEADER: \newcommand{\laquo}{\flqq} \newcommand{\raquo}{\frqq}

[...]

\laquo{}Quote\raquo{}

--8--snap--8---

to get the HTML and LaTeX output right but this leaves us with
`\laquo{}' in ASCII export and is generally a rather cumbersome
approach.

Maybe there's a simpler solution to address this but I haven't come
across it, yet (Note that `Use unicode!' isn't an option sometimes.).

Quoting is just one example that strikes my quite often, but the same
applies for all sorts of special characters; think of arrows, accented
characters etc.

This is certainly not a very pressing issue but it might be worth
thinking about how to handle this. What do you think?

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Org Entities

2009-12-17 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 feel free to send me a modified version of the definitions of
 org-html-entities which contains an ASCII element as the third
 element of a list.

 I would then use this element for ASCII export.

okay, great! I will work on that as soon as I have a little bit of spare
time. Stay tuned.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [OT] Emacs for email?

2009-12-03 Thread Ulf Stegemann
Rémi Vanicat vani...@debian.org wrote:

 Russell Adams rlad...@adamsinfoserv.com writes:

 On Tue, Dec 01, 2009 at 08:56:08PM -0600, Russell Adams wrote:
  - Mutt automatically changes my email address depending on the
recipient or folder according to a series of roles

 Not to reply to myself, but one item I've found lacking in other
 mailreaders and one of my primary reasons for using mutt is the
 concept of roles.

 I'm not sure what a role is, but with gnus, you can change you email
 address depending on the folder (group in gnus speak) or the topic
 (topic are a hierarchical organization of group). For this you use
 posting-style.

There's also `gnus-alias'[1] which allows you to automagically select
and easily switch identities. An `identity' covers nearly every aspect
of a message like From-, Reply-To- and other headers, text to be
pre-filled into the body and of course signatures. Having used quite a
few mail-/news clients (well, ages ago, I must admit) I never came
across a more powerful and flexible mechanism for using roles.

Ulf

[1] http://www.northbound-train.com/emacs.html#MyPackages



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [LaTeX-Export] Longtable and Caption

2009-12-03 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 it was my understanding that the caption command in longtable is different
 from the caption command in normal tables, in that it is a  line that is
 printed over the table on each page - so I thought it  always needs to be
 there.  Is that not correct?

yes, treatment is different but nevertheless the caption is not
mandatory for longtable. I never had any problems with longtable tables
without \caption{}.

Ulf




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Add \EUR to `org-html-entities'

2009-12-03 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 On Dec 2, 2009, at 8:38 AM, Ulf Stegemann wrote:

 is there anything that speaks against adding

 --8--snip--8---

 (EUR . euro;)

 --8--snap--8---

 to `org-html-entities'? \EUR{} is provided by the Marvosym package and
 euro; a valid (X)HTML representation of the euro sign. Maybe ever
 better would be to add

 I would like to minimize external dependencies.

well, that's something that speaks against it :)

 Which distributions carry this package?

Marvosym comes with my TeX Live LaTeX distro and used to come with teTeX
AFAIR. I had the impression the package was rather widely used but I
maybe wrong.

 (EURdig . euro;)
 (EURhv . euro;)
 (EURcr . euro;)
 (EURtm . euro;)

 I do not understand the purpose of these extra symbols, and why
 they are all equal in HTML

While \EUR becomes the `official' euro symbol, \EURdig is a variant of
that with the same width as digits, \EURhv is a euro symbol that fits to
Helvetica, \EURcr dto. to Courier and \EURtm dto. to Times. This makes a
difference in LaTeX but is all the same in HTML: euro;.

Anyway, adding those symbols is not strictly necessary since everybody
can use the eurosym package (where \euro{} command comes from). I like
the Marvosym package better but I can also stick to what I currently do:

#+LATEX_HEADER: \newcommand{\euro}{\EUR}

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [LaTeX-Export] Longtable and Caption

2009-12-01 Thread Ulf Stegemann
Hi,

is there any good reason why there's always a caption (\caption{})
included whenever a table is exported to LaTeX as longtable environment?
If there isn't, I would strongly prefer to have the same behaviour with
longtable as with ordinary tables, i.e. suppress the caption if
`#+CAPTION:' is not explicitly given.

Ulf



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BUG] HTML exporting numbered literal examples

2009-07-24 Thread Ulf Stegemann
Hi Bastien,

Bastien bastiengue...@googlemail.com wrote:

 I've finally pushed a change that allows whitespaces in labels and allow
 the -r switch to be used even if -n is not there. Please test it and
 let me know if it works as expected.

great! I've tested this with some examples and it seems to work fine.
Thanks for adding this feature :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BUG] HTML exporting numbered literal examples

2009-07-20 Thread Ulf Stegemann
Bastien bastiengue...@googlemail.com wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 Right, I agree with your observation but I think I wouldn't with your
 conclusion.  I don't think that this is a problem.  From the author's
 point of view I think he/she knows what's going on since this is not the
 default behaviour and the `-r' switch actually has to be added.  And
 after all we are talking about links.  And as with any other link if the
 link target is self-explanatory: fine, then I can use it as link name.  If
 it is not, I should choose something less confusing for the reader.

 One problem is the limitation about labels you can use.  E.g. labels do
 not allow whitespaces.  It is hard to write meaningful self-explanatory
 link names without using whitespaces.

Ah okay, that is a good point indeed.  I wasn't aware of the fact that
labels could not contain whitespaces.

 I will see if I can overcome this in a clean way.

That would be great. Thanks for your efforts!

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BUG] HTML exporting numbered literal examples

2009-07-17 Thread Ulf Stegemann
Hi,

Bastien bastiengue...@googlemail.com wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 With latest CVS Emacs and Git Org mode exporting literal examples
 (example/src) with the `-n' switch results in numbering starting on line
 *2* of the example in the resulting HTML file (LaTeX seems to be okay).

 The example in the manual ...

 --8--snip--8---
   #+BEGIN_SRC emacs-lisp -n -r
   (save-excursion  (ref:sc)
  (goto-char (point-min))   (ref:jump)
   #+END_SRC
   In line [[(sc)]] we remember the current positon.  [[(jump)][Line (jump)]]
   jumps to point-min.
 --8--snap--8---

 ... (which is BTW not working as the manual misses the underscore in
 `#+END_SRC') results (visually) in

 Fixed in the manual.

great, thanks!

 --8--snip--8---
 (save-excursion  (ref:sc)
 1: (goto-char (point-min))
 --8--snap--8---

 with reference `sc' broken.

 Can anyone reproduce this?

 Yes.  And I just pushed fix for that.

dto. seems to work now as expected.

 And while we are at it: Would it be feasible to have `-r' in literal
 examples even without `-n', thus removing the label in the source code
 block even if the example is not numbered. I have no concrete case where
 this may be necessary but I think that usually labels shouldn't be
 displayed in /literal/ examples.

 For this I have no idea - it looks like we can wait for concrete
 examples :)

I think, those examples are easy to make up.  Line numbers are great for
file contents and maybe input /or/ output.  But as soon as in- and output
are mixed up I find them rather disturbing (imagine e.g. a shell
session).  On the other hand removing labels and having that nice
highlighting feature with HTML exported files maybe useful in either
case.

I had a quick look at `org-export-number-lines' and the following seems
to work smoothly ...

--8--snip--8---

--- org-exp.el.orig 2009-07-17 11:56:22.0 +0200
+++ org-exp.el  2009-07-17 11:57:30.0 +0200
@@ -2293,8 +2293,6 @@
 (defun org-export-number-lines (text backend
 optional skip1 skip2 number cont
 replace-labels label-format)
-  (if (and (not number) (not (eq replace-labels 'keep)))
-  (setq replace-labels nil)) ;; must use names if no numbers
   (setq skip1 (or skip1 0) skip2 (or skip2 0))
   (if (not cont) (setq org-export-last-code-line-counter-value 0))
   (with-temp-buffer
@@ -2342,7 +2340,7 @@
  (if replace-labels
  (progn
(delete-region (match-beginning 1) (match-end 1))
-   (push (cons ref n) org-export-code-refs))
+   (push (cons ref (if ( n 0) n ref)) org-export-code-refs))
(goto-char (match-beginning 2))
(delete-region (match-beginning 2) (match-end 2))
(insert ( ref ))

--8--snap--8---

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BUG] HTML exporting numbered literal examples

2009-07-17 Thread Ulf Stegemann
Bastien bastiengue...@googlemail.com wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 I had a quick look at `org-export-number-lines' and the following seems
 to work smoothly ...

 Thanks for the patch.  One problem though: now the first link (from the
 manuals example) looks like sc but there is no sc left in the source
 code.  This is a bit confusing, no?  So if we plan to make references to
 lines of code, it make sense to have either the line numbering or the
 labels (or both).  What do you think?

Right, I agree with your observation but I think I wouldn't with your
conclusion.  I don't think that this is a problem.  From the author's
point of view I think he/she knows what's going on since this is not the
default behaviour and the `-r' switch actually has to be added.  And
after all we are talking about links.  And as with any other link if the
link target is self-explanatory: fine, then I can use it as link name.  If
it is not, I should choose something less confusing for the reader.
Translated to the situation we have here this means: I can choose a
self-explanatory reference and use this or I can give the link a label
with a clear indication of what the link is about.

From the reader's point of view there's no confusion either because
he/she can always follow the link and see where this leads.

I absolutely second that confusing behaviour should be avoided whenever
possible but I don't think any confusion will occur here.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Markup for export question

2009-07-10 Thread Ulf Stegemann
Hi Giovanni,

Giovanni Ridolfi giovanni.rido...@yahoo.it wrote:

 --- Gio 9/7/09, Ulf Stegemann ulf-n...@zeitform.de ha scritto:
 When writing documentations I often
 come across expressions like

  doMagic('myVariable')

 In an ideal world the HTML code for this after exporting the org file
 would look like this:

 codedoMagic('varmyVariable/var')/code

 The purpose is of course to indicate that `doMagic' is a literal
 function/method name while `myVariable' is not meant literal and is
 to be replaced something more or less sensible.

 ... did you play with Literal examples, chapter 12.1 of the manual?

 or 12.6.6 Text areas ?

yes, I'm aware of those but I was rather referring to inline markup not
src/example blocks. To make it clearer, imagine something like this:

  Copy your configuration to /install-dir/conf.

Which ideally would be exported as

  Copy your configuration to code/varinstall-dir/var/conf/code.

This is something where a src/example block is not suitable.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [BUG] HTML exporting numbered literal examples

2009-07-09 Thread Ulf Stegemann
With latest CVS Emacs and Git Org mode exporting literal examples
(example/src) with the `-n' switch results in numbering starting on line
*2* of the example in the resulting HTML file (LaTeX seems to be okay).

The example in the manual ...

--8--snip--8---
  #+BEGIN_SRC emacs-lisp -n -r
  (save-excursion  (ref:sc)
 (goto-char (point-min))   (ref:jump)
  #+END_SRC
  In line [[(sc)]] we remember the current positon.  [[(jump)][Line (jump)]]
  jumps to point-min.
--8--snap--8---

... (which is BTW not working as the manual misses the underscore in
`#+END_SRC') results (visually) in

--8--snip--8---
(save-excursion  (ref:sc)
1: (goto-char (point-min))
--8--snap--8---

with reference `sc' broken.

Can anyone reproduce this?

And while we are at it: Would it be feasible to have `-r' in literal
examples even without `-n', thus removing the label in the source code
block even if the example is not numbered. I have no concrete case where
this may be necessary but I think that usually labels shouldn't be
displayed in /literal/ examples.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Markup for export question

2009-07-09 Thread Ulf Stegemann
When writing documentations I often come across expressions like

  doMagic('myVariable')

In an ideal world the HTML code for this after exporting the org file
would look like this:

  codedoMagic('varmyVariable/var')/code

The purpose is of course to indicate that `doMagic' is a literal
function/method name while `myVariable' is not meant literal and is to
be replaced something more or less sensible.

However, I find that rather hard to achieve and was only able to produce
this with quoted HTML tags.  In order to find a simpler solution I was
fiddling with `org-emphasis-alist' and `org-emphasis-regexp-components'
but to no avail.  Does anybody have an idea how to create that HTML code
from a simple markup in an org file?  BTW: Same applies probably for
LaTeX export but I haven't been playing around with this.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Release 6.28

2009-07-01 Thread Ulf Stegemann
Carsten Dominik carsten.domi...@gmail.com wrote:

 Bulk action
 

 You can now use the `s' key to select entries in the agenda.
 When one or more entries have been selected, the `B' key will
 execute an action on all selected entries.  I believe this bulk
 action makes mainly sense for the commands that require answering
 interactive prompts.  So far the supported actions are

  - Refile all selected entries to a single destination
  - Archive all selected entries
  - Set the TODO state of all selected entries, bypassing any
blocking or note-taking.
  - Add or remove a tag to/from all selected entries

 We can add more actions, if you convince me they make sense.

IMHO setting scheduled (and maybe deadline) date would make sense.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Release 6.28

2009-07-01 Thread Ulf Stegemann
Christian Egli christian.e...@sbszh.ch wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:

 On Jul 1, 2009, at 9:20 AM, Ulf Stegemann wrote:
 Carsten Dominik carsten.domi...@gmail.com wrote:
 Bulk action
 

 We can add more actions, if you convince me they make sense.

 IMHO setting scheduled (and maybe deadline) date would make sense.

 In what sense?  Shifting all dates by the same amount, or setting them
 all to a fixed date?

 I usually display unscheduled TODO items in my agenda as well
 (org-agenda-include-all-todo), so if I decide that I should work on some
 of them next week then a bulk action to schedule them might come in
 handy.

 So one use case is to set a fixed scheduled date for a number of TODOs.
 In my case these are tasks that have not been scheduled yet.

 Another use case is when I decide that there will not be enough time
 this week to complete all scheduled tasks. I want to move some of the
 tasks to next week. This could be either a shift by 7 days or a
 rescheduling to next monday (a fixed date).

Yes, both shifting by the same amount and setting a fixed date can be
useful. I usually re-schedule leftover todos by shifting them by one
or two working days to the future. So originally I had a bulk version of
`org-agenda-do-date-later' and friends in mind as opposed to
`org-agenda-schedule'. But the latter one would be useful to. Ideally,
S-left, C-cC-s et al. would trigger a bulk shift/bulk schedule whenever
there are marked agenda items.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Macros broken

2009-06-22 Thread Ulf Stegemann
Hi,

with today's version of Org mode and CVS Emacs (23.1.50.1) macro
expansion seems to be broken. An org file like

--8--snip--8---
#+MACRO: foo BAR

* baz

{{{foo}}}
--8--snap--8---

exported to HTML produces

--8--snip--8---
[...]

div id=outline-container-1 class=outline-2
h2 id=sec-1span class=section-number-21/span baz /h2
div class=outline-text-2 id=text-1


p
ACR
/p/div

[...]
--8--snap--8---

The `ACR' origins from the first line of the file, i.e. different first
lines result in different expansions.

I'm not aware of any settings I have that should influence macro
handling, so I guess this is reproduce-able.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Macros broken

2009-06-22 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 Fixed, thanks.

great! Thank you. But you know that with your quick responses you feed
the rumours about multiple Carstens being out there :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Sourceforge community award

2009-06-10 Thread Ulf Stegemann
Carsten Dominik carsten.domi...@gmail.com wrote:

 1. Complete this sentence in about 140 characters: Our project is
 [-foo-].  For example, Our project is a tool that helps you wash your
 car.

There were already some good suggestions, I think. And furthermore the
example isn't bad either as Org mode actually *does* help you wash your
car ;)

 2. Complete this sentence, also in about 140 characters: We should win
 because [-bar-].  For example, We should win because we have a strong
 community and we solve a universal problem.

I don't have a concrete idea for the sentence but when I think about why
Org mode should win Neal Stephenson comes to my mind:

   emacs outshines all other editing software in approximately the same
   way that the noonday sun does the stars

Replace `Emacs' with `Org mode' and `editing' with `organising' and you
have the reason why Org mode should win. Maybe Org mode's singularity in
its area and the fact that it's so much ahead of any other organising
tool can be cast in a 140 character phrase for the jury?!

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [BUG] Date/Time Confusion

2009-05-27 Thread Ulf Stegemann
With git org as of yesterday an org file entry like

--8--snip--8---

* TODO [#B] Arrange something for [2009-06-01 Mon 10:00-12:30]
  SCHEDULED: 2009-05-27 Wed

--8--snap--8---

will show up in the agenda (C-a a) at the scheduled day at the time as
defined in the inactive timestamp in the headline. So according to the
agenda, the above example is scheduled for today, 10:00-12:30. The time
definition of the inactive timestamp is only considered as part of the
scheduled timestamp if the inactive timestamp appears in the headline
and if the scheduled timestamp does not contain times itself.

This is not really a big thing, but nevertheless I would consider it to
be a bug.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Counter cookies and mixed checkbox lists/subtasks

2009-04-22 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 On Apr 20, 2009, at 10:00 AM, Ulf Stegemann wrote:

 Carsten Dominik carsten.domi...@gmail.com wrote:

 Hmmm, I am still not convinced, in particular about adding new syntax.

 One thing I could imagine though, is this:
 If an entry has checkboxes, always put those into the cookie, not the
 children.
 Or maybe a variable, stating your preference for this.  This would at
 least
 give predictable behavior.

 or how about a property?

 You win.

 After your next git update, set the property COOKIE_DATA to either todo
 or checkbox.

great! Works like a charm here. Thank you for the effort.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Counter cookies and mixed checkbox lists/subtasks

2009-04-20 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 Hmmm, I am still not convinced, in particular about adding new syntax.

 One thing I could imagine though, is this:
 If an entry has checkboxes, always put those into the cookie, not the
 children.
 Or maybe a variable, stating your preference for this.  This would at least
 give predictable behavior.

or how about a property?

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-protocol and encoding

2009-04-16 Thread Ulf Stegemann
Sebastian, Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 Ulf, can you do some testing, please?

done that using Emacs 23 (cvs today), Org (git today + patch), Firefox
3.0.8 on linux. Everything seems to work fine, I haven't found a single
page/text that hasn't been encoded correctly. So I assume that the patch
is working ... at least in the environment mentioned. Thanks for your
effort and the good work :)


Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Counter cookies and mixed checkbox lists/subtasks

2009-04-16 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 there is no way currently to force a cookie either way.

 I think the the right solution is to modify the structure, so
 that the check boxes are only in entries without children.
 Seems to me that this is always possible - in your case
 you could just create a first child that gets the checkboxes.

okay, as said, this is rather a minor annoyance. However, fixing this
might nevertheless be desirable since the combination of checkboxes and
todo item is quite powerful.

Imagine you are compiling a document where you need contributions from
others. You could make a todo item for this with checkboxes for every
chapter planned (or for every author you expect input from, or ...). As
soon as contributions from authors arrive, you create todo items
preferably below the same initial todo item, indicating that you have to
integrate input. When compiling the document you finish those todo items
on the one hand and on the other hand checkboxes will eventually get
checked as chapters are finished. Although putting the chapter
checkboxes into its own sub-item is possible, much of the simplicity and
elegance of the original approach gets lost. What do you think?


Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Counter cookies and mixed checkbox lists/subtasks

2009-04-16 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com wrote:

 On Apr 16, 2009, at 11:05 AM, Ulf Stegemann wrote:

 Imagine you are compiling a document where you need contributions from
 others. You could make a todo item for this with checkboxes for every
 chapter planned (or for every author you expect input from, or ...). As
 soon as contributions from authors arrive, you create todo items
 preferably below the same initial todo item, indicating that you have to
 integrate input. When compiling the document you finish those todo items
 on the one hand and on the other hand checkboxes will eventually get
 checked as chapters are finished. Although putting the chapter
 checkboxes into its own sub-item is possible, much of the simplicity and
 elegance of the original approach gets lost. What do you think?

 Well, I don't really agree.

 * TODO compile document
   [ ] get input from Chris
   [ ] get input from Alice
 ** TODO integrate input from Chris
 ** TODO integrate input from Alice.

 You could easily do:

 * TODO compile document
 ** Get input
[ ] get input from Chris
[ ] get input from Alice
 ** TODO integrate input from Chris
 ** TODO integrate input from Alice.

 This is what I mean with you can always restructure
 to avoid the problem.  I think the second option is at
 least as clear, maybe clearer.

yes, certainly restructuring is an option but not necessarily a
satisfying one. I've probably missed to make the example clear enough.

Let's look at the checkbox part of the (top-level) todo item as a sort
of list of milestones. They certainly belong to the (top-level) todo and
are usually well defined from the very beginning. When the whole thing
gets started, todos pop in and they are added to the original todo item
ad hoc. Those todo items could be of varying quality, some simple
10-minutes jobs, others more complex, possibly with sub-items of their
own. However, in respect of measuring the top-level todo item's
progress, they are irrelevant, only milestones count.

Outsourcing the milestones into a sub-item is in my opinion not clearer
since the milestones really belong to the top-level and not the newly
created sub-item. Furthermore, the integral difference between
milestones and other todos blurs.

A logically better solution would be to turn every checkbox item into an
ordinary todo item and assign each new (non-milestone) todo  to the
relevant milestone item. This however would increase complexity of the
whole structure and would pose problems with todos that do not belong to
a single milestone.

Of course, the current behaviour of Org does not hinder anyone to use a
structure as outlined above (giving a great bunch of freedom to users on
how to organise themselves is one of the great strength of Org IMHO).
What's currently counted by the cookie is usually easy to recognise and
that's why I said this is really a minor issue.

Apart from all pros and cons on different structures there might be
another reason to deal with the cookie issue: IMHO it's very close to a
bug (although not a programming bug). Why? Because Org does something
the user does not expect and (what's worse) is not really useful. When
encountering an item with mixed types (checkboxes and sub-items), Org
counter cookies could count a) all items and checkboxes, b) only one
type (items or checkboxes) or c) the first type that appears in the
item. All these option would make a certain sense. But counting the type
that has been updated last is confusing and not really useful. Maybe
it's already enough to describe the current behaviour in the docs.

 I do like the simplicity of the cookies right now, adding specifiers
 of what they refere to would make them less usable in my mind.

I totally agree that the simplicity of the cookies should remain.
Defining a reference should only be necessary if you have an item with
mixed types below /and/ if you are not satisfied with the default
behaviour.

Sorry for that rather lengthy reply. It was not meant to steal your time
by discussing a minor issue.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Counter cookies and mixed checkbox lists/subtasks

2009-04-08 Thread Ulf Stegemann
The following applies to Emacs 23.0.92 and Org 6.25trans, both checked
out a few minutes ago.

I'm quite fond of using counter cookies in headlines (`[/]' or `[%]').
However, when using those cookies in headlines where the body mixes up
checkbox lists and subtasks org-mode changes reference of the cookie
between list items and tasks depending on what has been last updated
(probably due to the fact that the cookies may refer to both types).

To give an example:

--8--snip--8---
* TODO Something to do [/]

  - [ ] first item
  - [ ] second item
  - [ ] third item

** TODO first subtask
** TODO second subtask
--8--snap--8---

Now, when checking a check box this would look like:

--8--snip--8---
* TODO Something to do [1/3]

  - [x] first item
  - [ ] second item
  - [ ] third item

** TODO first subtask
** TODO second subtask
--8--snap--8---

Given that, changing the state of a subtask will lead to:

--8--snip--8---
* TODO Something to do [1/2]

  - [x] first item
  - [ ] second item
  - [ ] third item

** DONE first subtask
** TODO second subtask
--8--snap--8---

So the question is: Is it possible to give the counter cookie a clear
reference, i.e. always counting the checkbox list *or* the subtasks?

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppress linkification of external links possible?

2009-02-18 Thread Ulf Stegemann
Carsten Dominik domi...@science.uva.nl wrote:

 On Feb 18, 2009, at 8:58 AM, Ulf Stegemann wrote:


 great ... but unfortunately it's not working here. Whenever I try to
 export an org file to HTML now, I get 'org-export-normalize-links:
 Invalid function: org-if-unprotected-at' (with Emacs 23 and Org Mode
 versions as of this morning). This also happens with emacs -Q and a
 plain `org-install'.

 This is defined in org-macs.el.

 http://repo.or.cz/w/org-mode.git?a=commitdiff;h=538a536d0da678a753f4e5db17b2e13c6fb1876b

 Something must have gone wrong when you updated.  try removing
 all .elc files, maybe recompile.

You are right, it's there and after re-installing org-mode it works like
a charm. I guess, somehow org-macs.el failed to re-compile in the first
place but I really have no idea how this happened.

Anyway, this perfectly solves my problem. Thanks you very much :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppress linkification of external links possible?

2009-02-17 Thread Ulf Stegemann
Thank you for all the quick responses :)

Unfortunately, none of the proposed solutions really applies to the
problem I have (That's however entirely my fault, I should have made
things a bit clearer.).

The workarounds (except for one) concentrate on making a link caused by a
literal invalid address to become a valid link. However, what I like to
achieve is some sort of escaping that prevents org-mode from generating
a link at all (especially for HTML exporting).

Giovanni Ridolfi giovanni.rido...@yahoo.it wrote:

 You can write:

 1. [[ ][http://gateway.example.org]]
 ^^^ please note the space here
when converted it should refer to
http://your-server/yourfile#

Works, but still creates a link.

 2. use valid addresses ;-)

Unfortunately, this isn't an option.


Sebastian Rose sebastian_r...@gmx.de wrote:

 a dirty hackish aproach:

 (defun sr-no-link (href)
   Links, that are no links
   #)

 (setq org-link-abbrev-alist
'((man   . http://localhost/devel/man.php?q=manamp;what=%s;)
  ;; ... many more ...
  (dummy . sr-no-link))

   [[dummy:][http://gateway.example.org]]

 It's still displayed as link then, but the browsers do nothing ;-)

Goes in the same direction: a link is still created.


Matthew Lundin m...@imapmail.org wrote:

 You can customize the variable org-activate-links and remove plain
 from the list.

This would work (I guess), but is AFAIK to be set globally, thus
resulting in the loss of all other plain text links.

What I was originally looking for was some sort of escape
character/special markup that would prevent creating links at all, like
\http://...\ . This would also allow us to use other markups on plain
text links, something that - AFAIK - is currently not possible (like
=\http:...\=).

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppress linkification of external links possible?

2009-02-17 Thread Ulf Stegemann
Hi Giovanni,

Giovanni Ridolfi giovanni.rido...@yahoo.it wrote:

 --- Mar 17/2/09, Ulf Stegemann ulf-n...@zeitform.de ha scritto: 
 What I was originally looking for was some sort of escape
 character/special markup that would prevent creating links
 at all, like
 \http://...\ . This would also allow us to use
 other markups on plain
 text links, something that - AFAIK - is currently not
 possible (like
 =\http:...\=).

 what about post processing your HTML file with 
 an /ad hoc/ function (called e.g. my-replace-esc-hlink [1])?

 In your file.org you may write \http://gateway.orgthat is exported as:
 \a href=http://gateway.org;http://gateway.org/a

 then open your html buffer and

 M-x my-replace-esc-hlink 

thanks for the idea. I was also thinking about using a postprocessing,
maybe by using the completion-function when publishing. Should nothing
else work, I will probably come back to this.

Ulf




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppress linkification of external links possible?

2009-02-17 Thread Ulf Stegemann
Dear Carsten,

Carsten Dominik domi...@science.uva.nl wrote:

 On Feb 17, 2009, at 2:05 PM, Ulf Stegemann wrote:

 What I was originally looking for was some sort of escape
 character/special markup that would prevent creating links at all, like
 \http://...\ . This would also allow us to use other markups on plain
 text links, something that - AFAIK - is currently not possible (like
 =\http:...\=).

 Indeed, something like =http://a.com= should work, this is a bug.
 I have just fixed it.

great ... but unfortunately it's not working here. Whenever I try to
export an org file to HTML now, I get 'org-export-normalize-links:
Invalid function: org-if-unprotected-at' (with Emacs 23 and Org Mode
versions as of this morning). This also happens with emacs -Q and a
plain `org-install'.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Feature improvement request: state change logging

2009-02-12 Thread Ulf Stegemann
Wanrong Lin wanrong@gmail.com wrote:

 The state change logging is great, but I wonder whether we can further
 improve it:

 1. Can we also include the original state in the log message?
 i.e.: instead of having  - State DEFERRED   [2009-02-11 Wed 11:38]
 we can have
 - State DEFERRED  from HOLD [2009-02-11 Wed 11:38]

Nice idea IMHO.

 2. Can we put all of those state change history logging messages into a
 drawer like STATE-HIST (when the drawer is defined in org-drawers), so it
 is less intrusive in the file?

That's even better. I'd strongly second that.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Return on a task behaves like TAB

2009-02-05 Thread Ulf Stegemann
Hi Bernt,

Bernt Hansen be...@norang.ca wrote:

 ...
 ** Some Task...
 ** Another task...
 ...

 and I want to add detail at the end of 'Some Task'.  What I used to do
 was just put the point at the beginning of the line for ** Another Task
 and then hit RETURN to insert a blank line and move up to it to add
 detail.

just as a side note: wouldn't it be better to use C-o (`open-line')
instead of RET (`newline')?  This would leave the cursor probably where
you want it to be without the need for an additional C-p.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: POLL: the 40 variables project

2009-01-30 Thread Ulf Stegemann
Carsten Dominik domi...@science.uva.nl wrote:

 So here is my question to all of you.  Could you, in reply to this
 message, list all the Org-related variables that you have customized,
 along with the values you used?

apart from some face definitions and things like export or agenda view
customisations that really everybody will customise when he/she needs
it, here you are:

--8--snip--8---

(defconst emacs-org-dir  (expand-file-name org/ emacs-files-dir)
  Org-mode files directory)
(setq org-agenda-files (list
(expand-file-name todo.org emacs-org-dir)
(expand-file-name notes.org emacs-org-dir)
))

(setq
 org-log-done 'time
 org-use-fast-todo-selection t
 org-fast-tag-selection-include-todo t
 org-agenda-ndays 7
 org-deadline-warning-days 14
 org-agenda-show-all-dates t
 org-agenda-skip-deadline-if-done t
 org-agenda-skip-scheduled-if-done t
 org-agenda-start-on-weekday 1
 org-reverse-note-order nil
 org-return-follows-link t
 org-support-shift-select nil
 org-enforce-todo-dependencies t
 org-agenda-dim-blocked-tasks t
 org-fast-tag-selection-single-key t
 org-agenda-restore-windows-after-quit t
 org-agenda-window-setup (quote current-window)
 org-email-link-description-format Email %c: %.50s
 org-blank-before-new-entry (quote ((heading . auto) (plain-list-item . auto)))
 org-remember-store-without-prompt t
 org-remember-templates
  '((Tasks ?t * TODO %?\n  %i\n  %a todo.org Tasks)
(Notes ?n * %u %? notes.org Notes))
 remember-annotation-functions '(org-remember-annotation)
 remember-handler-functions '(org-remember-handler)
 org-global-properties
 '((Effort_ALL .
0 0:05 0:15 0:30 0:45 1:00 1:30 2:00 3:00 4:00 5:00 6:00 7:00 8:00))
 org-columns-default-format
 %PRIORITY %45ITEM(Task) %TODO %Effort(Est.){:} %CLOCKSUM(Time)
 org-agenda-columns-add-appointments-to-effort-sum t
 org-return-follows-link t
 org-special-ctrl-a/e t
 org-special-ctrl-k t
 org-tab-follows-link nil
 org-tag-faces nil
 org-agenda-restore-windows-after-quit t
 org-agenda-window-setup 'current-window
 org-archive-save-context-info '(time file category todo priority itags olpath 
ltags)
 org-blank-before-new-entry ((heading . auto) (plain-list-item . auto))
 org-clock-in-switch-to-state STARTED
 org-clock-out-remove-zero-time-clocks t
 org-email-link-description-format Email %c: %.30s nil nil n)

--8--snap--8---

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [IDEA] HTML-export literal examples to textarea

2009-01-20 Thread Ulf Stegemann
Carsten Dominik carsten.domi...@gmail.com wrote:

 On Jan 19, 2009, at 6:16 PM, Carsten Dominik wrote:

 OK, it is in:

 #+begin_example -t -w 80 -h 20
 ...
 #+end_example

 HTH, thanks for the idea.

Great! Works like a charm. Thank you for implementing it :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [IDEA] HTML-export literal examples to textarea

2009-01-19 Thread Ulf Stegemann
Carsten Dominik domi...@science.uva.nl wrote:

 On Jan 19, 2009, at 8:25 AM, Ulf Stegemann wrote:

 Hi Carsten,

 Carsten Dominik domi...@science.uva.nl wrote:

 On Jan 16, 2009, at 10:51 AM, Ulf Stegemann wrote:

 Is it worth thinking about an example block that will be exported to a
 ptextarea ../textarea/p structure in HTML export?

 I was recently playing around with org for online documentation. The
 documents contained lots of literal examples that can be directly copied
 and pasted e.g. into a terminal emu. While example- and src blocks work
 fine, I think that putting this kind of information into a textarea
 would be even better.

 Hi Ulf, so far I fail to see what the big advantage would be.  Can
 you try again to explain?

 of course. Generally, selecting text is a bit easier inside an input box
 but the very real advantage is that you can edit inside inputs. This
 allows to give literal examples with variables that can be changed
 directly inside the page before being copied and pasted.

 Hmmm, but why would you want to edit them in the text window, if you
 will paste them into an editor anyway, where you probably can edit
 them a lot easier?  Or are you talking about pasting examples
 directly into an interpreter input stream?

yes, in the concrete case the documentation was about a rather complex
system and software setup and the examples were mainly meant to be
copied and pasted directly into an terminal emu ... with variable things
like host-, path-, user names an so on. Of course, one could paste this
in an editor first to change something but as the changes would be
rather minimal this would prove to be a bit clumsy.

Actually nobody seems to do it like this. I asked the target group how
they handle this and they told me, they just selected the text up to the
first variable, pasted it into the terminal, typed their variable value
into the terminal and then selected the rest of the example to complete
their command line(s).

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [IDEA] HTML-export literal examples to textarea

2009-01-19 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik domi...@science.uva.nl wrote:

 So it remains a kind-of specialistic thing.

no, I wouldn't say so. textarea seems to have become quite popular in
HTML online documentation. Apart from all the copy and paste stuff,
textarea can do a virtual wrap or give you a horizontal scroll bar. This
is nice if you have literal text with long lines that can or should not
be wrapped but should also not exceed you layout's horizontal limits.
I'd guess this is the main reason, why textarea is widely used to give
literal examples.

Nevertheless, the textarea block is certainly just a nice-to-have and
not an absolutely necessary killer-feature.


Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [IDEA] HTML-export literal examples to textarea

2009-01-18 Thread Ulf Stegemann
Hi Carsten,

Carsten Dominik domi...@science.uva.nl wrote:

 On Jan 16, 2009, at 10:51 AM, Ulf Stegemann wrote:

 Is it worth thinking about an example block that will be exported to a
 ptextarea ../textarea/p structure in HTML export?

 I was recently playing around with org for online documentation. The
 documents contained lots of literal examples that can be directly copied
 and pasted e.g. into a terminal emu. While example- and src blocks work
 fine, I think that putting this kind of information into a textarea
 would be even better.

 Hi Ulf, so far I fail to see what the big advantage would be.  Can
 you try again to explain?

of course. Generally, selecting text is a bit easier inside an input box
but the very real advantage is that you can edit inside inputs. This
allows to give literal examples with variables that can be changed
directly inside the page before being copied and pasted.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [IDEA] HTML-export literal examples to textarea

2009-01-16 Thread Ulf Stegemann
Is it worth thinking about an example block that will be exported to a
ptextarea ../textarea/p structure in HTML export?

I was recently playing around with org for online documentation. The
documents contained lots of literal examples that can be directly copied
and pasted e.g. into a terminal emu. While example- and src blocks work
fine, I think that putting this kind of information into a textarea
would be even better.

Ideally the cols attribute to textarea could be defined by the user
after #+begin_textarea (or whatever) with a reasonable default (let's
say 80). Rows could be calculated depending on the number of lines
inside the block.

Export to anything else than HTML should treat such a block in much the
same way as an example block.

I think this really would be a nice feature to have and maybe I'm not
alone with this opinion?

Ulf




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug in `org-get-outline-path'

2008-12-17 Thread Ulf Stegemann
Hi,

I've encountered a problem with `org-get-outline-path' (as of today)
which fails if the (optional) argument `level' is nil. The error occured
when calling `org-archive-subtree'. The following fixes it for me.

--- org.el.orig	2008-12-17 09:55:44.0 +0100
+++ org.el	2008-12-17 10:23:38.0 +0100
@@ -7542,7 +7542,7 @@
 
 (defun org-get-outline-path (optional fastp level heading)
   Return the outline path to the current entry, as a list.
-  (if ( level 19) (error Outline path failure, more than 19 levels.))
+  (if (and level ( level 19)) (error Outline path failure, more than 19 levels.))
   (if fastp
   (progn
 	(loop for i from level upto 19 do

Ulf
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-12 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn tass...@member.fsf.org wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 Besides, my Gnus holds `gnus-large-newsgroup' as a string not as
 integer.

 What?!?  Do you set it somewhere?  The docs say it should be a number or
 nil.

Yes, I was investigating that, too ... and indeed I found that the value
was user set. What had driven me to set it as string remains a mystery
to me, I wasn't even aware I'd ever touched that value. So I think it's
save to assume that `gnus-large-newsgroup' is an integer or nil ;)

 Just one other comment: After failure to get a summary buffer by
 reading the last article you try it with reading 1-
 gnus-large-newsgroup articles.  I'd assume that in most cases where
 the first call to gnus-group-read-group fails only one or a few more
 articles have been deleted in the group in question. In that case, it
 might be quicker if `org-gnus-follow-link' increases the number of
 articles to be read by one and tries `gnus-group-read-group' again
 until the call succeeds.

 Yeah, I'll implement like that.  But incrementing one by one is not
 optimal.  When a user deletes all messages (including the linked one)
 the summary cannot be opened anyway and you'll loop till the maximum
 integer (or whatever you use as upper bound).  So I think I'll try
 increasing by one till 16 and then start doubling.

Yes, increasing the interval is certainly a good idea. But how about
using the Fibonacci sequence (1, 2, 3, 5, 8 ...) for this :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-12 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn tass...@member.fsf.org wrote:

 Ulf Stegemann ulf-n...@zeitform.de writes:

 Yes, increasing the interval is certainly a good idea. But how about
 using the Fibonacci sequence (1, 2, 3, 5, 8 ...) for this :)

 The fibonacci sequence increases too slow.  The current implementation
 (which should hit the main tree soon) increases step by step till 16 and
 then doubles the value till an integer overflow occurs.  Normally, that
 cannot happen, only if the group is empty.  But in that case gnus
 signals a quit condition, which is handled now with an appropriate
 message.

 If you're impatient you can pull from

git://www.tsdh.de/org-mode.git

 instead of waiting till Carsten pulled the changes.

Carsten already did that. The new version works fine. Thanks for your
effort :)

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-11 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn [EMAIL PROTECTED] wrote:

 Ulf Stegemann [EMAIL PROTECTED] writes:

 this works in principle but is not really an option. Since first
 argument 't' to `gnus-group-read-group' makes every article readable
 in a group, building the summary buffer takes far too long for groups
 with many articles. Try it with groups containing 10.000+ articles and
 you'll see what I mean.

 Normally you should be asked how many articles you wanna see, if the
 group is big.  If that's not the case for you, you have customized
 something which controls that.

hmmm, I'm not aware I've ever done something like that but since my Gnus
config evolved over several years I cannot completely exclude this
possibility. I know the behaviour you've mentioned from nntp groups,
maybe it's different with the nnml backend (I was actually testing this
with nnml).

 But indeed, it doesn't solve the real problem.  Even if it asks and the
 user says 100 but deleted the last 100 messages in that group before,
 it'll react as it is now.

D'accord.

Tassilo Horn [EMAIL PROTECTED] wrote:

 please try this one:

 diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
 index 7231538..05bed5b 100644
 --- a/lisp/org-gnus.el
 +++ b/lisp/org-gnus.el
 @@ -157,12 +157,9 @@ If `org-store-link' was called with a prefix arg the 
 meaning of
(funcall (cdr (assq 'gnus org-link-frame-setup)))
(if gnus-other-frame-object (select-frame gnus-other-frame-object))
(cond ((and group article)
 +  (gnus-activate-group group t)
(gnus-group-read-group 1 nil group)
 -  (gnus-summary-goto-article
 -   (if (string-match [^0-9] article)
 -   article
 - (string-to-number article))
 -   nil t))
 +  (gnus-summary-goto-article article nil t))
   (group (gnus-group-jump-to-group group
  
  (defun org-gnus-no-new-news ()

Unfortunately, it doesn't work. The behaviour is the same as with the
original version: jumping to the article works if the last article in
the group in question hasn't been deleted, otherwise it fails.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-11 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn [EMAIL PROTECTED] wrote:

 Ulf Stegemann [EMAIL PROTECTED] writes:

 please try this one:

 diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
 index 7231538..05bed5b 100644
 --- a/lisp/org-gnus.el
 +++ b/lisp/org-gnus.el
 @@ -157,12 +157,9 @@ If `org-store-link' was called with a prefix arg the 
 meaning of
(funcall (cdr (assq 'gnus org-link-frame-setup)))
(if gnus-other-frame-object (select-frame gnus-other-frame-object))
(cond ((and group article)
 +(gnus-activate-group group t)
  (gnus-group-read-group 1 nil group)
 -(gnus-summary-goto-article
 - (if (string-match [^0-9] article)
 - article
 -   (string-to-number article))
 - nil t))
 +(gnus-summary-goto-article article nil t))
 (group (gnus-group-jump-to-group group
  
  (defun org-gnus-no-new-news ()

 Unfortunately, it doesn't work. The behaviour is the same as with the
 original version: jumping to the article works if the last article in
 the group in question hasn't been deleted, otherwise it fails.

 I tried exactly that and it solved the problem for me.  Did you apply
 the patch and eval the function thereafter?  Or did you recompile
 org-mode if you restarted emacs for the test?

huh, that's strange. The patched version was really in effect here when
the tests failed. I've just updated Gnus to the latest (CVS) version but
again, it's not fixed for me ... and maybe it cannot be fixed. The whole
subject reminds me of the old Gnus wrong article count problem. AFAIK
there was never a solution for this apart from moving articles into
groups or temporarily renaming groups (see also
`gnus-group-compact-group').

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-11 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn [EMAIL PROTECTED] wrote:

 Ulf Stegemann [EMAIL PROTECTED] writes:

 huh, that's strange. The patched version was really in effect here
 when the tests failed. I've just updated Gnus to the latest (CVS)
 version but again, it's not fixed for me ... and maybe it cannot be
 fixed. The whole subject reminds me of the old Gnus wrong article
 count problem.

 Exactly that's the problem.

 Please do a test for me:

 1. Enter a group in Gnus
 2. Delete the last article
 3. Exit summary
 4. Try `C-u 1 RET' on the group.  It should issue No unread news.
 5. Do `M-: (gnus-activate-group group-name t) RET'
 6. Try `C-u 1 RET' on the group again.  Now it should be opened and
summary should contain one article.

 If you get different results it seems to be due to your gnus version.  I
 use the one included in emacs 23 and update daily, so it might be more
 up to date than your copy.  Maybe try to update yours, too.

done that. I was under the wrong impression that the CVS on cvs.gnus.org
holds the latest version of Gnus but it seems it just has the release
from 1st May. It seems that latest Gnus is now available from the Emacs
CVS only (sorry for my ignorance). I installed that version here (5.13
as of today, see User-Agent header) but again the summary buffer is not
opened. Do you know (and remember) what has changed in Gnus sources
since 1st May that made the wrong article count-bug go away?

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-11 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn [EMAIL PROTECTED] wrote:

 Ulf Stegemann [EMAIL PROTECTED] writes:

 Please do a test for me:

 1. Enter a group in Gnus
 2. Delete the last article
 3. Exit summary
 4. Try `C-u 1 RET' on the group.  It should issue No unread news.
 5. Do `M-: (gnus-activate-group group-name t) RET'
 6. Try `C-u 1 RET' on the group again.  Now it should be opened and
summary should contain one article.

 If you get different results it seems to be due to your gnus version.
 I use the one included in emacs 23 and update daily, so it might be
 more up to date than your copy.  Maybe try to update yours, too.

 done that. I was under the wrong impression that the CVS on
 cvs.gnus.org holds the latest version of Gnus but it seems it just has
 the release from 1st May. It seems that latest Gnus is now available
 from the Emacs CVS only (sorry for my ignorance).

 There's nothing to excuse.  I wasn't aware that the versions diverged
 that much, too.

yes, I really was surprised ... especially as gnus.org offers a 'nightly
snapshot' that also seems to be the version as of 1st May.

 I installed that version here (5.13 as of today, see User-Agent
 header)

 How?  Did you checkout GNU Emacs and copy all the gnus-related files
 somewhere?

Exactly, I got emacs sources by CVS and used the lisp/gnus/ files (plus
some other lisp files from gnus.org that where missing and XEmacs seems
to require). Byte-Compiling here with XEmacs 21.4 went smoothly, Gnus
runs as before ... at least until now ;)

 but again the summary buffer is not opened.

 That's really strange.  BTW: What backend did you use for testing?  I
 used nnimap.  MAybe that makes the difference...

Gotcha! It works on nnimap but not on nnml which I was using for the
tests. Maybe you'll try this with your installation as well. If it fails
for nnml groups for you, too, that might be an important point for the
discussion you've started on emacs.gnus.general.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Problem with org-gnus-follow-link

2008-12-10 Thread Ulf Stegemann
Hi Tassilo,

Tassilo Horn [EMAIL PROTECTED] wrote:

 Please try this patch and report back if it works.

[...]

 -  (gnus-group-read-group 1 nil group)
 -  (gnus-summary-goto-article
 -   (if (string-match [^0-9] article)
 -   article
 - (string-to-number article))
 -   nil t))
 - (group (gnus-group-jump-to-group group
 + (gnus-group-read-group t nil group)
 + (gnus-summary-goto-article article nil t))
 +(group (gnus-group-jump-to-group group

this works in principle but is not really an option. Since first
argument 't' to `gnus-group-read-group' makes every article readable in
a group, building the summary buffer takes far too long for groups with
many articles. Try it with groups containing 10.000+ articles and you'll
see what I mean.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Problem with org-gnus-follow-link

2008-12-09 Thread Ulf Stegemann
(Org as of 2008-12-08, Gnus/5.110009 (No Gnus v0.9), XEmacs/21.4.21 (linux))

Hi,

I've encountered a problem with `org-gnus-follow-link' which sometimes
fails to fetch the appropriate article in Gnus. This does not happen
when a buffer is visiting the group the link points to.

After a bit of investigation I found out that the problem is
`gnus-group-read-group' which is called by `org-gnus-follow-link'.
`gnus-group-read-group' does not return an article but nil if the last
message of the group has been deleted (this is re-producable here).
Inserting a new article into the group (e.g. by moving an article from
that group into the same group again) solves the problem.

I'm not quite sure how to address the problem or the other way round: is
this a bug in `gnus-group-read-group' that should never return nil if
the first argument is 1 and there's at least one article in the group or
is it a bug in `org-gnus-follow-link' that counts on
`gnus-group-read-group' returning an article.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] better links to Gnus articles

2008-11-28 Thread Ulf Stegemann
Tassilo Horn [EMAIL PROTECTED] wrote:

 Ulf Stegemann [EMAIL PROTECTED] writes:

 I've just updated to the latest git version and it seems that the
 patch in questions breaks linking to Gnus articles. I'm using XEmacs
 21.4.21 and No Gnus v0.9.

 Hm, I tried to setup XEmacs 21.4.21 and ngnus-0.10 (0.9 is not listed at
 gnus.org), but when do (require 'gnus) I get:

 Debugger entered--Lisp error: (file-error Cannot open load file
 jka-compr)

[...]

 Where do I get jka-compr for XEmacs?

It's part of the 'os-utils' package.

 Hm, that indicates that `org-gnus-store-link' returned nil.  You could
 do me a favour and edebug `org-gnus-store-link' and see what's going
 wrong.  There might me some differences between emacs and XEmacs I'm not
 aware of.

In fact org-gnus wasn't even loaded. The reason was that XEmacs'
`defvaralias' (line 41) doesn't accept an optional third argument as
Emacs does. Once this had been fixed, org-gnus was loaded without
problems and worked right away.

While testing the new version I've noticed that links are now made up of
group#message-id instead of group#article number, at least for
nnml groups. This means that links created with the new version are not
usable with older versions. And this might be a problem since the same set
of org files is often used on different computers with possibly
different versions of org-mode.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] better links to Gnus articles

2008-11-27 Thread Ulf Stegemann
Carsten Dominik [EMAIL PROTECTED] wrote:

 I have applied this patch without testing it thoroughly myself,
 I'd appreciate if some of you could test this and make sure that
 it does not break anything.

I've just updated to the latest git version and it seems that the patch
in questions breaks linking to Gnus articles. I'm using XEmacs 21.4.21
and No Gnus v0.9.

Unfortunately, I hadn't had the time to dive deeper into this but what's
not working anymore is `org-store-link' in an article or summary buffer
... 

,
| Debugger entered--Lisp error: (error Cannot link to a buffer which is
| not visiting a file)
|   signal(error (Cannot link to a buffer which is not visiting a file))
|   cerror(Cannot link to a buffer which is not visiting a file)
|   apply(cerror Cannot link to a buffer which is not visiting a file nil)
|   error(Cannot link to a buffer which is not visiting a file)
|   org-store-link(nil)
|   call-interactively(org-store-link)
`

... as well as opening a stored link to a Gnus article in an org buffer
(giving me No Match). Maybe I have the time to investigate this
further tomorrow or next week but I already wanted to let you know that
the patch in question probably needs some further attention.

Ulf



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: date marking with (org-diary)

2008-09-08 Thread Ulf Stegemann
Hi Carsten, all,

Carsten Dominik [EMAIL PROTECTED] wrote:

 On Aug 15, 2008, at 10:45 AM, Ulf Stegemann wrote:

[...]

 Including agenda items into the diary with '%%(org-diary ...' is
 something I personally find pretty useless as the dates of those items
 are not fontified in the calendar. Using '%%(org-diary ...' would be
 fine but the entries to use (':scheduled', ':todo' aso) cannot be
 limited any further. This not only leads to unacceptable delays while
 calendar tries to fontify its buffer but also to a calendar with nearly
 everyday marked. My intent was to mark dates with appointments only (I
 have scheduled items, todos etc. nearly everyday so there's no need to
 mark them). In my case this means that (org-diary) would need to
 distinct between different TODO keywords. However, filtering based on
 tags or date/time formats would be fine, too.

 My question now is: Is there currently any way to achieve such a
 filtering with (org-diary)? And if not, are there any plans to enhance
 (org-diary) in that direction?

[...]

 this is not supported yet, and I have no concrete plans to implement
 this.  Marking entries in the calendar will always be unacceptably
 slow, because the way the calendar/diary implements this is creating
 the list of appointment for each of the 90+ days in the calendar
 display.  Even with filtering, this would be slow - basically one
 would have to rewrite the code in the diary.

okay, then I guess we have to live with it.

[...]

Making use of the cursor position in the agenda
===

[...]

 * Picking a date for scheduling/deadline in the agenda

Thank you for pointing this out. It's not quite what I was looking for
but nevertheless it's a good workaround. Thanks for your help.

Ulf




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] date marking with (org-diary)

2008-08-15 Thread Ulf Stegemann
Hi all,

I was recently playing around with marking org agenda items in the
calendar using (org-diary) in the diary file. I encountered a problem
already described by Wanrong Lin some time ago (see
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg05839.html).
Unfortunately no answers were given to his original request so here it
comes again:

Including agenda items into the diary with '%%(org-diary ...' is
something I personally find pretty useless as the dates of those items
are not fontified in the calendar. Using '%%(org-diary ...' would be
fine but the entries to use (':scheduled', ':todo' aso) cannot be
limited any further. This not only leads to unacceptable delays while
calendar tries to fontify its buffer but also to a calendar with nearly
everyday marked. My intent was to mark dates with appointments only (I
have scheduled items, todos etc. nearly everyday so there's no need to
mark them). In my case this means that (org-diary) would need to
distinct between different TODO keywords. However, filtering based on
tags or date/time formats would be fine, too.

My question now is: Is there currently any way to achieve such a
filtering with (org-diary)? And if not, are there any plans to enhance
(org-diary) in that direction?

Regards,

Ulf




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode