Re: [O] SageTeX in export

2012-08-17 Thread Nick Dokos
mailingli...@nawaz.org wrote:

 Hi,
 
 Some background for the interested:
 
 Sage (http://www.sagemath.org/) is a free open source mathematics
 system. It essentially takes a number of well known open source math
 packages (Pari/GP, Maxima, etc) and provides it all to you under one
 interface, all glued together with Python. 
 
 I highly recommend it. There was even a post here a few days ago
 regarding including Sage into Org-Babel.
 
 I want to talk about SageTeX. It's a package that allows you to call
 Sage code from within your LaTeX document. You insert a Sage command
 (e.g. plotting some data) and it returns the result - either an image or
 relevant LaTeX code. Kind of like literate programming.
 
 Here's how it works. If your document is file.tex and it uses the
 SageTeX package, you run pdflatex on the .tex file. This will then
 produce a sage script called file.sagetex.sage. You then manually run
 this sage script using Sage. Then you run pdflatex again and it will
 include the results from your sage script into the document.
 
 I'm finding myself embedding Sage code into a document I'm writing which
 is meant for a LaTeX export. My problem is that Org mode's LaTeX export
 can't handle the steps in my previous paragraph. I'm sure it's trivial
 to do via some hook, but I'm no good at Elisp.
 
 All I need is a way for the export to:
 
 1. After running pdflatex, check if there is a file called
org_file_name.sagetex.sage.
 2. If it's present, run sage on it, and then rerun pdflatex.
 3. If it's not, nothing more is left to do.
 
 I'd really appreciate if someone could tell me how to enable this with
 Org mode's export.
 

All you have to do is set the variable org-latex-to-pdf-process,
something like this [fn:1]

(setq org-latex-to-pdf-process 
  '(pdflatex %f
if [ -f %b.sagetex.sage ] ;then sage %b.sagetex.sage ;fi
pdflatex %f
pdflatex %f))

although as Achim Gratz pointed out in this thread:

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

it's probably better to use the Customization interface, particularly if
one is an elisp beginner - do C-h v org-latex-to-pdf-process RET, read the
documentation for the variable and then click the customize link at the bottom
to get to the customization page.

Nick

Footnotes:

[fn:1] Note that the default setting for this variable is three invocations of
   pdflatex, so I'm just interpolating a call to sage.




Re: [O] make test on OSX

2012-08-17 Thread Neuwirth Erich
I do not kow hat you changed, but since today all tests pass.

On Aug 14, 2012, at 8:49 AM, Neuwirth Erich erich.neuwi...@univie.ac.at wrote:

 I am not (yet?) fluent enough in elisp to be able to debug other people's 
 code ;-)
 
 On Aug 13, 2012, at 9:21 AM, Bastien b...@gnu.org wrote:
 
 Hi Erich,
 
 Neuwirth Erich erich.neuwi...@univie.ac.at writes:
 
 Is there any way I can find out more?
 
 By looking for an actual bug related to the failed test?
 
 I have no other idea, sorry.
 
 -- 
 Bastien
 
 




[O] add entries to *emphasis-alist

2012-08-17 Thread Philipp Kroos
Hi,

is it still possible to add items to the emphasis alists?
I'm preparing a presentation with orgmode/beamer and try to get a markup 
for alert using '@'.
According to some (old..) thread 
(http://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00592.html)
I added an entry to org-emhasis-alist and
org-export-latex-emphasis-alist, see below.
Unfortunately, this is not working, '@noise@' is exported to '@noise@' 
literally.
I had a quick look at the source in org-latex.el and if I understand it 
correctly, the fontification is done in org-export-latex-fontify 
according to matches with org-emph-re, defined in org.el. But 
org-emph-re doesn't match with '@'- consequently, the markup is ignored.  

So do I have to redefine org-emph-re as well or is there any other trick?
I'm using the current org from git.

Thanks all!


;; this is how I add the entries to the lists
  (setq org-emphasis-alist
(append org-emphasis-alist
'((@ org-warning b /b
  (setq org-export-latex-emphasis-alist
(append org-export-latex-emphasis-alist
'((@ \\alert{%s} nil

;; this is a minimal example
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_FRAME_LEVEL: 1

* Testsection
** with some important @noise@



[O] Bug: org-export-with-priority: t broken [7.8.11]

2012-08-17 Thread Friedrich Delgado
Package: org-mode
Version: 7.8.11-2
Severity: minor


The following minimal org-file:

,[ foo.org ]
  *** Header
  *

`

With nothing changed from the site-configuration except for
org-export-with-priority: t, resuts in:

,[ *Messages* ]
  org-export-cleanup-toc-line: Wrong type argument: stringp, nil
`

Changing the second line to

,
  * Bla
`

fixes the problem, but I have lots of org files with spurious stars
(because of the way I use org-remember).

(setq org-export-with-priority nil) also helps.

Sebastian: Maybe it would be useful if org-submit-bug-report from the
debian package could add the debian specific information and
automatically forward the bug to b...@debian.org?

Emacs  : GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-04-07 on trouble, modified by Debian
Package: Org-mode version 7.8.11

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (50, 
'oneiric'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.0-8.dmz.1-liquorix-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to de_DE.utf8)
Shell: /bin/sh linked to /bin/bash

Versions of packages org-mode depends on:
ii  dpkg 1.16.4.3
ii  emacs23-lucid [emacs23]  23.4+1-3
ic  emacs23-nox [emacs23]23.2+1-5.1
ii  install-info 4.13a.dfsg.1-10

org-mode recommends no packages.

Versions of packages org-mode suggests:
ii  ditaa0.9+ds1-3
pn  easypg   none
pn  remember-el  none

-- no debconf information



[O] possible bug : multiple datetree files

2012-08-17 Thread Richard Riley

I added a new datetree org file template in addition to my original
journal.org :-

in org-capture-templates
,
| (j journal entry (file+datetree journal.org)
|  * %?\n\t:PROPERTIES:\n\t:DateCreated: 
%T\n\t:Link: %a\n\t:END:\n)
| (c barwebs changelog entry (file+datetree 
changelog.org)
|  * %?\n\t:PROPERTIES:\n\t:DateCreated: 
%T\n\t:Link: %a\n\t:END:\n)
`

When I invoke my barwebs changelog capture and commit it the status says
changelog.org is updated. Its not. journal.org is updated with the new
capture.

Is this a bug in my definition perhaps
? 




[O] Bug: icalendar export skips todos with a scheduled time-range [7.8.11]

2012-08-17 Thread Friedrich Delgado
Hi!

If I have an org-file containing a todo with a scheduled date range, like
this:

,[ foo.org ]
  *** TODO Weekend with the lads
  SCHEDULED: 2012-05-04 Fr--2012-05-08 Di
`

and try to export it via org-export-icalendar-this-file, the resulting
foo.ics will look like this

,[ foo.ics ]
  BEGIN:VCALENDAR
  VERSION:2.0
  X-WR-CALNAME:foo
  PRODID:-//Friedrich Delgado//Emacs with Org-mode//EN
  X-WR-TIMEZONE:Europe/Berlin
  X-WR-CALDESC:nil
  CALSCALE:GREGORIAN
  END:VCALENDAR
`

(i.e.: contain no appointments at all)

I think the responsible section of code may reside in
[[file:/usr/share/emacs23/site-lisp/org-mode/org-icalendar.el::defun%20org-print-icalendar-entries][Function:
 org-print-icalendar-entries]]

(org-link for your convenience, I hope), more specifically starting
with line 360:

,
  (if (looking-at re2)
  (progn
(goto-char (match-end 0))
(setq ts2 (match-string 1)
  inc (not (string-match [0-9]\\{1,2\\}:[0-9][0-9] ts2
(setq tmp (buffer-substring (max (point-min)
 (- pos org-ds-keyword-length))
pos)
  ts2 (if (string-match 
[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\) ts)
  (progn
(setq inc nil)
(replace-match \\1 t nil ts))
ts)
  deadlinep (string-match org-deadline-regexp tmp)
  scheduledp (string-match org-scheduled-regexp tmp)
  todo (org-get-todo-state)
  ;; donep (org-entry-is-done-p)
  ))
`

From my basic understanding of the code-flow it looks like re2 ==
(concat --?-?\\( org-ts-regexp \\)) is meant to match date-ranges,
but the code in the t branch of the if doesn't set deadlinep,
schedulep and todo, preventing all further processing of the entry.

But I may be wrong about the intentions of that function.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668496


Emacs  : GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-04-07 on trouble, modified by Debian
Package: Org-mode version 7.8.11

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 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-babel-pre-tangle-hook '(save-buffer)
 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-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 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-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 )
-- 
Friedrich Delgado frie...@nomaden.org
Laziness led to the invention of the most useful tools.



[O] export literal examples font-lock: ess-mode

2012-08-17 Thread Paul
I write do-files for Stata code in emacs using ESS, which marks up my
code and sends it to a comint-mode buffer for evaluation.  I'd like to
include some source code in an org file, as in the below examle:

#+begin_src -n
foreach var of varlist _all{
 rename `var' new_`var'
}
#+end_src

I have a couple of questions:
How can I use ess fontification in this snippet and in the file to
which I export?  The manual says I need to specify the name of the
major mode, however including #+begin_src ess -n results in the
following error org-edit-src-code: No such language mode: nil-mode.
I've tried using ess-mode, and anything else I can think of, to no
avail.  What should I include?

Also, assuming I'm able to get the fontification to work, is there a
way to customize it for exporting?

Finally, org-babel looks tremendously useful.  Is there a way to
harness it's capabilities for an unsupported language like Stata's?

Thanks to everyone who read this through, and in particular to anyone
who can help!
Paul



Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?

2012-08-17 Thread Eric Schulte

 The `org-src-in-org-buffer' macro may be used from an edit buffer to run
 elisp inside the code block, in the org-mode buffer of the edit buffer.
 e.g., the following 

 ;; -*- emacs-lisp -*-
 (org-src-in-org-buffer (message --%S (org-babel-get-src-block-info)))

 Where is org-src-in-org-buffer macro defined. Searching all dot el files
 in org folder does not show anything neither does C-h f show anything
 similar.

(describe-function 'org-src-in-org-buffer) shows that
org-src-in-org-buffer can be found in org-src.el (line 679 in my
version).

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



[O] Bug: html export converts to lt with #!RESULTS option [7.8.11]

2012-08-17 Thread Feiming Chen


Please see the attached test file (a.org), which I have tested with emacs 
-Q.  


In test 1, the html export (C-c C-e H) translates the line  !--
comment -- to  lt;!-- comment --gt;. 

In test 2, the translation is OK.

I am working on a .org file where I am using R code to generate the html
code, thus the #+RESULTS tag is generated by executing the R code
block.  I believe I don't have this problem with previous versions of
org (maybe before 7.8?).

Thanks a lot for your help! 

-- Feiming Chen

--

Emacs  : GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0)
 of 2012-08-13 on fmc.work
Package: Org-mode version 7.8.11

current state:
==
(setq
 org-export-blocks '((src org-babel-exp-src-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 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-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-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )

a.org
Description: Binary data


Re: [O] export literal examples font-lock: ess-mode

2012-08-17 Thread Ista Zahn
On Fri, Aug 17, 2012 at 9:23 AM, Paul paulburk...@gmail.com wrote:
 I write do-files for Stata code in emacs using ESS, which marks up my
 code and sends it to a comint-mode buffer for evaluation.  I'd like to
 include some source code in an org file, as in the below examle:

 #+begin_src -n
 foreach var of varlist _all{
  rename `var' new_`var'
 }
 #+end_src

 I have a couple of questions:
 How can I use ess fontification in this snippet

#+begin_src stata
  foreach var of varlist _all{
rename `var' new_`var'
  }
#+end_src

works for me.

and in the file to
 which I export?

I think this depends on your export target. It should just work for
html, but pdf will be more work.

  The manual says I need to specify the name of the
 major mode, however including #+begin_src ess -n results in the
 following error org-edit-src-code: No such language mode: nil-mode.
 I've tried using ess-mode, and anything else I can think of, to no
 avail.  What should I include?

I think #+begin_src stata is correct.


 Also, assuming I'm able to get the fontification to work, is there a
 way to customize it for exporting?

 Finally, org-babel looks tremendously useful.  Is there a way to
 harness it's capabilities for an unsupported language like Stata's?

C-c ' will open a temporary buffer in ess mode so you can edit and run
the code using ess, and tangling will work as expected. The only thing
you need babel support for is actually running the code in org-mode
and inserting the results block.

I've made weak attempts to add stata support to babel, but my
elisp-foo is not strong enough.


 Thanks to everyone who read this through, and in particular to anyone
 who can help!
 Paul




Re: [O] [patch] change indentation logic for edit-src

2012-08-17 Thread Ken Williams
Hi,

I know Bastien's out of touch for a few days, but could someone say whether a 
patch to the mailing list is the right place to put it, or should I put it on 
GitHub or somewhere else?  Thanks.

 -Ken

 From: Ken Williams
 Sent: Thursday, August 16, 2012 2:30 PM
 To: emacs-orgmode@gnu.org
 Subject: [patch] change indentation logic for edit-src

 Following on a message from a few days ago, I've prepared a patch (attached) 
 that alters the behavior of 'org-edit-src-exit' ...

CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. Any 
unauthorized review, use, disclosure or distribution of any kind is strictly 
prohibited. If you are not the intended recipient, please contact the sender 
via reply e-mail and destroy all copies of the original message. Thank you.



[O] Testing the git latest

2012-08-17 Thread Ken Williams
I recently made some local changes to the latest git HEAD, and I wanted to run 
regression tests.  It didn't work, though - here's the error I got:

% /cygdrive/c/Program\ Files\ \(x86\)/GNU\ Emacs\ 24.1/bin/emacs -Q --batch \
-L lisp/ -L testing/ -L testing/lisp -l lisp/org.el \
-l lisp/org-id.el -l testing/org-test.el \
--eval (progn (org-reload) (setq org-confirm-babel-evaluate nil)) \
-f org-test-run-batch-tests
Searching for program: no such file or directory, /bin/zsh

I'm on Cygwin, is that not a supported testing configuration maybe?


--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com



CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. Any 
unauthorized review, use, disclosure or distribution of any kind is strictly 
prohibited. If you are not the intended recipient, please contact the sender 
via reply e-mail and destroy all copies of the original message. Thank you.



Re: [O] [patch] change indentation logic for edit-src

2012-08-17 Thread Nick Dokos
Ken Williams ken.willi...@windlogics.com wrote:

 Hi,
 
 I know Bastien's out of touch for a few days, but could someone say whether a 
 patch to the mailing list is the right place to put it, or should I put it on 
 GitHub or somewhere else?  Thanks.
 
  -Ken
 
  From: Ken Williams
  Sent: Thursday, August 16, 2012 2:30 PM
  To: emacs-orgmode@gnu.org
  Subject: [patch] change indentation logic for edit-src
 
  Following on a message from a few days ago, I've prepared a patch 
  (attached) that alters the behavior of 'org-edit-src-exit' ...
 

The mailing list: see the guidelines at

http://orgmode.org/worg/org-contribute.html#sec-4

Nick




Re: [O] Question about org-habit and agenda views

2012-08-17 Thread Tomas Grigera
On Thu, Aug 16, 2012 at 11:28 AM, Thomas Moyer tommo...@gmail.com wrote:
 I have a set of habits that I do Monday through Friday (weekdays only) and
 the best suggestion I have found for this is to have 5 individual TODOs (one
 for each day). This seems to work well for the most part, but I have found
 one minor annoyance that I can't find a solution for.

 If I don't do one of the habits on Monday, that entry will appear as overdue
 until the next week on Monday when it comes around again. Is there a way to
 hide overdue habits? I don't want to mark it as DONE, since it wasn't even
 when it was late.

Hi Thomas,

In a similar situation, I use a CANCELLED, or similar, TODO state.
It doesn't mark the task as DONE and prevents it from appearing in the
agenda as overdue.

Tomas



[O] Can't tangle inline source code

2012-08-17 Thread Luis Muñiz
Hi there!  I'm having some problems while tangling.  More
specifically, I can tangle a src block of code:
#+BEGIN_SRC emacs-lisp :tangle block.el :results silent
  (format-time-string %Y/%m_%b/%d_%a :: [%H:%M:%S]
  )
#+END_SRC

But I can't tangle the inlined equivalent form:
  src_emacs-lisp[ :tangle inline.el :results silent
]{(format-time-string %Y/%m_%b/%d_%a :: [%H:%M:%S])}

I'm using org-mode version 7.8.11 from the GIT repository (updated a
couple hours ago, release_7.8.11-505-g952d72), and Emacs 23.2.1.
Same results using shell code (sh), and/or with Org Version 7.4.

In order to repeat the test, simply paste this whole message in an
Emacs (org-)buffer and tangle (C-c C-v t) it.  It should generate two
files block.el and inline.el, but only the former appears.

Regards,
--
  - Luis Muñiz



Re: [O] Testing the git latest

2012-08-17 Thread Achim Gratz
Ken Williams writes:
 I'm on Cygwin, is that not a supported testing configuration maybe?

Then why don't you use Cygwin's Emacs?  Or read this:

http://orgmode.org/worg/dev/org-build-system.html#sec-3-1-4



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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] add entries to *emphasis-alist

2012-08-17 Thread Sebastien Vauban
Hi Philipp,

Philipp Kroos wrote:
 is it still possible to add items to the emphasis alists?
 I'm preparing a presentation with orgmode/beamer and try to get a markup 
 for alert using '@'.
 According to some (old..) thread 
 (http://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00592.html)
 I added an entry to org-emhasis-alist and
 org-export-latex-emphasis-alist, see below.
 Unfortunately, this is not working, '@noise@' is exported to '@noise@' 
 literally.
 I had a quick look at the source in org-latex.el and if I understand it 
 correctly, the fontification is done in org-export-latex-fontify 
 according to matches with org-emph-re, defined in org.el. But 
 org-emph-re doesn't match with '@'- consequently, the markup is ignored.  

 So do I have to redefine org-emph-re as well or is there any other trick?
 I'm using the current org from git.

 Thanks all!


 ;; this is how I add the entries to the lists
   (setq org-emphasis-alist
 (append org-emphasis-alist
 '((@ org-warning b /b
   (setq org-export-latex-emphasis-alist
 (append org-export-latex-emphasis-alist
 '((@ \\alert{%s} nil

 ;; this is a minimal example
 #+LaTeX_CLASS: beamer
 #+LaTeX_CLASS_OPTIONS: [presentation]
 #+BEAMER_FRAME_LEVEL: 1

 * Testsection
 ** with some important @noise@

You have to make that customization *before* loading Org in your .emacs file.
Weird, never really understood why, but that's like that.

Best regards,
Seb

-- 
Sebastien Vauban




Re: [O] add entries to *emphasis-alist

2012-08-17 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 You have to make that customization *before* loading Org in your .emacs file.
 Weird, never really understood why, but that's like that.
 

The point is that the value of org-emphasis-alist (as well as the value
of org-emphasis-regexp-components) is used in order to calculate the
value of org-emph-re by calling the function org-set-emph-re afterwards:
it's org-emph-re that's used for the all the gory calculations, not
org-emphasis-alist, which just provides a nicer interface.

So if you arrange to call the org-set-emph-re function afterwards, you
can change org-emphasis-alist at any time. Customize makes it easy, in
that it does that automatically (see the :set property
of org-emphasis-alist).

If you do the setq before loading org, then what happens is that when the
defcustom is encountered, the value of the :set property (a function) is
called: the modified value of org-emphasis-alist is then used to calculate
org-emph-re, instead of the original default. If you do it after, none
of that happens and it's as if you never changed it.

Nick

PS BTW, the docstring for the variable says: Use customize to modify
   this, or restart Emacs after changing it but I'm not sure that's
   correct: if you change the variable in one session, the value is not
   going to be propagated to the next session, unless you use customize
   or put the setq in .emacs. In the latter case, it's not going to work
   unless you do it the way Seb describes: set it before loading Org.
   So restarting emacs is *not* enough. Am I missing something?




Re: [O] Can't tangle inline source code

2012-08-17 Thread Eric Schulte
I don't believe tangling is supported for inline code blocks.

The original reason for implementing inline code blocks was purely for
the inclusion of inline results in export.

Best,

Luis Muñiz org-m...@lmunix.net writes:

 Hi there!  I'm having some problems while tangling.  More
 specifically, I can tangle a src block of code:
 #+BEGIN_SRC emacs-lisp :tangle block.el :results silent
   (format-time-string %Y/%m_%b/%d_%a :: [%H:%M:%S]
   )
 #+END_SRC

 But I can't tangle the inlined equivalent form:
   src_emacs-lisp[ :tangle inline.el :results silent
 ]{(format-time-string %Y/%m_%b/%d_%a :: [%H:%M:%S])}

 I'm using org-mode version 7.8.11 from the GIT repository (updated a
 couple hours ago, release_7.8.11-505-g952d72), and Emacs 23.2.1.
 Same results using shell code (sh), and/or with Org Version 7.4.

 In order to repeat the test, simply paste this whole message in an
 Emacs (org-)buffer and tangle (C-c C-v t) it.  It should generate two
 files block.el and inline.el, but only the former appears.

 Regards,
 --
   - Luis Muñiz


-- 
Eric Schulte
http://cs.unm.edu/~eschulte



[O] Bug#685154: Acknowledgement (Bug: org-export-with-priority: t broken [7.8.11])

2012-08-17 Thread Debian Bug Tracking System
Thank you for filing a new Bug report with Debian.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Sebastien Delafond s...@debian.org

If you wish to submit further information on this problem, please
send it to 685...@bugs.debian.org.

Please do not send mail to ow...@bugs.debian.org unless you wish
to report a problem with the Bug-tracking system.

-- 
685154: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685154
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Re: [O] export literal examples font-lock: ess-mode

2012-08-17 Thread Paul Burkander
ah! for some reason capitalizing BEGIN_SRC seems to have been causing
problems.

Thanks for your help!

On Fri, Aug 17, 2012 at 11:12 AM, Ista Zahn istaz...@gmail.com wrote:

 On Fri, Aug 17, 2012 at 9:23 AM, Paul paulburk...@gmail.com wrote:
  I write do-files for Stata code in emacs using ESS, which marks up my
  code and sends it to a comint-mode buffer for evaluation.  I'd like to
  include some source code in an org file, as in the below examle:
 
  #+begin_src -n
  foreach var of varlist _all{
   rename `var' new_`var'
  }
  #+end_src
 
  I have a couple of questions:
  How can I use ess fontification in this snippet

 #+begin_src stata
   foreach var of varlist _all{
 rename `var' new_`var'
   }
 #+end_src

 works for me.

 and in the file to
  which I export?

 I think this depends on your export target. It should just work for
 html, but pdf will be more work.

   The manual says I need to specify the name of the
  major mode, however including #+begin_src ess -n results in the
  following error org-edit-src-code: No such language mode: nil-mode.
  I've tried using ess-mode, and anything else I can think of, to no
  avail.  What should I include?

 I think #+begin_src stata is correct.

 
  Also, assuming I'm able to get the fontification to work, is there a
  way to customize it for exporting?
 
  Finally, org-babel looks tremendously useful.  Is there a way to
  harness it's capabilities for an unsupported language like Stata's?

 C-c ' will open a temporary buffer in ess mode so you can edit and run
 the code using ess, and tangling will work as expected. The only thing
 you need babel support for is actually running the code in org-mode
 and inserting the results block.

 I've made weak attempts to add stata support to babel, but my
 elisp-foo is not strong enough.

 
  Thanks to everyone who read this through, and in particular to anyone
  who can help!
  Paul
 



[O] get rid of empty caption on html export?

2012-08-17 Thread Matt Price
Hi,

I have asimpl table in an org document which, when i export to HTML, is for
some reason accompanied by an empty caption/caption tag.  My wordpress
theme causes the caption to take up valuable space...  is there any way to
surpress the caption tag from being created on export?  If not, maybe
osmeone has a css trick that will stop the caption tag from taking up
vertical space on the screen if there's nothing inside it?

Thanks as always!
matt


Re: [O] get rid of empty caption on html export?

2012-08-17 Thread Nick Dokos
Matt Price mopto...@gmail.com wrote:

  I have asimpl table in an org document which, when i export to HTML,
 is for some reason accompanied by an empty caption/caption tag. 
 My wordpress theme causes the caption to take up valuable space...  is
 there any way to surpress the caption tag from being created on
 export?  If not, maybe osmeone has a css trick that will stop the
 caption tag from taking up vertical space on the screen if there's
 nothing inside it? 

org-html.el says:

,
|   ;; Since the output of HTML table formatter can also be used in
|   ;; DocBook document, we want to always include the caption to make
|   ;; DocBook XML file valid.
|   (push (format caption%s/caption (or caption )) html)
`

which seems a bit smelly to me, but it explains the empty caption.
Sorry, can't help with CSS.

Nick



Re: [O] auto-push to mobile (but only when editing org buffer)

2012-08-17 Thread Ken Mankoff
On Thu, Aug 16, 2012 at 2:54 PM, Ken Mankoff mank...@gmail.com wrote:
 Hi Marcel,

 On Wed, Aug 15, 2012 at 12:33 AM, Marcel van der Boom mar...@hsdev.com 
 wrote:
 Perhaps you will find https://gist.github.com/3111823 interesting. It
 contains a bit of code to do the org-mobile-push asynchronously (and
 notify me about it when done). This makes the push work in the
 background, in my case it can take quite a while, and not interfere
 with normal usage.


 That is a very useful snippet. Thank you for sharing.

-k.

It took a bit of work to get that snippet working on my system, but it
works well now. On the flip side, the following watches for incoming
changes and automagically calls org-mobile-pull when needed...

;; http://stackoverflow.com/questions/3456782/emacs-lisp-how-to-monitor-ch$
(defun install-monitor (file secs)
  (run-with-timer
   0 secs
   (lambda (f p)
 (unless ( p (second (time-since (elt (file-attributes f) 5
   ;(message File %s changed! f)))
   (org-mobile-pull)))
   file secs))
(defvar monitor-timer (install-monitor ~/Dropbox/MobileOrg/mobileorg.org$
  Check if file changed every 30 s.)

  -k.



Re: [O] org-link minor mode

2012-08-17 Thread Sean O'Halpin
On Tue, Aug 14, 2012 at 11:57 AM, Christopher J. White
orgm...@grierwhite.com wrote:
 This is pretty cool, Sean.  One issue I'm having is that it does not
 properly handle breaking the link:

Thanks for trying it out. I think I've fixed the link breaking
problem (using font-lock-unfontify-region-function). Source in github
at: https://github.com/seanohalpin/org-link-minor-mode

Regards,
Sean



Re: [O] [GSoC] Org Merge Driver Update

2012-08-17 Thread Simon Thum

Hi Andrew,

sorry to report less exciting things. I could not compile - the repo 
contains two invalid links into my system:


lrwxrwxrwx 1 simon users38 Aug 18 04:01 tap-driver.sh - 
/usr/share/automake-1.12/tap-driver.sh
lrwxrwxrwx 1 simon users36 Aug 18 04:01 test-driver - 
/usr/share/automake-1.12/test-driver


I'm on gentoo and do not have automake 1.12. Using a link not the right 
thing IMO.


II removed those from being referenced in source files and came farther, 
only for gcc to balk on


doc_ref.h:54:3: error: redefinition of typedef ‘doc_ref’
doc_ref.h:31:24: note: previous declaration of ‘doc_ref’ was here
doc_ref.h: In function ‘doc_ref_check_for_circular_conflict’:

and other such occurrences.

I'm not sure about the cause, but maybe typedefs conflict with struct names?

HTH,

Simon

On 08/14/2012 01:15 AM, Andrew Young wrote:

Hello Everyone,

I've been working on a merge driver for org-mode documents over the
summer as a Google Summer of Code project. I just wanted to show
everyone some progress on the merge driver.

There are some new examples you can see at the project page [1][2], and
instructions on how to build and use it.

the source is available here: git clone git://orgmode.org/org-merge-driver.git

I'd really appreciate if anyone could take the merge driver out for a
test spin, and come back with any kind of feedback, such as:

- file output
- customization
- the user interface
- the merging rules
- new features and element specific support
- testing
- neat ideas, etc.

There is only about a week left in GSoC, but I'm planning to continue to
develop the merge driver past the end of GSoC.

Please take a look, and thanks,

Andrew Young

[1] project page:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
[2] examples:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html







Re: [O] org-link minor mode

2012-08-17 Thread Sean O'Halpin
On Tue, Aug 14, 2012 at 8:49 AM, Bastien b...@gnu.org wrote:
 Sean O'Halpin sean.ohal...@gmail.com writes:

 I've been hacking this weekend to try to create a minor mode that
 enables org-mode bracket links in modes other than org-mode.
[snip]
 Yes.  This might especially be useful in modes where people use
 orgstruct as well -- and could well end up being part of orgstruct,
 if that's not too invasive.

I see it as orthogonal to orgstruct - they could happily co-exist side by side.
I've just tested that though and it seems they don't. I'll try to fix that.

 I'm not sure how to prevent turning on org-link-minor-mode
 from an org-mode buffer

 Simply use

 (unless (derived-mode-p 'org-mode)

 on the top of your function?

Thanks - I used your suggestion as you can see here:

  
https://github.com/seanohalpin/org-link-minor-mode/blob/master/org-link-minor-mode.el

I realised the problem I had was that I can't prevent entering the minor mode
because by the time I check for org-mode, the minor mode has already been
entered so I have to turn it off again.

BTW, I've refactored the code to simplify it and added more link types.

Regards,
Sean