Re: [Orgmode] Org-babel init

2010-07-13 Thread Jordi Inglada
Hi Eric,

That worked. I am ready to go now!

Thank you!

Jordi

Eric Schulte writes:
  Hi Jordi,
  
  The attached simple-init.el file works for me with
  
emacs -Q -l simple-init.el
  
  Emacs started w/o error, and I was able to evaluate python code blocks
  with no problem.
  
  Please give it a try and let me know if it doesn't work -- Eric
  
  (note you'll have to update the path to org/lisp)
  xapplication/emacs-lisp[Click mouse-2 to save to a file]
  
  Jordi Inglada jordi.ingl...@cesbio.cnes.fr writes:
  
   Eric,
  
   Thanks for the answer.
  
   If I do that using emacs -q, I get this message when loading the
   configuration:
  
   Symbol's value as variable is void: org-babel-tangle-lang-exts
  
   An after that when trying to evaluate this block from the tutorial
  
   #+begin_src python
   import time
   print(Hello, today's date is %s % time.ctime())
   print('Two plus two is')
   return 2 + 2
   #+end_src
  
   I get this other message:
  
   org-babel-execute-src-block: No org-babel-execute function for python!
  
   If I put the configuration in my .emacs, the error I get is:
  
   org-babel-result-hash: Symbol's value as variable is void: 
   org-babel-lob-one-liner-regexp
  
   I guess I missed something.
  
   Thanks.
  
   Jordi
  
   Eric Schulte writes:
 Hi Jordi,
 
 With the latest Org-mode from Git, Org-babel is now part of Org-mode, so
 you no longer need to add the contrib directory to your load path, or
 require org-babel-init.  The following should work for you.
 
 (setq load-path (cons /home/inglada/local/src/org-mode/lisp 
   load-path))
 (require 'org-install)
 (require 'ob-python)
 
 note that for a language-specific require, you now prefix the language
 name with ob- rather than org-babel-
 
 For more complete information on the new setup, see
 
   http://eschulte.github.com/babel-dev/DONE-document-configuration-changes-for-Babel-integration.html
 
 Cheers -- Eric
 
 Jordi Inglada jordi.ingl...@cesbio.cnes.fr writes:
 
  Hi all,
 
  I am having the same problem as this user here:
 
  http://www.mail-archive.com/emacs-orgmode@gnu.org/msg17498.html
 
  and the contrib/lisp directory is indeed in my load path.
 
  I am using a git changeset cloned today (Org-mode version 6.34trans
  (release_6.36.608.gc1ef)).
 
  I have tried using emacs -q and then loading an .el file containing
  only the following lines:
 
  (setq load-path (cons /home/inglada/local/src/org-mode/lisp 
   load-path))
  (setq load-path (cons /home/inglada/local/src/org-mode/contrib/lisp 
   load-path))
 
  (require 'org-install)
  (require 'org-babel-init)
  (require 'org-babel-python)
 
  and I get the same result.
 
  Thank you very much for your help.
 
  Jordi
 
  ___
  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: [google] updated awk script for google to org conversion

2010-07-13 Thread Sven Bretfeld
Michael Steiner michistei...@verizon.net writes:

 On 2010-07-12 05:22, Rémi Vanicat wrote:
 Sven Bretfeldsven.bretf...@gmx.ch  writes:
 you could use auto-revert-mode:

 That's what i do: i slightly changed ical2org.awk by replacing line 77

  print #+TITLE: Main Google calendar entries

 with

  print #+TITLE: Main Google calendar entries -*- mode:
 auto-revert; mode: org; -*-

Thank you very much. I will try that.

Greetings, 

Sven

___
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] tangling with leaving non-source code lines as empty lines?

2010-07-13 Thread Dr Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Eric,

On Mon, Jul 12, 2010 at 8:04 PM, Eric Schulte schulte.e...@gmail.comwrote:

 Hi Rainer,

 If I'm understand you correctly you want the absolute position (by LOC)
 of the lines of R code to be the same in both the original org file and
 the tangled file or R code.


That's right - that's what I was thinking about.


 I don't think this is possible.  It is
 possible to tangle code blocks in any order (not just the order in which
 they appear in the original org file), so there are many valid tangling
 scenarios in which this feature could not work.


Accepted - under these circumstances it would only concern a special case
where the whole file is tangled in order to another R file. I agree, that
other solutions would be more useful - please see comments below.


 Rather, I think that it may make sense to have a function for jumping
 back and forth between tangled code blocks and the related Org file.  In
 that case the R errors could be followed to the tangled R code file,
 from which you could easily jump to the relevant line in the relevant
 code block in the Org file.


That sounds perfect to me.


 If you are tangling with comments, then it
 should be possible to have a function called from a line in a tangled
 code file which when called

 1) finds it's enclosing comments
 2) remembers it's offset from the comments (which would then be it's
   offset in the code block in the Org file)
 3) read the comment to learn which code block in which Org file it's
   tangled from
 4) jump to the relevant line, in the relevant block, in the relevant
   file


That would be really be useful for literate programming and the following
debugging.


 Similarly when called form within a code block in an Org file the
 function could

 1) read it's header argument to find the relevant tangled code file
 2) jump to that file
 3) use the comments in that file to move to the appropriate section of
   code and related line


Also quite useful, although I don't see an immediate use for this, as the
code file is dynamic, and changing it would not make much sense (unless, and
now I am probably dreaming, one could sync the changes back into the .org
file into the blocks. In that way, one could debug the code file as one
would a normal code file and sync it, after it is working, back into the
.org file. Comments could be used to define the blocks. Although, I guess
that could cause problems with more advanced features on babel, which I am
not using (yet?).)

Another important aspect of a function lie that could be to be able to type
in the line number in the code file (from e.g. an error message) and to jump
to the corresponding line in the .org file. That would directly address my
suggestion above in a MUCH more elegant and efficient way.


 I'll think about such a function, and if it makes sense to implement it
 apart from a more general activate org-mode links in comments minor
 mode.  Any ideas or suggestions would be welcome!


I think that both functions would be extremely useful. The one outlined
above as a tool for debugging and the links in org-mode comments as kind
of backward linking documentation.

Let me know if you have anything you want me to test.

Cheers,

Rainer



 Thanks -- Eric

 Rainer M Krug r.m.k...@gmail.com writes:

  Hi Eric,
 
  would it be possible, when tangling, to leave lines without source code
 in
  the resulting code file as empty lines? The reasoning would be that error
  messages (at least in R) give the line in which the error occurred. If
 the
  line numbers in which the code sits would be preserved (by leaving empty
  lines where no code is in the .org file), debugging would be much easier.
 
  By the way: I am using the after tangle hook and it works absolutely
  perfectly.
 
  Thanks and cheers,
 
  Rainer




- -- 
NEW GERMAN FAX NUMBER!!!

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

Cell:   +27 - (0)83 9479 042
Fax:+27 - (0)86 516 2782
Fax:+49 - (0)321 2125 2244
email:  rai...@krugs.de

Skype:  RMkrug
Google: r.m.k...@gmail.com

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

iEYEARECAAYFAkw8GhMACgkQoYgNqgF2egqtdQCfY9TTM9MRWftZHEQhbA4zLqMe
qZ8AnjT2p3hRf/vr+lMTCbe9djOk7HAC
=i/Z5
-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] tangling with leaving non-source code lines as empty lines?

2010-07-13 Thread Dr Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 13/07/2010 02:46, Eric Schulte wrote:
 Hi Rainer,
 
 With the tangling comments generated by the latest Org-mode, the
 following function should be able to jump from any code in a tangled
 code file back to the relevant block in the original Org-mode file.

Wow - that was quick.

Thanks.

 
 --8---cut here---start-8---
 (defun org-babel-tangle-jump-to-org ()
   Jump from a tangled code file to the related Org-mode file.
   (interactive)
   (let ((mid (point))
   target-buffer target-char
   start end link path block-name)
 (save-window-excursion
   (save-excursion
   (unless (and (re-search-backward org-bracket-link-analytic-regexp nil t)
(setq start (point))
(setq link (match-string 0))
(setq path (match-string 3))
(setq block-name (match-string 5))
(re-search-forward (concat   (regexp-quote block-name)
ends here[\n\r]) nil t)
(setq end (point))
( start mid) ( mid end))
 (error not in tangled code)))
   (when (string-match :: path)
   (setq path (substring path 0 (match-beginning 0
   (find-file path) (setq target-buffer (current-buffer))
   (goto-char start) (org-open-link-from-string link)
   (if (string-match [^ \t\n\r]:\\([[:digit:]]+\\) block-name)
 (org-babel-next-src-block
  (string-to-int (match-string 1 block-name)))
   (org-babel-goto-named-src-block block-name))
   (setq target-char (point)))
 (pop-to-buffer target-buffer)
 (goto-char target-char)))
 --8---cut here---end---8---
 

I tried it out, and realised that one needs to name the blocks
(#+srcname:) to be able to use it. Then it jumps to the code block in
the org file.

Two more things (As pointed out in the other email) would be nice:

1) it would be nice to jump to the line of code in the Org-mode file
which corresponds to the line in the code file

2) It would be brilliant, if one could call the function from the
Org-file buffer and enter the line number and then jump to the block /
line in the block.

In addition:
3) it would be very useful, if this function could be used with
non-named source blocks.

But that function is already quite usefull.

Thanks,

Rainer


 This is too large of a block of untested code to push into Org-mode now,
 however please give it a try, and let me know if you think this could be
 generally useful.  Hopefully after the feature-freeze we can fold
 something like this into Babel to ease navigation between Org files and
 their tangled offspring.
 
 Cheers -- Eric
 
 Eric Schulte schulte.e...@gmail.com writes:
 
 Hi Rainer,

 If I'm understand you correctly you want the absolute position (by LOC)
 of the lines of R code to be the same in both the original org file and
 the tangled file or R code.  I don't think this is possible.  It is
 possible to tangle code blocks in any order (not just the order in which
 they appear in the original org file), so there are many valid tangling
 scenarios in which this feature could not work.

 Rather, I think that it may make sense to have a function for jumping
 back and forth between tangled code blocks and the related Org file.  In
 that case the R errors could be followed to the tangled R code file,
 from which you could easily jump to the relevant line in the relevant
 code block in the Org file.  If you are tangling with comments, then it
 should be possible to have a function called from a line in a tangled
 code file which when called

 1) finds it's enclosing comments
 2) remembers it's offset from the comments (which would then be it's
offset in the code block in the Org file)
 3) read the comment to learn which code block in which Org file it's
tangled from
 4) jump to the relevant line, in the relevant block, in the relevant
file

 Similarly when called form within a code block in an Org file the
 function could

 1) read it's header argument to find the relevant tangled code file
 2) jump to that file
 3) use the comments in that file to move to the appropriate section of
code and related line

 I'll think about such a function, and if it makes sense to implement it
 apart from a more general activate org-mode links in comments minor
 mode.  Any ideas or suggestions would be welcome!

 Thanks -- Eric

 Rainer M Krug r.m.k...@gmail.com writes:

 Hi Eric,

 would it be possible, when tangling, to leave lines without source code in
 the resulting code file as empty lines? The reasoning would be that error
 messages (at least in R) give the line in which the error occurred. If the
 line numbers in which the code sits would be preserved (by leaving empty
 lines where no code is in the .org file), debugging would be much easier.

 By the way: I am using the after 

Re: [Orgmode] [babel] feature request - tangle-and-evaluate-tangled-file

2010-07-13 Thread Dr Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/07/2010 19:51, Eric Schulte wrote:
 Rainer M Krug r.m.k...@gmail.com writes:
 
 Hi Eric,

 On Fri, Jul 9, 2010 at 5:44 PM, Eric Schulte schulte.e...@gmail.com wrote:

 Hi Rainer,

 Rainer M Krug r.m.k...@gmail.com writes:

 On Thu, Jul 8, 2010 at 9:03 PM, Eric Schulte schulte.e...@gmail.com
 wrote:
 [...]

 (add-hook 'org-babel-post-tangle-hook
  (lambda () (ess-load-file (buffer-file-name


 Unfortunately, this does not work. I put the code above into my
 emacs.organd nothing happens - not even an error message. I tried to
 use the C-h v to customise the variable, but I don't manage it.

 If the variable isn't registered with C-h v, then it sounds like maybe
 you need to update Org-mode, and/or re-run make clean  make.


 OK - that is working now.



 In addition, The filename for es-load-file shoud not be the buffer
 name, but the buffer name with the extension replaced with R.


 `buffer-file-name', returns the name of the file that the buffer is
 visiting, so wouldn't this already be the case if the filename ends with
 .R?


 Isn't the buffer from which I am tangling the org buffer, and not the result
 from the tangling? (see below for further remarks.

 
 No this hook is run from /within/ a buffer visiting the file of tangled
 code, so in the example hook function above (buffer-file-name) will
 equal the name of the file of tangled R code.  From your later message
 it looks like the issues below have been resolved.

Thanks a lot for a very useful addition, and I will see abut the
buffer-name and come back if it is still the org-file buffer for me,

Rainer

 
 Best -- Eric
 



 This minimal example with the hook defined as above works for me.  After
 tangling I can jump to the *R* buffer where both x and y are defined.

 --8---cut here---start-8---
 ** tangle R and load
   :PROPERTIES:
   :tangle:   to-load.r
   :END:

 #+begin_src R :comments yes
  x - 8
 #+end_src

 #+begin_src R
  y - 9
 #+end_src
 --8---cut here---end---8---


 Not here -

 Emacs and org-mode version:

 GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 Org-mode version 6.36trans (release_6.36.603.g227b)

 1) if no R process is running, I get the following message:
 ess-start-process-specific: No ESS processes running; not yet implemented to
 start (Initial,nil)
 No problem 0 I can start an R process manually.

 2) when an R session is running, I get the following error message from ESS:
 Errors: Use C-c ` to find error.
 Symbol's function definition is void: with-temp-filebuffer

 and from ESS:

 Error in source(/home/rkrug/tmp/R.org) :
   /home/rkrug/tmp/R.org:1:1: unexpected '^'
 1: **

 it seems to submit the org file (the buffer is saved as R.org) to R.

 So buffer-file-name should actually be replaced with the name from the file
 name resulting from the tangling, in the easiest case (which would be fine
 with me) the org buffer name with .org replaced with .R.
 So I did the following (my firs elisp code!):

   (add-hook 'org-babel-post-tangle-hook
 (lambda () (ess-load-file (replace-regexp-in-string .org .R
 buffer-file-name

 and it is working - except that I still get the Symbol's function definition
 is void: with-temp-filebuffer , but it does not seem to do anything.

 Thanks a lot,

 Rainer






 I am sorry about all these questions, but emacs-lisp I have never used
 emacs-lisp (I should - and I will!)


 No problem at all, but be careful about learning too much lisp as you
 may begin to grow dissatisfied with R :)

 Best -- Eric


 Cheers and thanks for your patience,

 Rainer


 Best -- Eric

 Rainer M Krug r.m.k...@gmail.com writes:

 Hi

 I am using org-babel for literate programming in R and I am using the
 following approach to test the code:

 1) tangle
 2) refresh buffer containing the tangled code (I use auto-revert-mode
 or
 global-auto-revert-mode for that)
 3) load the tangled file into an existing R session via ESS R for
 evaluation

 This involves switching between buffers in always the same sequence.
 Therefore my suggestion:

 would it be possible to have a tangle-and-evaluate-tangled-file
 funcction,
 which is doing this automatically?

 C-c - 0 and org-babel-execute-buffer do not work in this case, as
 functions
 are split over several code blocks in R.

 Cheers,

 Rainer



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

iEYEARECAAYFAkw8IGQACgkQoYgNqgF2egpm/ACdEttwt8P3epMZI6GfcksVW6s/
apIAnAj6BYlyAUgTcUST65NOjWk91Pmz
=15EP
-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] clocktable: maximum level 0 does not only avoid listing items but also does not calculate items

2010-07-13 Thread Rainer Stengele
Hi all!

lately I use the marvelous clocktables a lot...

For toplevel clocktables which just sum up all I use :maxlevel 0

The manual reads

:maxlevelMaximum level depth to which times are listed in the table.

which I misunderstood.
I understood: an unlisted item does not mean that its time is not added!
But it looks like :maxlevel 0 does not add everything up.

Ok, maybe the manual is a bit misleading here.



How can I get a clocktable without any details which simply adds up everything 
in the scope?

BTW, the :stepskip0 parameter does not seem to be included in the manual.


Rainer



___
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: Relative paths in file: links are expanded [6.36trans]

2010-07-13 Thread Aidan Gauland
If I create a link with C-c C-l and give it a relative file: link, a
link is created with an absolute path.  For example, C-c C-l
file:../foo.org RET foo puts
[[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
expecting [[file:../foo.org][foo]].

Emacs  : GNU Emacs 24.0.50.6 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-07-10 on neko
Package: Org-mode version 6.36trans

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers

org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
 
[org-add-hook change-major-mode-hook org-show-block-all append local] 5]
 #[nil 
\300\301\302\303\304$\207
 
[org-add-hook change-major-mode-hook org-babel-show-result-all append

local]
 5]
 
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point

org-babel-execute-src-block-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)

(src org-babel-exp-inline-src-blocks))
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp \\Aidan Gauland\\
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc

 org-beamer-auto-fragile-frames

 
org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-blocks nil)

 (comment org-export-blocks-format-comment t)

 (ditaa org-export-blocks-format-ditaa nil)

 (dot org-export-blocks-format-dot nil))
 )



signature.asc
Description: OpenPGP digital 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] Bug: Attempt to export buffer with invalid #+BEGIN_SRC fails with cryptic message [6.36trans]

2010-07-13 Thread Aidan Gauland
Attempting to export a buffer with a #+BEGIN_SRC block with no language
specified (i.e. an argumentless #+BEGIN_SRC block) fails with the
message apply: Wrong type argument: consp, nil.  This is rather
cryptic; it would be nice if Org-publish could say where it failed even
if not why it failed.

Emacs  : GNU Emacs 24.0.50.6 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-07-10 on neko
Package: Org-mode version 6.36trans

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers

org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
 
[org-add-hook change-major-mode-hook org-show-block-all append local] 5]
 #[nil 
\300\301\302\303\304$\207
 
[org-add-hook change-major-mode-hook org-babel-show-result-all append

local]
 5]
 
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point

org-babel-execute-src-block-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)

(src org-babel-exp-inline-src-blocks))
 org-occur-hook '(org-first-headline-recenter)
 org-from-is-user-regexp \\Aidan Gauland\\
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc

 org-beamer-auto-fragile-frames

 
org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-blocks nil)

 (comment org-export-blocks-format-comment t)

 (ditaa org-export-blocks-format-ditaa nil)

 (dot org-export-blocks-format-dot nil))
 )



signature.asc
Description: OpenPGP digital 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] Bug: Attempt to export buffer with invalid #+BEGIN_SRC fails with cryptic message [6.36trans]

2010-07-13 Thread Giovanni Ridolfi
Aidan Gauland aidal...@no8wireless.co.nz writes:

 Attempting to export a buffer with a #+BEGIN_SRC block with no language
 specified 

Well in the manual (Literal examples) it is written that: 

 This is done with the `src' block,

 where you also need to specify the name of the major mode
  
 that should be used to fontify the example:

(underline is mine)

 (i.e. an argumentless #+BEGIN_SRC block) fails with the
 message apply: Wrong type argument: consp, nil.  This is rather
 cryptic; it would be nice if Org-publish could say where it failed even
 if not why it failed.

reading the manual could be a first good option; 
asking the list a second.

Cheers,
Giovanni

___
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: remember template is slow

2010-07-13 Thread Carsten Dominik

Hi Buck,

what is the value of the variable org-agenda-files in your setup?

Thanks.

- Carsten

On Jul 12, 2010, at 6:18 PM, Buck Brody wrote:


Bernt,

Here are the results:

org-remember  1
  2.497 2.497
org-do-remember   1
  2.496 2.496
org-remember-apply-template   1
  2.493999  2.493999
org-mode  1
  2.259 2.259
org-install-agenda-files-menu 1
  2.258 2.258
org-agenda-files  1
  2.257 2.257
org-select-remember-template  1
  0.229 0.229
org-remember-handler  1
  0.001 0.001
org-set-regexps-and-options   1
  0.001 0.001
org-remember-finalize 1
  0.001 0.001
org-fix-tags-on-the-fly   2
  0.001 0.0005
org-delete-backward-char  1
  0.001 0.001
org-remember-kill 1
  0.001 0.001
org-set-font-lock-defaults1
  0.001 0.001
org-hide-wide-columns 2
  0.001 0.0005
org-align-tags-here   2
  0.001 0.0005
On Sat, Jul 10, 2010 at 5:49 AM, Bernt Hansen be...@norang.ca wrote:


Daniel J. Sinder dan...@sindercity.com writes:

On Wed, Jul 7, 2010 at 9:30 AM, Buck Brody buckbr...@gmail.com  
wrote:


I'm finding that my remember templates are slow to load.  I've  
got a lag of about three to four
seconds.  I know that doesn't sound like much, but it's kind  
of puts a kink in the workflow.  I
use GNU emacs on Windows.  I also have cygwin installed, and I  
have noticed that the problem

doesn't occur when using cygwin.  Any ideas?

For what it's worth, I've also had this problem for a while now.   
However, I *do* use emacs w/

cygwin:
Windows XP (w/ Cygwin)
GNU Emacs 23.2.1
Org-mode version 6.36trans (release_6.36.453.g0cd4)

I suspect (for no particular reason other than disdain for  
Windows) that it is related to poor file
system (NTFS) access speeds.  For example, maybe org is trying to  
open several files to look for

TODO keywords and/or tags?


You may want to try profiling the code as described by Carsten in the
following post:

http://thread.gmane.org/gmane.emacs.orgmode/13182

That may provide additional information to show exactly where the
slowdown is taking place.

Regards,
Bernt


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


- Carsten




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


Re: [Orgmode] Failed to create radio tables

2010-07-13 Thread Carsten Dominik

Hi everyone,

thanks to all who contributed to this thread.
Sending lists should now work as advertised, including
using C-c C-c to send the list.

- Carsten

On Jul 9, 2010, at 7:55 AM, Angel Popov wrote:


Hi,
I am following example on radio tables but it looks that it does not  
work.

I copied
 % BEGIN RECEIVE ORGLST to-buy
 % END RECEIVE ORGLST to-buy
 \begin{comment}
 #+ORGLIST: SEND to-buy orgtbl-to-latex
 - a new house
 - a new computer
   + a new keyboard
   + a new mouse
 - a new life
 \end{comment}

and when I C-c C-c on '- a new house' nothing happend

Regards, Angel


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


- Carsten




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


Re: [Orgmode] Re: skip entry with inherited tags

2010-07-13 Thread Carsten Dominik

Hi Martin,

On Jul 7, 2010, at 10:49 AM, Martin Pohlack wrote:


Hi Carsten,

On 04.06.2010 14:11, Martin Pohlack wrote:

On 04.06.2010 13:27, Carsten Dominik wrote:

Hi Martin,

maybe you can summarize this discussion so that I can see when  
should

be done?  Thanks.


* org-agenda-filter-preset is ignored for multi-part agendas (broken)
* I have a patch that fixes this by applying filtering for each sub- 
part

* The patch works for me


May I inquire the state of this item?

The patch seems to have vanished from the default view in patchwork  
it is only shown here:


http://patchwork.newartisans.com/project/org-mode/list/?archive=both

But it is still Under Review by you.

Do you need assistance with the patch?


Sorry for taking so much time for this.
I am still holding the patch because I have an almost unconscious itch
that something is wrong with it.  I cannot say what exactly it is
(if anything).  The logic of what needs to be done when in
block agendas has some reason.  One of the things I can say already
it that with such a local filter, I am afraid that updating the
agenda, or modifying the filter might fail or lead to strange results.
This is actually something you might want to work on testing.

I will only be able to study this more closely after the release.

Sorry

- Carsten


Cheers,
Martin


- Carsten




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


Re: [Orgmode] Re: org-capture-last-stored bookmark

2010-07-13 Thread Carsten Dominik

Hi Giles,

On Jul 6, 2010, at 5:44 PM, Giles Chamberlin wrote:


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


I have fixed this, please verify.


Doesn't seem to work here I'm afraid.  I've pulled the latest git  
which

contains what looks like the correct changeset:

commit b6305c713c54421257759c38c260f516686f2811
Author: Carsten Dominik carsten.domi...@gmail.com
Date:   Tue Jul 6 12:46:12 2010 +0200

Make sure going to last capture also works after refile

make;sudo make install then restart emacs.

C-c r t brings up a todo template

C-c C-w and refile it from default of refile.org to homers.org

C-x r l to list bookmarks (trimmed output):

   org-capture-last-stored   ~/orgfiles/refile.org
   org-refile-last-stored~/orgfiles/homers.org

I was hoping that org-capture-last-stored would point to homers.org.
Quite prepared to believe I've dome something stupid though!


Please pull again and then try again, I hope it works now.

- Carsten


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


[Orgmode] Re: can you require a certain template with lognotedone?

2010-07-13 Thread Matt Lundin
Hi Michael,

Michael Gilbert m...@gilbert.org writes:

 I require a note when certain TODOs are changed to DONE. These are
 almost always some sort of structured logging. Is there a way to call
 org-capture and/or require a certain template for that note? That
 would be a very powerful workflow for me.

You could use org-after-todo-state-change-hook to call a function that
invokes org-capture, using arbitrary tests to see if the current entry
has a particular property, etc.

Best,
Matt

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


[Orgmode] Re: Bug: Relative paths in file: links are expanded [6.36trans]

2010-07-13 Thread Matt Lundin
Aidan Gauland aidal...@no8wireless.co.nz writes:

 If I create a link with C-c C-l and give it a relative file: link, a
 link is created with an absolute path.  For example, C-c C-l
 file:../foo.org RET foo puts
 [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
 expecting [[file:../foo.org][foo]].

That is the default behavior. You can change it by setting
org-link-file-path-type to relative.

Best,
Matt


___
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-mobile produces errors in normal org functions

2010-07-13 Thread Carsten Dominik

Hi Sven,

does it help to remove ~/.emacs.d/.org-id-locations ?

Are you sure you are running the same version of Org on both systems?
On Jul 7, 2010, at 9:30 PM, Sven Bretfeld wrote:


Hi all

I have strange errors since I'm working with org-mobile. They seem to
have to do with the hash-code.

The first error: org-mobile-push results in a Wrong-type-argument. A
debug-message is included at the end of this mail. After an  
unsuccessful
run of this function, the buffers of the included org-files display  
the
** symbol in the status line, although the buffers haven't been  
changed

at all. Strangely enough, after trying three of four times the command
succeeds at last.

But that's not all. Similar errors occur when I run org-archive- 
subtree.

Since I work with org-mobile my entries contain an automatically
produced property of the form:

   :PROPERTIES:
   :ID:   8307e0ed-6936-4c88-b25f-d9729873f047
   :END:

If I delete this property, org-archive-subtree works on the respective
entry.

I use the same configuration on two computers, both running Ubuntu
Lucid, Emacs 23.1.1 and the most recent version of org. These errors
occur only on one of the computers (the one I use to sync my org files
with a webdav server using org-mobile, if that's relevant).

Does anybody have an idea what could be wrong here?

Thanks for help,

Sven

Debugger entered--Lisp error: (wrong-type-argument hash-table-p ((~/ 
aktuell/myconf/from-mobile.org cd2fdb6d-1ca6-45e7- 
b0d6-02044edcbbb9) (~/aktuell/myconf/from-mobile.org  
fdcc85e2-51c8-4d3d-827c-396687ca5a13) (~/aktuell/myconf/from- 
mobile.org a6a22b75-e0fe-44fb-b5d0-a61500218760) (~/aktuell/ 
myconf/from-mobile.org 2dce7212-3994-4ccc-a964-6569914fc17f) (~/ 
aktuell/myconf/from-mobile.org 177580d9- 
f0f0-472b-90d0-278bf503e07d) (~/aktuell/myconf/mygtd.org  
c4ceb0b6-b854-41ab-91b6-e3b1d40d8289) (~/aktuell/myconf/ 
mygtd.org 8850e02f-9e33-456b-8654-e55cf1604036) (~/aktuell/ 
myconf/mygtd.org 593cf7d5-5db7-4b39-bc7f-190c4acb4f51) (~/ 
aktuell/myconf/mygtd.org f20acbfb-c03c-4b08-bd22-d1b614dc7688)  
(~/aktuell/myconf/mygtd.org c76519fa-c2ba-434c-b3e2- 
e3838b72e6e3) \.\.\.))
 puthash(5a8cfb4f-3e43-4581-982b-44e0adcacac6 ~/aktuell/myconf/ 
mygtd.org ((~/aktuell/myconf/from-mobile.org cd2fdb6d-1ca6-45e7- 
b0d6-02044edcbbb9) (~/aktuell/myconf/from-mobile.org  
fdcc85e2-51c8-4d3d-827c-396687ca5a13) (~/aktuell/myconf/from- 
mobile.org a6a22b75-e0fe-44fb-b5d0-a61500218760) (~/aktuell/ 
myconf/from-mobile.org 2dce7212-3994-4ccc-a964-6569914fc17f) (~/ 
aktuell/myconf/from-mobile.org 177580d9- 
f0f0-472b-90d0-278bf503e07d) (~/aktuell/myconf/mygtd.org  
c4ceb0b6-b854-41ab-91b6-e3b1d40d8289) (~/aktuell/myconf/ 
mygtd.org 8850e02f-9e33-456b-8654-e55cf1604036) (~/aktuell/ 
myconf/mygtd.org 593cf7d5-5db7-4b39-bc7f-190c4acb4f51) (~/ 
aktuell/myconf/mygtd.org f20acbfb-c03c-4b08-bd22-d1b614dc7688)  
(~/aktuell/myconf/mygtd.org c76519fa-c2ba-434c-b3e2- 
e3838b72e6e3) \.\.\.))
 (progn (unless org-id-locations (org-id-locations-load)) (puthash  
id (abbreviate-file-name file) org-id-locations) (add-to-list (quote  
org-id-files) (abbreviate-file-name file)))
 (if (and org-id-track-globally id file) (progn (unless org-id- 
locations ...) (puthash id ... org-id-locations) (add-to- 
list ... ...)))
 (when (and org-id-track-globally id file) (unless org-id-locations  
(org-id-locations-load)) (puthash id (abbreviate-file-name file) org- 
id-locations) (add-to-list (quote org-id-files) (abbreviate-file- 
name file)))
 org-id-add-location(5a8cfb4f-3e43-4581-982b-44e0adcacac6 /home/ 
sven/aktuell/myconf/mygtd.org)
 (cond ((and id ... ...) id) (create (setq id ...) (org-entry-put  
pom ID id) (org-id-add-location id ...) id) (t nil))

 (let ((id ...)) (cond (... id) (create ... ... ... id) (t nil)))
 (save-excursion (goto-char (or pom ...)) (let (...)  
(cond ... ... ...)))
 (save-excursion (if (markerp pom) (set-buffer ...)) (save-excursion  
(goto-char ...) (let ... ...)))

 (org-with-point-at pom (let (...) (cond ... ... ...)))
 org-id-get(#marker at 1665 in mygtd.org create)
 (if (org-bound-and-true-p org-mobile-force-id-on-agenda-items) (org- 
id-get m (quote create)) (org-entry-get m ID))
 (setq id (if (org-bound-and-true-p org-mobile-force-id-on-agenda- 
items) (org-id-get m ...) (org-entry-get m ID)))
 (if (setq id (if ... ... ...)) (progn (insert:PROPERTIES: 
\n   :ORIGINAL_ID:  id \n   :END:\n)))
 (when (setq id (if ... ... ...)) (insert:PROPERTIES: 
\n   :ORIGINAL_ID:  id \n   :END:\n))
 (if sexp nil (insert (org-agenda-get-some-entry-text m 10 
 ...) \n) (when (setq id ...) (insert:PROPERTIES: 
\n   :ORIGINAL_ID:  id \n   :END:\n)))
 (unless sexp (insert (org-agenda-get-some-entry-text m 10 
 ...) \n) (when (setq id ...) (insert:PROPERTIES: 
\n   :ORIGINAL_ID:  id \n   :END:\n)))
 (cond ((looking-at [ 	]*$)) ((looking-at =+$) (delete- 
region ... ...)) ((get-text-property ... ...) (setq in-date nil)  
(setq app ...) (setq short ...) (when ... ... ...) (when  
app 

[Orgmode] Re: org-capture-last-stored bookmark

2010-07-13 Thread Giles Chamberlin
Carsten Dominik carsten.domi...@gmail.com writes:

 Please pull again and then try again, I hope it works now.

Yes and no I'm afraid.  I now get two bookmarks generated:

 - org-capture-last-stored: points to default file
 - org-capture-last-stored-marker: points correctly to refiled location


-- 
Giles


___
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] Footnote in title?

2010-07-13 Thread Reetinder_Sidhu
Hi all

Footnote in title (requiring exported latex to like \title{...\footnote{...}}) 
does not seem to work. Using a verbatim latex fragment might work, but would be 
nice to have a unified specification that could be exported to html as well. 
Any help appreciated.

Regards
Reetinder Sidhu


Mahindra Satyam powered IT for the 2010 FIFA World Cup(TM).
To learn more, visit: www.mahindrasatyam.com/fifa/index.asp

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.

___
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-startup-indented shifts columns in column-view

2010-07-13 Thread Julien Fantin
Thanks for noticing Dominik,

Reverting back to regular indentation is what I've done, however, I'm
afraid I have something else to report on that...
I mentionned this  issue in a separate thread :
http://article.gmane.org/gmane.emacs.orgmode/27388/

cheers

On Tue, Jul 13, 2010 at 2:14 PM, Carsten Dominik
carsten.domi...@gmail.com wrote:

 On Jul 6, 2010, at 9:55 PM, Julien Fantin wrote:

 I've been using the org-startup-indented and org-adapt-indentation
 variables for sometime, but I just realized that org-startup-indented when
 set to true, ends up shifting the cloumns in column-view according to the
 headline level.

 So headline 2 is shifted by 1 character to the right, headline 3 by 2
 characters and so forth.

 Is this the expected behaviour ? I hope not, because I'd like to use both
 features, but it makes the column-view quite impractical.

 Hi Julien,

 this is indeed a bug.  As it is not trivial to fix it,
 I will only be able to get to it after the release.
 As a work-around for now, turn off org-indent-mode before
 switching to column view.

 - Carsten



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


Re: [Orgmode] Re: remember template is slow

2010-07-13 Thread Buck Brody
(~/Documents/org/outline.org)

On Tue, Jul 13, 2010 at 4:06 AM, Carsten Dominik
carsten.domi...@gmail.com wrote:
 Hi Buck,

 what is the value of the variable org-agenda-files in your setup?

 Thanks.

 - Carsten

 On Jul 12, 2010, at 6:18 PM, Buck Brody wrote:

 Bernt,

 Here are the results:

 org-remember                                                  1
  2.497         2.497
 org-do-remember                                               1
  2.496         2.496
 org-remember-apply-template                                   1
  2.493999  2.493999
 org-mode                                                      1
  2.259         2.259
 org-install-agenda-files-menu                                 1
  2.258         2.258
 org-agenda-files                                              1
  2.257         2.257
 org-select-remember-template                                  1
  0.229         0.229
 org-remember-handler                                          1
  0.001         0.001
 org-set-regexps-and-options                                   1
  0.001         0.001
 org-remember-finalize                                         1
  0.001         0.001
 org-fix-tags-on-the-fly                                       2
  0.001         0.0005
 org-delete-backward-char                                      1
  0.001         0.001
 org-remember-kill                                             1
  0.001         0.001
 org-set-font-lock-defaults                                    1
  0.001         0.001
 org-hide-wide-columns                                         2
  0.001         0.0005
 org-align-tags-here                                           2
  0.001         0.0005
 On Sat, Jul 10, 2010 at 5:49 AM, Bernt Hansen be...@norang.ca wrote:

 Daniel J. Sinder dan...@sindercity.com writes:

 On Wed, Jul 7, 2010 at 9:30 AM, Buck Brody buckbr...@gmail.com wrote:

    I'm finding that my remember templates are slow to load.  I've got a
 lag of about three to four
    seconds.  I know that doesn't sound like much, but it's kind of puts
 a kink in the workflow.  I
    use GNU emacs on Windows.  I also have cygwin installed, and I have
 noticed that the problem
    doesn't occur when using cygwin.  Any ideas?

 For what it's worth, I've also had this problem for a while now.
  However, I *do* use emacs w/
 cygwin:
 Windows XP (w/ Cygwin)
 GNU Emacs 23.2.1
 Org-mode version 6.36trans (release_6.36.453.g0cd4)

 I suspect (for no particular reason other than disdain for Windows) that
 it is related to poor file
 system (NTFS) access speeds.  For example, maybe org is trying to open
 several files to look for
 TODO keywords and/or tags?

 You may want to try profiling the code as described by Carsten in the
 following post:

 http://thread.gmane.org/gmane.emacs.orgmode/13182

 That may provide additional information to show exactly where the
 slowdown is taking place.

 Regards,
 Bernt

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

 - Carsten





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


[Orgmode] \nbsp usage

2010-07-13 Thread Erik Butz
Hi all,

I have a somewhat stupid problem, but didn't find a solution in the
manual or the list archive.
I want to use the \nbsp macro to generate a '~' symbol for Latex, but
I don't seem to get it to work correctly in my case.
I want to write 200~m²

If I do: 200\nbspm^2
it gets exported as: 200\nbspm$^2$,  so the symbol is not recognized.

If I do: 200\nbsp m^2
it gets exported as 198~ m$^2$, so in addition to the nbsp there is
another space at which a linebreak can occur

trying: 200\nbsp{}m^2 in analogy to other commands
I get: 200~\{\}m$^2$, so the parentheses are not recognized as
belonging to the command.

I am using the latest org version (just did a git pull and checked
that the behavior is still there) with emacs 23.1.1

Any hints appreciated.

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] Re: can you require a certain template with lognotedone?

2010-07-13 Thread Michael Gilbert
 I require a note when certain TODOs are changed to DONE. These are
 almost always some sort of structured logging. Is there a way to call
 org-capture and/or require a certain template for that note? That
 would be a very powerful workflow for me.
 
 You could use org-after-todo-state-change-hook to call a function that
 invokes org-capture, using arbitrary tests to see if the current entry
 has a particular property, etc.

Thank you. This may be beyond my skill right now. And as Darlan pointed out to 
me offlist, this might be something that should be framed more generically. I 
do need to start learning about hooks though.

— Michael



___
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] tangling with leaving non-source code lines as empty lines?

2010-07-13 Thread Eric Schulte
Hi Rainer,

Dr Rainer M Krug r.m.k...@gmail.com writes:

 On 13/07/2010 02:46, Eric Schulte wrote:
 Hi Rainer,
 
 With the tangling comments generated by the latest Org-mode, the
 following function should be able to jump from any code in a tangled
 code file back to the relevant block in the original Org-mode file.

 Wow - that was quick.

 Thanks.

 
 --8---cut here---start-8---
 (defun org-babel-tangle-jump-to-org ()
   Jump from a tangled code file to the related Org-mode file.
   (interactive)
   (let ((mid (point))
  target-buffer target-char
  start end link path block-name)
 (save-window-excursion
   (save-excursion
  (unless (and (re-search-backward org-bracket-link-analytic-regexp nil t)
   (setq start (point))
   (setq link (match-string 0))
   (setq path (match-string 3))
   (setq block-name (match-string 5))
   (re-search-forward (concat   (regexp-quote block-name)
   ends here[\n\r]) nil t)
   (setq end (point))
   ( start mid) ( mid end))
(error not in tangled code)))
   (when (string-match :: path)
  (setq path (substring path 0 (match-beginning 0
   (find-file path) (setq target-buffer (current-buffer))
   (goto-char start) (org-open-link-from-string link)
   (if (string-match [^ \t\n\r]:\\([[:digit:]]+\\) block-name)
(org-babel-next-src-block
 (string-to-int (match-string 1 block-name)))
  (org-babel-goto-named-src-block block-name))
   (setq target-char (point)))
 (pop-to-buffer target-buffer)
 (goto-char target-char)))
 --8---cut here---end---8---
 

 I tried it out, and realised that one needs to name the blocks
 (#+srcname:) to be able to use it. Then it jumps to the code block in
 the org file.


Have you tried this on un-named code blocks (with the latest Org-mode
from git)?  It should work for those as well -- it parses the name, and
uses org-babel-next-src-block to jump down the appropriate number of
blocks.


 Two more things (As pointed out in the other email) would be nice:

 1) it would be nice to jump to the line of code in the Org-mode file
 which corresponds to the line in the code file


Agreed, I was planning on implementing this, it shouldn't be difficult.


 2) It would be brilliant, if one could call the function from the
 Org-file buffer and enter the line number and then jump to the block /
 line in the block.


That's a great suggestions, I will certainly look at folding it in.


 In addition:
 3) it would be very useful, if this function could be used with
 non-named source blocks.


As I said above, I /believe/ that it is usable as such now, however if
you could come up with an example where this fails, please do let me
know.


 But that function is already quite usefull.


Great, I'll post any future improvements I make to this thread, and
please do let me know if you run across errant behavior or new
potentially useful behavior.

Cheers -- Eric


 Thanks,

 Rainer


 This is too large of a block of untested code to push into Org-mode now,
 however please give it a try, and let me know if you think this could be
 generally useful.  Hopefully after the feature-freeze we can fold
 something like this into Babel to ease navigation between Org files and
 their tangled offspring.
 
 Cheers -- Eric
 
 Eric Schulte schulte.e...@gmail.com writes:
 
 Hi Rainer,

 If I'm understand you correctly you want the absolute position (by LOC)
 of the lines of R code to be the same in both the original org file and
 the tangled file or R code.  I don't think this is possible.  It is
 possible to tangle code blocks in any order (not just the order in which
 they appear in the original org file), so there are many valid tangling
 scenarios in which this feature could not work.

 Rather, I think that it may make sense to have a function for jumping
 back and forth between tangled code blocks and the related Org file.  In
 that case the R errors could be followed to the tangled R code file,
 from which you could easily jump to the relevant line in the relevant
 code block in the Org file.  If you are tangling with comments, then it
 should be possible to have a function called from a line in a tangled
 code file which when called

 1) finds it's enclosing comments
 2) remembers it's offset from the comments (which would then be it's
offset in the code block in the Org file)
 3) read the comment to learn which code block in which Org file it's
tangled from
 4) jump to the relevant line, in the relevant block, in the relevant
file

 Similarly when called form within a code block in an Org file the
 function could

 1) read it's header argument to find the relevant tangled code file
 2) jump to that file
 3) use the comments in that file to move to the appropriate 

Re: [Orgmode] Re: skip entry with inherited tags

2010-07-13 Thread Martin Pohlack
Hi Carsten,

On 13.07.2010 13:49, Carsten Dominik wrote:
 Sorry for taking so much time for this.
 I am still holding the patch because I have an almost unconscious itch
 that something is wrong with it.  I cannot say what exactly it is
 (if anything).  The logic of what needs to be done when in
 block agendas has some reason.  One of the things I can say already
 it that with such a local filter, I am afraid that updating the
 agenda, or modifying the filter might fail or lead to strange results.
 This is actually something you might want to work on testing.

Hard to respond to this vague situation :-).

It would be great if you could point me at more specific situations that
might break or if others could test the patch.  I have been using it for
more than a month now without problems.

 I will only be able to study this more closely after the release.

Take your time, I will wait for more details to emerge or feedback from
other testers.

One more note here: The current situation for block agendas is a bit
problematic as their limitations are not documented afaik.

Writing custom agendas is not easy in itself.  If things don't work, it
is really hard to distinguish between driver errors and limitations of
the block agendas.

Cheers,
Martin

___
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-mobile produces errors in normal org functions

2010-07-13 Thread Carsten Dominik


On Jul 13, 2010, at 7:41 PM, Sven Bretfeld wrote:


Hi Carsten

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


does it help to remove ~/.emacs.d/.org-id-locations ?


Yes, that did it. Thank you very much, you made me happy. I have  
already

tried to remove .emacs.d before, but with a running Emacs, what didn't
work. I didn't know that .emacs.d contains any dot-files at all.


That may be my mistake - maybe it would be better to make this a non- 
dot file.
This used to be a dot file in HOME, then I moved it into .emacs.d, but  
kept

it a dot file.

Does anyone here know if there are rules for .emacs.d ???

Greetings

- Carsten




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


Re: [Orgmode] Re: skip entry with inherited tags

2010-07-13 Thread Carsten Dominik


On Jul 13, 2010, at 7:41 PM, Martin Pohlack wrote:


Hi Carsten,

On 13.07.2010 13:49, Carsten Dominik wrote:

Sorry for taking so much time for this.
I am still holding the patch because I have an almost unconscious  
itch

that something is wrong with it.  I cannot say what exactly it is
(if anything).  The logic of what needs to be done when in
block agendas has some reason.  One of the things I can say already
it that with such a local filter, I am afraid that updating the
agenda, or modifying the filter might fail or lead to strange  
results.

This is actually something you might want to work on testing.


Hard to respond to this vague situation :-).

It would be great if you could point me at more specific situations  
that
might break or if others could test the patch.  I have been using it  
for

more than a month now without problems.


The specific one I meant is if you use r or g to rebuild the agenda,
if you do something like a refile command which does an automatic  
rebuild,

do you get back the view you expected?

Also, if you apply other filter commands, either with /, or narrowing
the filter with /, does that give the expected results while you are
in your block agenda?




I will only be able to study this more closely after the release.


Take your time, I will wait for more details to emerge or feedback  
from

other testers.

One more note here: The current situation for block agendas is a bit
problematic as their limitations are not documented afaik.

Writing custom agendas is not easy in itself.  If things don't work,  
it

is really hard to distinguish between driver errors and limitations of
the block agendas.


Do you have suggestions on how to improve the situation?

- Carsten

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


Re: [Orgmode] Re: remember template is slow

2010-07-13 Thread Carsten Dominik


On Jul 13, 2010, at 5:21 PM, Buck Brody wrote:


(~/Documents/org/outline.org)


Well, then I have no ideas what might make this so slow - it seems that
this call takes up all of the time.

The only further recommendation I would have is to do use uncompiled  
code

with

C-u M-x org-reload RET

and then do

M-x debug-on-entry RET org-agenda-files RET

If you then call a remember command, Emacs will stop in the debugger
in that function.  The you could step through using d and just watch
if you see which particular form inside that function eats up the time.

- Carsten



On Tue, Jul 13, 2010 at 4:06 AM, Carsten Dominik
carsten.domi...@gmail.com wrote:

Hi Buck,

what is the value of the variable org-agenda-files in your setup?

Thanks.

- Carsten

On Jul 12, 2010, at 6:18 PM, Buck Brody wrote:


Bernt,

Here are the results:

org-remember  1
 2.497 2.497
org-do-remember   1
 2.496 2.496
org-remember-apply-template   1
 2.493999  2.493999
org-mode  1
 2.259 2.259
org-install-agenda-files-menu 1
 2.258 2.258
org-agenda-files  1
 2.257 2.257
org-select-remember-template  1
 0.229 0.229
org-remember-handler  1
 0.001 0.001
org-set-regexps-and-options   1
 0.001 0.001
org-remember-finalize 1
 0.001 0.001
org-fix-tags-on-the-fly   2
 0.001 0.0005
org-delete-backward-char  1
 0.001 0.001
org-remember-kill 1
 0.001 0.001
org-set-font-lock-defaults1
 0.001 0.001
org-hide-wide-columns 2
 0.001 0.0005
org-align-tags-here   2
 0.001 0.0005
On Sat, Jul 10, 2010 at 5:49 AM, Bernt Hansen be...@norang.ca  
wrote:


Daniel J. Sinder dan...@sindercity.com writes:

On Wed, Jul 7, 2010 at 9:30 AM, Buck Brody buckbr...@gmail.com  
wrote:


   I'm finding that my remember templates are slow to load.   
I've got a

lag of about three to four
   seconds.  I know that doesn't sound like much, but it's kind  
of puts

a kink in the workflow.  I
   use GNU emacs on Windows.  I also have cygwin installed, and  
I have

noticed that the problem
   doesn't occur when using cygwin.  Any ideas?

For what it's worth, I've also had this problem for a while now.
 However, I *do* use emacs w/
cygwin:
Windows XP (w/ Cygwin)
GNU Emacs 23.2.1
Org-mode version 6.36trans (release_6.36.453.g0cd4)

I suspect (for no particular reason other than disdain for  
Windows) that

it is related to poor file
system (NTFS) access speeds.  For example, maybe org is trying  
to open

several files to look for
TODO keywords and/or tags?


You may want to try profiling the code as described by Carsten in  
the

following post:

http://thread.gmane.org/gmane.emacs.orgmode/13182

That may provide additional information to show exactly where the
slowdown is taking place.

Regards,
Bernt


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


- Carsten






- Carsten




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


[Orgmode] Tiny font in org-agenda-columns when using emacs --daemon

2010-07-13 Thread Jakob Lombacher
Hi,

my emacs behaves odd.
When I start emacs as daemon emacs --daemon  and than attache a
client to it, the org-agenda-columns view appears in a very tiny font.
If I start emacs normally the view appears in standard font size.

I found out that the Org Column face is set to different values
(Height: 1, ...). I can adapt it and it works, but when I start the
emacsclient again (only the client not the server), all settings are lost.
So it looks like the emacsclient overwrites those settings, but I have no idea 
how to discover what.

Has anybody an idea what's the cause of that? Can anybody report the
same behavior?

I use emacs 23.1-r3 on a gentoo linux system and org-mode 6.36c.

Jakob

___
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: skip entry with inherited tags

2010-07-13 Thread Martin Pohlack
Hi Carsten and Matt,

On 13.07.2010 20:48, Carsten Dominik wrote:
 On Jul 13, 2010, at 7:41 PM, Martin Pohlack wrote:
 Hard to respond to this vague situation :-).

 It would be great if you could point me at more specific situations  
 that
 might break or if others could test the patch.  I have been using it  
 for
 more than a month now without problems.
 
 The specific one I meant is if you use r or g to rebuild the agenda,
 if you do something like a refile command which does an automatic  
 rebuild,
 do you get back the view you expected?

Yes, I regularly use 'r'.  It works for me.  Refiling a single entry did
not show a problem.

 Also, if you apply other filter commands, either with /, or narrowing
 the filter with /, does that give the expected results while you are
 in your block agenda?

I quickly applied a tag filter using '/' 'tab'.  Only the relevant
entries were shown.  Some block agendas become empty as expected.
Clearing the filter restores the expected full view.

I am not entirely sure that the patch does not have problems though.

Matt: could you give the patch a quick test at your end?

 I will only be able to study this more closely after the release.

 Take your time, I will wait for more details to emerge or feedback  
 from
 other testers.

 One more note here: The current situation for block agendas is a bit
 problematic as their limitations are not documented afaik.

 Writing custom agendas is not easy in itself.  If things don't work,  
 it
 is really hard to distinguish between driver errors and limitations of
 the block agendas.
 
 Do you have suggestions on how to improve the situation?

* Well, the best thing to do would be to remove the limitations of the
  block agendas, obviously :-), which I hope this patch does.

* The second best thing is to document them.

I am aware of this tag filter limitation, but no others from the top of
my head.  Do others know more?

Cheers,
Martin

___
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-mobile produces errors in normal org functions

2010-07-13 Thread Shelagh Manton
On Tue, 13 Jul 2010 20:45:29 +0200, Carsten Dominik wrote:

 On Jul 13, 2010, at 7:41 PM, Sven Bretfeld wrote:
 
 Hi Carsten

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

 does it help to remove ~/.emacs.d/.org-id-locations ?

 Yes, that did it. Thank you very much, you made me happy. I have
 already
 tried to remove .emacs.d before, but with a running Emacs, what didn't
 work. I didn't know that .emacs.d contains any dot-files at all.
 
 That may be my mistake - maybe it would be better to make this a non-
 dot file.
 This used to be a dot file in HOME, then I moved it into .emacs.d, but
 kept
 it a dot file.
 
 Does anyone here know if there are rules for .emacs.d ???
 
 Greetings
 
 - Carsten
 
Not a rule, but a convention, that what is a dot-file in $HOME is just a 
normal file in .emacs.d. Because of course the idea is just to hide the 
file, but it is already hidden inside a hidden directory.

Cheers
Shelagh
 
 
 ___ 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: Bug: Relative paths in file: links are expanded [6.36trans]

2010-07-13 Thread David Maus
Matt Lundin wrote:
Aidan Gauland aidal...@no8wireless.co.nz writes:

 If I create a link with C-c C-l and give it a relative file: link, a
 link is created with an absolute path.  For example, C-c C-l
 file:../foo.org RET foo puts
 [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
 expecting [[file:../foo.org][foo]].

That is the default behavior. You can change it by setting
org-link-file-path-type to relative.

And in addition there was a fix pushed to repo.or.cz

,
| commit acb8bcfba7023b362a7fbe9615bb167a046ad26d
| Author: Carsten Dominik carsten.domi...@gmail.com
| Date:   Tue Jul 13 12:53:47 2010 +0200
|
| Fix relative path creation when making a file link
|
| * lisp/org.el (org-insert-link): Correctly determine if we should use
| a relative path.
|
| Aidan Gauland writes:
|
|  If I create a link with C-c C-l and give it a relative file: link, a
|  link is created with an absolute path.  For example, C-c C-l
|  file:../foo.org RET foo puts
|  [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
|  expecting [[file:../foo.org][foo]].
`

HTH,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp3xE4XuFkLp.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] Bug: Attempt to export buffer with invalid #+BEGIN_SRC fails with cryptic message [6.36trans]

2010-07-13 Thread David Maus
Aidan Gauland wrote:
[1  multipart/signed (7bit)]
[1.1  text/plain; UTF-8 (quoted-printable)]
Attempting to export a buffer with a #+BEGIN_SRC block with no language
specified (i.e. an argumentless #+BEGIN_SRC block) fails with the
message apply: Wrong type argument: consp, nil.  This is rather
cryptic; it would be nice if Org-publish could say where it failed even
if not why it failed.

,
| commit e8033b7f04a09cdbb7b092be5a7ed1f62828694d
| Author: Eric Schulte schulte.e...@gmail.com
| Date:   Mon Jul 12 10:42:59 2010 -0700
|
| org-exp: raise an error when trying to export code blocks w/o languages
|
| * lisp/ob.el (org-babel-get-src-block-info): ensure that we don't
|   match (and return info for) source blocks without a language
|
| * lisp/org-exp.el (org-export-replace-src-segments-and-examples):
|   updated source code block regexp so that the presence of a language
|   can be explicitly checked.  Also now raising an error when a source
|   block does not have a language.
`

So there will be a more helpful error message.

HTH
  -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpvWuWYmuVN9.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] apply #+TABLEFM lines during export?

2010-07-13 Thread Austin Frank
On Tue, Jul 13 2010, Eric Schulte wrote:

 if you want to use my approach above more widely you could name the code
 block say #+source:less-precision, then add :exports none to each of
 your existing code blocks that output over-precise data, and for each
 such block add a call of the following form

 #+call: less-precision(tab=overly-precise-R-block) :exports results

 which should work, but would litter your file with these call lines.  I
 guess this is an instance where a post-processing function specified at
 the file/subtree level could potentially be useful.

Yes, the post-processing approach really seems appropriate here--
looking forward to seeing what you come up with.

In the mean time, is there definitely not any hook that applies

 a) during export, and
 b) after results are generated from source blocks?

If not, is it possible that adding a hook like

 org-post-execution-pre-export-hook

would be a reasonable suggestion?  Carsten, thoughts?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpH7G6Cm64uU.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: Bug: Relative paths in file: links are expanded [6.36trans]

2010-07-13 Thread Matthew Lundin
David Maus dm...@ictsoc.de writes:

 Matt Lundin wrote:
Aidan Gauland aidal...@no8wireless.co.nz writes:

 If I create a link with C-c C-l and give it a relative file: link, a
 link is created with an absolute path.  For example, C-c C-l
 file:../foo.org RET foo puts
 [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
 expecting [[file:../foo.org][foo]].

That is the default behavior. You can change it by setting
org-link-file-path-type to relative.

 And in addition there was a fix pushed to repo.or.cz

Carsten is fast!! I turns out I tested the behavior with the applied
patch installed (having just updated org-mode). Sorry for the noise.

Best,
Matt

___
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: \nbsp usage

2010-07-13 Thread Bernt Hansen
Erik Butz erik.b...@googlemail.com writes:

 Hi all,

 I have a somewhat stupid problem, but didn't find a solution in the
 manual or the list archive.
 I want to use the \nbsp macro to generate a '~' symbol for Latex, but
 I don't seem to get it to work correctly in my case.
 I want to write 200~m²

 If I do: 200\nbspm^2
 it gets exported as: 200\nbspm$^2$,  so the symbol is not recognized.

 If I do: 200\nbsp m^2
 it gets exported as 198~ m$^2$, so in addition to the nbsp there is
 another space at which a linebreak can occur

 trying: 200\nbsp{}m^2 in analogy to other commands
 I get: 200~\{\}m$^2$, so the parentheses are not recognized as
 belonging to the command.

 I am using the latest org version (just did a git pull and checked
 that the behavior is still there) with emacs 23.1.1

 Any hints appreciated.

Hi Erik,

This seems to work for me:

,[ sample org file ]
| * nbsp
| If I do: one two three four five six seven eight nine ten eleven twelve 
200\nbsp m^2 it gets exported
`

this exports as 

,[ latex output ]
| ...
| \label{sec-1}
| 
| If I do: one two three four five six seven eight nine ten eleven twelve 200~ 
m\^{}2 it gets exported
| \end{document}
`

and when I look at that as a PDF it doesn't break between the 200 and
m^2.  I tried adding x and xx before the 200 and it pushes the entire
thing to the next line.  I can't make it break on a line so 200 is at
the end of one line and m^2 is on the following line.

Does this work for you?

-Bernt

___
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] Pull items from another file (by tag) and show them in another

2010-07-13 Thread Marcelo de Moraes Serpa
Hello list,

This might sound crazy, but here's what I'd like to do:

I have a reference.org file full of interesting notes I take during
the day. It even includes saying that I tag as mantras, such as this
one, from Paulo Coelho:  Be the best, but get prepared to be
attacked. Only mediocrity is safe ;)

I also have a horizons_of_focus.org (from GTD) a file I review every
week or so, and it has a list of MANTRAS I want to internalize. So,
when I capture a mantra, I just want it to go to my reference, but I
want to refer to it on horizons_of_focus. Is there a way (using babel
or some other crazy elisp) to pull entries tagged as TAG (in this
case :MANTRA:) and list them under a headline? This would be akin to a
custom view of data stored in other source (another org file).

Thanks,

Marcelo.

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


[Orgmode] [PATCH] org-capture - using `file' as template

2010-07-13 Thread Johan Friis

Setting up capture to use templates from file in the latest git seemed
to cause some errors. I looked into it and wrote this small patch. It
could probably use some love, seeing as I am quite new to org-mode,
elisp and emacs in general.

The error I was getting was related to testing (string-match ...) on
a list. The fix is to check if txt is a list before doing the test. In
addition I updated the customize interface to use `file' instead of
`file-contents'. This seems to be the current way of doing things.

Please note: This is my first time posting here. Please let me know if
there are some rules to follow that I missed. And thanks for a great
piece of software :)

Regards,

Johan


diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2cb6876..da0925c 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -285,7 +285,7 @@ calendar   |  %:type %:date
   (choice :tag Template
   (string)
   (list :tag File
-(const :format  file-contents)
+(const :format  file)
 (file :tag Template file))
   (list :tag Function
 (const :format  function)
@@ -981,14 +981,15 @@ Point will remain at the first line after the inserted 
text.
   (org-capture-put :key (car entry) :description (nth 1 entry)
   :target (nth 3 entry))
   (let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
-(when (or (not txt) (not (string-match \\S- txt)))
-  ;; The template may be empty or omitted for special types.
-  ;; Here we insert the default templates for such cases.
-  (cond
-   ((eq type 'item) (setq txt - %?))
-   ((eq type 'checkitem) (setq txt - [ ] %?))
-   ((eq type 'table-line) (setq txt | %? |))
-   ((member type '(nil entry)) (setq txt * %?\n  %a
+(when (or (not txt) (not (listp txt)))
+  (when (or (not txt) (not (string-match \\S- txt)))
+;; The template may be empty or omitted for special types.
+;; Here we insert the default templates for such cases.
+(cond
+ ((eq type 'item) (setq txt - %?))
+ ((eq type 'checkitem) (setq txt - [ ] %?))
+ ((eq type 'table-line) (setq txt | %? |))
+ ((member type '(nil entry)) (setq txt * %?\n  %a)
 (org-capture-put :template txt :type type)))
 
 (defun org-capture-goto-target (optional template-key)


___
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: \nbsp usage

2010-07-13 Thread Nick Dokos
Bernt Hansen be...@norang.ca wrote:

 Erik Butz erik.b...@googlemail.com writes:
 
  Hi all,
 
  I have a somewhat stupid problem, but didn't find a solution in the
  manual or the list archive.
  I want to use the \nbsp macro to generate a '~' symbol for Latex, but
  I don't seem to get it to work correctly in my case.
  I want to write 200~m=C2=B2
 
  If I do: 200\nbspm^2
  it gets exported as: 200\nbspm$^2$,  so the symbol is not recognized.
 
  If I do: 200\nbsp m^2
  it gets exported as 198~ m$^2$, so in addition to the nbsp there is
  another space at which a linebreak can occur
 
  trying: 200\nbsp{}m^2 in analogy to other commands
  I get: 200~\{\}m$^2$, so the parentheses are not recognized as
  belonging to the command.
 
  I am using the latest org version (just did a git pull and checked
  that the behavior is still there) with emacs 23.1.1
 
  Any hints appreciated.
 
 Hi Erik,
 
 This seems to work for me:
 
 ,[ sample org file ]
 | * nbsp
 | If I do: one two three four five six seven eight nine ten eleven twelve 2=
 00\nbsp m^2 it gets exported
 `
 
 this exports as=20
 
 ,[ latex output ]
 | ...
 | \label{sec-1}
 |=20
 | If I do: one two three four five six seven eight nine ten eleven twelve 2=
 00~ m\^{}2 it gets exported
 | \end{document}
 `
 
 and when I look at that as a PDF it doesn't break between the 200 and
 m^2.  I tried adding x and xx before the 200 and it pushes the entire
 thing to the next line.  I can't make it break on a line so 200 is at
 the end of one line and m^2 is on the following line.
 
 Does this work for you?
 

Bernt,

I suspect that you cannot decide the question with a simple experiment
like this, but I have no counterexample to offer.

However, Knuth warns explicitly (p.91 of my version of the TeXbook,
paperback 19th printing, Oct. 1990) that ...you shouldn't leave any blanks
next to the ~, since they will count as additional spaces.

It may well be that TeX's line-breaking algorithm does the right thing in
the example, but when push comes to shove in a *really* complicated situation,
it might be forced to choose the space after the tilde to break the line at.

Regards,
Nick

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


[Orgmode] Inserting date/time stamps including seconds

2010-07-13 Thread Miguel Ruiz
Is it possible to insert date/time stamps (active or inactive) including 
seconds?

I have tested that entries like [2010-07-13 tue 14:53:37] works perfectly.

Sorry, if this question have been answered; every second search I have done 
get me to first ..., second ...

Miguel Ruiz

Sevilla, Spain







___
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