Re: [Orgmode] Automatic noexport tag based on rules?

2011-02-09 Thread Eric S Fraga
John Hendy  writes:

[...]

> Yeah.. most of my todos aren't medium-sized projects, though. Many of them
> are more along the lines of one-liner action items I need to jot to myself
> so I don't forget as well as keeping them as a sort of rolling "next
> actions" queue. For that reason, I'd much rather keep them in their original
> context.

On possible suggestion: if you use inline tasks for these one liner
TODOs,

,
| C-c C-x t runs the command org-inlinetask-insert-task, which is an
| interactive compiled Lisp function in `org-inlinetask.el'.
| 
| It is bound to C-c C-x t.
| 
| (org-inlinetask-insert-task &optional NO-STATE)
| 
| Insert an inline task.
| If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
`

You can then customise =org-inlinetask-export-templates= to
generate latex code that basically ignores the inline task.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.324.gca7a)

___
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: org-capture - org-vm store link requires buffer file not always present [7.4]

2011-02-09 Thread Arik Mitschang
In VM if you have created a virtual folder, the buffer is not associated
with any file. However, during org-capture a function called
org-vm-store-link requires that the buffer (the vm folder in this case)
be associated with a file causing a type-mismatch error. I can fix the
problem with the following patch:

--
diff -U3 /usr/local/share/emacs/23.2/site-lisp/org-vm.el 
/var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL
--- /usr/local/share/emacs/23.2/site-lisp/org-vm.el 2010-12-11 
00:16:33.0 +1100
+++ /var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL   
2011-02-09 14:27:35.0 +1100
@@ -54,8 +54,12 @@
 ;; Implementation
 (defun org-vm-store-link ()
   "Store a link to a VM folder or message."
-  (when (or (eq major-mode 'vm-summary-mode)
+  (when (and (or (eq major-mode 'vm-summary-mode)
(eq major-mode 'vm-presentation-mode))
+(save-excursion (vm-select-folder-buffer)
+(eq (type-of 
buffer-file-name)
+'string)))
 (and (eq major-mode 'vm-presentation-mode) (vm-summarize))
 (vm-follow-summary-cursor)
 (save-excursion
--

Thanks
Arik

Emacs  : GNU Emacs 23.2.1 (x86_64-apple-darwin10.5.0, X toolkit)
 of 2011-01-14 on IT-4064.local
Package: Org-mode version 7.4

___
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] [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Chris Maier
In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
it's possible to hit C-c ' and edit the block code in a separate
buffer with the appropriate mode.  This doesn't appear to work when
using org-exp-blocks to edit a "begin_dot" block.

Is there a command to do this?

Thanks,
Chris

___
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: Fontification of blocks

2011-02-09 Thread Dan Davison
>> Just quickly, one thing I noticed is that the begin/end lines were
>> visible even inside folded trees. I.e., in a folded org file, containing
>> many src blocks, I could see the coloured backgrounds "poking out" of
>> the folded sections, extending to the right of the screen.

[...]
>> E.g. this file
>>
>> -
>> * heading
>> #+begin_src emacs-lisp
>> 1
>> #+end_src
>> -
>
> I could reproduce it with your above file, if the file ends on the end_src
> line.
>
> The following:
>
> * heading
>
> #+begin_src emacs-lisp
> 1
> #+end_src
> * other heading
>
> also exhibits the problem, but this one:
>
> * heading
>
> #+begin_src emacs-lisp
> 1
> #+end_src
>
> * other heading
>
> does not.
>
> So, it is related to the fact that the block is the last line of the subtree
> or of the file.
>
> As I always have newlines before headings, I don't see such a problem on my
> docs.
>
> Dan, can you confirm the above observation?

Confirm. Good point.

>
> Knowing this, do you have an idea on how to fix it?

No. I do see things like this from time to time with
outline-minor-mode. Can anyone suggest how to solve this
folding/overlay/visibility problem?

Dan

>  If not, I'll try having a
> play with the patched file.
>
> Best regards,
>   Seb

___
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] org-agende changes mode in buffer to fundamental

2011-02-09 Thread Eric S Fraga
Detlef Steuer  writes:

> Hi!
>
> Just trying to start my workday ...
>
> As always the first command is
> emacs todo.org
>
> Everthing looks like it should, mode is Org .
> But now, if I type 
> C-a a 
> to view my agenda, mode is reverted back to fundamental.

What version of emacs are you using?  I have seen this happen to me in
GNUS, not org (so far), with the latest emacs 24 snapshot...
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.324.gca7a)

___
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] [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Eric S Fraga
Chris Maier  writes:

> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
> it's possible to hit C-c ' and edit the block code in a separate
> buffer with the appropriate mode.  This doesn't appear to work when
> using org-exp-blocks to edit a "begin_dot" block.
>
> Is there a command to do this?

No idea but what about using #+begin_src dot ... #+end_src?
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.324.gca7a)

___
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: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Sébastien Vauban
Hi Chris,

Chris Maier wrote:
> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src) it's
> possible to hit C-c ' and edit the block code in a separate buffer with the
> appropriate mode. This doesn't appear to work when using org-exp-blocks to
> edit a "begin_dot" block.
>
> Is there a command to do this?

I don't know... but you clearly should move your begin_dot code to a:

#+begin_src dot
...
#+end_src

block.

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] [babel] After Tangle Change File Permission

2011-02-09 Thread Ian Barton
I am starting to use babel to maintain my collection of shell scripts. I 
want to automate the process as much as possible, so I would like to be 
able to set the execute bit on my tangled .sh scripts after the tangle 
process.


I see that there is an after-tangle hook. Can anyone give me some hints 
as to how I might use this to execute a chmod *.sh on the directory 
containing my tangles shell scripts.


Ian.

___
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] Automatic noexport tag based on rules? (and a possible bug)

2011-02-09 Thread Nick Dokos
John Hendy  wrote:

> Yeah.. most of my todos aren't medium-sized projects, though. Many of them
> are more along the lines of one-liner action items I need to jot to myself
> so I don't forget as well as keeping them as a sort of rolling "next
> actions" queue. For that reason, I'd much rather keep them in their original
> context.
> 
> This can't be too hard.
> 
> ,---
> | sed '/[*]* TODO/ s/$/   :noexport:/g'
> `---
> 
That's perfectly workable[fn:1].

> Or (facetious)
> 
> ,---
> | setq (prefix-for-noexport-custom-variable)
> | setq (default-tags-for-no-export-variable)
> `---
> 

This isn't ;-)

> I just don't know what the elegant, "right" elisp/org method is for
> something like this.
> 

Eye of the beholder and all that. Here's my attempt which should work,
except I think there is a bug in org-change-tag-in-region (see below):

--8<---cut here---start->8---
(defun set-noexport ()
  (org-change-tag-in-region (save-excursion (beginning-of-line) (point)) 
(save-excursion (end-of-line) (point)) "noexport" nil))

(defun jh-mark-todo-noexport ()
  (org-map-entries 'set-noexport "/+TODO" 'file))
--8<---cut here---end--->8---

There might be a simpler way to set the tag, but if so, I didn't find it.
OTOH, mapping over the entries is as elegant as it gets.

Now for the (purported) bug: org-change-tag-in-region does the following

,
| ...
| (goto-char end)
| (setq l2 (1- (org-current-line)))
| (goto-char beg)
| (setq l1 (org-current-line))
| (loop for l from l1 to l2 do
| ...
`

so if the region is a single line (say line 3), l2 becomes 2, l1 becomes 3
and the loop is not executed at all, whereas methinks it should be executed 
once.
Shouldn't l2 be set to (org-current-line)?

Thanks,
Nick

Footnotes:
[fn:1]  ...except that you might not want to add the tag if it's there already -
I'm not sure whether that would cause a problem.

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

2011-02-09 Thread Andrea Crotti
I have a quite huge file with a lot of code blocks in many possible
languages.
Now the problem is that I'm not able to export it to html/pdf.
Some other times it happened that pdf export was not working, but it was
quite easy to spot the mistake and fix it.

But with html export I'm not understanding where is the error, since I
don't get the line...
The funny thing is that the 2 lines that I can see downthere from the
debugger ("import static..." and "..jython..") are now *deleted* from
the buffer.

So where are they still coming from? (I also deleted the previously
created html file).

Maybe it would be useful to have some system to spot easily the line
that causes trouble during exportation, and even better would be to see
it visually in the org-buffer if something could cause troubles...

Here below the backtrace..
Thanks!


Debugger entered--Lisp error: (args-out-of-range 137 150)
  put-text-property(137 150 face font-lock-type-face)
  c-fontify-recorded-types-and-refs()
  #[(match-pos inside-macro) "`\306`\307\"\310=\203\311
!\204R\nSf\312>\203|\neX\203$\313\202~\306\nS\314\"\211\315=\2035\316\202x\f\317=\204C\nSf\320=\203H\321\202x\f\203Q\313\202x
\203\\\n)W\202`\n*W\203v\316\nS+\322+\211T\314\315$\210)\202x\313)\202~\323,\205\206\313=-\324\n.#\211/\203R/\325=\203\241`.\202M
\203\262`)V\203\274`)\202\274`*V\203\274`*/@b\210\203\nSf\326=\205\212\nSb\210\327
 
\210\330\331!\332W\2040\333=\205`1\334\323x\332W\203\n\335\323x\332W\203\n\3112!\203\n\332\2251Y\203\n\336\2021b\210\323)\205\3113!)\202\336\2114\203C\212\327
 \210o\204B`S+\322+\211T\314/A\203>\337\202?\340$\210))\341d4/A#\210)\342 
\210\323\207b\210\343\336\n\323#\2115\205\2605\344=\203\200\3226\2117@@)6\2117@A)\3078$\210\202\2545\345=\203\237\3226\2117@@)6\2117@A)\307\310$\210\202\2545\346=\203\254\347\3506\"\210\3236\336\207"
 [start-pos c-not-decl-init-keywords match-pos context type inside-macro 
get-text-property face font-lock-keyword-face looking-at (40 44 91 60) arglist 
c-type c-decl-arg-start decl c-<>-arg-sep 60 <> put-text-property nil 
c-forward-decl-or-cast-1 cast 40 c-backward-sws skip-syntax-backward "w_" 0 
pike-mode "-!%&*+/<=>^|~[]()" "`" t c-decl-type-start c-decl-id-start 
c-font-lock-declarators c-fontify-recorded-types-and-refs c-forward-label 
goto-target qt-1kwd-colon qt-2kwds-colon mapc #[... "\301@A\302\303$\207" 
[kwd put-text-property face font-lock-keyword-face] 5] 
max-type-decl-end-before-token max-type-decl-end -pos- c-recognize-<>-arglists 
c-restricted-<>-arglists last-cast-end decl-or-cast c-buffer-is-cc-mode pos 
...] 6](0 nil)
  c-find-decl-spots(36 "[[:alpha:]_]" (nil font-lock-type-face 
font-lock-constant-face font-lock-keyword-face) #[(match-pos inside-macro) 
"`\306`\307\"\310=\203\311   
!\204R\nSf\312>\203|\neX\203$\313\202~\306\nS\314\"\211\315=\2035\316\202x\f\317=\204C\nSf\320=\203H\321\202x\f\203Q\313\202x
\203\\\n)W\202`\n*W\203v\316\nS+\322+\211T\314\315$\210)\202x\313)\202~\323,\205\206\313=-\324\n.#\211/\203R/\325=\203\241`.\202M
\203\262`)V\203\274`)\202\274`*V\203\274`*/@b\210\203\nSf\326=\205\212\nSb\210\327
 
\210\330\331!\332W\2040\333=\205`1\334\323x\332W\203\n\335\323x\332W\203\n\3112!\203\n\332\2251Y\203\n\336\2021b\210\323)\205\3113!)\202\336\2114\203C\212\327
 \210o\204B`S+\322+\211T\314/A\203>\337\202?\340$\210))\341d4/A#\210)\342 
\210\323\207b\210\343\336\n\323#\2115\205\2605\344=\203\200\3226\2117@@)6\2117@A)\3078$\210\202\2545\345=\203\237\3226\2117@@)6\2117@A)\307\310$\210\202\2545\346=\203\254\347\3506\"\210\3236\336\207"
 [start-pos c-not-decl-init-keywords match-pos context type inside-macro 
get-text-property face font-lock-keyword-face looking-at (40 44 91 60) arglist 
c-type c-decl-arg-start decl c-<>-arg-sep 60 <> put-text-property nil 
c-forward-decl-or-cast-1 cast 40 c-backward-sws skip-syntax-backward "w_" 0 
pike-mode "-!%&*+/<=>^|~[]()" "`" t c-decl-type-start c-decl-id-start 
c-font-lock-declarators c-fontify-recorded-types-and-refs c-forward-label 
goto-target qt-1kwd-colon qt-2kwds-colon mapc #[... "\301@A\302\303$\207" 
[kwd put-text-property face font-lock-keyword-face] 5] 
max-type-decl-end-before-token max-type-decl-end -pos- c-recognize-<>-arglists 
c-restricted-<>-arglists last-cast-end decl-or-cast c-buffer-is-cc-mode pos 
...] 6])
  c-font-lock-declarations(36)
  font-lock-fontify-keywords-region(1 36 t)
  font-lock-default-fontify-region(1 36 t)
  font-lock-fontify-region(1 36 t)
  byte-code("\212\303 \304\216\305ed#\210\306 \210\307\211+\207" 
[save-match-data-internal verbose font-lock-fontified match-data ((byte-code 
"\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 
font-lock-fontify-region font-lock-after-fontify-buffer t] 4)
  font-lock-default-fontify-buffer()
  font-lock-fontify-buffer()
  org-export-format-source-code-or-example(html "java" "import static 
org.junit.Assert.*;\n\n" " " 0 nil)
  org-export-replace-src-segments-and-examples(html)
  org-export-preprocess-str

Re: [Orgmode] [babel] After Tangle Change File Permission

2011-02-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/09/2011 10:16 AM, Ian Barton wrote:
> I am starting to use babel to maintain my collection of shell scripts. I
> want to automate the process as much as possible, so I would like to be
> able to set the execute bit on my tangled .sh scripts after the tangle
> process.
> 
> I see that there is an after-tangle hook. Can anyone give me some hints
> as to how I might use this to execute a chmod *.sh on the directory
> containing my tangles shell scripts.

Below an example how I use this:
1) I create a postTangleScript.sh, which I want to execute after
tangling. In this script, I put all the things I want to do.
2) I set the post-tangle-hook, so that the script is executed.
3) if you want to have the name of the tangled file automatically in
your post tangle script, you can use variables (but don't ask me how to
get the name of the tangled file)

Hope this helps,

Rainer


* Internal configurations
:noexport:
** Post tangle script
#+begin_src sh :tangle postTangleScript.sh :var
BUFFERFILENAME=(buffer-file-name)
  # do whatever
#+end_src

** Evaluate to run post tangle script
#+begin_src emacs-lisp :results silent :tangle no :exports none
  (add-hook 'org-babel-post-tangle-hook
(
 lambda ()
(call-process-shell-command "./postTangleScript.sh"
nil 0 nil)
)
)
#+end_src

> 
> Ian.
> 
> ___
> 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


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1SZP0ACgkQoYgNqgF2egogZACeK/GohKqClBenIaVsvqSboC/f
bX4AnA8+lCDUON76x7hFVAGTbmJv9zIA
=WgSG
-END 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 exporting table with images

2011-02-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/08/2011 09:02 PM, Sébastien Vauban wrote:
> Hi Rainer,
> 
> Rainer M Krug wrote:
>> #+TITLE: Export of images in table to pdf
>> #+AUTHOR:Rainer M. Krug
>> #+DATE:  2011-02-08 Tue
>>
>> Hi
>>
>> I have problems exporting this table with graphs to pdf:
>> 1) when exporting, the links are retained, and okular tells me
>> "malformed url"
>> 2) I would like to have the graphs inserted instead of the links ---
>> according to the manual, this should be done automatically, but it does
>> not work.
>>
>> Is there something I am missing here?
>> Cheers,
>>
>> Rainer
>>
>> * Generating the graphs
>> #+begin_src R :results output org :exports both
>>   cat("|---|---|---|\n")
>>   for (x in 1:3) {
>>   for (y in 1:3) {
>> pdf(paste("img", x, y, "pdf", sep="."))
>> plot(runif(100))
>> dev.off()
>>   }
>>   cat("|", paste(" [[file:img.1", x, "pdf", sep="."), "]] |",
>> paste(" [[./img.2", x, "pdf", sep="."), "]] |", paste("[[./img.3", x,
>> "pdf", sep="."), "]] |\n")
>> }
>>   cat("|---|---|---|\n")
>> #+end_src
>>
>> #+results:
>> #+BEGIN_ORG
>> |---++|
>> | [[file:img.1.1.pdf ]] | [[./img.2.1.pdf ]] | [[./img.3.1.pdf ]] |
>> | [[file:img.1.2.pdf ]] | [[./img.2.2.pdf ]] | [[./img.3.2.pdf ]] |
>> | [[file:img.1.3.pdf ]] | [[./img.2.3.pdf ]] | [[./img.3.3.pdf ]] |
>> |---++|
>> #+END_ORG
> 
> Don't know if that can be the source of the problem, but it appears you have
> spaces after the filename, in your links.

Partly - now I have:

* Generating the graphs
#+begin_src R :results output org :exports both
  cat("|---|---|---|\n")
  for (x in 1:3) {
  for (y in 1:3) {
pdf(paste("img", x, y, "pdf", sep="."))
plot(runif(100))
dev.off()
  }
  cat("|", " [[file:img_1_", x, ".pdf", "]] |", " [[./img_2_", x,
".pdf", "]] |", "[[./img_3_", x, ".pdf", "]] |\n", sep="")
}
  cat("|---|---|---|\n")
#+end_src

#+results:
#+BEGIN_ORG
|---|---|---|
| [[file:img_1_1.pdf]] | [[./img_2_1.pdf]] |[[./img_3_1.pdf]] |
| [[file:img_1_2.pdf]] | [[./img_2_2.pdf]] |[[./img_3_2.pdf]] |
| [[file:img_1_3.pdf]] | [[./img_2_3.pdf]] |[[./img_3_3.pdf]] |
|---|---|---|
#+END_ORG

The table is translated to LaTeX as:
\begin{tabular}{lll}
\hline
 \includegraphics[width=10em]{./img_1_1.pdf}  &
\includegraphics[width=10em]{./img_2_1.pdf}  &
\includegraphics[width=10em]{./img_3_1.pdf}  \\
 \includegraphics[width=10em]{./img_1_2.pdf}  &
\includegraphics[width=10em]{./img_2_2.pdf}  &
\includegraphics[width=10em]{./img_3_2.pdf}  \\
 \includegraphics[width=10em]{./img_1_3.pdf}  &
\includegraphics[width=10em]{./img_2_3.pdf}  &
\includegraphics[width=10em]{./img_3_3.pdf}  \\
\hline
\end{tabular}

Which gives the following error:


LaTeX Warning: File `./img_1_1.pdf' not found on input line 68.

!pdfTeX error: pdflatex (file ./img_1_1.pdf): cannot find image file
 ==> Fatal error occurred, no output PDF file produced!


So do I have to provide absolute paths to the graphs?


Cheers,

Rainer



> Best regards,
>   Seb
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1SZ9MACgkQoYgNqgF2egqNCACcDoJzyUk02hEWWOHsnM9RkKw9
52EAnjB3HuJlNzUo6PrAdWQlqTbBaV8H
=x8b/
-END 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: [babel] After Tangle Change File Permission

2011-02-09 Thread Dan Davison
Ian Barton  writes:

> I am starting to use babel to maintain my collection of shell
> scripts. I want to automate the process as much as possible, so I
> would like to be able to set the execute bit on my tangled .sh scripts
> after the tangle process.
>
> I see that there is an after-tangle hook. Can anyone give me some
> hints as to how I might use this to execute a chmod *.sh on the
> directory containing my tangles shell scripts.

Hi Ian,

It looks like Eric has already implemented this particular case in a
different way: if the :shebang header arg is set, then the file will be
made executable. E.g. :shebang #!/bin/bash.

However, to use the hook function, does something like this not work?

#+begin_src emacs-lisp
(defun dan/make-tangled-shell-files-executable () (shell-command "chmod +x 
*.sh"))
(add-hook 'org-babel-post-tangle-hook 'dan/make-tangled-shell-files-executable)
#+end_src

I admit I was getting some inconsistent results just then that I didn't
understand. It should be possible to use

#+begin_src emacs-lisp
(add-hook 'org-babel-post-tangle-hook
'dan/make-tangled-shell-files-executable nil 'local)
#+end_src

so that the hook is set locally for the buffer in question.

The code is

#+begin_src emacs-lisp
  (when org-babel-post-tangle-hook
(mapc
 (lambda (file)
   (org-babel-with-temp-filebuffer file
 (run-hooks 'org-babel-post-tangle-hook)))
 path-collector))
#+end_src

, where `path-collector' is a list of tangled files. I believe that this
implies that, each time the hook is run, default-directory will be equal
to the directory containing the file in question, so the shell-command
should run in that directory. Otoh, the above shows that the hook is run
for each tangled file, so chmod +x *.sh would be executed more times
than necessary.

Dan

>
> Ian.
>
> ___
> 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

___
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 exporting table with images

2011-02-09 Thread Sébastien Vauban
Hi Rainer,

Rainer M Krug wrote:
> Which gives the following error:
>
> 
> LaTeX Warning: File `./img_1_1.pdf' not found on input line 68.
>
> !pdfTeX error: pdflatex (file ./img_1_1.pdf): cannot find image file
>  ==> Fatal error occurred, no output PDF file produced!
> 
>
> So do I have to provide absolute paths to the graphs?

Why prefixing with `.', which is the current directory?  If you correctly set
the search path for the images (so that it includes the current directory --
that setting is certainly there by default), it should be OK.

So, I'd try opting out the `./' prefix in front of your links, if that's
acceptable for you.

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: Problem exporting table with images

2011-02-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/09/2011 11:36 AM, Sébastien Vauban wrote:
> Hi Rainer,
> 
> Rainer M Krug wrote:
>> Which gives the following error:
>>
>> 
>> LaTeX Warning: File `./img_1_1.pdf' not found on input line 68.
>>
>> !pdfTeX error: pdflatex (file ./img_1_1.pdf): cannot find image file
>>  ==> Fatal error occurred, no output PDF file produced!
>> 
>>
>> So do I have to provide absolute paths to the graphs?
> 
> Why prefixing with `.', which is the current directory?  If you correctly set
> the search path for the images (so that it includes the current directory --
> that setting is certainly there by default), it should be OK.
> 
> So, I'd try opting out the `./' prefix in front of your links, if that's
> acceptable for you.

Fixed it - the problem was the "." in the filename of the image. If I
use "_" instead, it works. LaTeX seems to split the filemane and the
extension after the *first* "." and tries to identify the image type by
using everything right of the first "." - so it wont work if the file
name is "img.2.3.pdf", but with "img_2_3.pdf" it does.

Pitty - I like the "." in the filenames (and I don't like the "_").

I guess it is a LaTeX question, but is there a way of telling LaTeX to
split after the *last* "." or to specify the image type?

Thanks,

Rainer


> 
> Best regards,
>   Seb
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1SeMoACgkQoYgNqgF2egrMfwCfQefWwyHzCrFYxJTCQTNHxbb2
8YAAniGIABHy6oYkylXIrgYaI7Cs+dUf
=UL3F
-END 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: org-agende changes mode in buffer to fundamental

2011-02-09 Thread Detlef Steuer
On Wed, 09 Feb 2011 08:54:41 +
Eric S Fraga  wrote:

> Detlef Steuer  writes:
> 
> > Hi!
> >
> > Just trying to start my workday ...
> >
> > As always the first command is
> > emacs todo.org
> >
> > Everthing looks like it should, mode is Org .
> > But now, if I type 
> > C-a a 
> > to view my agenda, mode is reverted back to fundamental.
> 
> What version of emacs are you using?  I have seen this happen to me in
> GNUS, not org (so far), with the latest emacs 24 snapshot...

Ah, sorry, forgot to mention:

steuer@gaia:~> emacs --version
GNU Emacs 23.2.1

Detlef 

> -- 
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.324.gca7a)
> 
> ___
> 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
> 



___
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 2/2] org-publish

2011-02-09 Thread Manuel Giraud
Bastien  writes:

> I'd welcome a reworked version of this idea!

Hi Bastien,

Thanks for accepting my previous patch. Here's a new version of this last
patch that support formated sitemap entry.

--8<---cut here---start->8---
commit 660ece15eca316075da6529560bf66565934b713
Author: Manuel Giraud 
Date:   Tue Nov 23 16:20:15 2010 +0100

formated sitemap

Modified lisp/org-publish.el
diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index 47b80db..98e09f3 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -267,6 +267,22 @@ You can overwrite this default per project in your
   :group 'org-publish
   :type 'boolean)
 
+(defcustom org-publish-sitemap-date-format "%Y-%m-%d"
+  "Format for `format-time-string' which is used to print a date
+in the sitemap."
+  :group 'org-publish
+  :type 'string)
+
+(defcustom org-publish-sitemap-file-entry-format "%T"
+  "How a sitemap file entry is formated.
+You could use brackets to delimit on what part the link will be.
+
+%T is the title.
+%A is the author.
+%D is the date formated using `org-publish-sitemap-date-format'."
+  :group 'org-publish
+  :type 'string)
+
 
 ;;; Timestamp-related functions
 
@@ -370,6 +386,8 @@ This splices all the components into the list."
 (defvar sitemap-sort-folders)
 (defvar sitemap-ignore-case)
 (defvar sitemap-requested)
+(defvar sitemap-date-format)
+(defvar sitemap-file-entry-format)
 (defun org-publish-compare-directory-files (a b)
   "Predicate for `sort', that sorts folders and files for sitemap."
   (let ((retval t))
@@ -392,8 +410,10 @@ This splices all the components into the list."
(not (string-lessp B A))
((or (equal sitemap-sort-files 'chronologically)
 (equal sitemap-sort-files 'anti-chronologically))
-(let ((A (org-publish-find-date a))
-  (B (org-publish-find-date b)))
+(let* ((adate (org-publish-find-date a))
+   (bdate (org-publish-find-date b))
+   (A (+ (lsh (car adate) 16) (cadr adate)))
+   (B (+ (lsh (car bdate) 16) (cadr bdate
   (setq retval (if (equal sitemap-sort-files 'chronologically)
(<= A B)
  (>= A B)))
@@ -701,6 +721,10 @@ If :makeindex is set, also produce a file theindex.org."
"sitemap.org"))
  (sitemap-function (or (plist-get project-plist :sitemap-function)
'org-publish-org-sitemap))
+ (sitemap-date-format (or (plist-get project-plist 
:sitemap-date-format)
+  org-publish-sitemap-date-format))
+ (sitemap-file-entry-format (or (plist-get project-plist 
:sitemap-file-entry-format)
+org-publish-sitemap-file-entry-format))
  (preparation-function (plist-get project-plist :preparation-function))
  (completion-function (plist-get project-plist :completion-function))
  (files (org-publish-get-base-files project exclude-regexp)) file)
@@ -776,12 +800,32 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
  (setq indent-str (make-string
(+ (length indent-str) 2) ?\ )))
;; This is common to 'flat and 'tree
-   (insert (concat indent-str " + [[file:" link "]["
-   (org-publish-find-title file)
-   "]]\n")
+   (let ((entry
+  (org-publish-format-file-entry sitemap-file-entry-format 
+ file project-plist))
+ (regexp "\\(.*\\)\\[\\([^][]+\\)\\]\\(.*\\)"))
+ (cond ((string-match-p regexp entry)
+(string-match regexp entry)
+(insert (concat indent-str " + " (match-string 1 entry)
+"[[file:" link "]["
+(match-string 2 entry)
+"]]" (match-string 3 entry) "\n")))
+   (t 
+(insert (concat indent-str " + [[file:" link "]["
+entry
+"]]\n"
   (save-buffer))
 (or visiting (kill-buffer sitemap-buffer
 
+(defun org-publish-format-file-entry (fmt file project-plist)
+  (org-replace-escapes fmt
+  (list (cons "%T" (org-publish-find-title file))
+(cons "%D" (format-time-string 
+sitemap-date-format 
+(org-publish-find-date file)))
+(cons "%A" (or (plist-get project-plist :author)
+ 

[Orgmode] [babel] Execute checks before trying to load Babel languages

2011-02-09 Thread Sébastien Vauban
Hi,

I am sharing my .emacs file, and this is beginning to cause problems with
people who don't have the same environment as I do. In particular with the
following:

#+begin_src emacs-lisp
  (org-babel-do-load-languages
   'org-babel-load-languages
   '(
 (C . t)
 (R . t)
 (calc . t)
 (ditaa . t)
 (dot . t)
 (emacs-lisp . t)
 (gnuplot . t)
 (haskell . nil)
 (latex . t)
 (ledger . t)
 (ocaml . nil)
 (octave . nil)
 (org . t)
 (perl . t)
 (python . t)
 (ruby . t)
 (screen . t)
 (sh . t)
 (sql . t)
 (sqlite . t)))
#+end_src

Someone got:

--8<---cut here---start->8---
Debugger entered--Lisp error: (file-error "Cannot open load file" "ob-calc")
--8<---cut here---end--->8---

In fact, this is much more general than checking the Org-version: it addresses
as well installed packages such as

- Rterm (R and ess-mode)
- ditaa (requires =sudo aptitude install openjdk-6-jre=)
- gnuplot (requires gnuplot-mode)
- ledger (requires that =ob-ledger= is found...)
- org (requires that =ob-org= is found...)
- ruby

Do I have to check myself for such executables in a way similar to:

#+begin_src emacs-lisp
(when (find-exec "Rterm")
  ... add R language ...
  )

(when (file-exists-p "ob-ledger")
  ... add ledger language ...
  )
#+end_src

or could we come up with some more generic and compact solution that would
easily be usable by all of us?

Maybe such a check should be made, by default, in every language file?

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] Problems with source code listings in PDF

2011-02-09 Thread Robert Klein

Am 08.02.2011, 16:47 Uhr, schrieb Thomas S. Dye :



On Feb 8, 2011, at 4:59 AM, Avdi Grimm wrote:


I'm working on creating a PDF eBook with Org-Mode, and I'm running
into some difficulty getting them to come out looking decent.


[s.d.]


I'm seeing a few problems with the output:

1. There is no color; only bolded keywords
2. Listings are formatted in a not-very-well-rendered font with serifs
that just doesn't look good at all.


Instructions for setting up different fonts can be found here:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-14



I think a better answer for point 2. might be a header line of


#+LaTeX_HEADER: \lstset{ basicstyle=\small\ttfamily }

Best regards
Robert




All the best,
Tom



3. In begin_example sections, spaces are replaced with odd little
curved underscores.

I've attached some examples to show what I mean.

I'm running Org-Mode 7.4 on Ubuntu 10.10 with Emacs 23.1.50.1.

Has anyone had any luck formatting source code and example listings in
PDF output? What I'd really like to get is output identical to the
listings exported to HTML.

Thanks!

--
Avdi Grimm
<
example
.png>___
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


___
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] :no-expand in :PROPERTIES: block?

2011-02-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

#+BABEL: :var A="one" :var B="two"
Hi

is it possible to put the :no-expand option in a :properi

* Behind source block
  #+begin_src sh :tangle notHere.sh :no-expand
echo "No they are not here"
  #+end_src

* Behind source block
  :PROPERTIES:
  :no-expand
  :END:
  #+begin_src sh :tangle butHere.sh
echo "No they should not be here"
  #+end_src

  #+begin_src sh :tangle butHereToo.sh
echo "No they should also not be here"
  #+end_src

  The :no-expand is ignored (I guess it is in the wrong format?). How
can I set it in the :PROPERTIES: block so that it applies to the whole
subtree?

Thanks

Rainer



- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1Sl78ACgkQoYgNqgF2egoshwCfdkfelEKMUM+VxamyJtIBTqgR
Wf0An1a7o/+pzGJEI+uBSi8ue6G0Ogut
=b4tb
-END 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] [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Eric S Fraga
Chris Maier  writes:

> The begin_dot is part of org-exp-blocks, as I understand it, and
> appears required to make it evaluate the Dot code, create the image
> file, and then incorporate that into the exported document (LaTeX,
> HTML, etc.)
>
> Thanks,
> Chris
>
> On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
>> Chris Maier  writes:
>>
>>> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
>>> it's possible to hit C-c ' and edit the block code in a separate
>>> buffer with the appropriate mode.  This doesn't appear to work when
>>> using org-exp-blocks to edit a "begin_dot" block.
>>>
>>> Is there a command to do this?
>>
>> No idea but what about using #+begin_src dot ... #+end_src?
>> --
>> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
>> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>>

Yes, I know; I used to use begin_dot and begin_ditaa quite a bit.  My
understanding is that babel knows about dot and therefore provides the
same functionality, albeit in a different way, possibly more confusing
but definitely more customisable and hence more powerful.  babel gives
you access to features such as fontification, mode specific editing,
caching.

I am not sure what the intended long term development for these special
export blocks might be?  org's long term growth (development of
features) is organic and responsive, not planned per se (and I mean this
in a positive way as planned software projects seldom achieve their
goals...)  so it may be that nobody can answer this question!

In any case, I didn't mean to imply that you cannot continue using these
specific export blocks or that they don't do the job they were intended
for.  Simply that maybe babel is the route to go if you want to be able
to use mode specific editing.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.324.gca7a)











___
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  wrote:

> Ulf Stegemann  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] Re: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Dan Davison
Eric S Fraga  writes:

> Chris Maier  writes:
>
>> The begin_dot is part of org-exp-blocks, as I understand it, and
>> appears required to make it evaluate the Dot code, create the image
>> file, and then incorporate that into the exported document (LaTeX,
>> HTML, etc.)
>>
>> Thanks,
>> Chris
>>
>> On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
>>> Chris Maier  writes:
>>>
 In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
 it's possible to hit C-c ' and edit the block code in a separate
 buffer with the appropriate mode.  This doesn't appear to work when
 using org-exp-blocks to edit a "begin_dot" block.

 Is there a command to do this?
>>>
>>> No idea but what about using #+begin_src dot ... #+end_src?
>>> --
>>> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
>>> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>>>
>
> Yes, I know; I used to use begin_dot and begin_ditaa quite a bit.  My
> understanding is that babel knows about dot and therefore provides the
> same functionality, albeit in a different way,

I vote for removing / deprecating the dot and ditaa functionality of
org-exp-blocks.


> possibly more confusing
> but definitely more customisable and hence more powerful.  babel gives
> you access to features such as fontification, mode specific editing,
> caching.
>
> I am not sure what the intended long term development for these special
> export blocks might be?  org's long term growth (development of
> features) is organic and responsive, not planned per se (and I mean this
> in a positive way as planned software projects seldom achieve their
> goals...)  so it may be that nobody can answer this question!
>
> In any case, I didn't mean to imply that you cannot continue using these
> specific export blocks or that they don't do the job they were intended
> for.  Simply that maybe babel is the route to go if you want to be able
> to use mode specific editing.

___
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] Automatic noexport tag based on rules?

2011-02-09 Thread John Hendy
On Wed, Feb 9, 2011 at 1:40 AM, Eric S Fraga  wrote:

> John Hendy  writes:
>
> [...]
>
> > Yeah.. most of my todos aren't medium-sized projects, though. Many of
> them
> > are more along the lines of one-liner action items I need to jot to
> myself
> > so I don't forget as well as keeping them as a sort of rolling "next
> > actions" queue. For that reason, I'd much rather keep them in their
> original
> > context.
>
> On possible suggestion: if you use inline tasks for these one liner
> TODOs,
>
>
Perhaps that's the way to go. I just find them ugly :(


> ,
> | C-c C-x t runs the command org-inlinetask-insert-task, which is an
> | interactive compiled Lisp function in `org-inlinetask.el'.
> |
> | It is bound to C-c C-x t.
> |
> | (org-inlinetask-insert-task &optional NO-STATE)
> |
> | Insert an inline task.
> | If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
> `
>
>
This isn't working for me and it's been quite difficult to find mention of
inline tasks in documentation. My searching only pulls a mention from the
6.29v list of visible changes: http://orgmode.org/Changes_old.html#sec-1_1_6

Is there something I need to set up to get this working?


Thanks,
John


> You can then customise =org-inlinetask-export-templates= to
> generate latex code that basically ignores the inline task.
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>
___
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: [babel] Execute checks before trying to load Babel languages

2011-02-09 Thread Dan Davison
Hey Seb,

> I am sharing my .emacs file, and this is beginning to cause problems with
> people who don't have the same environment as I do. In particular with the
> following:
>
> #+begin_src emacs-lisp
>   (org-babel-do-load-languages
>'org-babel-load-languages
>'(
>  (C . t)
>  (R . t)
>  (calc . t)
>  (ditaa . t)
[...]
>  (sqlite . t)))
> #+end_src
>

A couple of ideas:

1. I use this, which loads all languages supported in the current
   version of Org. dan/org-babel-list-supported-languages is a personal
   function, code below.

#+begin_src emacs-lisp
(setq org-babel-load-languages
  (mapcar (lambda (lang) (cons lang t))
  (dan/org-babel-list-supported-languages)))
(org-babel-do-load-languages
 'org-babel-load-languages org-babel-load-languages)
#+end_src

[...]

> In fact, this is much more general than checking the Org-version: it addresses
> as well installed packages such as
>
> - Rterm (R and ess-mode)
> - ditaa (requires =sudo aptitude install openjdk-6-jre=)
> - gnuplot (requires gnuplot-mode)

I don't think any of these are required in order to load the
language. They should only be required when executing a block (and in
the case of 'ess, when :session is used)

> - ledger (requires that =ob-ledger= is found...)
> - org (requires that =ob-org= is found...)

2. Seeing as you're sharing config files, maybe the solution is to
   accept that some bits of the configuration are by their nature
   specific to a paticular user and not robust across different
   installations. So in your main shared config file you could make a
   conservative decision to activate only emacs-lisp, or a set of core
   languages that you are confident will be present on your colleagues'
   systems. Then in addition you would have your own personal config
   file that gets loaded after the shared config, which activates your
   own languages.

Dan

#+begin_src emacs-lisp
(require 'cl)
(defun dan/org-babel-list-supported-languages ()
  (interactive)
  (sort
   (set-difference
(mapcar
 (lambda (s) (intern (progn (string-match "^ob-\\(.+\\)\.el$" s)
(match-string 1 s
 (directory-files
  (save-window-excursion
(file-name-directory
 (buffer-file-name (find-library "ob"
  nil "^ob-.+\.el$"))
'(comint eval exp keys lob ref table tangle))
   (lambda (x y) (string< (downcase (symbol-name x))
  (downcase (symbol-name y))
#+end_src


> - ruby



>
> Do I have to check myself for such executables in a way similar to:
>
> #+begin_src emacs-lisp
> (when (find-exec "Rterm")
>   ... add R language ...
>   )
>
> (when (file-exists-p "ob-ledger")
>   ... add ledger language ...
>   )
> #+end_src
>
> or could we come up with some more generic and compact solution that would
> easily be usable by all of us?
>
> Maybe such a check should be made, by default, in every language file?
>
> Best regards,
>   Seb

___
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] export weekly completed/late items

2011-02-09 Thread Christopher Allan Webber
I do this for generating work reports, but all I do is 

#+begin_src emacs-lisp
(setq org-log-done 'time)
(setq org-log-state-notes-into-drawer t)
#+end_src

To enable logging (second line is to prevent cluttering things up)

Then in the agenda:

press "v l" to enable logging
press "v a" to enable archived trees
press "b" to go back a week.

It also helps that I have

#+begin_src emacs-lisp
; Start weekly view from present day
(setq org-agenda-start-on-weekday nil)
#+end_src

set so that the agenda starts on the current day.

I usually end up generating reports for the last two weeks... I've
considered looking to see if there's a way to set up agenda commands to
generate a list of the last two weeks' tasks so I didn't have to press
back twice, but I haven't tried yet :)

Does that help?
 - cwebb

Kyle Farrell  writes:

> I'm a bit of a newbie to org-mode, so where should I start to look at
> this?  Is there existing functionality in either org-agenda or
> org-export that would be a good starting point?
>
>
> Marcelo de Moraes Serpa wrote:
>> This is a great idea, and one I would use myself. I don't think you
>> could configure the agenda to build something like that though, I'd
>> say we'd need to come up with some custom elisp code or a script that
>> parses the org archive file and does the dirty job.
>> 
>> Marcelo.
>> 
>> On Mon, Feb 7, 2011 at 2:04 PM, Kyle Farrell  wrote:
>> > I'm trying to create a weekly report of items completed or
>> > outstanding.  I'd like to bucket these by status.  I've got my entries
>> > with a DEADLINE calendar date set.
>> >
>> > For example given the org input:
>> >
>> > * TODO Fix bug for software project X
>> >   DEADLINE: <2011-02-07 Mon>
>> > * DONE Update documentation for feature Y
>> >   DEADLINE: <2011-02-09 Wed>
>> > * DONE Scope out new version of Z
>> >   DEADLINE: <2011-02-09 Wed>
>> > * TODO Code new version of Z
>> >   DEADLINE: <2011-02-17 Thu>
>> >
>> > I'd like to bucketize these based on the current date TODO status.  If
>> > the date is 2/11/2011, based on the deadline and the status I'd like
>> > to see:
>> >
>> >  Missed:
>> >  2011-02-07: Fix bug for software project X
>> >
>> >  Completed:
>> >  2011-02-09: Update documentation for feature Y
>> >  2011-02-09: Scope out new version of Z
>> >
>> >  Coming up:
>> >  2011-02-17: Code new version of Z
>> >
>> >
>> > Am I best using an agenda view to create this?  Or would this be in a
>> > custom exporter?
>> >
>> > thanks!
>> > -Kyle
>> >
>> > ___
>> > 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
>> >
>> 
>
> ___
> 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
>

-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻

___
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: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Chris Maier
I fixed my problem... had to dig around in the source of ob-dot.el,
though, since it doesn't appear to be on the website [1].  There are
some additional undocumented header parameters that ob-dot adds to the
standard Babel params.

With org-exp-blocks you do this:

#+begin_dot foo.png -Tpng
... dot code ...
#+end_dot

With plain old Babel, you do this:

#+begin_src dot :file foo.png :cmdline -Tpng
... dot code ...
#+end_src

Knowing this now, I'd argue for deprecating org-exp-blocks, too.

Now my question changes slightly.  With the src block configured as
above, I can export and execute the code fine, but when I type C-c '
to edit the Dot code in a separate buffer, it goes into fundamental
mode, even though I have graphviz-dot-mode [2] installed and working
fine.  I suspect it might be because it's called "graphviz-dot-mode"
instead of just "dot-mode" (that's just speculation on my part,
though).

Is there a way to explicitly associate an major mode with a particular
kind of language block?

Thanks,
Chris

[1] http://orgmode.org/worg/org-contrib/babel/languages.html
[2] 
http://users.skynet.be/ppareit/projects/graphviz-dot-mode/graphviz-dot-mode.html

On Wed, Feb 9, 2011 at 10:14 AM, Dan Davison  wrote:
> Eric S Fraga  writes:
>
>> Chris Maier  writes:
>>
>>> The begin_dot is part of org-exp-blocks, as I understand it, and
>>> appears required to make it evaluate the Dot code, create the image
>>> file, and then incorporate that into the exported document (LaTeX,
>>> HTML, etc.)
>>>
>>> Thanks,
>>> Chris
>>>
>>> On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
 Chris Maier  writes:

> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
> it's possible to hit C-c ' and edit the block code in a separate
> buffer with the appropriate mode.  This doesn't appear to work when
> using org-exp-blocks to edit a "begin_dot" block.
>
> Is there a command to do this?

 No idea but what about using #+begin_src dot ... #+end_src?
 --
 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 : using Org-mode version 7.4 (release_7.4.324.gca7a)

>>
>> Yes, I know; I used to use begin_dot and begin_ditaa quite a bit.  My
>> understanding is that babel knows about dot and therefore provides the
>> same functionality, albeit in a different way,
>
> I vote for removing / deprecating the dot and ditaa functionality of
> org-exp-blocks.
>
>
>> possibly more confusing
>> but definitely more customisable and hence more powerful.  babel gives
>> you access to features such as fontification, mode specific editing,
>> caching.
>>
>> I am not sure what the intended long term development for these special
>> export blocks might be?  org's long term growth (development of
>> features) is organic and responsive, not planned per se (and I mean this
>> in a positive way as planned software projects seldom achieve their
>> goals...)  so it may be that nobody can answer this question!
>>
>> In any case, I didn't mean to imply that you cannot continue using these
>> specific export blocks or that they don't do the job they were intended
>> for.  Simply that maybe babel is the route to go if you want to be able
>> to use mode specific editing.
>

___
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][babel] Problem using noweb

2011-02-09 Thread andy
I want to take advantage of babel's noweb capabilities, but I can't seem
to get it to work. I'm sure there is something trivial wrong with my
source block, but after looking at the documentation and looking at the
examples I can find on the web, I think this should work.

I define a variable in test-block, but it's not there, even though
test-block should be getting pulled in when I run the source block, bar.
What am I doing wrong? My .emacs has R defined and indeed, the session
*R* starts up without any problems and the print statement works, but
test-block just isn't there.

* Foo
** Bar
#+src_name: bar
#+begin_src R :noweb yes :session *R*
  <>
  print("I am here")
  a
#+end_src

* test-block
#+src_name: test-block
#+begin_src R :session *R*
  a <- c(1,2,3,4,5)
#+end_src


thanks
--andy




___
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] Store link in message mode

2011-02-09 Thread Bastien
Bastien  writes:

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

Ulf sent me a patch that I just applied.

It allows Gnusers to create org-links from message-mode.  

This is a move toward a more general solution "org-message.el", 
handling not only Gnus but any Emacs MUA storing sent messages,
ideas and patches welcome.

Note that the link will not find drafts, just sent emails.

Thanks to Ulf for this contribution, quite useful!

-- 
 Bastien

___
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] [Accepted] [Orgmode,2/2] org-publish

2011-02-09 Thread Bastien Guerry
Patch 590 (http://patchwork.newartisans.com/patch/590/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87bp2lcs6d.fsf%40univ-nantes.fr%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,2/2] org-publish
> Date: Wed, 09 Feb 2011 17:23:54 -
> From: Manuel Giraud 
> X-Patchwork-Id: 590
> Message-Id: <87bp2lcs6d@univ-nantes.fr>
> To: Bastien 
> Cc: emacs-orgmode 
> 
> Bastien  writes:
> 
> > I'd welcome a reworked version of this idea!
> 
> Hi Bastien,
> 
> Thanks for accepting my previous patch. Here's a new version of this last
> patch that support formated sitemap entry.
> 
> --8<---cut here---start->8---
> commit 660ece15eca316075da6529560bf66565934b713
> Author: Manuel Giraud 
> Date:   Tue Nov 23 16:20:15 2010 +0100
> 
> formated sitemap
> 
>   Modified lisp/org-publish.el
> --8<---cut here---end--->8---
> 
> Best regards,
> 
> 
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index 47b80db..98e09f3 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -267,6 +267,22 @@ You can overwrite this default per project in your
>:group 'org-publish
>:type 'boolean)
>  
> +(defcustom org-publish-sitemap-date-format "%Y-%m-%d"
> +  "Format for `format-time-string' which is used to print a date
> +in the sitemap."
> +  :group 'org-publish
> +  :type 'string)
> +
> +(defcustom org-publish-sitemap-file-entry-format "%T"
> +  "How a sitemap file entry is formated.
> +You could use brackets to delimit on what part the link will be.
> +
> +%T is the title.
> +%A is the author.
> +%D is the date formated using `org-publish-sitemap-date-format'."
> +  :group 'org-publish
> +  :type 'string)
> +
>  
>  ;;; Timestamp-related functions
>  
> @@ -370,6 +386,8 @@ This splices all the components into the list."
>  (defvar sitemap-sort-folders)
>  (defvar sitemap-ignore-case)
>  (defvar sitemap-requested)
> +(defvar sitemap-date-format)
> +(defvar sitemap-file-entry-format)
>  (defun org-publish-compare-directory-files (a b)
>"Predicate for `sort', that sorts folders and files for sitemap."
>(let ((retval t))
> @@ -392,8 +410,10 @@ This splices all the components into the list."
>   (not (string-lessp B A))
>   ((or (equal sitemap-sort-files 'chronologically)
>(equal sitemap-sort-files 'anti-chronologically))
> -  (let ((A (org-publish-find-date a))
> -(B (org-publish-find-date b)))
> +  (let* ((adate (org-publish-find-date a))
> + (bdate (org-publish-find-date b))
> + (A (+ (lsh (car adate) 16) (cadr adate)))
> + (B (+ (lsh (car bdate) 16) (cadr bdate
>  (setq retval (if (equal sitemap-sort-files 'chronologically)
>   (<= A B)
> (>= A B)))
> @@ -701,6 +721,10 @@ If :makeindex is set, also produce a file theindex.org."
>   "sitemap.org"))
> (sitemap-function (or (plist-get project-plist :sitemap-function)
>   'org-publish-org-sitemap))
> +   (sitemap-date-format (or (plist-get project-plist 
> :sitemap-date-format)
> +org-publish-sitemap-date-format))
> +   (sitemap-file-entry-format (or (plist-get project-plist 
> :sitemap-file-entry-format)
> +  org-publish-sitemap-file-entry-format))
> (preparation-function (plist-get project-plist :preparation-function))
> (completion-function (plist-get project-plist :completion-function))
> (files (org-publish-get-base-files project exclude-regexp)) file)
> @@ -776,12 +800,32 @@ Default for SITEMAP-FILENAME is 'sitemap.org'."
> (setq indent-str (make-string
>   (+ (length indent-str) 2) ?\ )))
>   ;; This is common to 'flat and 'tree
> - (insert (concat indent-str " + [[file:" link "]["
> - (org-publish-find-title file)
> - "]]\n")
> + (let ((entry
> +(org-publish-format-file-entry sitemap-file-entry-format 
> +   file project-plist))
> +   (regexp "\\(.*\\)\\[\\([^][]+\\)\\]\\(.*\\)"))
> +   (cond ((string-match-p regexp entry)
> +  (string-match regexp entry)
> +  (insert (concat indent-str " + " (match-string 1 entry)
> +  "[[file:" link "]["
> +  (match-string 2 entry)
> +  

[Orgmode] Re: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Dan Davison
Chris Maier  writes:

> I fixed my problem... had to dig around in the source of ob-dot.el,
> though, since it doesn't appear to be on the website [1].  There are
> some additional undocumented header parameters that ob-dot adds to the
> standard Babel params.
>
> With org-exp-blocks you do this:
>
> #+begin_dot foo.png -Tpng
> ... dot code ...
> #+end_dot
>
> With plain old Babel, you do this:
>
> #+begin_src dot :file foo.png :cmdline -Tpng
> ... dot code ...
> #+end_src
>
> Knowing this now, I'd argue for deprecating org-exp-blocks, too.
>
> Now my question changes slightly.  With the src block configured as
> above, I can export and execute the code fine, but when I type C-c '
> to edit the Dot code in a separate buffer, it goes into fundamental
> mode, even though I have graphviz-dot-mode [2] installed and working
> fine.  I suspect it might be because it's called "graphviz-dot-mode"
> instead of just "dot-mode" (that's just speculation on my part,
> though).
>
> Is there a way to explicitly associate an major mode with a particular
> kind of language block?

Hi Chris,

Yes, see the variable org-src-lang-modes. Use customize, or something
like this:

#+begin_src emacs-lisp
(aput 'org-src-lang-modes "dot" 'graphviz-dot)
#+end_src

(Elisp question: I can't remember why we don't use aput in org-mode?
What's the idiomatic org way of doing that?

This

#+begin_src emacs-lisp
(setq org-src-lang-modes
  (append '(("dot" . graphviz-dot))
  (delq (assoc "dot" org-src-lang-modes)
org-src-lang-modes)))
#+end_src

doesn't work if there's already more than one entry for "dot")

Dan

>
> Thanks,
> Chris
>
> [1] http://orgmode.org/worg/org-contrib/babel/languages.html
> [2] 
> http://users.skynet.be/ppareit/projects/graphviz-dot-mode/graphviz-dot-mode.html
>
> On Wed, Feb 9, 2011 at 10:14 AM, Dan Davison  wrote:
>> Eric S Fraga  writes:
>>
>>> Chris Maier  writes:
>>>
 The begin_dot is part of org-exp-blocks, as I understand it, and
 appears required to make it evaluate the Dot code, create the image
 file, and then incorporate that into the exported document (LaTeX,
 HTML, etc.)

 Thanks,
 Chris

 On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
> Chris Maier  writes:
>
>> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
>> it's possible to hit C-c ' and edit the block code in a separate
>> buffer with the appropriate mode.  This doesn't appear to work when
>> using org-exp-blocks to edit a "begin_dot" block.
>>
>> Is there a command to do this?
>
> No idea but what about using #+begin_src dot ... #+end_src?
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>
>>>
>>> Yes, I know; I used to use begin_dot and begin_ditaa quite a bit.  My
>>> understanding is that babel knows about dot and therefore provides the
>>> same functionality, albeit in a different way,
>>
>> I vote for removing / deprecating the dot and ditaa functionality of
>> org-exp-blocks.
>>
>>
>>> possibly more confusing
>>> but definitely more customisable and hence more powerful.  babel gives
>>> you access to features such as fontification, mode specific editing,
>>> caching.
>>>
>>> I am not sure what the intended long term development for these special
>>> export blocks might be?  org's long term growth (development of
>>> features) is organic and responsive, not planned per se (and I mean this
>>> in a positive way as planned software projects seldom achieve their
>>> goals...)  so it may be that nobody can answer this question!
>>>
>>> In any case, I didn't mean to imply that you cannot continue using these
>>> specific export blocks or that they don't do the job they were intended
>>> for.  Simply that maybe babel is the route to go if you want to be able
>>> to use mode specific editing.
>>
>
> ___
> 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

___
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 2/2] org-publish

2011-02-09 Thread Bastien
Hi Manuel,

Manuel Giraud  writes:

> Thanks for accepting my previous patch. Here's a new version of this
> last patch that support formated sitemap entry.

Works fine, thanks.  Note for later: better to prepare patch submission
with git format-patch* so that I don't have to amend the commit message.

Thanks!

* http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html

-- 
 Bastien

___
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-capture - org-vm store link requires buffer file not always present [7.4]

2011-02-09 Thread Bastien
Hi Arik,

Arik Mitschang  writes:

> In VM if you have created a virtual folder, the buffer is not associated
> with any file. However, during org-capture a function called
> org-vm-store-link requires that the buffer (the vm folder in this case)
> be associated with a file causing a type-mismatch error. I can fix the
> problem with the following patch:

This looks fine to me, but I'm not using VM.  

Can some VM user double-check this?

> --
> diff -U3 /usr/local/share/emacs/23.2/site-lisp/org-vm.el 
> /var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL
> --- /usr/local/share/emacs/23.2/site-lisp/org-vm.el   2010-12-11 
> 00:16:33.0 +1100
> +++ /var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL 
> 2011-02-09 14:27:35.0 +1100
> @@ -54,8 +54,12 @@
>  ;; Implementation
>  (defun org-vm-store-link ()
>"Store a link to a VM folder or message."
> -  (when (or (eq major-mode 'vm-summary-mode)
> +  (when (and (or (eq major-mode 'vm-summary-mode)
>   (eq major-mode 'vm-presentation-mode))
> +  (save-excursion (vm-select-folder-buffer)
> +  (eq (type-of 
> buffer-file-name)
> +  'string)))

(Better use (stringp buffer-file-name) instead of type-of.)

-- 
 Bastien

___
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] org-agende changes mode in buffer to fundamental

2011-02-09 Thread Bastien
Hi Detlef,

Detlef Steuer  writes:

> Just trying to start my workday ...
>
> As always the first command is
> emacs todo.org
>
> Everthing looks like it should, mode is Org .
> But now, if I type 
> C-a a 
> to view my agenda, mode is reverted back to fundamental.
>
> That also happens if I use
> M-x org-agenda
> to start it.
>
> Mode line tells me: Agenda file todo.org not in org-mode.
> Message buffer: 
> org-agenda-get-day-entries: Agenda file ~/.pim/todo.org is
> not in `org-mode'
> Well --- it was when I called you, org-mode! ;-)

This was caused by a recent commit (ca7aeada).

I've reverted this commit for now, your agenda views should 
look normal back again.

Thanks for spotting this,

-- 
 Bastien

___
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: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-09 Thread Bastien
Julien Danjou  writes:

> On Sat, Feb 05 2011, Matt Lundin wrote:
>
>> This results in only a day view because org-agenda-current-span is still
>> 'day.
>
> Here's a proposal fix.

I applied it to early, I made the error of not testing it 
with a bare "emacs -q".

The fix is not okay.  Let's find a better solution.

Thanks,

-- 
 Bastien

___
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] export weekly completed/late items

2011-02-09 Thread Marcelo de Moraes Serpa
Christopher, thank you very much!

Although I have been using org for quite some time, I never really
spend time going through the manual and learning all the nuances of
the agenda, and I often forget how powerful it is.

It would really nice if we had an agenda command to export all of this
as a PDF report, for example.

Cheers,

Marcelo.

On Wed, Feb 9, 2011 at 9:36 AM, Christopher Allan Webber
 wrote:
> I do this for generating work reports, but all I do is
>
> #+begin_src emacs-lisp
> (setq org-log-done 'time)
> (setq org-log-state-notes-into-drawer t)
> #+end_src
>
> To enable logging (second line is to prevent cluttering things up)
>
> Then in the agenda:
>
> press "v l" to enable logging
> press "v a" to enable archived trees
> press "b" to go back a week.
>
> It also helps that I have
>
> #+begin_src emacs-lisp
> ; Start weekly view from present day
> (setq org-agenda-start-on-weekday nil)
> #+end_src
>
> set so that the agenda starts on the current day.
>
> I usually end up generating reports for the last two weeks... I've
> considered looking to see if there's a way to set up agenda commands to
> generate a list of the last two weeks' tasks so I didn't have to press
> back twice, but I haven't tried yet :)
>
> Does that help?
>  - cwebb
>
> Kyle Farrell  writes:
>
>> I'm a bit of a newbie to org-mode, so where should I start to look at
>> this?  Is there existing functionality in either org-agenda or
>> org-export that would be a good starting point?
>>
>>
>> Marcelo de Moraes Serpa wrote:
>>> This is a great idea, and one I would use myself. I don't think you
>>> could configure the agenda to build something like that though, I'd
>>> say we'd need to come up with some custom elisp code or a script that
>>> parses the org archive file and does the dirty job.
>>>
>>> Marcelo.
>>>
>>> On Mon, Feb 7, 2011 at 2:04 PM, Kyle Farrell  wrote:
>>> > I'm trying to create a weekly report of items completed or
>>> > outstanding.  I'd like to bucket these by status.  I've got my entries
>>> > with a DEADLINE calendar date set.
>>> >
>>> > For example given the org input:
>>> >
>>> > * TODO Fix bug for software project X
>>> >   DEADLINE: <2011-02-07 Mon>
>>> > * DONE Update documentation for feature Y
>>> >   DEADLINE: <2011-02-09 Wed>
>>> > * DONE Scope out new version of Z
>>> >   DEADLINE: <2011-02-09 Wed>
>>> > * TODO Code new version of Z
>>> >   DEADLINE: <2011-02-17 Thu>
>>> >
>>> > I'd like to bucketize these based on the current date TODO status.  If
>>> > the date is 2/11/2011, based on the deadline and the status I'd like
>>> > to see:
>>> >
>>> >  Missed:
>>> >  2011-02-07: Fix bug for software project X
>>> >
>>> >  Completed:
>>> >  2011-02-09: Update documentation for feature Y
>>> >  2011-02-09: Scope out new version of Z
>>> >
>>> >  Coming up:
>>> >  2011-02-17: Code new version of Z
>>> >
>>> >
>>> > Am I best using an agenda view to create this?  Or would this be in a
>>> > custom exporter?
>>> >
>>> > thanks!
>>> > -Kyle
>>> >
>>> > ___
>>> > 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
>>> >
>>>
>>
>> ___
>> 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
>>
>
> --
> 𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻
>

___
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] export weekly completed/late items

2011-02-09 Thread Bastien
Hi Marcelo,

Marcelo de Moraes Serpa  writes:

> Although I have been using org for quite some time, I never really
> spend time going through the manual and learning all the nuances of
> the agenda, and I often forget how powerful it is.

It's a good read :)

> It would really nice if we had an agenda command to export all of this
> as a PDF report, for example.

You can export agendas as PDF by writing them to .pdf files.

See section 10.5 in the manual: "Commands in the agenda buffer"

`C-x C-w (`org-write-agenda')'
 Write the agenda view to a file.  Depending on the extension of
 the selected file name, the view will be exported as HTML
 (extension `.html' or `.htm'), Postscript (extension `.ps'), PDF
 (extension `.pdf'), and plain text (any other extension).  When
 called with a `C-u' prefix argument, immediately open the newly
 created file.  Use the variable `org-agenda-exporter-settings' to
 set options for `ps-print' and for `htmlize' to be used during
 export.

HTH,

-- 
 Bastien

___
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] Underscores in HTML Exported URLs get backslashes added

2011-02-09 Thread Jonathan Arkell
Hi list

I am having a problem, and my google-fu is a little weak in finding the 
solution.  Whenever I do an HTML export of an org-page if a URL contains 
underscores in it it will be exported escaped with a backslash in the text of 
the url.

For instance if I have an org buffer:

** Some foo title for context

this is an url:  http://somefoo.com/this_is_broken



Will get exported to:

 Some foo title for context 
 this is an url:  http://somefoo.com/this_is_broken";>http://somefoo.com/this\_is\_broken


Does anyone have any idea what is going on?

Thanks!

__

Jonathan Arkell
Tech Lead
Inspired By Drum & Bass, Scheme, Kawaii

p. 403.206.4377

402 -- 11th Ave SE
Calgary, AB, Canada T2G 0Y4

jonath...@criticalmass.com
criticalmass.com








The information contained in this message is confidential. It is intended to be 
read only by the individual or entity named above or their designee. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any distribution of this message, in any form, is strictly prohibited. If 
you have received this message in error, please immediately notify the sender 
and delete or destroy any copy of this message.

___
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] Automatic noexport tag based on rules?

2011-02-09 Thread John Hendy
Nevermind. Once I located 'org-inlinetask.el' the answer was clear.


John

On Wed, Feb 9, 2011 at 9:18 AM, John Hendy  wrote:

> On Wed, Feb 9, 2011 at 1:40 AM, Eric S Fraga  wrote:
>
>> John Hendy  writes:
>>
>> [...]
>>
>> > Yeah.. most of my todos aren't medium-sized projects, though. Many of
>> them
>> > are more along the lines of one-liner action items I need to jot to
>> myself
>> > so I don't forget as well as keeping them as a sort of rolling "next
>> > actions" queue. For that reason, I'd much rather keep them in their
>> original
>> > context.
>>
>> On possible suggestion: if you use inline tasks for these one liner
>> TODOs,
>>
>>
> Perhaps that's the way to go. I just find them ugly :(
>
>
>> ,
>> | C-c C-x t runs the command org-inlinetask-insert-task, which is an
>> | interactive compiled Lisp function in `org-inlinetask.el'.
>> |
>> | It is bound to C-c C-x t.
>> |
>> | (org-inlinetask-insert-task &optional NO-STATE)
>> |
>> | Insert an inline task.
>> | If prefix arg NO-STATE is set, ignore `org-inlinetask-default-state'.
>> `
>>
>>
> This isn't working for me and it's been quite difficult to find mention of
> inline tasks in documentation. My searching only pulls a mention from the
> 6.29v list of visible changes:
> http://orgmode.org/Changes_old.html#sec-1_1_6
>
> Is there something I need to set up to get this working?
>
>
> Thanks,
> John
>
>
>> You can then customise =org-inlinetask-export-templates= to
>> generate latex code that basically ignores the inline task.
>>
>> --
>> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
>> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>>
>
>
___
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] [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Chris Maier
The begin_dot is part of org-exp-blocks, as I understand it, and
appears required to make it evaluate the Dot code, create the image
file, and then incorporate that into the exported document (LaTeX,
HTML, etc.)

Thanks,
Chris

On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
> Chris Maier  writes:
>
>> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
>> it's possible to hit C-c ' and edit the block code in a separate
>> buffer with the appropriate mode.  This doesn't appear to work when
>> using org-exp-blocks to edit a "begin_dot" block.
>>
>> Is there a command to do this?
>
> No idea but what about using #+begin_src dot ... #+end_src?
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.324.gca7a)
>

___
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] org-bbdb: allow anniversaries with unknown years

2011-02-09 Thread Christoph Groth
Thomas Baumann  writes:

> Christoph Groth  writes:
>
>> Anniversaries in BBDB can be now also specified in the format MM-DD
>> next to -MM-DD.

> The ChangeLog should mention that any customized
> "org-bbdb-anniversary-format-alist" has to be updated, otherwise there
> will be an "Bad sexp at line 637 in /home/tb/org/diary.org:
> (org-bbdb-anniversaries)" error with the new format.

Yes, this patch breaks compatibility, so this should be documented in
the proper place.  I didn't as I'm not sure about the policies of
orgmode here.

Christoph


___
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] [babel] common lisp / slime evaluation in org-mode

2011-02-09 Thread Erik Iverson

Hello,

I have started playing around with SLIME and was pleased to find there
was already some support in org-mode for evaluating Common LISP
blocks. The comments in ob-lisp.el makes it clear that it is not
complete support yet. It appears for example that you can only
evaluate one lisp form per code block. Here is an example.

* First, let's try in emacs lisp

The following works how I would expect. The value in the results block
is the value of the last expression in the code block.

#+begin_src emacs-lisp

(defvar test1 "test1 value")
(defvar test2 "test2 value")
test2

#+end_src

#+results:
: test2 value

* Now, let's try common lisp

First, we need to start up a SLIME session, with M-x slime. This
assumes you have SLIME set up correctly. I am using SBCL as my CL
environment in this example.

#+begin_src lisp :session

(defvar test1 "test1 value")
(defvar test2 "test2 value")
test2

#+end_src

#+results:
: TEST1

You see the result in the buffer is the value of the first form, and
if I go into the inferior-lisp buffer, test2 is not bound to any
value. If I evaluate the CL code block above without the :session
argument, I get an error in the *Org-Babel Error Output* buffer.

Looking at the code in ob-lisp.el, I think I see why this is
happening, but don't know enough about SLIME yet to make it work. It
seems that line that calls =eval-slime= would need to be changed to
=eval-slime-buffer= after dumping the code block into a temporary
buffer. However, that didn't quite work since that function
(=slime-eval-buffer=) doesn't appear to actually return the final
value.

So, I write this in case this is an easy fix for someone with more
knowledge of SLIME, and to confirm that this is indeed the current
behavior that others see. I will continue to investigate a solution.

Thanks,
--Erik

___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
Hi,

Following my short presentation at the Paris OrgCamp, I've now written a
page and officially released org-contacts. It is a contact manager based
on Org, that can possibly replace BBDB for certain usage.

   http://julien.danjou.info/org-contacts.html

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpLeBYyndtfp.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: [ANN] Changes to lists

2011-02-09 Thread Achim Gratz
Nicolas Goaziou  writes:
> I've pushed a change in that direction. Unchecked boxes do not rely
> anymore on visibility:hidden style property.

Looks OK, but the space should probably be replaced by   to avoid
possible tearing of the checkbox.  The regex for matching does not
catch "[-]", which explains why this type of checkbox is not boldened.
I think something like

  (if (string-match "^[ \t]*\\[\\([X -]\\)\\]" line)
  (setq line
(replace-match
 (if (equal (match-string 1 line) " ")
 "[ ]"
   (concat "[" (match-string 1 line) "]")
 t t line

should work, but I don't have enough experience with the string
replacement functions to be sure that it always does.

Meanwhile I've encountered the same questionable construct in the HTML
export of "\\___" (whitespace placeholder).


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra


___
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: [ANN] Changes to lists

2011-02-09 Thread Achim Gratz
Achim Gratz  writes:
> I've found some time today to install the new-struct branch at my work
> machine.  Things look good so far and the checkboxes have started to
> work again. :-)

I've since been working with the code (and doing the occasional pull)
without noticing any ill effects.  I'd like to see this included in the
next official orgmode release.

Thank you Nicolas!


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


___
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] Automatic noexport tag based on rules?

2011-02-09 Thread John Hendy
On Wed, Feb 9, 2011 at 12:13 PM, Nicolas Goaziou wrote:

> Hello,
>
> > Eric S Fraga writes:
> > You can then customise =org-inlinetask-export-templates= to generate
> > latex code that basically ignores the inline task.
>
> For the record, if the goal is to completely ignore inline tasks upon
> exporting, you should set org-inlinetask-export to nil instead of
> modifying org-inlinetask-export-templates.
>
>
Yes -- I read org-inlinetask.el and saw this setting in the preamble. I
added

,---
| (setq org-inlinetask-export nil)
`---

to .emacs and it works.

John


> Regards,
>
> --
> Nicolas
>
___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread John Hendy
On Wed, Feb 9, 2011 at 3:02 AM, Julien Danjou  wrote:

> Hi,
>
> Following my short presentation at the Paris OrgCamp, I've now written a
> page and officially released org-contacts. It is a contact manager based
> on Org, that can possibly replace BBDB for certain usage.
>
>   http://julien.danjou.info/org-contacts.html
>
>
This is awesome. I was using bbdb but got tired of it. I switched to the
contacts method mentioned on the mailing list a time ago about just doing
something like this (which is also the approx format you've used):

,-
| * Category
| ** Name
|   :PROPERTIES:
|   :Phone: xxx
|   :Email: b...@blah.com
|   ...etc.
|   :END:
`-

>From skimming the website and org-contacts.el, is the main advantage that it
can search multiple files as well as integrate with gnus? I don't use gnus
(can't access personal email via pop/imap from behind work firewall) and so
that feature isn't wholly attractive. It looks like I could use the remember
template as well for my current method. Is there something else that you
would put forth as the primary benefits of this system? I'm quite interested
in it.

A few other questions:
-- can you add additional fields? It looks like I could keep repeating the
pattern in your .el like so:
,-
|(defcustom org-contacts-SOME-NAME-property "SOME-NAME"
|  "Name of the property for contact email address."
|  :type 'string
|  :group 'org-contacts)
`-

-- I will often need to look up a contact at work and reproduce it in an
email. It would be nice to standardize the order of the properties and then
have a way to "export" the whole contact into the kill-ring for pasting into
email format. Do you think something like that could be integrated? For
example 'M-x export-selected-contact' would take the highlighted area and
create:

,-
| Name
| Title
| Company
| Email
| Phone
`-

And perhaps one could define the fields for export (I wouldn't, for example,
hardly ever need to export the address and my notes about the contact).

Just my thoughts! I was very excited to see this in my inbox and look
around. I'm assuming with the right fields, my current system would already
be in the right syntax to integrate with this, so I'm interested to hear
your answers to the above.


Thanks for your work,
John


> --
> Julien Danjou
> ❱ http://julien.danjou.info
>
> ___
> 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
>
>
___
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: [ANN] Changes to lists

2011-02-09 Thread Nicolas Goaziou
Hello,

> Achim Gratz writes:

> Nicolas Goaziou  writes:
>> I've pushed a change in that direction. Unchecked boxes do not rely
>> anymore on visibility:hidden style property.

> Looks OK, but the space should probably be replaced by   to
> avoid possible tearing of the checkbox. The regex for matching does
> not catch "[-]", which explains why this type of checkbox is not
> boldened. I think something like

Checkboxes are not boldened anymore since that patch. They are
enclosed in  tags. You may be, somehow, looking at old code.

Regards,

--
Nicolas

___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Tassilo Horn
Julien Danjou  writes:

Hi Julien,

> Following my short presentation at the Paris OrgCamp, I've now written
> a page and officially released org-contacts. It is a contact manager
> based on Org, that can possibly replace BBDB for certain usage.
>
>http://julien.danjou.info/org-contacts.html

Awesome, Julien!  I'll give it a try as soon as I find some time.

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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread John Hendy
On Wed, Feb 9, 2011 at 3:02 AM, Julien Danjou  wrote:

> Hi,
>
> Following my short presentation at the Paris OrgCamp, I've now written a
> page and officially released org-contacts. It is a contact manager based
> on Org, that can possibly replace BBDB for certain usage.
>
>   http://julien.danjou.info/org-contacts.html
>
>
I just gave it a whirl, but am having a strange result. Here were my steps:
- org-contacts.el moved to load path
- added =(require 'org-contacts)= to .emacs
- created ~/org/contact-example.org and used your website's example of Dave
Null
- I used org-customize to set the definition of the =org-contacts-files=
variable like so:
,-
| (custom-set-variables
| '(org-contacts-files "/home/jwhendy/org/contact-example.org"))
`-
- restarted emacs and did 'M-x org-contacts' followed by typing "dave"
- the minibuffer shows the following:
,-
| non-existent agenda file ~/org/#+startup: showeverything. [R]emove from
list or [A]bort?
`-

Removing the line just moves to the next line and asks if I want to remove
'~/org/* Friends', then '~/org/** Dave Null' and so on.

What am I doing wrong?


Best regards,
John



> --
> Julien Danjou
> ❱ http://julien.danjou.info
>
> ___
> 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
>
>
___
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][babel] Problem using noweb

2011-02-09 Thread Eric S Fraga
andy  writes:

> I want to take advantage of babel's noweb capabilities, but I can't seem
> to get it to work. I'm sure there is something trivial wrong with my
> source block, but after looking at the documentation and looking at the
> examples I can find on the web, I think this should work.
>
> I define a variable in test-block, but it's not there, even though
> test-block should be getting pulled in when I run the source block, bar.
> What am I doing wrong? My .emacs has R defined and indeed, the session
> *R* starts up without any problems and the print statement works, but
> test-block just isn't there.
>
> * Foo
> ** Bar
> #+src_name: bar
> #+begin_src R :noweb yes :session *R*
>   <>
>   print("I am here")
>   a
> #+end_src
>
> * test-block
> #+src_name: test-block
> #+begin_src R :session *R*
>   a <- c(1,2,3,4,5)
> #+end_src
>
>
> thanks
> --andy

I believe that you need to specify noweb on every source block,
including the one you wish to include.  That's what I had to do, in any
case, if I remember correctly...  haven't tried it on your code as my
train is pulling into the station and I have to run! ;)

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.330.g7473e)

___
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: [ANN] Changes to lists

2011-02-09 Thread Achim Gratz
Nicolas Goaziou  writes:
> Checkboxes are not boldened anymore since that patch. They are
> enclosed in  tags. You may be, somehow, looking at old code.

Indeed I was on a branch that hadn't been fully merged with your latest
changes, sorry for the confusion.  But I sustain the suggestion for
  instead of a space character. :-)


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Sébastien Vauban
Hi Julien,

John Hendy wrote:
> From skimming the website and org-contacts.el, is the main advantage that it
> can search multiple files as well as integrate with gnus?

This looks very neat. Thanks for sharing.

>From skimming on the available docs, would I be right to state that the only
missing *features set* (vs bbdb) is the *scanning done on the incoming mails*:
detecting a new email address, asking to add it, eventually as the primary
one, detecting the Organization field and storing it, parsing the X-Face and
storing it, etc.?

Would such features be added in the future?  Or do we have to choose for the
simplicity of the new format, eventually losing some minor features?

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: [babel] Problem using noweb

2011-02-09 Thread Dan Davison
Eric S Fraga  writes:

> andy  writes:
>
>> I want to take advantage of babel's noweb capabilities, but I can't seem
>> to get it to work.
[...]
>> * Foo
>> ** Bar
>> #+src_name: bar
>> #+begin_src R :noweb yes :session *R*
>>   <>
>>   print("I am here")
>>   a
>> #+end_src
>>
>> * test-block
>> #+src_name: test-block
>> #+begin_src R :session *R*
>>   a <- c(1,2,3,4,5)
>> #+end_src
>>

Hey Andy,

I hope this didn't detain you too long, because you were basically doing
nothing wrong. Except... #+srcname has no underscore in it!

> I believe that you need to specify noweb on every source block,
> including the one you wish to include.

Nope. :) Only bar needs :noweb above.

Dan

>  That's what I had to do, in any
> case, if I remember correctly...  haven't tried it on your code as my
> train is pulling into the station and I have to run! ;)

___
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] Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
On Wed, Feb 09 2011, John Hendy wrote:

> From skimming the website and org-contacts.el, is the main advantage that it
> can search multiple files as well as integrate with gnus? I don't use gnus
> (can't access personal email via pop/imap from behind work firewall) and so
> that feature isn't wholly attractive. It looks like I could use the remember
> template as well for my current method. Is there something else that you
> would put forth as the primary benefits of this system? I'm quite interested
> in it.

Not yet. I'm working with Bastien to integrate a set of patches so the
`org-contacts' function will print contacts in a better way.

They will probably be more at the time come, we'll see.

> A few other questions:
> -- can you add additional fields? It looks like I could keep repeating the
> pattern in your .el like so:
> ,-
> |(defcustom org-contacts-SOME-NAME-property "SOME-NAME"
> |  "Name of the property for contact email address."
> |  :type 'string
> |  :group 'org-contacts)
> `-

You add what you want. Org-contacts does not care at all. It just use
some fields like EMAIL for Gnus completion, so it has to know it. Other
fields are up to your choices.

> -- I will often need to look up a contact at work and reproduce it in an
> email. It would be nice to standardize the order of the properties and then
> have a way to "export" the whole contact into the kill-ring for pasting into
> email format. Do you think something like that could be integrated? For
> example 'M-x export-selected-contact' would take the highlighted area and
> create:
>
> ,-
> | Name
> | Title
> | Company
> | Email
> | Phone
> `-
>
> And perhaps one could define the fields for export (I wouldn't, for example,
> hardly ever need to export the address and my notes about the
> contact).

That would be easy. Maybe a vcard export even?

> Just my thoughts! I was very excited to see this in my inbox and look
> around. I'm assuming with the right fields, my current system would already
> be in the right syntax to integrate with this, so I'm interested to hear
> your answers to the above.

I think so, yes. Org-contacts let you be free about how you manage your
contacts, so it should adapt to your current organization.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpJQXIL0d0HX.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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Julien Danjou
On Wed, Feb 09 2011, Sébastien Vauban wrote:

> From skimming on the available docs, would I be right to state that the only
> missing *features set* (vs bbdb) is the *scanning done on the incoming mails*:
> detecting a new email address, asking to add it, eventually as the primary
> one, detecting the Organization field and storing it, parsing the X-Face and
> storing it, etc.?
>
> Would such features be added in the future?  Or do we have to choose for the
> simplicity of the new format, eventually losing some minor features?

Snarffing info from known contacts and adding other mail addresses
email, faces, etc is planned.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpIN6v5gs085.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: [babel] Problem using noweb

2011-02-09 Thread andy


On 02/09/2011 03:27 PM, Dan Davison wrote:
> Eric S Fraga  writes:
>
>> andy  writes:
>>
>>> I want to take advantage of babel's noweb capabilities, but I can't seem
>>> to get it to work.
> [...]
>>> * Foo
>>> ** Bar
>>> #+src_name: bar
>>> #+begin_src R :noweb yes :session *R*
>>>   <>
>>>   print("I am here")
>>>   a
>>> #+end_src
>>>
>>> * test-block
>>> #+src_name: test-block
>>> #+begin_src R :session *R*
>>>   a <- c(1,2,3,4,5)
>>> #+end_src
>>>
> Hey Andy,
>
> I hope this didn't detain you too long, because you were basically doing
> nothing wrong. Except... #+srcname has no underscore in it!
>

That got it. Thanks. I am feeling a little silly right now.

>> I believe that you need to specify noweb on every source block,
>> including the one you wish to include.
> Nope. :) Only bar needs :noweb above.
>
> Dan
>
>>  That's what I had to do, in any
>> case, if I remember correctly...  haven't tried it on your code as my
>> train is pulling into the station and I have to run! ;)

-- 
I climb things up so I can ski them DOWN!


___
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: Announcing org-contacts, a bbdb-like contact manager for Org

2011-02-09 Thread Russell Adams
On Wed, Feb 09, 2011 at 09:43:33PM +0100, Julien Danjou wrote:
> On Wed, Feb 09 2011, S??bastien Vauban wrote:
>
> > From skimming on the available docs, would I be right to state that the only
> > missing *features set* (vs bbdb) is the *scanning done on the incoming 
> > mails*:
> > detecting a new email address, asking to add it, eventually as the primary
> > one, detecting the Organization field and storing it, parsing the X-Face and
> > storing it, etc.?
> >
> > Would such features be added in the future?  Or do we have to choose for the
> > simplicity of the new format, eventually losing some minor features?
>
> Snarffing info from known contacts and adding other mail addresses
> email, faces, etc is planned.
>
> --
> Julien Danjou
> ??? http://julien.danjou.info

I currently have lbdb caching incoming addresses to it's own format,
not Org. Then I have my contacts in Org, and I have a perl plugin for
lbdb to find my Org contacts when I trigger a quick lookup from mutt.

If there's interest, I'll post the relevant portions.

Thanks.



--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

___
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: [ANN] Changes to lists

2011-02-09 Thread Nicolas Goaziou

> Achim Gratz writes:

> But I sustain the suggestion for   instead of a space
> character. :-)

Done. You may need to use -f flag.

Thank you for the suggestion,

--
Nicolas

___
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: [babel] Problem using noweb

2011-02-09 Thread Eric S Fraga
Dan Davison  writes:

> Eric S Fraga  writes:

[...]

>
>> I believe that you need to specify noweb on every source block,
>> including the one you wish to include.
>
> Nope. :) Only bar needs :noweb above.

Thanks for the correction!  this is one of those cases of having tried
all kinds of things, I never did know what it is that I had done to get
noweb working but convinced myself that it was adding :noweb yes to
everything that did it!


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.330.g7473e.dirty)

___
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: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Eric Schulte
Dan Davison  writes:

> Eric S Fraga  writes:
>
>> Chris Maier  writes:
>>
>>> The begin_dot is part of org-exp-blocks, as I understand it, and
>>> appears required to make it evaluate the Dot code, create the image
>>> file, and then incorporate that into the exported document (LaTeX,
>>> HTML, etc.)
>>>
>>> Thanks,
>>> Chris
>>>
>>> On Wed, Feb 9, 2011 at 3:56 AM, Eric S Fraga  wrote:
 Chris Maier  writes:

> In "normal" Org code blocks (e.g. #+begin_src clojure  #+end_src)
> it's possible to hit C-c ' and edit the block code in a separate
> buffer with the appropriate mode.  This doesn't appear to work when
> using org-exp-blocks to edit a "begin_dot" block.
>
> Is there a command to do this?

 No idea but what about using #+begin_src dot ... #+end_src?
 --
 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 : using Org-mode version 7.4 (release_7.4.324.gca7a)

>>
>> Yes, I know; I used to use begin_dot and begin_ditaa quite a bit.  My
>> understanding is that babel knows about dot and therefore provides the
>> same functionality, albeit in a different way,
>
> I vote for removing / deprecating the dot and ditaa functionality of
> org-exp-blocks.
>

I also vote for removing the dot and ditaa block types from
org-exp-blocks, left over from before the existence of begin_src blocks.
As the original developer of org-exp-blocks, I no longer maintain it in
favor of focusing on begin_src blocks.

The only downside to removing these block types is breaking existing
Org-mode files... Perhaps we could add a deprecation warning which will
appear as a message every time a begin_dot or begin_ditaa blocks is
evaluate, then after a month or so of warning we can remove those blocks
entirely.

Thoughts? -- Eric

___
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: [babel] After Tangle Change File Permission

2011-02-09 Thread Eric Schulte
Dan Davison  writes:

> Ian Barton  writes:
>
>> I am starting to use babel to maintain my collection of shell
>> scripts. I want to automate the process as much as possible, so I
>> would like to be able to set the execute bit on my tangled .sh scripts
>> after the tangle process.
>>
>> I see that there is an after-tangle hook. Can anyone give me some
>> hints as to how I might use this to execute a chmod *.sh on the
>> directory containing my tangles shell scripts.
>
> Hi Ian,
>
> It looks like Eric has already implemented this particular case in a
> different way: if the :shebang header arg is set, then the file will be
> made executable. E.g. :shebang #!/bin/bash.
>

True this is probably the easiest way.

>
> However, to use the hook function, does something like this not work?
>
> #+begin_src emacs-lisp
> (defun dan/make-tangled-shell-files-executable () (shell-command "chmod +x 
> *.sh"))
> (add-hook 'org-babel-post-tangle-hook 
> 'dan/make-tangled-shell-files-executable)
> #+end_src
>

The org-babel-post-tangle-hook is evaluated in the tangled file, so the
following should work as well...

#+begin_src emacs-lisp
  (defun eric/make-tangled-files-executable ()
(set-file-modes (buffer-file-name) #o755))
  (add-hook 'org-babel-post-tangle-hook 'eric/make-tangled-files-executable)
#+end_src

>
> I admit I was getting some inconsistent results just then that I didn't
> understand. It should be possible to use
>
> #+begin_src emacs-lisp
> (add-hook 'org-babel-post-tangle-hook
> 'dan/make-tangled-shell-files-executable nil 'local)
> #+end_src
>
> so that the hook is set locally for the buffer in question.
>
> The code is
>
> #+begin_src emacs-lisp
>   (when org-babel-post-tangle-hook
>   (mapc
>(lambda (file)
>  (org-babel-with-temp-filebuffer file
>(run-hooks 'org-babel-post-tangle-hook)))
>path-collector))
> #+end_src
>
> , where `path-collector' is a list of tangled files. I believe that this
> implies that, each time the hook is run, default-directory will be equal
> to the directory containing the file in question,

true

> so the shell-command should run in that directory. Otoh, the above
> shows that the hook is run for each tangled file, so chmod +x *.sh
> would be executed more times than necessary.
>

yes, I think the solution above should be a little bit more efficient.

Cheers -- Eric

>
> Dan
>
>>
>> Ian.
>>
>> ___
>> 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
>
> ___
> 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

___
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] [babel] common lisp / slime evaluation in org-mode

2011-02-09 Thread Eric Schulte
Hi Erik,

I've been switching from Clojure to Common Lisp myself, and have also
found that there are some issues with ob-lisp.el (although I've been too
busy recently to look closely at them).

ob-clojure.el works well, and uses slime for code evaluation -- and it
has a simpler setup than ob-lisp -- so maybe it would be possible to
port the code in ob-clojure over to common lisp?

I'll be happy to help get ob-lisp.el into shape once I have a free
moment...

Cheers -- Eric

Erik Iverson  writes:

> Hello,
>
> I have started playing around with SLIME and was pleased to find there
> was already some support in org-mode for evaluating Common LISP
> blocks. The comments in ob-lisp.el makes it clear that it is not
> complete support yet. It appears for example that you can only
> evaluate one lisp form per code block. Here is an example.
>
> * First, let's try in emacs lisp
>
> The following works how I would expect. The value in the results block
> is the value of the last expression in the code block.
>
> #+begin_src emacs-lisp
>
> (defvar test1 "test1 value")
> (defvar test2 "test2 value")
> test2
>
> #+end_src
>
> #+results:
> : test2 value
>
> * Now, let's try common lisp
>
> First, we need to start up a SLIME session, with M-x slime. This
> assumes you have SLIME set up correctly. I am using SBCL as my CL
> environment in this example.
>
> #+begin_src lisp :session
>
> (defvar test1 "test1 value")
> (defvar test2 "test2 value")
> test2
>
> #+end_src
>
> #+results:
> : TEST1
>
> You see the result in the buffer is the value of the first form, and
> if I go into the inferior-lisp buffer, test2 is not bound to any
> value. If I evaluate the CL code block above without the :session
> argument, I get an error in the *Org-Babel Error Output* buffer.
>
> Looking at the code in ob-lisp.el, I think I see why this is
> happening, but don't know enough about SLIME yet to make it work. It
> seems that line that calls =eval-slime= would need to be changed to
> =eval-slime-buffer= after dumping the code block into a temporary
> buffer. However, that didn't quite work since that function
> (=slime-eval-buffer=) doesn't appear to actually return the final
> value.
>
> So, I write this in case this is an easy fix for someone with more
> knowledge of SLIME, and to confirm that this is indeed the current
> behavior that others see. I will continue to investigate a solution.
>
> Thanks,
> --Erik
>
> ___
> 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

___
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] allout-mode + Babel

2011-02-09 Thread Eric Schulte
I'm not sure what sort of text allout-mode uses to indicate outline
headers, but perhaps this could be accomplished simply by customizing
the `org-babel-tangle-comment-format-end' and
`org-babel-tangle-comment-format-end' variables.  They are templates
which specify how the comments around code blocks are formed.

Cheers -- Eric

Jambunathan K  writes:

> Discovered allout-mode today. It permits outline navigation in code
> buffers. I am surprised to see that some of the stuff within org-mode
> itself is inspired by the allout library.
>
> If Babel could tangle so that the output file is allout navigable that
> would be interesting. This has never before surfaced in the mailing
> list. So here I go ...
>
> http://www.emacswiki.org/emacs/AllOut
>
> Jambunathan K.
>
>
>
> ___
> 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

___
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] [babel] common lisp / slime evaluation in org-mode

2011-02-09 Thread Erik Iverson

On 02/09/2011 07:18 PM, Eric Schulte wrote:

Hi Erik,

I've been switching from Clojure to Common Lisp myself, and have also
found that there are some issues with ob-lisp.el (although I've been too
busy recently to look closely at them).

ob-clojure.el works well, and uses slime for code evaluation -- and it
has a simpler setup than ob-lisp -- so maybe it would be possible to
port the code in ob-clojure over to common lisp?

I'll be happy to help get ob-lisp.el into shape once I have a free
moment...


Great, in the mean time, I'll definitely take a stab at it and submit
a patch if I fix my issue. Thanks for the tip!

--Erik


___
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: [BABEL] Editing dot blocks with org-exp-blocks

2011-02-09 Thread Chris Maier
On Wed, Feb 9, 2011 at 11:14 AM, Dan Davison  wrote:
> Chris Maier  writes:
>> Is there a way to explicitly associate an major mode with a particular
>> kind of language block?
>
> Hi Chris,
>
> Yes, see the variable org-src-lang-modes. Use customize, or something
> like this:
>
> #+begin_src emacs-lisp
> (aput 'org-src-lang-modes "dot" 'graphviz-dot)
> #+end_src
>
> (Elisp question: I can't remember why we don't use aput in org-mode?
> What's the idiomatic org way of doing that?
>
> This
>
> #+begin_src emacs-lisp
> (setq org-src-lang-modes
>      (append '(("dot" . graphviz-dot))
>              (delq (assoc "dot" org-src-lang-modes)
>                    org-src-lang-modes)))
> #+end_src
>
> doesn't work if there's already more than one entry for "dot")
>
> Dan

org-src-lang-modes I knew I'd seen it somewhere!  Thanks for the tip, Dan.

Chris

___
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