[Orgmode] [PATCH] Use correct variable when calculating `org-timer-start-time'

2010-07-17 Thread David Maus
* org-timer.el (org-timer-start): Use correct variable when
calculating `org-timer-start-time'.
---
 lisp/org-timer.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index e0817c8..3b3ef02 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -102,7 +102,7 @@ the region 0:00:00.
  (setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s)
(setq org-timer-start-time
  (seconds-to-time
-  (- (org-float-time) (org-timer-hms-to-secs s)
+  (- (org-float-time) delta
   (org-timer-set-mode-line 'on)
   (message Timer start time set to %s, current value is %s
   (format-time-string %T org-timer-start-time)
-- 
1.7.1


___
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


Re: [Orgmode] possible single-quote bug in PDF docs (was: trouble with Imenu integration)

2010-07-17 Thread David Maus
Carsten Dominik wrote:

Yes.  Unfortunately I don't know a way to fix this.

This is a known problem and texinfo provides the options

,
| @set txicodequoteundirected
| causes the output for the ' character to be the undirected single quote, 
like this:
|
| '.
| @set txicodequotebacktick
| Cause the output for the ` character to be the standalone grave accent, 
like this:
|
| `.
`
http://www.gnu.org/software/hello/manual/texinfo/Inserting-Quote-Characters.html

To make these options work the file texinfo.tex in doc has to replaced
by a recent version.  Here it is located at

/usr/share/texmf/tex/texinfo/texinfo.tex

Compiling the manual with this texinfo.tex works fine and the quotes

HTH,
  -- David

[1] http://lists.gnu.org/archive/html/bug-texinfo/2006-06/msg2.html
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpj4rUyJdedW.pgp
Description: PGP signature
___
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


Re: [Orgmode] Re: Problem when org-capturing text from French email

2010-07-17 Thread David Maus
Sébastien Vauban wrote:
 The Attached patch avoids this bug by removing all text properties from the
 subject (the same is done in org-wl.el).

I've applied your patch. That hinders, indeed, the bug to occur. So, it
perfectly shows you're right about the cause.

Though, the patch you gave me causes me troubles in my Gnus buffers: the
*Group* and *Summary* buffers are now black and white only. All my colors
disappeared...

This is indeed the patch's fault.  Something I don't completely
understand yet, is when and why this kind of side effect occurs.
Anyway, attached patch supersedes the last one and should work.  It
creates and uses a copy of the subject string.

HTH
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de
From 43db1365040528e3245b68e422f687bd4628e5df Mon Sep 17 00:00:00 2001
From: David Maus dm...@ictsoc.de
Date: Sat, 17 Jul 2010 08:37:40 +0200
Subject: [PATCH] Remove text properties of subject to avoid Emacs bug #3506

* org-gnus.el (org-gnus-store-link): Remove text properties of
subject to avoid Emacs bug #3506.
---
 lisp/org-gnus.el |   22 +-
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a41de2e..642e438 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -120,22 +120,26 @@ If `org-store-link' was called with a prefix arg the 
meaning of
 
((memq major-mode '(gnus-summary-mode gnus-article-mode))
 (let* ((group gnus-newsgroup-name)
-  (header (with-current-buffer gnus-summary-buffer
+  (header (with-current-buffer gnus-summary-buffer
 (gnus-summary-article-header)))
   (from (mail-header-from header))
   (message-id (org-remove-angle-brackets (mail-header-id header)))
   (date (mail-header-date header))
-  (subject (mail-header-subject header))
-   (to (cdr (assq 'To (mail-header-extra header
-   newsgroups x-no-archive desc link)
+  (subject (copy-sequence (mail-header-subject header)))
+  (to (cdr (assq 'To (mail-header-extra header
+  newsgroups x-no-archive desc link)
+  ;; Remove text properties of subject string to avoid Emacs bug
+  ;; #3506
+  (set-text-properties 0 (length subject) nil subject)
+
   ;; Fetching an article is an expensive operation; newsgroup and
   ;; x-no-archive are only needed for web links.
   (when (org-xor current-prefix-arg org-gnus-prefer-web-links)
-;; Make sure the original article buffer is up-to-date
-(save-window-excursion (gnus-summary-select-article))
-(setq to (or to (gnus-fetch-original-field To))
-  newsgroups (gnus-fetch-original-field Newsgroups)
-  x-no-archive (gnus-fetch-original-field x-no-archive)))
+   ;; Make sure the original article buffer is up-to-date
+   (save-window-excursion (gnus-summary-select-article))
+   (setq to (or to (gnus-fetch-original-field To))
+ newsgroups (gnus-fetch-original-field Newsgroups)
+ x-no-archive (gnus-fetch-original-field x-no-archive)))
   (org-store-link-props :type gnus :from from :subject subject
:message-id message-id :group group :to to)
   (setq desc (org-email-link-description)
-- 
1.7.1



pgpAYVlDZn48r.pgp
Description: PGP signature
___
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: Behavior of Gnus when called from an hyperlink

2010-07-17 Thread Tassilo Horn
Sébastien Vauban wxhgmqzgw...@spammotel.com
writes:

Hi Sébastien,

 When stepping with SPC, the arrow mark (in the left fringe) stayed 5
 mins on line 487:

 --8---cut here---start-8---
  ;; Use `head' function.
  ((fboundp head)
   (setq res (funcall head article (gnus-group-real-name group)
(nth 1 gnus-command-method
 ^
  cursor after first paren
 --8---cut here---end---8---

 If I understand well, it wasted all the time evaluating

 --8---cut here---start-8---
 (nth 1 gnus-command-method)
 --8---cut here---end---8---

 I can't understand anything from the above... Someone does?

Not really.  Picking the second element out of a list must not take 5
minutes!  What's the value of `gnus-command-method' when this happens?
One SPC before the hang, that variable is evaluated and its contents are
printed to *Messages*.

For example, checking with an org-gnus link to an article in a gmane
group, the value of `gnus-command-method' at that time was

  (nntp Gmane (nntp-address news.gmane.org))

here, and picking out Gmane took no time at all...

Bye,
Tassilo


___
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


Re: [Orgmode] [PATCH] Use correct variable when calculating `org-timer-start-time'

2010-07-17 Thread Christian Moe

Hi,

I've tested and this patch solves the bug I reported yesterday under the 
heading [Orgmode] Bug: org-timer-start with offset [6.36trans].


Thanks!

Yours,
Christian


David Maus wrote:

* org-timer.el (org-timer-start): Use correct variable when
calculating `org-timer-start-time'.
---
 lisp/org-timer.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index e0817c8..3b3ef02 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -102,7 +102,7 @@ the region 0:00:00.
  (setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s)
(setq org-timer-start-time
  (seconds-to-time
-  (- (org-float-time) (org-timer-hms-to-secs s)
+  (- (org-float-time) delta
   (org-timer-set-mode-line 'on)
   (message Timer start time set to %s, current value is %s
   (format-time-string %T org-timer-start-time)



--

Christian Moe
E-mail:  m...@christianmoe.com
Website: http://christianmoe.com


___
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


Re: [Orgmode] Bug: org-timer-start with offset [6.36trans]

2010-07-17 Thread Christian Moe

Solved by David Maus's patch.

Thanks,
Christian



___
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


Re: [Orgmode] word wrap preferences in org-mode buffers

2010-07-17 Thread Eric S Fraga
On Fri, 16 Jul 2010 22:55:40 +0200, Sebastian Rose sebastian_r...@gmx.de 
wrote:
 
 Erik Iverson er...@ccbr.umn.edu writes:
  Hello,
 
  As I use org-mode more and more for actually writing things, I'm wondering 
  what
  your favorite Emacs word/line-wrapping mode is.
 
  Basically, I see two main ways of doing this, auto-fill-mode and
  visual-line-mode.  Any others that you all use?  If you use auto-fill-mode 
  or
  visual-line-mode, are there any obvious drawbacks, particularly regarding
  org-tables and source code blocks.
 
 
 I have this here bound to `SUPER-t':
 
 (defun sr-toggle-truncate-lines ()
   Lange Zeilen abschneiden, oder eben nicht.
   (interactive)
   (setq truncate-lines (if truncate-lines nil t)))
 
 I use it to toggle truncate-lines in the rare cases I have to edit a
 longish piece of text, that must be on one line.

Sebastian, 

Emacs, at least since v22 or maybe longer, has a built-in function
toggle-truncate-lines.
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
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] [Patch] Capture: %[FILE] and %(SEXP) (again)

2010-07-17 Thread Sebastian Rose
Hi,



currently, WE CANNOT EDIT FULL FLEDGED TEMPLATES IN SEPARATE FILE IN ORG
MODE.

Sorry for being back with this issue again and again, but I got no
feedback for the last two times I tried, did I?



I just found, that something like my proposed patch in is implemented in
org-capture (see
http://thread.gmane.org/gmane.emacs.orgmode/26441/focus=26484a).


But let's see...



This is supposed to be one of the entries in my `org-capture-templates'
variable:

   (L Lauf entry (file+headline notes/Laufen/Training.org Training)
 %[~/emacs/org/capture-templates/training.org]
 :empty-lines 1
 :prepend t)


The file ~/emacs/org/capture-templates/training.org looks like this:


* DONE %u  (%^{Run or what|run|run|bike|swim|wout})  %^{Distance}  X:XX
  :PROPERTIES:
  :kcal: XXX%^{meters}p%^{start}p%^{time}p%^{type}p%^{rpuls}p
  :END:
*** Weather
%?

*** Track

...etc.



Everything worked, except the %u elements (and all the others like
%u) which I expect to expand to inactive timestamps (w.o. time).

If I switched the second line of my template to

%(org-file-contents \~/emacs/org/capture-templates/training.org\)

I encountered the same bahaviour.



In my opinion, this is because `%[FILE]' and `%(SEXP)' are is
implemented the wrong way or at least, the aim of the implementation is
vague and the documentation is not appropriate.


EITHER (a)

  the user wants to insert the contents of file (or the result of a
  sexp) without special template parsing.  In that case the ^{PROP}
  substitution should not work as well, or the docs should reflect the
  facts, that ^{PROP}-subtitution takes place after expansion of %[]
  and %(), %()-substitution takes place after %[]-substitution
  (i.e. in the results of that substitution).  %[]- and
  %()-substitutions takes place after simple substitution.

  Currently, the docs do not reflect the fact, that the user may not use
  arbitrary text in %[] files.  Some expansions take place (the
  complex ones), some don't (the simple ones %\\(uUtT...\\) --- !??).

  Alternatively, the code vor %() and %[] should go to separate
  variables, that are inserted into the template after all expansion is
  done, i.e. the end of `org-capture-fill-template'.

OR (b)

  the user wants the contents of the file (or the result of a sexp) to
  be used as a template with all bells and wistles (why? he would simply
  use `C-x i' otherwise).  In that case, the evaluation of `%[FILE]' and
  `%(SEXP)' should be done, as my patch proposed, at the start of
  `org-capture-set-plist'.  There, the value of the local `txt' variable
  should be set to the contents of the file (or the result of the sexp.
  Now it would work reliably for ever (assuming `org-capture-set-plist'
  is and will be the unique entry point to template parsing).

OR (c)

  (a) and (b) are true and (b) is the special case, where the template
  consists of either a single entry %[FILE] or the contents of the
  local variable `txt' in `org-capture-set-plist' is the name of an
  existing file (+1).




I'll keep rebasing my org-capture branch, which now does this:

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index afb56ba..421e098 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -982,6 +982,8 @@ Point will remain at the first line after the inserted text.
   (org-capture-put :key (car entry) :description (nth 1 entry)
 		   :target (nth 3 entry))
   (let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
+(when (file-exists-p txt)
+	(setq txt (org-file-contents txt)))
 (when (or (not txt) (and (stringp txt) (not (string-match \\S- txt
   ;; The template may be empty or omitted for special types.
   ;; Here we insert the default templates for such cases.


This let's you edit full fledged templates in separate file in Org mode! Yeah!




I thought of this here:

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index afb56ba..eb05c7a 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -982,6 +982,18 @@ Point will remain at the first line after the inserted text.
   (org-capture-put :key (car entry) :description (nth 1 entry)
 		   :target (nth 3 entry))
   (let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
+
+  ;; Special case:
+  ;; The template consists of exactly one element out of %[FILE] or %(SEXP).
+  ;; In this case, insert the contents/reulsts to allow full fledged templates.
+  (cond
+;; %[] Insert contents of a file:
+((string-match ^%\\[\\(.+\\)\\]$ txt)
+  (setq txt (org-file-contents (expand-file-name (match-string 1 txt)
+;; %() Insert contents of a sexp:
+((string-match ^%\\((.+)\\)$ txt)
+  (setq txt (eval (read (match-string 1 txt))
+
 (when (or (not txt) (and (stringp txt) (not (string-match \\S- txt
   ;; The template may be empty or omitted for special types.
   ;; Here we insert the default templates for such cases.

But I don't like this special case the patch provides.


I 

Re: [Orgmode] word wrap preferences in org-mode buffers

2010-07-17 Thread Sebastian Rose
Eric S Fraga ucec...@ucl.ac.uk writes:
 Sebastian, 

 Emacs, at least since v22 or maybe longer, has a built-in function
 toggle-truncate-lines.

...which is bound to what key?

emacs24 has it, too. I'll switch to use that one...


Thanks Eric


  Sebastian

___
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


Re: [Orgmode] word wrap preferences in org-mode buffers

2010-07-17 Thread Eric S Fraga
On Sat, 17 Jul 2010 13:57:41 +0200, Sebastian Rose sebastian_r...@gmx.de 
wrote:
 
 Eric S Fraga ucec...@ucl.ac.uk writes:
  Sebastian, 
 
  Emacs, at least since v22 or maybe longer, has a built-in function
  toggle-truncate-lines.
 
 ...which is bound to what key?

Not bound anywhere by default as far as I can tell.  I bind it to \C-c t:

(global-set-key \C-ct 'toggle-truncate-lines)
-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
___
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


Re: [Orgmode] cdlatex, previewing LaTeX, and dollar signs

2010-07-17 Thread Michael Benfield
On Wed, Jul 14, 2010 at 2:41 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:


 This would be very difficult to achieve.  But note that you can part of it
 by setting

   (setq org-pretty-entities t)


Thanks; I was using an older org-mode and hadn't looked at this. This
is great, except... my Emacs apparently ignores the raise display
specification, so subscripts and superscripts don't work. Oh well.

Mike

___
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] Fix list assignments in ob-ocaml.el

2010-07-17 Thread Bernt Hansen


dybbuk-qpb3x58jdzkavxtiumw...@public.gmane.org (Erik L. Arneson) writes:

 I'm sorry if this is not the correct format to send patches in, but it's
 my first patch.  Hope it looks good.

Comments like this should not be part of the commit message.  The
subject line (after [PATCH] is taken as the first line of the commit
message and the body of the email up to the --- separator is the body of
the commit message.

If you want to add extra detail for the mailing list which should not be
included in the commit message (like your text above) it should be put
between the --- and the diffstat.

You can find an example of a patch with extra detail which is not part
of the commit message here:

http://permalink.gmane.org/gmane.emacs.orgmode/26832

Text in the email between the --- separator and the diffstat is ignored
by 'git am' and 'git apply' so whomever is applying your patch won't
have to edit it manually to remove it.

git format-patch will create a patch file in the correct format
(assuming you've made your changes and committed them in your local
repository.  If it is a single patch

   git format-patch -1

will create a single file with the patch contents.  You can also use 
git send-email --annotate -1 
assuming you have set up the mailing list details in git.

I have the following in my .git/config for org-mode
,[ .git/config ]
| [sendemail]
|   to = emacs-orgmode@gnu.org
`

so git send-email -1 --annotate creates a patch of the current HEAD
commit and drops me in an editor where I can insert extra details
between the --- separator and the diffstat.

The -1 (dash one) specifies how many commits to create patches for.
-3 would take the last 3 commits and create numbered files (or emails)
for submission to the mailing list.

HTH,
Bernt

PS. I know you said to ignore this patch but I thought I'd provide this
detail anyway.  It's possible to apply a patch manually with fixups
if it is in not in the correct format for git but it takes extra
effort by the maintainer.  If you already have commits for your
changes in git then creating patches in the correct format is easy.


___
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] [PATCH] Correct some doc strings [part 5]

2010-07-17 Thread Philip Rooke

This is the fifth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil

-- 

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 0135ca4..bc32dda 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -87,10 +87,11 @@ These are the regions where each line starts with a colon.
  (function :tag Other (specify
 
 (defcustom org-src-preserve-indentation nil
-  If non-nil, leading whitespace characters in source code
-blocks are preserved on export, and when switching between the
-org buffer and the language mode edit buffer. If this variable
-is nil then, after editing with \\[org-edit-src-code], the
+  If non-nil preserve leading whitespace characters on export.
+If non-nil leading whitespace characters in source code blocks
+are preserved on export, and when switching between the org
+buffer and the language mode edit buffer.  If this variable is nil
+then, after editing with \\[org-edit-src-code], the
 minimum (across-lines) number of leading whitespace characters
 are removed from all lines, and the code block is uniformly
 indented according to the value of `org-edit-src-content-indentation'.
@@ -101,7 +102,7 @@ indented according to the value of 
`org-edit-src-content-indentation'.
   Indentation for the content of a source code block.
 This should be the number of spaces added to the indentation of the #+begin
 line in order to compute the indentation of the block content after
-editing it with \\[org-edit-src-code]. Has no effect if
+editing it with \\[org-edit-src-code].  Has no effect if
 `org-src-preserve-indentation' is non-nil.
   :group 'org-edit-structure
   :type 'integer)
@@ -326,7 +327,7 @@ the edited version. Optional argument CONTEXT is used by
  (switch-to-buffer buffer
 
 (defun org-src-construct-edit-buffer-name (org-buffer-name lang)
-  Construct the buffer name for a source editing buffer
+  Construct the buffer name for a source editing buffer.
   (concat *Org Src  org-buffer-name [  lang  ]*))
 
 (defun org-edit-src-find-buffer (beg end)
@@ -527,7 +528,7 @@ the language, a switch telling if the content should be in 
a single line.
(match-string 1 s
 
 (defun org-edit-src-get-indentation (pos)
-  Count leading whitespace characters on line
+  Count leading whitespace characters on line.
   (save-match-data
 (goto-char pos)
 (org-get-indentation)))
@@ -536,7 +537,7 @@ the language, a switch telling if the content should be in 
a single line.
   Exit special edit and protect problematic lines.
   (interactive)
   (unless (org-bound-and-true-p org-edit-src-from-org-mode)
-(error This is not a sub-editing buffer, something is wrong...))
+(error This is not a sub-editing buffer, something is wrong))
   (widen)
   (let* ((beg org-edit-src-beg-marker)
 (end org-edit-src-end-marker)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index cd7642e..17a69a7 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -196,7 +196,7 @@ t:  accept as input and present for editing
 calc-date-format ( - MM - DD   Www (  hh : mm))
 calc-display-working-message t
 )
-  List with Calc mode settings for use in calc-eval for table formulas.
+  List with Calc mode settings for use in `calc-eval' for table formulas.
 The list must contain alternating symbols (Calc modes variables and values).
 Don't remove any of the default settings, just change the values.  Org-mode
 relies on the variables to be present in the list.
@@ -276,10 +276,11 @@ portability of tables.
   :group 'org-table)
 
 (defcustom org-table-export-default-format orgtbl-to-tsv
-  Default export parameters for org-table-export. These can be
-overridden on for a specific table by setting the TABLE_EXPORT_FORMAT
-property.  See the manual section on orgtbl radio tables for the different
-export transformations and available parameters.
+  Default export parameters for `org-table-export'.
+These can be overridden for a specific table by setting the
+TABLE_EXPORT_FORMAT property.  See the manual section on orgtbl
+radio tables for the different export transformations and
+available parameters.
   :group 'org-table-import-export
   :type 'string)
 
@@ -290,8 +291,7 @@ export transformations and available parameters.
 (defconst org-table-calculate-mark-regexp ^[ \t]*| *[!$^_#*] *\\(|\\|$\\)
   Detects a table line marked for automatic recalculation.)
 (defconst org-table-border-regexp ^[ \t]*[^| \t]
-  Searching from within a table (any type) this finds the first line
-outside the table.)
+  Searching from within a table (any type) this finds the first line outside 
the table.)
 (defvar org-table-last-highlighted-reference nil)
 (defvar 

[Orgmode] Re: [Patch] Capture: %[FILE] and %(SEXP) (again)

2010-07-17 Thread Johan Friis
I have this in my org-capture-templates, and it works just fine. The
note.org file is of course an org-mode file, with normal syntax.

  (j Journal entry (file ~/note/journal.org) (file 
~/note/template/journal.org))

I am not sure if I misunderstood what you want to do, just wanted to
state that the above works great for me (it expands what it is supposed to)

- Johan

  


___
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


Re: [Orgmode] inline image display not working when org-indent-mode active

2010-07-17 Thread Erik Iverson

On 07/17/2010 12:14 AM, Erik Iverson wrote:

Hello!

Just pulled the latest org-mode from git.

I've upgraded to Emacs 23.2 so that org-indent-mode works properly.

However, when org-indent-mode is active, it seems that inline images
(C-c C-x C-v) do not work properly.

They show up for a brief time ( 1 second) and then promptly return to
showing just the file link.

Turning off org-indent-mode and re-toggling image display shows the
image properly.

If it matters, these files were created in org-babel source blocks.


This also seems to happen if org-indent-mode is turned off, and the
source block that produces the image is re-run.  Then, the file link
is displayed, and I have to toggle inline image display to get it
to appear.

___
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


Re: [Orgmode] Re: [PATCH] Fix list assignments in ob-ocaml.el

2010-07-17 Thread Eric Schulte
dyb...@lnouv.com (Erik L. Arneson) writes:

 dyb...@lnouv.com (Erik L. Arneson) writes:
 This patch fixes the OCaml list assignment when using a table as a var
 to an OCaml source block in org-babel.

 Please ignore this patch.  It still needs some work.  Values being
 returned from OCaml don't seem to be read correctly now.  Oops!

 (I'm still really new to org-babel, so this is kind of a hairy learning
 process.)

Hi Erik,

One good way to gain familiarity with Org-Babel is to look at the other
language specific files, and to run a code block in one of these
languages, stepping through the language specific evaluation functions
using Edebug [1].

If you have specific babel code/implementation questions you can always
post them to this list, preferably with a [babel] string in the
subject line.

Also, if you plan on contributing to Babel, you will need to assign
copyright for your contributions to Emacs (see [2]).

Always happy to have more people hacking away at Babel.

Best -- Eric

Footnotes: 
[1]  http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/edebug.html

[2]  http://orgmode.org/worg/org-contribute.php

___
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 todo and Lotus Notes ToDo

2010-07-17 Thread Stoph Long
John Hendy jw.hendy at gmail.com writes:

 I've been searching all kinds of things... converting todos, importing todos, 
syncing todos, etc. in an effort to scrape up something of use to this idea, 
but 
haven't really found anything. Probably stupid, but one interesting program (I 
actually ran into this a ways back) is GCalDaemon which can do all kinds of 
things. Here's a post on converting a feed into a calendar entry in Mozilla 
Sunbird: http://gcaldaemon.sourceforge.net/usage3.htmlAgain, probably not 
really 
applicable, but interesting nonetheless.The only thing I can think of is 
creating 
a somewhat hackish system of titling the items in org to be exported to Atom 
something like 'TODO: blah blah' so they show up in the Notes feed with that 
title. Then in Notes, pop open the feed reader and go from there? It would be 
more 
of a reminder system, but then one would need to remember to mark things as 
done 
once back in org, and remove it from the publishing list once it was done?Not 
sure 
where to go... quite the interesting idea, though. My company blocks POP and 
IMAP 
so I can't get at personal email or calendar from google via Notes. I say this 
because the feeds, however, do still work so it's pretty cool that this feature 
could be a universally accessible method.John 
 

From what I've been able to gather, calling an external program from emacs
via a command line interface might be the most fluid way to synchronize with 
Lotus Notes.  From what I've been able to find, Jython and notes.jar might be
the best option for non-windows folks.  Python on windows using the Lotus
Notes com  interface is also an option.

Details are here:
http://www.dominopower.com/issues/issue28/command002

Stoph


___
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: Behavior of Gnus when called from an hyperlink

2010-07-17 Thread Sébastien Vauban
Hi Nick and Tassilo,

Nick Dokos wrote:
 Tassilo Horn tass...@member.fsf.org wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:
 
 If I understand well, it wasted all the time evaluating

 --8---cut here---start-8---
 (nth 1 gnus-command-method)
 --8---cut here---end---8---

 I can't understand anything from the above... Someone does?

 Not really. Picking the second element out of a list must not take 5
 minutes! What's the value of `gnus-command-method' when this happens? One
 SPC before the hang, that variable is evaluated and its contents are
 printed to *Messages*.

 try single stepping to that point and evaluate the various expressions
 that enter into the computation. For example,

  ;; Use `head' function.
  ((fboundp head)
   (setq res (funcall head article (gnus-group-real-name group)
   - (nth 1 gnus-command-method

 put the cursor after the closing paren of the (nth 1 gnus-command-method)
 form and type C-x C-e, after the closing paren of (gnus-group-real-name
 group) and do the same and after the closing paren of the (funcall ...) and
 do the same. Also perhaps after the head variable (between head and article)
 and do the same. Tassilo is right of course that (nth 1 gnus-command-method)
 should be trivial (unless nth has been redefined somehow and is trying to
 prove the Riemann hypothesis instead :-) ) -- but the cursor might be off by
 one and it's really the funcall that's taking all the time.

By carefully reading the article just sent by Erik (in another thread) about
Edebug, becoming aware of the cursor movements under stepping, I now can say
without error what *really* eats the time.

I effectively saw every parameter evaluated, every one after the other. Here
are the results:

- head :: nnimap-request-head
- article :: 871vbxzo6@mundaneum.com
- (gnus-group-real-name group) :: INBOX.mc
- gnus-command-method :: (nnimap mc
  (nnimap-address mail.missioncriticalit.com)
  (nnir-search-engine imap))
- (nth 1 gnus-command-method) :: mc
- (funcall nnimap-request-head 871vbxzo6@mundaneum.com INBOX.mc mc)
  results... after 5 mins... in (INBOX.mc . 28606)

So, that's not `nth' that took the time (as previously thought), but the
`funcall'.

What does the jury thinks of that?

Thanks a lot for your remote assistance!
  Seb

-- 
Sébastien Vauban


___
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: Problem when org-capturing text from French email

2010-07-17 Thread Sébastien Vauban
Hi David,

David Maus wrote:
 Sébastien Vauban wrote:
 The Attached patch avoids this bug by removing all text properties from
 the subject (the same is done in org-wl.el).

 I've applied your patch. That hinders, indeed, the bug to occur. So, it
 perfectly shows you're right about the cause.

 Though, the patch you gave me causes me troubles in my Gnus buffers: the
 *Group* and *Summary* buffers are now black and white only. All my colors
 disappeared...

 This is indeed the patch's fault. Something I don't completely understand
 yet, is when and why this kind of side effect occurs. Anyway, attached patch
 supersedes the last one and should work. It creates and uses a copy of the
 subject string.

That does work as expected. SOLVED. Thanks a lot!

Best regards,
  Seb

-- 
Sébastien Vauban


___
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


Re: [Orgmode] Re: [Patch] Capture: %[FILE] and %(SEXP) (again)

2010-07-17 Thread Sebastian Rose
Johan Friis m...@alterecco.net writes:
 I have this in my org-capture-templates, and it works just fine. The
 note.org file is of course an org-mode file, with normal syntax.

   (j Journal entry (file ~/note/journal.org) (file 
 ~/note/template/journal.org))

 I am not sure if I misunderstood what you want to do, just wanted to
 state that the above works great for me (it expands what it is supposed to)



A!

This does what I expect, but it is not documented.

Thanks Johan!

That's why I wrote my previous mail?  I simply could not figure out, how
to achieve that and I did not know about (file filename).  Where is
this in the docs?

But, OK, forget it.  I now know that I have to use the (file ...)
syntax.


So this is one of the neccessary patches:

diff --git a/doc/org.texi b/doc/org.texi
index f1f894a..e5d0a3b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6109,7 +6109,9 @@ file and location.
 The template for creating the capture item.  If you leave this
 empty, an appropriate default template will be used.  Otherwise this is a
 string with  escape codes, which will be replaced depending on time
-and context of the capture call.  See below for more details.
+and context of the capture call.  The string with escapes may be loaded
+from a template file, using the special syntax `(file
+``path-to-template'')'.  See below for more details.
 
 @item properties
 The rest of the entry is a property list of additional options.




Still, as I said in my previous mail, the way %[FILE] and %(SEXP)
work is not quite right and the docs are still incomplete.


Best wishes

   Sebastian
___
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


Re: [Orgmode] Re: Behavior of Gnus when called from an hyperlink

2010-07-17 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?= wxhgmqzgw...@spammotel.com wrote:


 By carefully reading the article just sent by Erik (in another thread) about
 Edebug, becoming aware of the cursor movements under stepping, I now can say
 without error what *really* eats the time.
 
 I effectively saw every parameter evaluated, every one after the other. Here
 are the results:
 
 - head :: nnimap-request-head
 - article :: 871vbxzo6@mundaneum.com
 - (gnus-group-real-name group) :: INBOX.mc
 - gnus-command-method :: (nnimap mc
   (nnimap-address mail.missioncriticalit.com)
   (nnir-search-engine imap))
 - (nth 1 gnus-command-method) :: mc
 - (funcall nnimap-request-head 871vbxzo6@mundaneum.com INBOX.mc =
 mc)
   results... after 5 mins... in (INBOX.mc . 28606)
 
 So, that's not `nth' that took the time (as previously thought), but the
 `funcall'.
 
 What does the jury thinks of that?
 

You've got a few more layers of elisp to go through.

You should edebug-defun the function nnimap-request-article-part in
nnimap.el and keep going. You should also probably investigate what
would happen if you set nnimap-debug to t, after reading its docstring.

Cheers,
Nick


___
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] imenu support for babel blocks

2010-07-17 Thread David O'Toole
I tried the following to get an Imenu composed of babel blocks, so that you
could browse/jump to blocks. But it doesn't seem to work, I'm guessing that
something about how org-mode builds the imenu-generic-expression overwrites
my entry. Is there a hook (or could there be a hook added) that allows me to
imenu-ify more constructs?

  (push (list Source code chunks
^#\\+\\(source:\\|srcname:\\|function:\\) \\(.*\\)$ 2)
imenu-generic-expression)
___
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: Behavior of Gnus when called from an hyperlink

2010-07-17 Thread Sébastien Vauban
Hi Nick,

Nick Dokos wrote:
 =?utf-8?Q?S=C3=A9bastien_Vauban?= wxhgmqzgw...@spammotel.com wrote:

 - (funcall nnimap-request-head 871vbxzo6@mundaneum.com INBOX.mc
   mc) results... after 5 mins... in (INBOX.mc . 28606)
 
 What does the jury thinks of that?

 You've got a few more layers of elisp to go through.

 You should edebug-defun the function nnimap-request-article-part in
 nnimap.el and keep going.

Just to keep you informed, elp-instrumented nnimap, and got this:

nnimap-request-head  3   256.16610285.388700666
nnimap-request-article-part  3   256.16600485.388668
nnimap-request-group 2   12.306432000 6.153216

Your function `nnimap-request-article-part' seems the culprit, then.


 You should also probably investigate what would happen if you set
 nnimap-debug to t, after reading its docstring.

FYI, this var is always set to t, for a long time... I disabled it, and rerun
everything, but that did not impact the times (or marginally). So, ouf, it's
not the logging that takes all that time.

Best regards,
  Seb

-- 
Sébastien Vauban


___
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: Behavior of Gnus when called from an hyperlink

2010-07-17 Thread Sébastien Vauban
Nick, Tassilo,

 Nick Dokos wrote:
 =?utf-8?Q?S=C3=A9bastien_Vauban?= wrote:

 - (funcall nnimap-request-head
   871vbxzo6@mundaneum.com INBOX.mc
   mc) results... after 5 mins... in (INBOX.mc . 28606)

 What does the jury thinks of that?

 You've got a few more layers of elisp to go through.

 You should edebug-defun the function nnimap-request-article-part in
 nnimap.el and keep going.

 Just to keep you informed, elp-instrumented nnimap, and got this:

 nnimap-request-head  3   256.16610285.388700
 nnimap-request-article-part  3   256.16600485.388668
 nnimap-request-group 2   12.306432000 6.15321600

 Your function `nnimap-request-article-part' seems the culprit, then.

Progressing, slowly. Not understanding everything from what I do...

The function `nnimap-request-article-part' gets called several times.

--8---cut here---start-8---
(defun nnimap-request-article-part (article part prop optional
group server to-buffer detail)
  (when (nnimap-possibly-change-group group server)
(let ((article (if (stringp article)
   (car-safe (imap-search
  (format HEADER Message-Id \%s\ article)
  nnimap-server-buffer))
 article)))
  (when article
  ;; [...]
--8---cut here---end---8---

The first couple of times happen quickly, with `article' 140579, then 140580,
then 140581.

After that, (real) things happen:

--8---cut here---start-8---
IMAP split moved mc:INBOX:140581 to INBOX.scorpios
nnimap: Updating info for nnimap+mc:INBOX.mc...done
Retrieving newsgroup: nnimap+mc:INBOX.mc...
nnimap: Updating info for nnimap+mc:INBOX.mc...done
Fetching headers for nnimap+mc:INBOX.mc...done
Scoring...done
Making sparse threads...done
Sorting threads...done
Generating summary...done
No more unread articles
--8---cut here---end---8---

and I have the top buffer displaying the subject of the linked article I'm
after. Already something...

What follows is stepping another time in the function
`nnimap-request-article-part', this time with `article'
871vbrxzo6@mundaneum.com (not a number anymore).

I'm then directed in the then part of the if-then-else (testing if
`article' is a string or not).

And, then, what stops me for 5 mins is the `imap-search' call.

I guess I will have to dive that side (not now -- going to sleep). Don't know
if that gives hints yet, or not...

Thanks for your help,
  Seb

-- 
Sébastien Vauban


___
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] [PATCH] Quote path argument in ob-ditaa

2010-07-17 Thread Gregory J. Grubbs
Patch fixes ob-ditaa for paths that contain spaces and other
shell-interpreted characters.


diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
index 1f56d12..cc06246 100644
--- a/lisp/ob-ditaa.el
+++ b/lisp/ob-ditaa.el
@@ -59,7 +59,7 @@ called by `org-babel-execute-src-block'.
   (error Could not find ditaa.jar at %s org-ditaa-jar-path))
 (with-temp-file in-file (insert body))
 (message (concat java -jar  org-ditaa-jar-path   cmdline   in-file  
 out-file))
-(shell-command (concat java -jar  org-ditaa-jar-path   cmdline   
in-file   out-file))
+(shell-command (concat java -jar  (shell-quote-argument 
org-ditaa-jar-path)   cmdline   in-file   out-file))
 out-file))
 
 (defun org-babel-prep-session:ditaa (session params)


___
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] [PATCH] Quote path argument in org-latex

2010-07-17 Thread Gregory J. Grubbs

Patch quotes paths to protect from interpretation by the shell

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index b6a7769..156dbcf 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -836,7 +836,7 @@ when PUB-DIR is set, use this as the publishing directory.
 (with-current-buffer outbuf (erase-buffer))
 (message Processing LaTeX file...)
 (if (and cmds (symbolp cmds))
-   (funcall cmds file)
+   (funcall cmds (shell-quote-argument file))
   (while cmds
(setq cmd (pop cmds))
(while (string-match %b cmd)


___
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


Re: [Orgmode] Re: [Patch] Capture: %[FILE] and %(SEXP) (again)

2010-07-17 Thread Carsten Dominik

Hi Sebastian,

I have rejected both of your patches an instead changed the order of  
evaluation

of escapes in `org-capture-fill-template'.  Inserting file contents and
evaluating sexp entries now happens first, so that the parser looking
for other escapes also sees the stuff inserted by these escapes.

Hope this fixes the issues you where having.

Cheers

- Carsten

On Jul 17, 2010, at 10:23 PM, Sebastian Rose wrote:


Johan Friis m...@alterecco.net writes:

I have this in my org-capture-templates, and it works just fine. The
note.org file is of course an org-mode file, with normal syntax.

 (j Journal entry (file ~/note/journal.org) (file ~/note/ 
template/journal.org))


I am not sure if I misunderstood what you want to do, just wanted to
state that the above works great for me (it expands what it is  
supposed to)




A!

This does what I expect, but it is not documented.

Thanks Johan!

That's why I wrote my previous mail?  I simply could not figure out,  
how

to achieve that and I did not know about (file filename).  Where is
this in the docs?

But, OK, forget it.  I now know that I have to use the (file ...)
syntax.


So this is one of the neccessary patches:

diff --git a/doc/org.texi b/doc/org.texi
index f1f894a..e5d0a3b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6109,7 +6109,9 @@ file and location.
The template for creating the capture item.  If you leave this
empty, an appropriate default template will be used.  Otherwise this  
is a

string with  escape codes, which will be replaced depending on time
-and context of the capture call.  See below for more details.
+and context of the capture call.  The string with escapes may be  
loaded

+from a template file, using the special syntax `(file
+``path-to-template'')'.  See below for more details.

@item properties
The rest of the entry is a property list of additional options.




Still, as I said in my previous mail, the way %[FILE] and %(SEXP)
work is not quite right and the docs are still incomplete.


Best wishes

  Sebastian
___
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


- Carsten




___
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


Re: [Orgmode] [PATCH] Quote path argument in org-latex

2010-07-17 Thread Carsten Dominik

Applied, thanks

- Carsten

On Jul 18, 2010, at 6:08 AM, Gregory J. Grubbs wrote:



Patch quotes paths to protect from interpretation by the shell

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index b6a7769..156dbcf 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -836,7 +836,7 @@ when PUB-DIR is set, use this as the publishing  
directory.

(with-current-buffer outbuf (erase-buffer))
(message Processing LaTeX file...)
(if (and cmds (symbolp cmds))
-   (funcall cmds file)
+   (funcall cmds (shell-quote-argument file))
  (while cmds
   (setq cmd (pop cmds))
   (while (string-match %b cmd)


___
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


- Carsten




___
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


Re: [Orgmode] [PATCH] Quote path argument in ob-ditaa

2010-07-17 Thread Carsten Dominik

Applied, thanks

- Carsten

On Jul 18, 2010, at 6:01 AM, Gregory J. Grubbs wrote:


Patch fixes ob-ditaa for paths that contain spaces and other
shell-interpreted characters.


diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
index 1f56d12..cc06246 100644
--- a/lisp/ob-ditaa.el
+++ b/lisp/ob-ditaa.el
@@ -59,7 +59,7 @@ called by `org-babel-execute-src-block'.
  (error Could not find ditaa.jar at %s org-ditaa-jar-path))
(with-temp-file in-file (insert body))
(message (concat java -jar  org-ditaa-jar-path   cmdline
in-file   out-file))
-(shell-command (concat java -jar  org-ditaa-jar-path
cmdline   in-file   out-file))
+(shell-command (concat java -jar  (shell-quote-argument org- 
ditaa-jar-path)   cmdline   in-file   out-file))

out-file))

(defun org-babel-prep-session:ditaa (session params)


___
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


- Carsten




___
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