Re: [O] PATCH: Processing language support in Babel

2015-03-31 Thread Jarmo Hurri

Greetings.

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 +;; This differs from most standard languages in that
 +;;
 +;; 1) there is no such thing as a session in processing
 +;;
 +;; 2) results can only be exported as html; in this case, the
 +;;processing code is embedded via a file into a javascript block
 +;;using the processing.js module; the script then draws the
 +;;resulting output when the web page is viewed in a browser
 +;;
 +;; 3) when not exporting html, evaluation of processing code results
 +;;in interactive viewing of the results via Processing 2.0 Emacs
 +;;mode; note that the user is responsible for making sure that
 +;;processing.js is available on the website

 It is awkward (and fragile) to guess the current export back-end used.
 Wouldn't it be simpler to do 2 if :results is html and 3 otherwise?

What the user will want is to view the sketch in an external viewer when
not exporting, so (s)he can see what will eventually be exported. So the
user would have :results html set, but would still like to do 3 in the
buffer.

I think what I could try to do is to bind some key combination so that
it will do 3 when inside a Processing block. That is, remove 3 from
org-babel-execute-processing. What would also solve some other issues
you mention below. Would that be ok?

 +;; declaration needed because requiring ob does not define the variable
 +(eval-when-compile (defvar org-babel-temporary-directory))

 Isn't

   (defvar org-babel-temporary-directory)

 sufficient?

Could be, but it would mean that that variable would be defvar'd
multiple times (when not compiling). Maybe that is ok in elisp, but it
sounds weird programming practice to me. Or?

 +;; default header tags depend on whether exporting html or not; if not
 +;; exporting html, then no results are produced; otherwise results are
 +;; html

 It shouldn't.

Ok, this was addressed in the suggestion above.

 +;; a running index for producing unique ids for processing sketches
 +(defvar org-babel-processing-sketch-number 0)
 +(add-hook 'org-export-before-processing-hook
 +  (lambda (backend) (setq org-babel-processing-sketch-number 0)))

 It pollutes `org-export-before-processing-hook'. What about using sha1
 of the contents of the code block instead?

I'll do that.

 +(defun org-babel-execute:processing (body params)
 +  Execute a block of Processing code.
 +This function is called by `org-babel-execute-src-block'.
 +  (let ((sketch-code
 + (org-babel-expand-body:generic
 +  body
 +  params
 +  (org-babel-variable-assignments:processing params
 +(if (and (not (null org-babel-exp-reference-buffer))
 + (string= org-export-current-backend html))

 This will not work if current back-end is derived from html.

Addressed above.

 +;; results are html if exporting html
 +(let ((sketch-canvas-id
 +   (concat org-processing-canvas-
 +   (number-to-string org-babel-processing-sketch-number

   (format org-processing-canvas-%d org-babel-processing-sketch-number)

 +  (setq org-babel-processing-sketch-number
 +(1+ org-babel-processing-sketch-number))

   (incf org-babel-processing-sketch-number)

 +(defun org-babel-processing-define-type (data)
 +  Determine type of DATA.
 +
 +DATA is a list.  Return type as a symbol.
 +
 +The type is `String' if any element in DATA is
 +a string.  Otherwise, it is either `float', if some elements are
 +floats, or `int'.
 +  (let* ((type 'int)
 + find-type  ; for byte-compiler
 + (find-type
 +  (function

 Not needed.

Which part is not needed? This was adapted directly from
ob-asymptote.el. Is it unnecessary there as well?

 +   (lambda (row)
 + (catch 'exit
 +   (mapc (lambda (el)
 +   (cond ((listp el) (funcall find-type el))
 + ((stringp el) (throw 'exit (setq type 'String)))
 + ((floatp el) (setq type 'float
 + row))

   (lambda (row)
 (dolist (el row type)
   (cond ...)))

 +(funcall find-type data) type))
 
   not needed

Unnecessary in ob-asymptote.el as well?

I'll proceed to implement the changes once I get an ok from you.

All the best,

Jarmo




Re: [O] org-mode to latex, again!

2015-03-31 Thread Rasmus
Sharon Kimble boudic...@skimble.plus.com writes:

 #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}
 # #+Latex_Class: mysty

Use #+latex_header.

—Rasmus

-- 
Together we will make the possible totay impossible!




Re: [O] replace letf with cl-letf in org-mime

2015-03-31 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 Subject: [PATCH] org-mime.el: Avoid use of letf/cl-letf

Thank you. Some comments follow.

 +(let* ((mp (lambda (p)) (org-entry-get nil p 
 org-mime-use-property-inheritance))

It should be

  (mp (lambda (p) (org-entry-get )))

 +  (let ((bhook
 +  (lambda (body fmt)
 +(let ((hook (intern (concat org-mime-pre-
 +(symbol-name fmt)
 +-hook
 +  (if ( (eval `(length ,hook)) 0)
 +  (with-temp-buffer
 +(insert body)
 +(goto-char (point-min))
 +(eval `(run-hooks ',hook))
 +(buffer-string))
 +body

Not really related to the patch but the `eval' in the definition above
looks wrong. Shouldn't it be

  ( (length hook) 0)

and

  (run-hooks hook)

?


Regards,



Re: [O] [ox, patch] #+SUBTITLE

2015-03-31 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 For the record, if the situation ever rises again, I think that
 a keyword can be added to ox.el only if

   - it is supported at least in every major back-end (ASCII, HTML,
 LaTeX, ODT and Texinfo)
   - it comes with a toggle in the OPTIONS line e.g. keyword:nil

 For subtitle I'm reusing :with-title.  If you think it necessary, I can
 add a :with-subtitle, but I didn't think it was necessary.

It doesn't apply here since SUBTITLE isn't defined in ox.el. You can
do whatever you think is appropriate for SUBTITLE.

 OK.  So with the above the in mind the game plan seems to be:

  - Remove DESCRIPTION/KEYWORD from it's current position in org.texi
to backend descriptions and retain them in relevant backends.

Correct.

This imply some repetition, but also allows greater details,
e.g. with latex we can point to the hyperref template.

Indeed.

  - In the subtitle patch documentation should be documented in the
relevant backend sections.

Exactly.

Regards,



Re: [O] org-drill problem: questions are blank

2015-03-31 Thread Peter Westlake
On Mon, 30 Mar 2015, at 18:08, Marco Wahl wrote:
 Peter Westlake peter.westl...@pobox.com writes:
 
  On Mon, 30 Mar 2015, at 17:54, Marco Wahl wrote:
  Hi Peter,
  
  Peter Westlake peter.westl...@pobox.com writes:
  
   Thanks for the suggestion, but this doesn't make the bug go away for
   me.
  
  That's awkward.  
  
  Just to be sure: did you evaluate the function after changing the line
  in function org-toggle-latex-fragment of org.el to
  
  ; (set-window-start nil window-start)
  
  ?  I ask since this fixed the issue for me and to not give up too early.
 
  Yes, I even restarted Emacs.
 
 Did you byte-compile org.el then?

That's the thing I always forget. That does appear to work now, thank
you!

Peter.



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Eric S Fraga
On Saturday, 28 Mar 2015 at 10:53, Richard Lawrence wrote:
 Hi everyone,

 I thought I should send an update to let you know that org-citeproc [1],
 the command-line citation processing tool I've been working on, now
 supports multi-cites.  I believe that means it is now capable of
 processing all citations in the basic citation syntax.  It can output
 plain text, HTML, and ODT (and a Pandoc native format, mostly useful for
 debugging).

This looks really good!  Thanks.

However, for some reason, libreoffice doesn't display the citations in
the ODT document you have included.  I have had a look at the actual ODT
file and it looks fine.  Can you suggest what may be wrong?  I'm
attaching a crop of a screenshot to illustrate what I mean.  Highlighted
is where I would have expected to see some text for the citation.

A second question: what will be required to use the new cite syntax with
LaTeX/PDF which will remain my main target for export?

Thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9


Re: [O] [ox, patch] #+SUBTITLE

2015-03-31 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Also, assuming you keep :subtitle instead of :BACKEND-subtitle, these
 should also be documented in Publishing options.

 So I *still* don't see this.  I assume you want me to add something do you
 want me to add lines like this:

  @item @code{:subtitle}   @tab 

 To the tables akin to the one in @subsubheading Beamer specific
 properties?

 Note that there's no mapping to a variable, only to an buffer-keyword.

You're right, there's nothing to do.

Let's erase my suggestion from the internet archives. Pretty please.


Regards,



[O] Performance of table computing

2015-03-31 Thread Sebastien Vauban
Hello,

In one of my Org files, I have 20 small tables. Among them, 11 have
a line of formula's (TBLFM), mainly for computing a total (sum), so
that's in essence relatively standard and simple.

The file in itself is quite big (11,000 lines), but I did not expect to
see that re-applying formulas to all of them would take 30 seconds... at
every save... since I did add the following to my `.emacs' file:

--8---cut here---start-8---
  (defmacro measure-time (message rest body)
Measure the time it takes to evaluate BODY.
`(let ((time (current-time)))
   ,@body
   (message __%s (in %.02f s)___
,message (float-time (time-since time)

  (defun my/org-update-buffer ()
Update all dynamic blocks and all tables in the buffer.
(interactive)
(when (derived-mode-p 'org-mode)
  (message (Info) Update Org buffer %s
   (file-name-nondirectory (buffer-file-name)))
  (sit-for 1.5)
  (let ((flyspell-mode-before-save flyspell-mode))
(flyspell-mode -1)  ; Temporarily disable Flyspell to
; avoid checking the following
; modifications of the buffer.
(measure-time Updated all dynamic blocks
  (org-update-all-dblocks))
(measure-time Re-applied formulas to all tables
  (org-table-iterate-buffer-tables))
(when flyspell-mode-before-save (flyspell-mode 1)

  ;; Make sure that all dynamic blocks and all tables are always up-to-date.
  (add-hook 'before-save-hook 'my/org-update-buffer)
--8---cut here---end---8---

Is my observation shared?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode to latex, again!

2015-03-31 Thread Nicolas Goaziou
Hello,

Sharon Kimble boudic...@skimble.plus.com writes:

 I am attempting again to write a latex document with org-mode. The
 org-mode part is no problem, but the latex part is awkward. This is
 the first few line of my org-mode document -


 #+TITLE: The history of custard pies.
 #+AUTHOR:Sharon Kimble
 #+EMAIL: boudic...@skimble.plus.com
 #+DATE:  01-04-2015
 #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}
 # #+Latex_Class: mysty
 #+DESCRIPTION:
 #+KEYWORDS:
 #+LANGUAGE:  en

 * Blargh


 The latex file mysty is actually mysty.sty and contains all the
 latex files that I want to use, but it doesn't appear to be loading,
 and I can't see why? My idea of having *all* the latex packages in
 one file is so that I hope to be able to have it in its own
 directory and then symlink it to each projects main org-mode file so
 that I would have a known working setup, right from the start!

LATEX_CLASS matches an entry in `org-latex-classes', not a .sty file.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-944-g830cf3 @ /Users/snapp/.emacs.d/vendor/org/)]

2015-03-31 Thread Nicolas Goaziou
Hello,

Thierry Banel tbanelweb...@free.fr writes:

 Ok, 100% of votes are for the removal of wired #includes.
 Here is the patch.  Tests are changed accordingly.

Applied. Thank you.

 IMO, it would be better than the current situation, but I wonder if
 it makes sense to have a global default setting containing the
 three files, but one which the user can customize; any :includes
 parameters would augment the default.

 That would satisfy the OP's requirements, but would also allow for
 a shorter #+BEGIN_SRC line.

I think this suggestion makes sense. While you're at it, would you mind
implementing it?


Regards,

-- 
Nicolas Goaziou



[O] org-mode to latex, again!

2015-03-31 Thread Sharon Kimble
I am attempting again to write a latex document with org-mode. The
org-mode part is no problem, but the latex part is awkward. This is
the first few line of my org-mode document -

--8---cut here---start-8---
#+TITLE: The history of custard pies.
#+AUTHOR:Sharon Kimble
#+EMAIL: boudic...@skimble.plus.com
#+DATE:  01-04-2015
#+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}
# #+Latex_Class: mysty
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en

* Blargh
--8---cut here---end---8---

The latex file mysty is actually mysty.sty and contains all the
latex files that I want to use, but it doesn't appear to be loading,
and I can't see why? My idea of having *all* the latex packages in
one file is so that I hope to be able to have it in its own
directory and then symlink it to each projects main org-mode file so
that I would have a known working setup, right from the start!

The first few lines of mysty.sty are

--8---cut here---start-8---
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mysty}[31-03-2015]

\RequirePackage[l2tabu,orthodox]{nag}
\RequirePackage{fixltx2e}
\documentclass[a4paper,12pt]{article}
% \documentclass[a4paper,12pt]{book}
% \documentclass[a4paper,12pt]{report} 
% \documentclass[a4paper,12pt]{memoir} NO
% \documentclass[a4paper,12pt]{scrbook}
%%\documentclass[a4paper,12pt]{scrreprt}
\usepackage{morewrites}
\usepackage{tocloft}
\usepackage[stretch=10]{microtype}
\setlength\parindent{0pt} % sets indent to zero
\setlength{\parskip}{5pt} % changes vertical space between paragraphs
\setcounter{tocdepth}{1}
--8---cut here---end---8---

Any ideas please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.7, emacs 24.4.1.0


signature.asc
Description: PGP signature


Re: [O] [PATCH] Fix massive slowdown in org-id-find

2015-03-31 Thread Nicolas Goaziou
Florian Beck f...@miszellen.de writes:

 Seems like this does trick. I don't really understand why, though.The
 previous profiling seemed to indicate that most of the time was spent in
 `org-entry-get' (that's why I removed it).

`org-entry-get' is quite fast by itself. However it was called on every
entry with an :ID: property, which seems to include a lot of candidates
in your setup. Now it also requires :ID: value to match the one you're
looking for.

 I attached the new patch.

Applied. Thank you.

I added TINYCHANGE at the end of the commit message since you don't seem
to have signed the FSF papers. Please correct me if I'm wrong.

Regards,



Re: [O] [ox, patch] #+SUBTITLE

2015-03-31 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 So I would keep them.  The documentation explicitly states which backend
 these keywords are supported by.

 OK. Then DESCRIPTION and KEYWORD stay in ox.el, and documented in
 Export settings. You need to revert your patch about it.

 I thought we were just discussing criteria for being at a particular spot
 in the manual, not in the code.

As I explained, both are linked:

  - Anything defined in ox.el is documented in Export settings ;
  - Anything defined in ox-backend.el is documented in Backend
export.

This is a hard rule. Even if it means repeating documentation in three
different places, some back-end might use differently the same keyword
than others.

For the record, if the situation ever rises again, I think that
a keyword can be added to ox.el only if

  - it is supported at least in every major back-end (ASCII, HTML,
LaTeX, ODT and Texinfo)
  - it comes with a toggle in the OPTIONS line e.g. keyword:nil

Even when these criteria are met, this move shouldn't be taken lightly
as it implies all back-ends should try hard to support it.

Again, keywords in this category are to be documented in 

  (info (org)Export settings).

 So should I also move the SUBTITLE to ox.el or keep it in files?  I think
 it's OK to just define it in the files where it makes sense...

SUBTITLE, DESCRIPTION and KEYWORDS can be defined in the libraries where
they are used. Only the documentation needs to be adapted, per above.

Sorry for the confusion.

 We will have to take care about support for missing back-ends. E.g.,
 ASCII could treat DESCRIPTION as a quote box just below title.

 Would that not be an abstract?  I'm not sure I think description should be
 handled like that.

Forget about it. I'm not sure DESCRIPTION should be handled at all in
ASCII back-end.


Regards,



Re: [O] [ox, patch] #+SUBTITLE

2015-03-31 Thread Rasmus
Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 As I explained, both are linked:

   - Anything defined in ox.el is documented in Export settings ;
   - Anything defined in ox-backend.el is documented in Backend
 export.

 This is a hard rule.

OK.

 Even if it means repeating documentation in three
 different places, some back-end might use differently the same keyword
 than others.

 For the record, if the situation ever rises again, I think that
 a keyword can be added to ox.el only if

   - it is supported at least in every major back-end (ASCII, HTML,
 LaTeX, ODT and Texinfo)
   - it comes with a toggle in the OPTIONS line e.g. keyword:nil

For subtitle I'm reusing :with-title.  If you think it necessary, I can
add a :with-subtitle, but I didn't think it was necessary.

 So should I also move the SUBTITLE to ox.el or keep it in files?  I think
 it's OK to just define it in the files where it makes sense...

 SUBTITLE, DESCRIPTION and KEYWORDS can be defined in the libraries where
 they are used. Only the documentation needs to be adapted, per above.

 Sorry for the confusion.

OK.  So with the above the in mind the game plan seems to be:

 - Remove DESCRIPTION/KEYWORD from it's current position in org.texi
   to backend descriptions and retain them in relevant backends.

   This imply some repetition, but also allows greater details,
   e.g. with latex we can point to the hyperref template.

 - In the subtitle patch documentation should be documented in the
   relevant backend sections.

 We will have to take care about support for missing back-ends. E.g.,
 ASCII could treat DESCRIPTION as a quote box just below title.

 Would that not be an abstract?  I'm not sure I think description should be
 handled like that.

 Forget about it. I'm not sure DESCRIPTION should be handled at all in
 ASCII back-end.

OK.  If you want something like the above, I think we should just
recognize abstract blocks and reuse the quote formatting.

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Let's erase my suggestion from the internet archives. Pretty please.

You can ask Lars to remove the post from gmane, at least . . . :)

—Rasmus

-- 
Dung makes an excellent fertilizer



Re: [O] Performance of table computing

2015-03-31 Thread Sebastien Vauban
Jacob Nielsen wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:

 In one of my Org files, I have 20 small tables. Among them, 11 have
 a line of formula's (TBLFM), mainly for computing a total (sum), so
 that's in essence relatively standard and simple.

 Try this:
 # -*- cache-long-scans: nil; -*-
 # This makes forward-line much faster and thus org-goto-line and
 # thus org-table-sum (C-c +)

 My org file is 9990 lines and I just do weekly summations on small
 tables used for invoices. The performance was driving my crazy but
 setting cache-long-scans to nil has made me happy again.

Euh... It went down (no suspense anymore) from:

__Re-applied formulas to all tables (in 33.32 s)___


to:

__Re-applied formulas to all tables (in 0.21 s)___


Well, that's an HUGE improvement!  I couldn't believe my eyes...

I'll let-bind this variable in my above function, so that I don't have
to hardcode this anywhere...

Thanks a lot!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] set a location for simple export of individual file?

2015-03-31 Thread Matt Price
Wow, that was way easier than I thought it would be. Made a couple of
modest changes to org-html-to-html, and now a simple keybinding exports to
my desired location and opens the file in my desired location, which I
purge every couple of days.  Thank you!

On Sat, Mar 28, 2015 at 11:43 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Matt Price mopto...@gmail.com writes:

  I have an org file with lots of long tables in it; org is great for the
  data entry part, but sometimes I want to see the long lines in the table
 in
  their entirety, and for this I export to HTML. It works great.  However,
  for whatever reason I don't want the HTML to live in the same directory
 as
  the original org file.*
 
  I have tried this:
 
  #+BIND: org-export-publishing-directory /tmp/
 
  But that doesn't work, I think because I export using the export
 interface,
  not by publishing. Is there a comparable variable for export location?

 You can build a function around `org-export-to-file'. See
 `org-html-export-to-html' for example.


 Regards,

 --
 Nicolas Goaziou



Re: [O] Performance of table computing

2015-03-31 Thread Jacob Nielsen
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Hello,

 In one of my Org files, I have 20 small tables. Among them, 11 have
 a line of formula's (TBLFM), mainly for computing a total (sum), so
 that's in essence relatively standard and simple.

 The file in itself is quite big (11,000 lines), but I did not expect to
 see that re-applying formulas to all of them would take 30 seconds... at
 every save... since I did add the following to my `.emacs' file:
Try this:
# -*- cache-long-scans: nil; -*-
# This makes forward-line much faster and thus org-goto-line
# and thus org-table-sum (C-c +)

My org file is 9990 lines without any tblfmt but I do summations on
columns on small tables once a week (invoicing for the week).

The speed of C-c + was driving me nuts.
 [snip]
 Is my observation shared?

Sadly, yes but setting cache-long-scans made me happy again.

Best regards,
Jacob




Re: [O] Performance of table computing

2015-03-31 Thread Jacob Nielsen
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Hello,

 In one of my Org files, I have 20 small tables. Among them, 11 have
 a line of formula's (TBLFM), mainly for computing a total (sum), so
 that's in essence relatively standard and simple.
It looked like like Gnus failed when sending my reply the last time, so
sorry if this post comes twice.

Try this:
# -*- cache-long-scans: nil; -*-
# This makes forward-line much faster and thus org-goto-line and
# thus org-table-sum (C-c +)

My org file is 9990 lines and I just do weekly summations on small
tables used for invoices. The performance was driving my crazy but
setting cache-long-scans to nil has made me happy again.

Best regards,
Jacob




[O] tabbar and editing code with C-c '

2015-03-31 Thread Rainer M Krug
Hi

I am using tabbar (I know - I am one of the strant=ge folk=s who use the
mouse...) and whenever I edit code, the tabbar is overwritten by the top
bar which says Edit, then exit with ... (I'll just call it the info bar).

Here is a screenshot which shows on the right window the tabbar, and on
the left windor=w the info bar [1]

Is there any way of seeing both, e.g. having the info bar being
displayed below the tabbar?

Thanks,

Rainer

Footnotes: 
[1]  
https://www.dropbox.com/s/zt5ls9kvva5vte9/Screenshot%202015-03-31%2014.41.56.png?dl=0

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] replace letf with cl-letf in org-mime

2015-03-31 Thread Eric Abrahamsen
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Subject: [PATCH] org-mime.el: Avoid use of letf/cl-letf

 Thank you. Some comments follow.

 +(let* ((mp (lambda (p)) (org-entry-get nil p 
 org-mime-use-property-inheritance))

 It should be

   (mp (lambda (p) (org-entry-get )))

Whoops, dammit, I made the same mistake in both places, but somehow only
fixed the second.

 +  (let ((bhook
 + (lambda (body fmt)
 +   (let ((hook (intern (concat org-mime-pre-
 +   (symbol-name fmt)
 +   -hook
 + (if ( (eval `(length ,hook)) 0)
 + (with-temp-buffer
 +   (insert body)
 +   (goto-char (point-min))
 +   (eval `(run-hooks ',hook))
 +   (buffer-string))
 +   body

 Not really related to the patch but the `eval' in the definition above
 looks wrong. Shouldn't it be

   ( (length hook) 0)

 and

   (run-hooks hook)

That is weird. What's even weirder is the above doesn't work. I set up a
test like this:

(defun my-org-mime-hook ()
  (message hook!))

(add-hook 'org-mime-pre-org-hook 'my-org-mime-hook)

If I remove the two `eval's and treat hook like a normal variable, the
call to `length' fails with:

Wrong type argument: sequencep, org-mime-pre-org-hook

So apparently `length' is seeing the symbol name, and not the symbol
value.

I tried changing the `let' to look like:

(let ((hook (symbol-value (intern (

Now the value of hook is '(my-org-mime-hook). That works with the
`length', and also with the `run-hooks', so long hook is quoted as in
the original `eval' version:

(run-hooks 'hook)

Unfortunately, that means there are still some fundamental things I
don't understand about how symbols work.

Here's a fixed version of the previous patch. I suppose I could also
alter the bhook thing to use `symbol-value' instead of `eval', but
that doesn't seem to be a net gain.

Thanks,
Eric


From 5901c2c696d3857f5f7a3c70b6de93f4f5974200 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Wed, 1 Apr 2015 10:08:34 +0800
Subject: [PATCH] org-mime.el: Don't use letf or cl-letf

* contrib/lisp/org-mime.el (org-mime-send-subtree, org-mime-compose):
  `cl-letf' doesn't exist in Emacs = 23, but `letf' won't exist in
  future Emacs. Replace with `lambda' and `funcall'.
---
 contrib/lisp/org-mime.el | 111 ---
 1 file changed, 56 insertions(+), 55 deletions(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index f341474..1e7a3b8 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -252,22 +252,22 @@ export that region, otherwise export the entire body.
   (save-restriction
 (org-narrow-to-subtree)
 (run-hooks 'org-mime-send-subtree-hook)
-(flet ((mp (p) (org-entry-get nil p org-mime-use-property-inheritance)))
-  (let* ((file (buffer-file-name (current-buffer)))
-	 (subject (or (mp MAIL_SUBJECT) (nth 4 (org-heading-components
-	 (to (mp MAIL_TO))
-	 (cc (mp MAIL_CC))
-	 (bcc (mp MAIL_BCC))
-	 (body (buffer-substring
-		(save-excursion (goto-char (point-min))
-(forward-line 1)
-(when (looking-at [ \t]*:PROPERTIES:)
-  (re-search-forward :END: nil)
-  (forward-char))
-(point))
-		(point-max
-	(org-mime-compose body (or fmt 'org) file to subject
-			  `((cc . ,cc) (bcc . ,bcc)))
+(let* ((mp (lambda (p) (org-entry-get nil p org-mime-use-property-inheritance)))
+	   (file (buffer-file-name (current-buffer)))
+	   (subject (or (funcall mp MAIL_SUBJECT) (nth 4 (org-heading-components
+	   (to (funcall mp MAIL_TO))
+	   (cc (funcall mp MAIL_CC))
+	   (bcc (funcall mp MAIL_BCC))
+	   (body (buffer-substring
+		  (save-excursion (goto-char (point-min))
+  (forward-line 1)
+  (when (looking-at [ \t]*:PROPERTIES:)
+(re-search-forward :END: nil)
+(forward-char))
+  (point))
+		  (point-max
+  (org-mime-compose body (or fmt 'org) file to subject
+			`((cc . ,cc) (bcc . ,bcc))
 
 (defun org-mime-send-buffer (optional fmt)
   (run-hooks 'org-mime-send-buffer-hook)
@@ -287,45 +287,46 @@ export that region, otherwise export the entire body.
   (require 'message)
   (message-mail to subject headers nil)
   (message-goto-body)
-  (flet ((bhook (body fmt)
-		(let ((hook (intern (concat org-mime-pre-
-	(symbol-name fmt)
-	-hook
-		  (if ( (eval `(length ,hook)) 0)
-		  (with-temp-buffer
-			(insert body)
-			(goto-char (point-min))
-			(eval `(run-hooks ',hook))
-			(buffer-string))
-		body
-(let ((fmt (if (symbolp fmt) fmt (intern fmt
-  (cond
-   ((eq fmt 'org)
-	(require 'ox-org)
-	(insert (org-export-string-as
-		 (org-babel-trim (bhook body 'org)) 'org t)))
-   ((eq fmt 'ascii)
-	(require 'ox-ascii)
-	(insert (org-export-string-as
-		 

Re: [O] Define org-capture-templates with variables via customize

2015-03-31 Thread Nicolas Goaziou
Hello,

Nick Dokos ndo...@gmail.com writes:

 Trying to just read Xavier's email message in Gnus, I get the following
 backtrace (with unprintable characters replaced by periods) - to me, this
 looks like a bug somewhere, but not sure where:

 Debugger entered--Lisp error: (error Before first headline at position 114 
 in buffer *fontification*2)

Fixed in c1a744659d2b44c067ecb195b3e5d51e837bddd1. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Possible bug: Can not search for text in links - only description

2015-03-31 Thread Ken Mankoff

On 2015-03-20 at 13:53, Samuel Wales samolog...@gmail.com wrote:
 hmm:

 ===
 search-invisible is a variable defined in `isearch.el'.
 Its value is open

 Documentation:
 If t incremental search/query-replace can match hidden text.
 A nil value means don't match invisible text.
 When the value is `open', if the text matched is made invisible by
 an overlay having an `invisible' property and that overlay has a property
 `isearch-open-invisible', then incremental search will show the contents.
 (This applies when using `outline.el' and `hideshow.el'.)
 ...
 ===


Note that setting search-invisible to t means that collapsed segments no longer 
expand.

  -k.
  



[O] [org.texi] New keywords tables (was: [ox, patch] #+SUBTITLE)

2015-03-31 Thread Rasmus
Hi,

Following this discussion:

Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Rasmus ras...@gmx.us writes:

 OK.  So with the above the in mind the game plan [for documentation]
 seems to be:

  - Remove DESCRIPTION/KEYWORD from it's current position in org.texi
to backend descriptions and retain them in relevant backends.

 Correct.

This imply some repetition, but also allows greater details,
e.g. with latex we can point to the hyperref template.

 Indeed.

An example of a structure change is attached.  It introduces a table
similar to @ref{Export settings} in the beginning of most backend
chapters.

I have not (re)read it yet, but I want to make sure that we roughly agree
on the structure before I put more time into it.  It does not touch
texinfo (yet) 'cause it's complicated.

WDYT?

Also I would kill all backend specific keywords from the table in @node
In-buffer settings:

@itemx #+LATEX_HEADER:, #+LATEX_HEADER_EXTRA:,
@itemx #+HTML_HEAD:, #+HTML_HEAD_EXTRA:, #+HTML_LINK_UP:, #+HTML_LINK_HOME:,
@itemx #+ODT_STYLES_FILE:,

It does not contain all HTML KW or any Beamer KW.  IOW it's a mess and the
true picture here would be ugly.

WDYT?

—Rasmus

-- 
However beautiful the theory, you should occasionally look at the evidence
From 406fec4af53607a78d56d278389a8821d9d91f1c Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Tue, 31 Mar 2015 17:37:48 +0200
Subject: [PATCH 2/2] org.texi: Introduce tables for backend keywords

---
 doc/org.texi | 176 ++-
 1 file changed, 163 insertions(+), 13 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index ffaa281..1780b33 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -9707,7 +9707,7 @@ The title of the exported document is taken from the special line
 
 @cindex #+TITLE
 @example
-#+TITLE: This is the title of the document
+#+: This is the title of the document
 @end example
 
 @cindex property, EXPORT_TITLE
@@ -11092,21 +11092,49 @@ Beamer back-end is an extension of @LaTeX{} back-end.  As such, all @LaTeX{}
 specific syntax (e.g., @samp{#+LATEX:} or @samp{#+ATTR_LATEX:}) is
 recognized.  See @ref{@LaTeX{} and PDF export} for more information.
 
+Beamer export introduces a number of keywords, similar to the general options
+settings described in @pxref{Export settings}.
+
+@table @samp
+@item BEAMER_THEME
 @cindex #+BEAMER_THEME
-@cindex #+BEAMER_COLOR_THEME
+@vindex org-beamer-theme
+The Beamer theme (@code{org-beamer-theme}).  See chapter 15 in the Beamer
+manual.
+
+@item BEAMER_FONT_THEME
 @cindex #+BEAMER_FONT_THEME
+The Beamer font theme.  See chapter 18 in the Beamer manual.
+
+@item BEAMER_INNER_THEME
 @cindex #+BEAMER_INNER_THEME
+The Beamer inner theme.  See chapter 16 in the Beamer manual.
+
+@item BEAMER_OUTER_THEME
 @cindex #+BEAMER_OUTER_THEME
-Beamer export introduces a number of keywords to insert code in the
-document's header.  Four control appearance of the presentation:
-@code{#+BEAMER_THEME}, @code{#+BEAMER_COLOR_THEME},
-@code{#+BEAMER_FONT_THEME}, @code{#+BEAMER_INNER_THEME} and
-@code{#+BEAMER_OUTER_THEME}.  All of them accept optional arguments within
-square brackets.  The last one, @code{#+BEAMER_HEADER}, is more generic and
-allows you to append any line of code in the header@footnote{Lines are
-appended at the end of the preamble, allowing for any final customization
-such as the inclusion of short titles.}.
+The Beamer outer theme.  See chapter 16 in the Beamer manual.
+
+@c This one is probably not needed
+@item BEAMER_HEADER
+@cindex #+BEAMER_HEADER
+Arbitrary lines appended to the end of the preamble of the document.
+
+@item DESCRIPTION
+@cindex #+DESCRIPTION (Beamer)
+The document description.  By default these are inserted as metadata using
+hyperref.  You can use several such keywords if the list is long.  See also
+@code{org-latex-hyperref-template} and @code{org-latex-title-command}.
 
+@item KEYWORDS
+@cindex #+KEYWORDS (Beamer)
+The keywords defining the contents of the document.  By default these are
+inserted as metadata using hyperref.  You can use several such keywords if
+the list is long.  See also @code{org-latex-hyperref-template} and
+@code{org-latex-title-command}.
+@end table
+
+This example illustrates how to change the theme.  Note that theme options
+can be specified in square brackets.
 @example
 #+BEAMER_THEME: Rochester [height=20pt]
 #+BEAMER_COLOR_THEME: spruce
@@ -11219,6 +11247,7 @@ HTML formatting, in ways similar to John Gruber's @emph{markdown}
 language, but with additional support for tables.
 
 @menu
+* HTML specific syntax::Special keywords for HTML export.
 * HTML Export commands::How to invoke HTML export
 * HTML doctypes::   Org can export to various (X)HTML flavors
 * HTML preamble and postamble::  How to insert a preamble and a postamble
@@ -11232,6 +11261,61 @@ language, but with additional support for tables.
 * JavaScript support::  Info and 

Re: [O] org-mode to latex, again!

2015-03-31 Thread Marcin Borkowski

On 2015-03-31, at 12:26, Sharon Kimble boudic...@skimble.plus.com wrote:

 I am attempting again to write a latex document with org-mode. The
 org-mode part is no problem, but the latex part is awkward. This is
 the first few line of my org-mode document -

 --8---cut here---start-8---
 #+TITLE: The history of custard pies.
 #+AUTHOR:Sharon Kimble
 #+EMAIL: boudic...@skimble.plus.com
 #+DATE:  01-04-2015
 #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}
 # #+Latex_Class: mysty
 #+DESCRIPTION:
 #+KEYWORDS:
 #+LANGUAGE:  en

 * Blargh
 --8---cut here---end---8---

 The latex file mysty is actually mysty.sty and contains all the
 latex files that I want to use, but it doesn't appear to be loading,
 and I can't see why? My idea of having *all* the latex packages in
 one file is so that I hope to be able to have it in its own
 directory and then symlink it to each projects main org-mode file so
 that I would have a known working setup, right from the start!

1. Then, why not put your customizations in a custom LaTeX class (based
on an existing one)?  Currently, you have a package/class mix (see
below).  See clsguide.pdf in your TeX distro for details about how to do
it (see e.g. section Example: a newsletter class)

2. And no need to symlink it anywhere.  If you have it in e.g.
~/texmf/tex/latex/mystuff/myclass.cls, run mktexlsr (assuming you are on
TeXlive) and then just \usepackage{mypackage} or
\documentclass{myclass}.  It is only necessary to run mktexlsr again in
case of a change in the directory under ~/texmf, so e.g. new files or
filename changes, but not just updating the file itself.

 The first few lines of mysty.sty are

 --8---cut here---start-8---
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{mysty}[31-03-2015]

For .sty, this ^^ should be \ProvidesPackage.  Again, see clsguide.pdf.

 \RequirePackage[l2tabu,orthodox]{nag}

Probably a good idea.

 \RequirePackage{fixltx2e}
 \documentclass[a4paper,12pt]{article}
 % \documentclass[a4paper,12pt]{book}
 % \documentclass[a4paper,12pt]{report} 
 % \documentclass[a4paper,12pt]{memoir} NO
 % \documentclass[a4paper,12pt]{scrbook}
 %%\documentclass[a4paper,12pt]{scrreprt}

This should be \LoadClass (or similar, like \LoadClassWithOptions) in
a class file.

 \usepackage{morewrites}
 \usepackage{tocloft}
 \usepackage[stretch=10]{microtype}
 \setlength\parindent{0pt} % sets indent to zero
 \setlength{\parskip}{5pt} % changes vertical space between paragraphs

Tsk, tsk.  What about \usepackage{parskip}?

 \setcounter{tocdepth}{1}
 --8---cut here---end---8---

 Any ideas please?

 Thanks
 Sharon.

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



[O] Function that splits a CLOCK interval

2015-03-31 Thread Christoph LANGE

Dear org-mode community,

I use org's clocking facility to clock all my working time.  I 
frequently find myself clocking time for a task T1, but later realise 
that I actually spent part of this time on some other task T2.  In such 
a situation I go to the corresponding CLOCK: line for T1, split the 
interval clocked, e.g. from


   CLOCK: [2015-03-30 Mon 16:27]--[2015-03-30 Mon 16:30] =  0:03

to

   CLOCK: [2015-03-30 Mon 16:28]--[2015-03-30 Mon 16:30] =  0:02
   CLOCK: [2015-03-30 Mon 16:27]--[2015-03-30 Mon 16:28] =  0:01

and move one of the two lines to the LOGBOOK of task T2.

The following function now automates the task of splitting:

--- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---
(defun org-clock-split-current-interval ()
  If this is a CLOCK line, split its clock time interval into two.
t the current time interval be A--C; then this function interactively 
prompts for a time B (suggesting A as a default), and then replaces A--C 
by B--C and A--B.  The point is left on the line B--C, so that this line 
can, e.g., be moved to another entry.

  (interactive)
  (save-excursion
;; Part of the following code is copied from 
org-clock-update-time-maybe.
;; If this function becomes part of org-clock.el, some refactoring 
would be in order.

(beginning-of-line 1)
(skip-chars-forward  \t)
(when (looking-at org-clock-string)
  (let ((re (concat [ \t]* org-clock-string
 *[[][^]]+[]]-+[[][^]]+[]]
\\(?:[ \t]*=.*\\)?)))
(when (looking-at re)
;; duplicate current line (resulting in A--C newline A--C)
(let ((current-line (thing-at-point 'line t)))
  (when (or (= 1 (forward-line 1)) (eq (point) (point-max)))
(insert \n))
  (insert current-line))
;; interactively change start time of the later interval
;; (resulting in B--C newline A--C)
;; TODO when universal-argument is provided, we might 
alternatively offer changing the end time of the earlier interval, 
resulting in A--C newline A--B.

(forward-line -2)
;; we currently assume that all timestamps in clock intervals 
are inactive

(search-forward (concat org-clock-string  [))
;; TODO call org-time-stamp with arguments that are conditional 
on whether an active or an inactive timestamp was found above

(call-interactively 'org-time-stamp-inactive)
;; If there were a function that implemented the actual body of 
org-clock-update-time-maybe, we could call that function, as in this 
context we _know_ that we are on a CLOCK line.

(org-clock-update-time-maybe)
;; copy changed time and also make it the end time of the 
earlier interval

;; (resulting in B--C newline A--B)
(re-search-backward org-ts-regexp-both)
(let ((ts (match-string 0)))
  (move-end-of-line 2)
  (when (re-search-backward org-ts-regexp-both nil t)
(replace-match ts))
  (org-clock-update-time-maybe)))

(define-key org-mode-map (kbd \C-cs) 'org-clock-split-current-interval)
--- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---

As I said in my previous email:

I would even be happy to contribute it to the codebase of org-mode (core 
or contrib); however in this case someone would have to point me to a 
fool-proof guide for how to do this.  I know that for contributing code 
I will have to sign some FSF copyright forms, and I know how to use git, 
but I don't know the exact org-mode specific steps of doing so.


Cheers,

Christoph

--
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701

→ Semantic Publishing Challenge: Assessing the Quality of Scientific Output
  ESWC, 31 May–4 June 2014, Portorož, Slovenia. 
https://tinyurl.com/SPChallenge15

  Submission deadline 27 March (abstracts: 20 March)



[O] Function that jumps to an entry with a certain CUSTOM_ID

2015-03-31 Thread Christoph LANGE

Hi all,

the following function has served me well for a few years, so I thought 
I'd share it.  I would even be happy to contribute it to the codebase of 
org-mode (core or contrib); however in this case someone would have to 
point me to a fool-proof guide for how to do this.  I know that for 
contributing code I will have to sign some FSF copyright forms, and I 
know how to use git, but I don't know the exact org-mode specific steps 
of doing so.


--- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---
(defun org-jump-to-id ()
  Asks for an identifier and searches for the first entry in the 
current file that has this identifier as a CUSTOM_ID property.

  (interactive)
  (let* ((property CUSTOM_ID)
 (custom-id (org-icompleting-read CUSTOM_ID of entry: 
  (mapcar 'list 
(org-property-values property)

  (org-link-search (concat # custom-id

(define-key org-mode-map (kbd \C-cj) 'org-jump-to-id)
--- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---

This implementation works efficiently in a 4 MB org file with 100 IDs. 
Together with ido or helm I find it a very user-friendly way of jumping 
to frequently used headlines.


I noticed that org-babel-ref-goto-headline-id does something similar, so 
maybe some code could be shared among the two functions.


Cheers,

Christoph

--
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701

→ Semantic Publishing Challenge: Assessing the Quality of Scientific Output
  ESWC, 31 May–4 June 2014, Portorož, Slovenia. 
https://tinyurl.com/SPChallenge15

  Submission deadline 27 March (abstracts: 20 March)



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Nick Dokos
Richard Lawrence richard.lawre...@berkeley.edu writes:

 However, there are a couple of other scenarios to think about:

 1) Some people may still need to use plain BibTeX.  Generating LaTeX
 that is intended to be processed with BibTeX, as opposed to BibLaTeX, is
 a little trickier, because (IIUC) BibTeX does not support multi-cite
 citations.

I know next to nothing about citations in general, so please bear with
me: if multi-cite support means being able to condense citations (e.g.
[1-3, 5, 9]), then bibtex can do at least some of that
(e.g. http://texblog.org/2007/05/28/mulitple-reference-citation/).

 Also, I don't know how easy it would be to capture the other
 features of citations (e.g., the in-text vs. parenthetical distinction)
 without relying on a package like natbib.  If generating
 BibTeX-compatible LaTeX is needed, is it OK to rely on such a package?


IMO yes.

Nick






Re: [O] Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-944-g830cf3 @ /Users/snapp/.emacs.d/vendor/org/)]

2015-03-31 Thread Thierry Banel
Le 31/03/2015 12:07, Nicolas Goaziou a écrit :

 IMO, it would be better than the current situation, but I wonder if
 it makes sense to have a global default setting containing the
 three files, but one which the user can customize; any :includes
 parameters would augment the default.

 That would satisfy the OP's requirements, but would also allow for
 a shorter #+BEGIN_SRC line.
 I think this suggestion makes sense. While you're at it, would you mind
 implementing it?



Well, actually the global default setting feature may already be available
  1) through properties in drawers
  2) through the org-babel-default-header-args global variable

* Property in drawer
  :PROPERTIES:
  :includes: stdio.h myheader.h
  :END:
Any C++ babel block below this tree will inherit the stdio.h and
myheader.h#includes

* The org-babel-default-header-argsvariable
This variable holds global defaults. For C++ do something like that:
(add-to-list 'org-babel-default-header-args '(:includes  stdio.h
myheader.h))
Any babel C++ block anywhere will inherit from the global variable.

Nick, are those the kinds of settings you were thinking about?
The augment feature may be missing though:
local :includes overwrite global ones.

Thierry



Re: [O] org-mode to latex, again!

2015-03-31 Thread Marcin Borkowski

On 2015-03-31, at 18:54, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 On Tuesday, 31 Mar 2015 at 12:36, Rasmus wrote:
 Sharon Kimble boudic...@skimble.plus.com writes:

 #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}

 Use #+latex_header.

 And possibly omit the full path as LaTeX should be able to find
 mysty.sty if located within the ~/texmf directory. (untested)

As I wrote - yes, provided you update the filename database
(e.g. launching mktexlsr from the command line).  (Because of speed, TeX
does not search the directory tree each time it looks for a package or
something, but uses a database in a familiar, ls -R format.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



[O] moving into another time zone?

2015-03-31 Thread Toomas Rosin
Hello!

Is it possible to create timestamps (SCHEDULED:) for TODOs with respect to one 
timezone, but have Agenda view show them for another zone — so that when I move 
to another timezone, all I have to do is tell org-mode (via environment?) in 
which timezone I happen to be at the moment, to have the Agenda view display 
all times according to that zone, without me having to change anything in the 
.org file itself?

And if it is not possible (which I suspect, not having found anything promising 
by grepping for zone in org-mode sources and docs, and by looking at 
`org-time-string-to-time' and `org-ts-regexp0'), what exactly would it take to 
make it possible?

With best wishes,
T.



[O] Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil

2015-03-31 Thread Alain Schneble (Realize IT GmbH)
Hi

Steps to reproduce:
- if org-descriptive-links is non-nil, invoke M-x org-toggle-link-display
- org-descriptive-links is now expected to be nil
- M-x org-agenda-list
- M-x org-agenda-clockreport-mode (or short: v R)

Observation (given that there is at least some data being shown in the 
clockreport):
1) clockreport table is misaligned
2) clockreport table contains descriptive links even though 
org-descriptive-links is nil

Cause:
a) *org-agenda-list* /calls/ *org-agenda-prepare* which in turn /calls/ 
*org-agenda-mode*
b) *org-agenda-mode* /calls/ (add-to-invisibility-spec '(org-link))
   In contrast, *org-mode* /calls/ (if org-descriptive-links 
(add-to-invisibility-spec '(org-link))), hence makes adding org-link to the 
invisibility spec dependent on org-descriptive-links.
c) the clockreport in the agenda list is constructed in 
*org-clock-get-clocktable* using a with-temp-buffer in whose context (org-mode) 
is called. The clockreport table will therefore be aligned based on the 
invisibility spec of org-mode which is different if org-descriptive-links was 
set to nil at the time *org-agenda-list* was called.

Suggestions:
1.1) Inherit org-link invisibility spec in *org-clock-get-clocktable* from the 
outer mode (i.e. org-agenda-mode):
 ...
 (let ((descriptive-links (org-in-invisibility-spec-p '(org-link
   (with-temp-buffer
 (org-mode)
 (if descriptive-links
 (add-to-invisibility-spec '(org-link))
   (remove-from-invisibility-spec '(org-link)))
 ...
 )
1.2) ... or make the call to *add-to-invisibility-spec* in *org-agenda-mode* 
dependent on org-descriptive-links as already done by *org-mode*

Any other suggestions?

Btw, is there a reason why org-descriptive-links is global and not made 
buffer-local using make-variable-buffer-local after its defcustom definition? I 
had expected it to be buffer-local. If it isn't buffer local, the displayed 
links in different org buffers can get inconsistent with the flag hold in the 
org-descriptive-links variable.

Cheers
Alain

--- 

Emacs  : GNU Emacs 24.4.1 (i686-pc-mingw32)
 of 2014-10-24 on LEG570
Package: Org-mode version 8.2.10 (release_8.2.10 @ c:/Program Files 
(x86)/emacs-24.4/share/emacs/24.4/lisp/org/)

current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-html-format-inlinetask-function 'ignore
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-agenda-use-time-grid nil
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-agenda-start-with-log-mode 'clockcheck
 org-confirm-babel-evaluate nil
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-html-format-headline-function 'ignore
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-catch-invisible-edits 'show
 org-descriptive-links nil
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-todo-keywords '((type TODO | DONE))
 org-agenda-files '(c:/agenda.org)
 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-babel-load-languages '((gnuplot . t) (emacs-lisp . t))
 org-latex-format-inlinetask-function 'ignore
 org-agenda-start-with-clockreport-mode t
 org-confirm-shell-link-function 'yes-or-no-p
 )




Re: [O] org-cite and org-citeproc

2015-03-31 Thread Richard Lawrence
Hi Eric and all,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 On Saturday, 28 Mar 2015 at 10:53, Richard Lawrence wrote:

 I thought I should send an update to let you know that org-citeproc [1],
 the command-line citation processing tool I've been working on, now
 supports multi-cites.  I believe that means it is now capable of
 processing all citations in the basic citation syntax.  It can output
 plain text, HTML, and ODT (and a Pandoc native format, mostly useful for
 debugging).

 This looks really good!  Thanks.

Thanks!

 However, for some reason, libreoffice doesn't display the citations in
 the ODT document you have included.  I have had a look at the actual ODT
 file and it looks fine.  Can you suggest what may be wrong?  

Hmm, you're right.  I don't have LibreOffice on the machine where I am
working on org-citeproc, but I tested it on another machine (OS X,
LibreOffice version 4.2.8.2 I think), and the citation text is indeed
missing.

As you say, the actual file looks fine to me, and it displays correctly
on Google Drive (which is where I originally tested the output).

So LibreOffice might be where the problem is.  That doesn't mean there
isn't a problem with org-citeproc, or the ODT exporter, but given that
the file looks fine and another viewer handles it correctly, LibreOffice
would be my first suspect.

I don't really know anything about the ODT format, though.  My code
more-or-less blindly pastes Pandoc-generated XML into the document
during Org ODT export.  Can someone who knows more about the format take
a look at the file and see if there is some subtle problem I'm not
noticing?

 A second question: what will be required to use the new cite syntax with
 LaTeX/PDF which will remain my main target for export?

I think this needs more discussion, actually.

The citation syntax can basically be mapped directly to BibLaTeX syntax,
so generating LaTeX that will be processed with BibLaTeX is a simple and
straightforward modification to Org's LaTeX exporter, and compiling the
exported document should continue to require no external programs except
the LaTeX distribution itself.  That is, `C-c C-e l whatever' should
continue to be all that is needed from a user's perspective, plus or
minus some LATEX_HEADER setup.

However, there are a couple of other scenarios to think about:

1) Some people may still need to use plain BibTeX.  Generating LaTeX
that is intended to be processed with BibTeX, as opposed to BibLaTeX, is
a little trickier, because (IIUC) BibTeX does not support multi-cite
citations.  Also, I don't know how easy it would be to capture the other
features of citations (e.g., the in-text vs. parenthetical distinction)
without relying on a package like natbib.  If generating
BibTeX-compatible LaTeX is needed, is it OK to rely on such a package?

2) Some people might find it useful *not* to generate LaTeX citation
commands, and instead have a tool like org-citeproc process citations
instead, with the exporter inserting the rendered output into the
document.  This could be useful if e.g. you are preparing to submit to a
journal that provides a CSL file, but not a BibTeX or BibLaTeX style.

If either of these scenarios represents an important use case, it will
be more work to implement.  

I suggest that for now we just target BibLaTeX, but I'd like to hear
from other people about whether there's reason to do more than that.
 
Best,
Richard



Re: [O] Function that jumps to an entry with a certain CUSTOM_ID

2015-03-31 Thread Nicolas Goaziou
Hello,

Christoph LANGE math.semantic@gmail.com writes:

 the following function has served me well for a few years, so
 I thought I'd share it.  I would even be happy to contribute it to the
 codebase of org-mode (core or contrib); however in this case someone
 would have to point me to a fool-proof guide for how to do this.
 I know that for contributing code I will have to sign some FSF
 copyright forms, and I know how to use git, but I don't know the exact
 org-mode specific steps of doing so.

The problem is that we're running out of interesting keybindings. C-c
j is not an option since it is reserved to users.

Another option would be to add it to Worg.

 --- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---
 (defun org-jump-to-id ()
   Asks for an identifier and searches for the first entry in the
 current file that has this identifier as a CUSTOM_ID property.
   (interactive)
   (let* ((property CUSTOM_ID)
  (custom-id (org-icompleting-read CUSTOM_ID of entry: 
   (mapcar 'list
 (org-property-values property)
   (org-link-search (concat # custom-id

 (define-key org-mode-map (kbd \C-cj) 'org-jump-to-id)
 --- % --- % --- % --- % --- % --- % --- % --- % --- % --- % ---

 This implementation works efficiently in a 4 MB org file with 100 IDs.
 Together with ido or helm I find it a very user-friendly way of
 jumping to frequently used headlines.

Note that you can use

  (let ((h (org-find-property CUSTOM_ID custom-id)))
(when h (goto-char h)))

instead of

  (org-link-search ...)

for one less level of indirection.

 I noticed that org-babel-ref-goto-headline-id does something similar,
 so maybe some code could be shared among the two functions.

Indeed. I modified it so it uses `org-find-property'.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-mode to latex, again!

2015-03-31 Thread Eric S Fraga
On Tuesday, 31 Mar 2015 at 12:36, Rasmus wrote:
 Sharon Kimble boudic...@skimble.plus.com writes:

 #+LATEX: \usepackage{~/texmf/tex/latex/commonstuff/mysty}

 Use #+latex_header.

And possibly omit the full path as LaTeX should be able to find
mysty.sty if located within the ~/texmf directory. (untested)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-820-gd92ef9



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Thomas S. Dye
Aloha all,

Nick Dokos ndo...@gmail.com writes:

 Richard Lawrence richard.lawre...@berkeley.edu writes:

 However, there are a couple of other scenarios to think about:

 1) Some people may still need to use plain BibTeX.  Generating LaTeX
 that is intended to be processed with BibTeX, as opposed to BibLaTeX, is
 a little trickier, because (IIUC) BibTeX does not support multi-cite
 citations.

 I know next to nothing about citations in general, so please bear with
 me: if multi-cite support means being able to condense citations (e.g.
 [1-3, 5, 9]), then bibtex can do at least some of that
 (e.g. http://texblog.org/2007/05/28/mulitple-reference-citation/).

Multiple citations with natbib are limited in the sense that individual
citations within them don't carry pre- and post-notes.  BibLaTeX does
away with this restriction.

 Also, I don't know how easy it would be to capture the other
 features of citations (e.g., the in-text vs. parenthetical distinction)
 without relying on a package like natbib.  If generating
 BibTeX-compatible LaTeX is needed, is it OK to rely on such a package?


 IMO yes.

IMO yes, too.

The org-export-cite-add-citation-mode-latex function that Aaron Ecay
wrote allows the author to choose (implicitly) which package to use.  I
like this design because it can accommodate new packages without changes
to the Org mode code.

,-
| Your comment inspired me to implement   
| org-export-cite-add-citation-mode-latex in the experimental citation
| support I just pushed.  So you can do:  
| 
| (org-export-cite-add-citation-mode-latex tsd  
| \\mycitecommand[%s][%s]{%s} \\myparencitecommand[%s][%s]{%s})   
| 
| Add to your document:   
| 
| #+CITATION_MODE: tsd
| 
| And citations should just work with your chosen commands.  I’m sure when
| advanced citation support comes along (whether from subtypes or plists),
| a similarly simple wrapper can be implemented.  
`-

I haven't found time to experiment with the citation developments or to
read through the developing code base.  Was this feature of Aaron's
experimental support subsequently dropped?

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [org.texi] New keywords tables

2015-03-31 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 An example of a structure change is attached.  It introduces a table
 similar to @ref{Export settings} in the beginning of most backend
 chapters.

 I have not (re)read it yet, but I want to make sure that we roughly agree
 on the structure before I put more time into it.  It does not touch
 texinfo (yet) 'cause it's complicated.

What is complicated? I find it quite clear. I'm biased, tho.

 WDYT?

Thanks. It is a good idea.

 Also I would kill all backend specific keywords from the table in @node
 In-buffer settings:

 @itemx #+LATEX_HEADER:, #+LATEX_HEADER_EXTRA:,
 @itemx #+HTML_HEAD:, #+HTML_HEAD_EXTRA:, #+HTML_LINK_UP:, 
 #+HTML_LINK_HOME:,
 @itemx #+ODT_STYLES_FILE:,

 It does not contain all HTML KW or any Beamer KW.  IOW it's a mess and the
 true picture here would be ugly.

 WDYT?

Agreed.

 +#+TITLE: This is the title of the document
 +#+: This is the title of the document

Typo.

 +Beamer export introduces a number of keywords, similar to the general options
 +settings described in @pxref{Export settings}.
 +
 +@table @samp
 +@item BEAMER_THEME
  @cindex #+BEAMER_THEME
 -@cindex #+BEAMER_COLOR_THEME
 +@vindex org-beamer-theme
 +The Beamer theme (@code{org-beamer-theme}).  See chapter 15 in the Beamer
 +manual.

I think the user can find references to Beamer's theme in the
appropriate manual by himself.  I suggest to remove the second sentence.

 +@item BEAMER_FONT_THEME
  @cindex #+BEAMER_FONT_THEME
 +The Beamer font theme.  See chapter 18 in the Beamer manual.

Ditto.

 +@item BEAMER_INNER_THEME
  @cindex #+BEAMER_INNER_THEME
 +The Beamer inner theme.  See chapter 16 in the Beamer manual.

Ditto.

 +@item BEAMER_OUTER_THEME
  @cindex #+BEAMER_OUTER_THEME
 -Beamer export introduces a number of keywords to insert code in the
 -document's header.  Four control appearance of the presentation:
 -@code{#+BEAMER_THEME}, @code{#+BEAMER_COLOR_THEME},
 -@code{#+BEAMER_FONT_THEME}, @code{#+BEAMER_INNER_THEME} and
 -@code{#+BEAMER_OUTER_THEME}.  All of them accept optional arguments within
 -square brackets.  The last one, @code{#+BEAMER_HEADER}, is more generic and
 -allows you to append any line of code in the header@footnote{Lines are
 -appended at the end of the preamble, allowing for any final customization
 -such as the inclusion of short titles.}.
 +The Beamer outer theme.  See chapter 16 in the Beamer manual.

Ditto.

 +@c This one is probably not needed

Why this comment?

 +@item BEAMER_HEADER
 +@cindex #+BEAMER_HEADER
 +Arbitrary lines appended to the end of the preamble of the document.
 +
 +@item DESCRIPTION
 +@cindex #+DESCRIPTION (Beamer)
 +The document description.  By default these are inserted as metadata using
 +hyperref.  You can use several such keywords if the list is long.  See also
 +@code{org-latex-hyperref-template} and @code{org-latex-title-command}.

See also is a bit terse. Maybe

  By default these are inserted as metadata using @samp{hyperref}
  package@footnote{You can customize @code{org-latex-hyperref-template}
  to control what data is included in the document.} and can be used to
  build complex titles (see @code{org-latex-title-command} for details).
  You can use several such keywords if the description is long.

 +@item KEYWORDS
 +@cindex #+KEYWORDS (Beamer)
 +The keywords defining the contents of the document.  By default these are
 +inserted as metadata using hyperref.  You can use several such keywords if
 +the list is long.  See also @code{org-latex-hyperref-template} and
 +@code{org-latex-title-command}.
 +@end table
 +
 +This example illustrates how to change the theme.  Note that theme options
 +can be specified in square brackets.

Shouldn't the example be moved earlier, when BEAMER_THEME is discussed?

 +@cindex #+HTML_MATHJAX
 +Options for MathJax (@code{org-html-mathjax-options}).  See also
 +@code{org-html-mathjax-template}.

See above.

 +@item LATEX_HEADER
 +@cindex #+LATEX_HEADER (HTML)
 +used when transcoding e.g. math formulas to images.

Capital. This may be expanded a bit, i.e., how is it used?

 -@example
 +@exampl

Typo.

  [[./img.png]]
  @end example
  
 @@ -13144,7 +13294,7 @@ including DocBook.}.
  @end table
  
  @node Document preamble
 -@subsection Document preamble
 +@subsection Texinfo specific syntax

Typo?


Regards,



[O] Custom agenda starting tomorrow

2015-03-31 Thread Ken Mankoff
I have a custom agenda view that includes the today view:

 (agenda  ((org-agenda-ndays 1)
 (org-agenda-overriding-header Scheduled Today)
 (org-deadline-warning-days 0)))

And the next week:

  (agenda  ((org-agenda-overriding-header Scheduled)
  (org-deadline-warning-days 0)))

Is there any way to have an agenda view that does not include today? today 
gets repeated here, and for the second agenda view I'd like to have it start 
tomorrow and show the next ndays from then.

Thanks,

  -k.



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Eric S Fraga
On Tuesday, 31 Mar 2015 at 12:13, Richard Lawrence wrote:
 Hi Eric and all,

 Eric S Fraga e.fr...@ucl.ac.uk writes:

[...]

 However, for some reason, libreoffice doesn't display the citations in
 the ODT document you have included.  I have had a look at the actual ODT
 file and it looks fine.  Can you suggest what may be wrong?  

 Hmm, you're right.  I don't have LibreOffice on the machine where I am
 working on org-citeproc, but I tested it on another machine (OS X,
 LibreOffice version 4.2.8.2 I think), and the citation text is indeed
 missing.

Thanks for confirming this.  At least it's not me!  I hope somebody
can figure out what is going on here.

[...]

 A second question: what will be required to use the new cite syntax with
 LaTeX/PDF which will remain my main target for export?

 I think this needs more discussion, actually.

 The citation syntax can basically be mapped directly to BibLaTeX syntax,
 so generating LaTeX that will be processed with BibLaTeX is a simple and
 straightforward modification to Org's LaTeX exporter, and compiling the

Although I normally use bibtex, I am happy moving to biblatex if it
means unifying org's citation approaches.  I don't need the extra
features (e.g. multicite) in practice but I'm also not attached to
bibtex.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-921-gfd8c84



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Richard Lawrence
Hi Tom and all,

t...@tsdye.com (Thomas S. Dye) writes:

 I know next to nothing about citations in general, so please bear with
 me: if multi-cite support means being able to condense citations (e.g.
 [1-3, 5, 9]), then bibtex can do at least some of that
 (e.g. http://texblog.org/2007/05/28/mulitple-reference-citation/).

 Multiple citations with natbib are limited in the sense that individual
 citations within them don't carry pre- and post-notes.  BibLaTeX does
 away with this restriction.

Just to clarify: our syntax allows both pre- and post-notes for each
individual reference within a citation, plus common pre- and post-notes
for the citation as a whole.  Is it only the latter which BibTeX does
not support?  Or is it also that it can't handle pre- and post-notes for
individual references when there is more than one work cited?  I don't
think I've ever tried to do something that complicated with plain BibTeX.

(Also, do you think it is important to support plain BibTeX at all?  It
seems like we should not bother with this problem unless it's important
for a lot of people.  I personally would be fine with just targeting
BibLaTeX, and it sounds like Eric would be too.)

 The org-export-cite-add-citation-mode-latex function that Aaron Ecay
 wrote allows the author to choose (implicitly) which package to use.  I
 like this design because it can accommodate new packages without changes
 to the Org mode code.

 ,-
 | Your comment inspired me to implement   
 | org-export-cite-add-citation-mode-latex in the experimental citation
 | support I just pushed.  So you can do:  
 | 
 | (org-export-cite-add-citation-mode-latex tsd  
 | \\mycitecommand[%s][%s]{%s} \\myparencitecommand[%s][%s]{%s})   
 | 
 | Add to your document:   
 | 
 | #+CITATION_MODE: tsd
 | 
 | And citations should just work with your chosen commands.  I’m sure when
 | advanced citation support comes along (whether from subtypes or plists),
 | a similarly simple wrapper can be implemented.  
 `-

 I haven't found time to experiment with the citation developments or to
 read through the developing code base.  Was this feature of Aaron's
 experimental support subsequently dropped?

No, I haven't touched that part of the code, and as far as I know that
should still work.  However, I also haven't been able to make sense of
how the CITATION_MODE and CITATION_STYLE keywords should work in
non-LaTeX backends, so my code doesn't make any use of them, either.  

If I understand correctly, the mode and the style are two pieces of
information that jointly determine how citations should be formatted.
The reason they are separated is that you can have multiple styles
associated with a mode (or is it the other way around?).  Is it right to
say that in LaTeX, choosing a mode and a style determines both
which citation commands are available and what their behavior is?

In the CSL world, both of these pieces of information seem to be
determined by the choice of CSL stylesheet.  Thus, I went with a single
keyword, CSL_FILE, to specify this information.  I guess one could also
go the other way, and try to select a stylesheet based on CITATION_MODE
and CITATION_STYLE, but I wasn't sure how to do that.  I also don't
really know if it would be useful to provide a notion of `custom modes'
outside of LaTeX; as far as I can see, all customization would just come
down to selecting a different stylesheet.  But maybe I'm missing
something important?

Best,
Richard




Re: [O] [org.texi] New keywords tables

2015-03-31 Thread Rasmus
Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 An example of a structure change is attached.  It introduces a table
 similar to @ref{Export settings} in the beginning of most backend
 chapters.

 I have not (re)read it yet, but I want to make sure that we roughly agree
 on the structure before I put more time into it.  It does not touch
 texinfo (yet) 'cause it's complicated.

 What is complicated? I find it quite clear. I'm biased, tho.

It's complicated 'cause it already good quality in the sense that it
already more structure (≡ using a table-like structure) than other
sections.  Thus, it's not simply a question of going through the backend
definitions, and copying in keywords.


 Also I would kill all backend specific keywords from the table in @node
 In-buffer settings:

 @itemx #+LATEX_HEADER:, #+LATEX_HEADER_EXTRA:,
 @itemx #+HTML_HEAD:, #+HTML_HEAD_EXTRA:, #+HTML_LINK_UP:,
 #+HTML_LINK_HOME:,
 @itemx #+ODT_STYLES_FILE:,

 It does not contain all HTML KW or any Beamer KW.  IOW it's a mess and the
 true picture here would be ugly.

 WDYT?

 Agreed.

OK.

 +#+TITLE: This is the title of the document
 +#+: This is the title of the document

 Typo.

I was trying to suggest that I had not put much effort into this yet,
implying comments would be premature.  Anyway, thanks for the comments!

 +Beamer export introduces a number of keywords, similar to the general 
 options
 +settings described in @pxref{Export settings}.
 +
 +@table @samp
 +@item BEAMER_THEME
  @cindex #+BEAMER_THEME
 -@cindex #+BEAMER_COLOR_THEME
 +@vindex org-beamer-theme
 +The Beamer theme (@code{org-beamer-theme}).  See chapter 15 in the Beamer
 +manual.

 I think the user can find references to Beamer's theme in the
 appropriate manual by himself.  I suggest to remove the second sentence.

OK.

 +@c This one is probably not needed

 Why this comment?

'Cause it's work in progress.  Anyway, I decided to just include any
keyword defined in the backend.  Thus, it should be included.

 +@item BEAMER_HEADER
 +@cindex #+BEAMER_HEADER
 +Arbitrary lines appended to the end of the preamble of the document.
 +
 +@item DESCRIPTION
 +@cindex #+DESCRIPTION (Beamer)
 +The document description.  By default these are inserted as metadata using
 +hyperref.  You can use several such keywords if the list is long.  See also
 +@code{org-latex-hyperref-template} and @code{org-latex-title-command}.

 See also is a bit terse. Maybe

   By default these are inserted as metadata using @samp{hyperref}
   package@footnote{You can customize @code{org-latex-hyperref-template}
   to control what data is included in the document.} and can be used to
   build complex titles (see @code{org-latex-title-command} for details).
   You can use several such keywords if the description is long.

I'm indifferent, but I know these keywords too well.

 +@item KEYWORDS
 +@cindex #+KEYWORDS (Beamer)
 +The keywords defining the contents of the document.  By default these are
 +inserted as metadata using hyperref.  You can use several such keywords if
 +the list is long.  See also @code{org-latex-hyperref-template} and
 +@code{org-latex-title-command}.
 +@end table
 +
 +This example illustrates how to change the theme.  Note that theme options
 +can be specified in square brackets.

 Shouldn't the example be moved earlier, when BEAMER_THEME is discussed?

No 'cause I want a clean view of the keywords.  I don't know what the
point is of that example (it was there before), but I learned about the
interpretation of square brackets...


 +@item LATEX_HEADER
 +@cindex #+LATEX_HEADER (HTML)
 +used when transcoding e.g. math formulas to images.

 Capital. This may be expanded a bit, i.e., how is it used?

Good question.

  [[./img.png]]
  @end example
  
 @@ -13144,7 +13294,7 @@ including DocBook.}.
  @end table
  
  @node Document preamble
 -@subsection Document preamble
 +@subsection Texinfo specific syntax

 Typo?

No, I would like to have consistent headings for each backend.  But see my
note above on the Texinfo chapter being more structured.

—Rasmus

-- 
And when I’m finished thinking, I have to die a lot







Re: [O] Bug: Proposed new version of ob-C.el [8.3beta (release_8.3beta-944-g830cf3 @ /Users/snapp/.emacs.d/vendor/org/)]

2015-03-31 Thread Nick Dokos
Thierry Banel tbanelweb...@free.fr writes:

 Le 31/03/2015 12:07, Nicolas Goaziou a écrit :

 IMO, it would be better than the current situation, but I wonder if
 it makes sense to have a global default setting containing the
 three files, but one which the user can customize; any :includes
 parameters would augment the default.

 That would satisfy the OP's requirements, but would also allow for
 a shorter #+BEGIN_SRC line.
 I think this suggestion makes sense. While you're at it, would you mind
 implementing it?



 Well, actually the global default setting feature may already be available
   1) through properties in drawers
   2) through the org-babel-default-header-args global variable

 * Property in drawer
   :PROPERTIES:
   :includes: stdio.h myheader.h
   :END:
 Any C++ babel block below this tree will inherit the stdio.h and
 myheader.h#includes

 * The org-babel-default-header-argsvariable
 This variable holds global defaults. For C++ do something like that:
 (add-to-list 'org-babel-default-header-args '(:includes  stdio.h
 myheader.h))
 Any babel C++ block anywhere will inherit from the global variable.

 Nick, are those the kinds of settings you were thinking about?

I was thinking of an ob-C.el customizable variable that is set by
default to some useful list of includes, not file-settable things.
But I'm probably the last person you should ask about what is useful
here. Real users should speak up.

 The augment feature may be missing though:
 local :includes overwrite global ones.

I think augmentation might be nice, but if people are willing to live
with replacement, I'm not going to argue. And if augmentation carries
the day, there always is the vexing question of what to do when you
really *want* replacement, not augmentation.

Nick






Re: [O] org-cite and org-citeproc

2015-03-31 Thread Rasmus
Richard Lawrence richard.lawre...@berkeley.edu writes:

 I don't really know anything about the ODT format, though.  My code
 more-or-less blindly pastes Pandoc-generated XML into the document
 during Org ODT export.  Can someone who knows more about the format take
 a look at the file and see if there is some subtle problem I'm not
 noticing?

I can't test your code 'cause I, for personal/silly reasons, refuse to
spend any more dealing with compiling Haskell.

That being said, my gut feeling is that you have to define the data
elsewhere.

For example, to add a (sub)title to a odt document the field/keyword is
defined in a file different from contents.xml and will just not be printed
if used in contents.xml only.

Also, the bibliography is not correct in the sense that if it was setup
in the right semantic way, it would be gray in LO, like the TOC.

—Rasmus

-- 
Bang bang




Re: [O] Function that jumps to an entry with a certain CUSTOM_ID

2015-03-31 Thread Christoph Lange
On Mar 31, 2015 9:53 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 The problem is that we're running out of interesting keybindings.

Let me ask the question differently: as all reasonable key bindings are
taken (a statement to which I tend to agree), is the suggestion of
interactive functions to be added to the core of org-mode no longer
appropriate? I.e. should I contribute them to Worg (with which I still need
to familiarise myself) rather than suggesting them here? Or, asking about a
middle course, what's the role of org's contrib directory? (Is it even
suitable for something that is not a complete plugin of its own right, but
rather just a single function?)

 C-c
 j is not an option since it is reserved to users.

Sorry, this was unfortunate in my initial post. I didn't intend to
hard-code this as the default key binding, but it was rather meant to be
read as if you like this function, you could bind it, for example, to 

 Note that you can use

   (let ((h (org-find-property CUSTOM_ID custom-id)))
 (when h (goto-char h)))

 instead of

   (org-link-search ...)

 for one less level of indirection.

Thanks - makes sense. However probably not if I write a tutorial in the
style of if you want to do something, then copy the following lines to
your. emacs.

But I think I should rather aim at Worg's contrib directory, with a short
elisp file containing my function, plus a short HTML file explaining that
there exists an elisp file containing a function that does a few words
about the functionality - does this make sense?

Cheers, and thanks for your advice,

Christoph

-- 
Christoph Lange(-Bever)
http://langec.wordpress.com/about
Sent from a mobile device; please excuse my brevity.


Re: [O] Possible bug: Can not search for text in links - only description

2015-03-31 Thread Samuel Wales
hi ken,

that's right, my point was that perhaps it is relevant, not that one
would set the variable.

for example, perhaps there is a way that timestamps can have an
invisible property and thus be subject to this variable.

of course, it might not be possible, if timestamps do not use
overlays, but it might inspire a more general fix.


samuel

On 3/31/15, Ken Mankoff mank...@gmail.com wrote:

 On 2015-03-20 at 13:53, Samuel Wales samolog...@gmail.com wrote:
 hmm:

 ===
 search-invisible is a variable defined in `isearch.el'.
 Its value is open

 Documentation:
 If t incremental search/query-replace can match hidden text.
 A nil value means don't match invisible text.
 When the value is `open', if the text matched is made invisible by
 an overlay having an `invisible' property and that overlay has a property
 `isearch-open-invisible', then incremental search will show the contents.
 (This applies when using `outline.el' and `hideshow.el'.)
 ...
 ===


 Note that setting search-invisible to t means that collapsed segments no
 longer expand.

   -k.




-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

Ramsay's disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] org-cite and org-citeproc

2015-03-31 Thread Thomas S. Dye
Richard Lawrence richard.lawre...@berkeley.edu writes:

 Hi Tom and all,

 t...@tsdye.com (Thomas S. Dye) writes:

 I know next to nothing about citations in general, so please bear with
 me: if multi-cite support means being able to condense citations (e.g.
 [1-3, 5, 9]), then bibtex can do at least some of that
 (e.g. http://texblog.org/2007/05/28/mulitple-reference-citation/).

 Multiple citations with natbib are limited in the sense that individual
 citations within them don't carry pre- and post-notes.  BibLaTeX does
 away with this restriction.

 Just to clarify: our syntax allows both pre- and post-notes for each
 individual reference within a citation, plus common pre- and post-notes
 for the citation as a whole.  Is it only the latter which BibTeX does
 not support?  Or is it also that it can't handle pre- and post-notes for
 individual references when there is more than one work cited?  I don't
 think I've ever tried to do something that complicated with plain BibTeX.

IIUC, plain BibTeX just supports \cite, and it was the natbib style
that introduced parenthetical, \citep, and text, \citet, citation
commands.  The corresponding commands in BibLaTeX styles are \parencite
and \textcite.

With natbib, it is possible to give a pre-note and a post-note to the
citation as a whole, but not to individual citations within it.  In
order to support your syntax fully, I think BibLaTeX is needed.

 (Also, do you think it is important to support plain BibTeX at all?  It
 seems like we should not bother with this problem unless it's important
 for a lot of people.  I personally would be fine with just targeting
 BibLaTeX, and it sounds like Eric would be too.)

Well, one benefit of Aaron's function was to make this choice
superfluous, both now and in the future.  It binds the two citation
commands you've implemented to citation commands implemented in
CITATION_STYLE.  As Aaron notes, it should be easy to modify this (to
bind additional commands) when advanced citation support comes along.

 The org-export-cite-add-citation-mode-latex function that Aaron Ecay
 wrote allows the author to choose (implicitly) which package to use.  I
 like this design because it can accommodate new packages without changes
 to the Org mode code.

 ,-
 | Your comment inspired me to implement   
 | org-export-cite-add-citation-mode-latex in the experimental citation
 | support I just pushed.  So you can do:  
 | 
 | (org-export-cite-add-citation-mode-latex tsd  
 | \\mycitecommand[%s][%s]{%s} \\myparencitecommand[%s][%s]{%s})   
 | 
 | Add to your document:   
 | 
 | #+CITATION_MODE: tsd
 | 
 | And citations should just work with your chosen commands.  I’m sure when
 | advanced citation support comes along (whether from subtypes or plists),
 | a similarly simple wrapper can be implemented.  
 `-

 I haven't found time to experiment with the citation developments or to
 read through the developing code base.  Was this feature of Aaron's
 experimental support subsequently dropped?

 No, I haven't touched that part of the code, and as far as I know that
 should still work.  However, I also haven't been able to make sense of
 how the CITATION_MODE and CITATION_STYLE keywords should work in
 non-LaTeX backends, so my code doesn't make any use of them, either.  

IIUC, CITATION_STYLE refers to the bibliography style file.
CITATION_MODE makes it possible for an author using your syntax to get
away from the Harvard mode citations that seem to be your target and use
another mode such as the footnote citations common in the humanities.

 If I understand correctly, the mode and the style are two pieces of
 information that jointly determine how citations should be formatted.
 The reason they are separated is that you can have multiple styles
 associated with a mode (or is it the other way around?).  Is it right to
 say that in LaTeX, choosing a mode and a style determines both
 which citation commands are available and what their behavior is?

Typically, a bibliography style file defines several citation commands,
which might belong to one or more modes.  It sounds to me as if the CSL
world conflates styles and modes, but I haven't looked closely.

 In the CSL world, both of these pieces of information seem to be
 determined by the choice of CSL stylesheet.  Thus, I went with a single
 keyword,