Re: [O] How to print only visible elements of org-agenda

2015-11-27 Thread sgeorgii .
Updating the org package to the latest version indeed fixed this behavior.
Thank you Nicolas!

On 26 November 2015 at 16:23, Nicolas Goaziou 
wrote:

> Hello,
>
> "sgeorgii ."  writes:
>
> > I run  org-agenda and then I do some filtering of the agenda by tags.
> >
> > Then I simply want to print the lines which I now see on the screen.
> >
> > My problem is - I am getting printed _all_ lines of org-agenda,
> > including those I just filtered out and do not see on my screen!
> >
> > My desired outcome is to get printed only those org-agenda lines I see
> > on screen after filtering. Can this be done?
>
> Actually, it was intended to behave this way, but a bug was getting in
> the way. I fixed it. Thank you.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] TOC local for specified heading and its subheadings (in HTML export)?

2015-11-27 Thread D. C. Toedt
The #+TOC: headlines [n] local feature is really useful; I use it a lot.
How easy would it be to do a macro to generate a similar table of contents
for the subheadings of an arbitrary specified heading?  That would be an
alternative to transclusion ,
allowing re-use of text but with links instead of the actual text.  For UX
purposes this will sometimes be preferable to actual transclusion, e.g.,
with Angular.js.  I'm not even a cargo-cult programmer in elisp and
wouldn't have the level of skill to do this myself without spending a lot
of time.

EXAMPLE:  In the Common Draft contract form file
, I'd like to add a Model Confidentiality
Agreement, a Model Software Development Agreement, a Model Consulting
Services Agreement, etc.  Each of these model agreements would include
several TOC-style lists of clauses under various other headings, as shown
in the following hypothetical file excerpt:

* Model Confidentiality Agreement
  :PROPERTIES:
  :CUSTOM_ID: ConfAgrmt
  :END:

** Parties; Effective Date

This Agreement is entered into as of November 27, 2015, between ABC Ltd.
and XYZ Inc.

** Confidential Information

# = The next line is the desired feature: Generate a TOC list
(with links) of all subheadings in the specified heading
=
#+TOC: headlines 1 local ConfInfoClauses

** Notices

#+TOC: headlines 1 local NoticesClauses

* Signatures

AGREED:

ABC Ltd, by:

[Signature block]


AGREED:

XYZ Inc., by:

[Signature block]


* Confidential Information Clauses
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoClauses
  :END:

** Confidential Information Definition
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoDefn
  :END:

[text of clause]

** Confidentiality Obligation
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoOblig
  :END:

[text of clause]


* Notices Clauses
  :PROPERTIES:
  :CUSTOM_ID: NoticesClauses
  :END:

​** Notices Must Be in Writing
  :PROPERTIES:
  :CUSTOM_ID: NoticesWriting
  :END:
​
​[text of clause]

** Notices by Email
  :PROPERTIES:
  :CUSTOM_ID: NoticesEmail
  :END:
​
​[text of clause]​

​I'd be happy to make a donation for this.

​


D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
Common Draft  contract clauses & checklists,
annotated
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt 
www.OnContracts.com/About

Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


[O] String nil error when export with ":EXPORT_OPTIONS: |:nil" (without exporting table) in properties drawer

2015-11-27 Thread Lei Zhe
I tried to exclude the table export of one headline by setup:

* headline
 :PROPERTIES:
 :EXPORT_OPTIONS:  |:nil
 :END:

But the string nil error appeared.
Any help?

I am working on Org-mode 8.2.10.

Zhe Lei



[O] How to hide past days in Agenda view

2015-11-27 Thread sgeorgii .
Hello!

The subject question. When I

M-x org-agenda

and it is now Friday - in my weekly agenda view I want only to see Friday
(today), Saturday and Sunday. I.e. only remaining part of the week.

By default my agenda shows from Monday till Sunday regardless of current
day. How do I filter our days which are in past in my Agenda?

Any help?


[O] Jumping between source blocks in a file

2015-11-27 Thread Andrew Kirkpatrick
On the emacs subreddit, someone recently asked if there was a command
to jump between babel source blocks while editing them. I couldn't
find such a command but liked the idea so I implemented it. My
implementation can be invoked from org-mode or org-src-mode. If a C-u
prefix is supplied, the edit is aborted rather than exited retaining
edits.

If this is deemed useful, I'm happy to make changes suitable for
inclusion in the project.

Cheers

(defun my-babel-src-jump (arg jump-fn)
  (let* ((minor-modes (cl-remove-if-not (lambda (x)
  (and (boundp x) (symbol-value x)))
minor-mode-list)))
(when (member 'org-src-mode minor-modes)
  (if (equal arg '(4))
  (org-edit-src-abort)
(org-edit-src-exit)))
(when (eq major-mode 'org-mode)
  (funcall jump-fn)
  (org-edit-src-code

(defun my-babel-edit-next (arg)
  (interactive "P")
  (my-babel-src-jump arg #'org-babel-next-src-block))

(defun my-babel-edit-previous (arg)
  (interactive "P")
  (my-babel-src-jump arg #'org-babel-previous-src-block))



Re: [O] How to hide past days in Agenda view

2015-11-27 Thread Charles Millar

Hi,

On 11/27/2015 08:45 AM, sgeorgii . wrote:

Hello!

The subject question. When I

M-x org-agenda

and it is now Friday - in my weekly agenda view I want only to see 
Friday (today), Saturday and Sunday. I.e. only remaining part of the week.


By default my agenda shows from Monday till Sunday regardless of 
current day. How do I filter our days which are in past in my Agenda?


Any help?

As to agenda starting today I have the following in my init.el

(setq org-agenda-start-on-weekday nil) ;starts agenda week view "today"
   ;rather than a fixed day each week

Perhaps you can set org-agenda-span someway to show only the remaining 
days in the week. I set it to


(setq org-agenda-span 14)

so that I see the next 14 days I believe setting it to 'fortnight also 
works.


Charlie Millar



Re: [O] :completion function isn't run anymore?

2015-11-27 Thread Julien Cubizolles
Julien Cubizolles  writes:

> I noticed that the :preparation-function defined in
> org-publish-project-alist isn't run anymore when publishing a project.

It seems the preparation-function isn't run either. Consider the
following more simple examples

--8<---cut here---start->8---

#+TITLE: Hello
#+begin_src emacs-lisp :tangle none :exports none
  (setq org-export-in-background nil)
  (defun jc-preparation ()
  "Preparation functions to be run before actually pubishing"
  (setq org-latex-title-command "")
  )
  (setq org-publish-project-alist
`(("pdf"
   :base-directory "./"
   :publishing-directory "./"
   :preparation-function jc-preparation
   :publishing-function org-beamer-publish-to-pdf
   :exclude ".*"
   :include ,(list (file-name-nondirectory buffer-file-name))
   )
  ))
#+end_src

#+RESULTS:
| pdf | :base-directory | ./ | :publishing-directory | ./ | 
:preparation-function | jc-preparation | :publishing-function | 
org-beamer-publish-to-pdf | :exclude | .* | :include | (test.org) |

* 1st section
** 1st subsection
** 2nd subsection
--8<---cut here---end--->8---

Save the to test.org and publish using the "pdf"
project. org-beamer-publish-to-pdf creates test.pdf as it should but the
preparation-function should remove the titlepage wich it doesn't.

However, with emacs -Q (and the version of org-mode shipped with it), I
recover the expected behaviour.

With  emacs -Q -l ~/test.el, the problem reoccurs

~/test.el

--8<---cut here---start->8---
(add-to-list 'load-path "~/info/emacs/org-mode/lisp")
(add-to-list 'load-path "~/info/emacs/org-mode/contrib/lisp")
--8<---cut here---end--->8---

~/info/emacs/org-mode/ is my git repo of org-mode.

 I'm running GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.14.13) of 
2015-10-21

Julien.




[O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-27 Thread Steve Moreau
Hi,

Moving from old org-mode versions (6.33 or 7.9.3f-17-g7524ef) to the latest
stable one currently (8.3.2), I noticed two changes which made me out of my
comfort zone.

   1. Demoting/promoting a header now changes the indentation of text below.
   I reverted to the previous mode with '(setf org-adapt-indentation nil)'
   in ~/.emacs, and that's fine but I mentioned it in case it has an impact on
   point#2.

   2. 'M-x fill-region' does not fill custom lists as before. In the
   previous version, I could select and fill several mixed paragraphs/lists
   directly. For example, filling the following block (without --- separator
   added as a delimiter in this message)
   ---
   # a very long comment

   a long sentence that
   should be filled over 2 lines

   - a looong item that should be filled
   over 2 lines

 - a looong item that should be filled
   over 2 lines

   a long sentence that
   should be filled over 2 lines
   ---
   resulted in (version 6.33 or 7.9.3):
   ---
   # a very long comment

   a long sentence
   that should be filled over 2 lines

   - a looong item that should be filled
 over 2 lines

 - a looong item that should be
   filled over 2 lines

   a long sentence
   that should be filled over 2 lines
   ---
   and now results in (version 8.3.2):
   ---
   # a very long comment

   a long sentence
   that should be filled over 2 lines

   - a looong item that should be filled
   over 2 lines

 - a looong item that should be filled
   over 2 lines

   a long sentence
   that should be filled over 2 lines
   ---

   Lists are not filled anymore and I have to select each list entry and
   fill it individually to get the same output.

So my questions are:

   - Is there any simple way to revert to the previous mode with a variable?
   - Else, could you explain briefly where I should look if I want to
   understand why the filling is skipped in this case, and eventually change
   it if I cannot change my mind and adapt to this different behavior? I had a
   look at function (org.el:23249 org-setup-filling) but I am not sure this is
   the right location.

Thanks, and have a nice day.


Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-27 Thread John Hendy
On Fri, Nov 27, 2015 at 10:56 AM, Steve Moreau  wrote:
> Hi,
>
> Moving from old org-mode versions (6.33 or 7.9.3f-17-g7524ef) to the latest
> stable one currently (8.3.2), I noticed two changes which made me out of my
> comfort zone.
>
> Demoting/promoting a header now changes the indentation of text below.
> I reverted to the previous mode with '(setf org-adapt-indentation nil)' in
> ~/.emacs, and that's fine but I mentioned it in case it has an impact on
> point#2.
>
> 'M-x fill-region' does not fill custom lists as before. In the previous
> version, I could select and fill several mixed paragraphs/lists directly.
> For example, filling the following block (without --- separator added as a
> delimiter in this message)
> ---
> # a very long comment
>
> a long sentence that
> should be filled over 2 lines
>
> - a looong item that should be filled over 2
> lines
>
>   - a looong item that should be filled over
> 2 lines
>
> a long sentence that
> should be filled over 2 lines

[snip]

> Lists are not filled anymore and I have to select each list entry and fill
> it individually to get the same output.
>
> So my questions are:
>
> Is there any simple way to revert to the previous mode with a variable?
> Else, could you explain briefly where I should look if I want to understand
> why the filling is skipped in this case, and eventually change it if I
> cannot change my mind and adapt to this different behavior? I had a look at
> function (org.el:23249 org-setup-filling) but I am not sure this is the
> right location.

I don't really have an answer regarding *why*, but I have this in my
.emacs that seems to work with either spaces at the end of your
example above (fills the current line) or with M-x fill-region. Want
to try that? Maybe the new org requires manually setting fill options?

#+begin_src .emacs

;; change 80 to whatever you prefer
(setq-default fill-column 80)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

#+end_src


Hope that helps!
John

>
> Thanks, and have a nice day.



Re: [O] org-info.js not displaying document?

2015-11-27 Thread Matthieu Caneill
On Thu, Nov 26, 2015 at 03:44:42PM +0200, Greg Minshall wrote:
> oof.  my problem does *not* happen with "emacs -Q".  sorry about not
> checking that before complaining.  (if anyone has any hints...)

Hi,
Why not diff-ing the 2 html files, the one produced with your settings
and the other one produced with -Q ? This may give you a pointer.

Cheers,
--
Matthieu Caneill
m...@brokenwa.re - http://matthieu.io



Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-27 Thread John Hendy
On Fri, Nov 27, 2015 at 11:32 AM, John Hendy  wrote:
> On Fri, Nov 27, 2015 at 10:56 AM, Steve Moreau  wrote:
>> Hi,
>>
>> Moving from old org-mode versions (6.33 or 7.9.3f-17-g7524ef) to the latest
>> stable one currently (8.3.2), I noticed two changes which made me out of my
>> comfort zone.
>>
>> Demoting/promoting a header now changes the indentation of text below.
>> I reverted to the previous mode with '(setf org-adapt-indentation nil)' in
>> ~/.emacs, and that's fine but I mentioned it in case it has an impact on
>> point#2.
>>
>> 'M-x fill-region' does not fill custom lists as before. In the previous
>> version, I could select and fill several mixed paragraphs/lists directly.
>> For example, filling the following block (without --- separator added as a
>> delimiter in this message)
>> ---
>> # a very long comment
>>
>> a long sentence that
>> should be filled over 2 lines
>>
>> - a looong item that should be filled over 2
>> lines
>>
>>   - a looong item that should be filled over
>> 2 lines
>>
>> a long sentence that
>> should be filled over 2 lines
>
> [snip]
>
>> Lists are not filled anymore and I have to select each list entry and fill
>> it individually to get the same output.
>>
>> So my questions are:
>>
>> Is there any simple way to revert to the previous mode with a variable?
>> Else, could you explain briefly where I should look if I want to understand
>> why the filling is skipped in this case, and eventually change it if I
>> cannot change my mind and adapt to this different behavior? I had a look at
>> function (org.el:23249 org-setup-filling) but I am not sure this is the
>> right location.
>
> I don't really have an answer regarding *why*, but I have this in my
> .emacs that seems to work with either spaces at the end of your
> example above (fills the current line) or with M-x fill-region. Want
> to try that? Maybe the new org requires manually setting fill options?
>
> #+begin_src .emacs
>
> ;; change 80 to whatever you prefer
> (setq-default fill-column 80)
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
>
> #+end_src

I take that back. It didn't work on the unordered list after all.
Googling around, turns out someone asked about this sort of thing
before (me!):
- http://comments.gmane.org/gmane.emacs.orgmode/76593

In following the thread, it does't seem like there was a
fill-paragraph equivalent that worked on lists. Perhaps someone else
can chime in here on why Org doesn't fill on lists. I get no filling
when running =M-x fill-paragraph= on your example, and it turns it
into a paragraph (ignoring the current "-" bullet structure) using
=M-x fill-region-as-paragraph=.


John

>
>
> Hope that helps!
> John
>
>>
>> Thanks, and have a nice day.



Re: [O] String nil error when export with ":EXPORT_OPTIONS: |:nil" (without exporting table) in properties drawer

2015-11-27 Thread Nicolas Goaziou
Hello,

Lei Zhe  writes:

> I tried to exclude the table export of one headline by setup:
>
> * headline
>  :PROPERTIES:
>  :EXPORT_OPTIONS:  |:nil
>  :END:
>
> But the string nil error appeared.
> Any help?
>
> I am working on Org-mode 8.2.10.

I cannot reproduce the problem on latest Org. Could you update and try
again?


Regards,

-- 
Nicolas Goaziou



Re: [O] interaction between org-latex-custom-lang-environments and name when exporting to latex

2015-11-27 Thread Alan Schmitt
Hi Rasmus,

Thanks a lot for the great comments. Here is an updated patch, with some
comments on your comments for the thing I did not change.

On 2015-11-25 10:57, Rasmus  writes:

>> +  \\begin{listing}
>> +  \\begin{minted}{ocaml}
>> +  
>> +  \\end{minted}
>> +  \\caption{}
>> +  \\label{}
>> +  \\end{listing}")
>
> Nitpick: label should be inside caption in the example to be consistent
> with how captions are normally formatted by ox-latex.  Either way is fine
> though.

I chose this example because it's the code in the minted manual.

> Also, you need to denote that the defcustom was changed.
>
>   :version "25.1"
>   :package-version '(Org . "9.0")
>
> When you are at it, please add the missing tags, :group and :type.

It's not a defcustom but a defvar. (But maybe it should be a defcustom …)

From 527635c2e674fe1f3ab9d5d3de96e238d0debf7b Mon Sep 17 00:00:00 2001
From: Alan Schmitt 
Date: Wed, 25 Nov 2015 08:48:58 +0100
Subject: [PATCH] ox-latex: Extend custom-lang-environments

* ox-latex.el (org-latex-custom-lang-environments): Extend the
  documentation string.
* ox-latex.el (org-latex-src-block): Allow a custom language environment
  to be a format string to be directly inserted.
---
 lisp/ox-latex.el | 58 
 1 file changed, 46 insertions(+), 12 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index bbf7f41..0a9f7d4 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1025,17 +1025,44 @@ block-specific options, you may use the following syntax:
   "Alist mapping languages to language-specific LaTeX environments.
 
 It is used during export of src blocks by the listings and minted
-latex packages.  For example,
+latex packages.  The environment may either be a simple string,
+composed of only letters and numbers.  In this case, the string is
+directly the name of the latex environment to use.  The environment
+may also be a format string.  In this case the format string will be
+directly exported.  This format string may contain these elements:
+
+  %s for the formatted source
+  %c for the caption
+  %f for the float attribute
+  %l for an appropriate label 
+
+For example,
 
   (setq org-latex-custom-lang-environments
- '((python \"pythoncode\")))
+ '((python \"pythoncode\")
+   (ocaml \"begin{listing}
+begin{minted}{ocaml}
+%send{minted}
+caption{%c}
+label{%l}\")))
 
-would have the effect that if org encounters begin_src python
-during latex export it will output
+would have the effect that if org encounters a Python source block
+during LaTeX export it will produce
 
   \\begin{pythoncode}
   
-  \\end{pythoncode}")
+  \\end{pythoncode}
+
+and if org encounters an Ocaml source block during LaTeX export it
+will produce
+
+  \\begin{listing}
+  \\begin{minted}{ocaml}
+  
+  \\end{minted}
+  \\caption{}
+  \\label{}
+  \\end{listing}")
 
 
  Compilation
@@ -2756,13 +2783,20 @@ contextual information."
 			   (org-export-format-code-default src-block info))
;; Case 2.  Custom environment.
(custom-env
-	(let ((caption-str (org-latex--caption/label-string src-block info)))
-	  (format "\\begin{%s}\n%s\\end{%s}\n"
-		  custom-env
-		  (concat (and caption-above-p caption-str)
-			  (org-export-format-code-default src-block info)
-			  (and (not caption-above-p) caption-str))
-		  custom-env)))
+	(let ((caption-str (org-latex--caption/label-string src-block info))
+  (formatted-src (org-export-format-code-default src-block info)))
+  (if (org-string-match-p "\\`[a-zA-Z0-9]+\\'" custom-env)
+	  (format "\\begin{%s}\n%s\\end{%s}\n"
+		  custom-env
+		  (concat (and caption-above-p caption-str)
+			  formatted-src
+			  (and (not caption-above-p) caption-str))
+		  custom-env)
+	(format-spec custom-env
+			 `((?s . ,formatted-src)
+			   (?c . ,caption)
+			   (?f . ,float)
+			   (?l . ,(org-latex--label src-block info)))
;; Case 3.  Use minted package.
((eq listings 'minted)
 	(let* ((caption-str (org-latex--caption/label-string src-block info))
-- 
2.6.3


Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated November 22, 2015, Mauna Loa Obs.): 400.35 ppm


signature.asc
Description: PGP signature


Re: [O] iPad text editor for .org files in Dropbox?

2015-11-27 Thread Alan Schmitt
Hello Peter,

On 2015-11-25 14:36, Peter Davis  writes:

> I know this question is a bit off the list's topic, but has anyone
> found an iPad text editor that can operate on .org files in Dropbox?

I have been looking into this, and here is some additional information.
As I'm writing this while being offline, I cannot give you links except
for those in my browser cache. Please ping me if you cannot find the
programs I reference below.

Editorial looks very nice, especially since you can create workflows
around it using python. There is no syntax support for org files but
I found a feature request for it.

Another option can be Textatsic (http://www.textasticapp.com/). It does
not have org support out of the box, but it can load textmate syntax
description, and I found one written for it
(https://github.com/jezcope/Org.tmbundle).

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated November 22, 2015, Mauna Loa Obs.): 400.35 ppm


signature.asc
Description: PGP signature


Re: [O] iPad text editor for .org files in Dropbox?

2015-11-27 Thread Peter Davis

Thanks for all the suggestions on this. A couple of people mentioned
Editorial, and that does indeed seem very powerful. Like MobileOrg, it
can synch with any particular Dropbox folder, so that part is pretty
transparent.

I don't know what it would take to add org-mode support for this, but it
does already support Markdown, including live previewing and exporting
as HTML or PDF, so it may indeed be a very useful tool.

Thanks!
-pd


-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com



Re: [O] interaction between org-latex-custom-lang-environments and name when exporting to latex

2015-11-27 Thread Rasmus
Hi Alan,

Alan Schmitt  writes:

>> Nitpick: label should be inside caption in the example to be consistent
>> with how captions are normally formatted by ox-latex.  Either way is fine
>> though.
>
> I chose this example because it's the code in the minted manual.

As you prefer.

>> Also, you need to denote that the defcustom was changed.
>>
>>   :version "25.1"
>>   :package-version '(Org . "9.0")
>>
>> When you are at it, please add the missing tags, :group and :type.
>
> It's not a defcustom but a defvar. (But maybe it should be a defcustom …)

It should be a defcustom.  Feel free to fix it, preferably in a separate
patch.

11.5 Defining Global Variables
A [defvar/defconst] definition is a construct that announces your
intention to use a symbol as a global variable.
...
To define a customizable variable, you should use defcustom (which
calls defvar as a subroutine). See Variable Definitions.

> From 527635c2e674fe1f3ab9d5d3de96e238d0debf7b Mon Sep 17 00:00:00 2001
> From: Alan Schmitt 
> Date: Wed, 25 Nov 2015 08:48:58 +0100
> Subject: [PATCH] ox-latex: Extend custom-lang-environments
>
> * ox-latex.el (org-latex-custom-lang-environments): Extend the
>   documentation string.
> * ox-latex.el (org-latex-src-block): Allow a custom language environment
>   to be a format string to be directly inserted.
> ---
>  lisp/ox-latex.el | 58 
> 
>  1 file changed, 46 insertions(+), 12 deletions(-)
>
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index bbf7f41..0a9f7d4 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -1025,17 +1025,44 @@ block-specific options, you may use the following 
> syntax:
>"Alist mapping languages to language-specific LaTeX environments.
>  
>  It is used during export of src blocks by the listings and minted
> -latex packages.  For example,
> +latex packages.  The environment may either be a simple string,

You don’t need the ’either’ IMO, but as you please. 

> +composed of only letters and numbers.  In this case, the string is
> +directly the name of the latex environment to use.  The environment
> +may also be a format string.  In this case the format string will be
> +directly exported.  This format string may contain these elements:
> +
> +  %s for the formatted source
> +  %c for the caption
> +  %f for the float attribute
> +  %l for an appropriate label 
> +
> +For example,
>  
>(setq org-latex-custom-lang-environments
> - '((python \"pythoncode\")))
> + '((python \"pythoncode\")
> +   (ocaml \"begin{listing}
> +begin{minted}{ocaml}
> +%send{minted}
> +caption{%c}
> +label{%l}\")))
>  
> -would have the effect that if org encounters begin_src python
> -during latex export it will output
> +would have the effect that if org encounters a Python source block
> +during LaTeX export it will produce
>  
>\\begin{pythoncode}
>
> -  \\end{pythoncode}")
> +  \\end{pythoncode}
> +
> +and if org encounters an Ocaml source block during LaTeX export it

Org.  Perhaps the ’and’ should be capitalized.  I don’t know.

The rest looks good to me.  Feel free to push (modulus someone else saying
otherwise).

Thanks,
Rasmus

-- 
m-mm-mmm- bacon!




Re: [O] Featur request org-table-iterate-table-subtree

2015-11-27 Thread Charles Millar

Any thoughts? Any body?

If there are two headlines each with the same set of table templates but 
different data in each,  org-table-iterate-buffer-tables will converge; 
however the convergence may yield incorrect results.


I suppose there are two options at the moment,

rename all tables in heading 1 to heading1summary, heading1A, 
heading1B, etc. and heading2summary, heading2A, heading2B, etc. and 
change all remote references to reflect this, or


set up separate org files for each set of tables although the 
tables pertain to the same over all subject.


Neither is really acceptable, but the second is the least trouble.

A third choice is worse, narrow to the heading and use org-table-iterate 
on each table. At least the buffer should not be widened in that case.


I have missed some documentation? I thought this would be a useful 
feature much the same way that export-subtree.


Charlie Millar

On 10/24/2015 09:18 PM, Charles Millar wrote:
Please see the attached example. If I call 
org-table-iterate-buffer-tables, Summary1 and Summary2 both are 
calculated using the referenced tables in heading "first set of 
tables" and the tables in the second heading are disregarded.


Without going into the details there are times when I use certain form 
tables in separate headlines in the same file. The entries are 
different in each and I believe that a function perhaps 
"org-table-iterate-subtree-tables" would be a useful addition to 
org-table.el.


Please note that narrowing the buffer to the second headline does not 
help since the code in org-table-iterate-buffer-tables widens the buffer.


Charlie Millar





Re: [O] String nil error when export with ":EXPORT_OPTIONS: |:nil" (without exporting table) in properties drawer

2015-11-27 Thread Lei Zhe
Hello,

I updated my org to 8.3.2.
When I only export the current sub-headline, the table can be extruded
successfully. But when I export the whole document, the tables in the
current sub-headline still be exported.

Thanks for any help.

Zhe Lei

On Sat, Nov 28, 2015 at 5:38 AM, Nicolas Goaziou  wrote:
> Hello,
>
> Lei Zhe  writes:
>
>> I tried to exclude the table export of one headline by setup:
>>
>> * headline
>>  :PROPERTIES:
>>  :EXPORT_OPTIONS:  |:nil
>>  :END:
>>
>> But the string nil error appeared.
>> Any help?
>>
>> I am working on Org-mode 8.2.10.
>
> I cannot reproduce the problem on latest Org. Could you update and try
> again?
>
>
> Regards,
>
> --
> Nicolas Goaziou



Re: [O] String nil error when export with ":EXPORT_OPTIONS: |:nil" (without exporting table) in properties drawer

2015-11-27 Thread Nicolas Goaziou
Lei Zhe  writes:

> I updated my org to 8.3.2.
> When I only export the current sub-headline, the table can be extruded
> successfully. But when I export the whole document, the tables in the
> current sub-headline still be exported.

This is to be expected. :EXPORT_OPTIONS: only applies to subtree export.

Regards,



Re: [O] TOC local for specified heading and its subheadings (in HTML export)?

2015-11-27 Thread Sacha Chua
"D. C. Toedt"  writes:

Hello, D. C., all!

> # = The next line is the desired feature: Generate a TOC list
> (with links) of all subheadings in the specified heading
> =
> #+TOC: headlines 1 local ConfInfoClauses

This is totally a partial implementation since I've only bothered to
make it work for HTML export, but someone can make it work nicely for
everything else. =)

I think it will permit the use of lines like:

#+TOC: headlines 1 id:ConfInfoClauses

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index effd387..3b0e239 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2651,8 +2651,18 @@ CONTENTS is nil.  INFO is a plist holding contextual 
information."
 ((string-match "\\" value)
  (let ((depth (and (string-match "\\<[0-9]+\\>" value)
(string-to-number (match-string 0 value
-   (localp (org-string-match-p "\\" value)))
-   (org-html-toc depth info (and localp keyword
+   (localp (org-string-match-p "\\" value))
+   (local-id (and (string-match "\\" value)
+  (match-string 1 value
+   (org-html-toc depth info
+ (or
+  (and local-id
+   (car (org-element-map (plist-get info 
:parse-tree)
+'headline
+  (lambda (element)
+(and (string= (org-element-property 
:CUSTOM_ID element) local-id)
+ element)
+  (and localp keyword)
 ((string= "listings" value) (org-html-list-of-listings info))
 ((string= "tables" value) (org-html-list-of-tables info
 
D. C., are you okay with applying patches to your local copy, or do
you need someone to clean it up and merge it into core?

I have copyright assignment papers on file. Feel free to do what you
want with the code!

Sacha




Re: [O] fetching the description from a link string

2015-11-27 Thread Sacha Chua
Alan Schmitt  writes:

> Thank you for the suggestion. I'm already doing something similar:
> #+begin_src emacs-lisp
> (let ((link (org-store-link nil))
>   (name (org-element-property :raw-value (org-element-at-point
> ...)
> #+end_src

You can also use org-bracket-link-regexp, if you want:

(let ((link "[[http://example.com][Description]]";))
  (and (string-match org-bracket-link-regexp link)
   (match-string 3 link)))

Sacha