Re: [O] Exporting to multiple files

2014-10-01 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Eric Abrahamsen  writes:
>
>> Not many formats: many files. To be honest, it's not necessary for epub
>> to export to many separate files, but it's often done. It is easier to
>> deal with, if you're editing the epub afterwards. 
>
> In this case, the back-end can generate multiple files. AFAIK, ox-odt
> does something like that, except that the files are eventually zipped.

I was already borrowing quite heavily from ox-odt (epub is a zipped
directory, too, and has a bunch of the same manifest/metadata stuff),
but hadn't yet tackled the problem of preserving inter-file links (I
don't think ox-odt splits the actual text into multiple files). If you
can think of any more clever approach than just
find-and-replace-plus-bookkeeping, please let me know!

Eric




Re: [O] [patch, ox] Unnumbered headlines

2014-10-01 Thread Rasmus
["Cloud-note" to self (probably) or, preferably, someone else]

One "deficit" of unnumbered headlines in odt is that they are
indented.  This looks dumb!  Here's some notes on how I think is the
best way to get rid of the indention in ox-odt.

If this bothers someone, please go ahead and fix it!  Otherwise I
might look at it eventually. . .

Alan L Tyree  writes:

> Also interesting [to note on unnumbered headlines in LO]: right
> click on the unnumbered headline. Go to Bullets and Numbering. Click
> on 'Remove' at the bottom and the headline jumps back into proper
> alignment.

Arh, so indention for unnumbered headlines can be removed!

Studying the xml files of LO it seems the mechanism is something like
this.  Basically, to get an unnumbered headline you have to specify it
as a list header.  This is what the current patch does and how LO does
it.  But the indention is caused by the fact that it's a list
header. To get rid of the indention one has to specify the list style
to be the empty style "" (empty quote). . .

So, for unnumbered headlines, append text:is-list-header="true" to the
text:h specification.  Example: 

headline

To get it unindented we need to add

style:list-style-name=""

To the style.  LO does this by generating PN, N is an int, styles on
the fly that are derived from Heading styles:



In Org, I think the easiest thing to do would be to add these styles
to the styles.xml file and choose the right style based on whether
headline is numbered or not numbered. . .  Unfortunately, it seems we
cannot just add style:list-style-name="" to the end of the style
definition of Heading_20_N as this kills the number.

—Rasmus

-- 
Dobbelt-A







Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-01 Thread John Kitchin
Nicolas Goaziou  writes:

is it the case that ATTR_HTML width attributes are only in pixels? If
so, that is certainly an easier modification to make, and would solve my
problem (we almost exclusively use attr_latex for that export).

Your comment inspired me to solve it this way:

#+attr_latex: :width 4in :placement [H]
#+attr_org: :width 400
[[./images/batch-multiple.png]]


For inline images, the attr_org is found first, but in latex export it
is ignored and it gets the width there.

Maybe no change is needed at all.


> Hello,
>
> John Kitchin  writes:
>
>> I have set this in my init file
>>
>> (setq org-image-actual-width '(600))
>>
>> It works great, unless I use:
>> #+attr_latex: :width 4in
>>
>> This makes my images 4 inches wide in LaTeX, but it sets my images to
>> approximately 4 pixels wide!
>>
>> I feel like it is worth modifying the regexp that gets the width to
>> catch these cases and fall back on the variable value when they
>> exist. Any thoughts?
>
> I wonder if this kludge makes any sense in the general case. As you
> noticed, units given in a LaTeX attributes line will probably be
> different from pixels.
>
> What about limiting the regexp to ATTR_HTML lines only?
>
>
> Regards,

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



[O] Bug: org-time-stamp keymap [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2014-10-01 Thread Pierre-Yves Luyten

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


org-time-stamp does call org-read-date, which copies calendar-mode-map
then adds its own functions, for example S- to navigate in order
to select a date.

This is not easy to customize ; org-read-date is a complex function thus
overriding this definition would be dangerous.

Instead, defining a specific keymap, heriting from calendar-mode-map,
would allow users to easily call define-key to set up their own way
to use calendar.

I gues org-read-date is actually used in many more functions, but my
report should be clear anyway.





Emacs  : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9)
 of 2014-08-18 on buildvm-21.phx2.fedoraproject.org
Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ 
/usr/share/emacs/24.3/lisp/org/)

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-from-is-user-regexp "\\"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append
local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-blocks '((src org-babel-exp-src-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] Improved way to include some headlines from an external org file

2014-10-01 Thread Andrea Rossetti
Xavier Garrido  writes:
> Thanks for the follow-up. Actually I am waiting this patch
> http://article.gmane.org/gmane.emacs.orgmode/90932/match=include+resolve+links
> to be pushed by Rasmus (see the comment in the endlessparentheses

Ahem... sincere apologies for the noise. I got confused by
those words "resolve links" in the topic title, it sounded
like a HTML-specific thing. Kindest regards, Andrea



Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-01 Thread Rasmus
Hi,

Nicolas Goaziou  writes:

> It isn't very important, but you forgot full stops at the end of
> comments in the test file.

Fixed. 

>> I want to discuss one more important potential issue before having the
>> patch applied.  Currently, location is ignored if the included part is
>> not an env (line 3381) and not a block (3392).  I'm not sure this is
>> right.  I could do one of the following:
>>
>>1. Nothing (current state)
>>2. Throw an error if location and env or block are combined.
>>3. Try to use location even if block is set.  Recall, though, that
>>   location is resolved using org-mode. 
>>4. Let location be a general regexp if env or block is non-nil.
>>   But then we are breaking with the org file-link idea.
>>5. Make location work for org files when env or block, otherwise
>>   throw an error.
>>
>> WDYT?
>
> I think option 1 is perfect. If a block with org contents is needed, one
> can always do
>
>   #+begin_center
>   #+include: "file.org::*headline"
>   #+end_center
>
> Block and environments are really meant for literal insertion, where
> locations do not apply.

Great!  Less work.  

We can always tune it later as necessary.

>> + (only-contents
>> + (and (string-match ":only-contents *?\\([^: \r\t\n]\\S-*\\)?"
>> value)
>
> Is the shy *? necessary?

No!  Only the * is necessary to catch an implicit nil.  Thanks.

Feel free to commit the attached patch if there's nothing else.

—Rasmus 

-- 
Hooray!
>From 35fdda4c4fe160bee2963687d368104febb2b627 Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Sun, 28 Sep 2014 21:05:17 +0200
Subject: [PATCH] ox: Allow file-links with #+INCLUDE-keyword

* org.el (org-edit-special): Handle file-links for INCLUDE.
* ox.el (org-export--prepare-file-contents): Handle links and
add option no-heading.
* ox.el (org-export-expand-include-keyword): Resolve headline
links and add option :only-contents.
* orgguide.texi (Include files)
org.texi (Include files): Updated.
* testing/examples/include.org: New examples.
* test-ox.el (test-org-export/expand-include): New tests.
---
 doc/org.texi |  17 +++
 doc/orgguide.texi|   9 +++-
 lisp/org.el  |   9 ++--
 lisp/ox.el   | 117 +++
 testing/examples/include.org |  25 +
 testing/lisp/test-ox.el  |  59 +-
 6 files changed, 220 insertions(+), 16 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 7d98d51..296e289 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10008,6 +10008,23 @@ to use the obvious defaults.
 #+INCLUDE: "~/.emacs" :lines "10-"@r{Include lines from 10 to EOF}
 @end example
 
+Finally, you may use a file-link, see @ref{search option in file links}, to
+extract an object as matched by @code{org-link-search}@footnote{Note that
+@code{org-link-search-must-match-exact-headline} is locally bound to non-nil.
+Therefore, @code{org-link-search} only matches headlines and named
+elements.}.  If the @code{:only-contents} property is non-nil, only the
+contents of the requested element will be included, omitting properties
+drawer and planning-line if present.  The @code{:lines} keyword
+operates locally with respect to the requested element.  Some examples:
+
+@example
+#+INCLUDE: "./paper.org::#theory" :only-contents t
+   @r{Include the body of the heading with the custom id @code{theory}}
+#+INCLUDE: "./paper.org::mytable"  @r{Include named element.}
+#+INCLUDE: "./paper.org::*conclusion" :lines 1-20
+   @r{Include the first 20 lines of the headline named conclusion.}
+@end example
+
 @table @kbd
 @kindex C-c '
 @item C-c '
diff --git a/doc/orgguide.texi b/doc/orgguide.texi
index ca8e052..4feeaca 100644
--- a/doc/orgguide.texi
+++ b/doc/orgguide.texi
@@ -2264,8 +2264,13 @@ include your @file{.emacs} file, you could use:
 The optional second and third parameter are the markup (i.e., @samp{example}
 or @samp{src}), and, if the markup is @samp{src}, the language for formatting
 the contents.  The markup is optional, if it is not given, the text will be
-assumed to be in Org mode format and will be processed normally. @kbd{C-c '}
-will visit the included file.
+assumed to be in Org mode format and will be processed normally.  File-links
+will be interpreted as well:
+@smallexample
+#+INCLUDE: "./otherfile.org::#my_custom_id" :only-contents t
+@end smallexample
+@noindent
+@kbd{C-c '} will visit the included file.
 
 @node Embedded @LaTeX{},  , Include files, Markup
 @section Embedded @LaTeX{}
diff --git a/lisp/org.el b/lisp/org.el
index 9815eb4..0910296 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20524,9 +20524,12 @@ Otherwise, return a user error."
 		   session params))
   (keyword
(if (member (org-element-property :key element) '("INCLUDE" "SETUPFILE"))
-   (find-file-other-window
-(org-remove-double-quotes
- (car (org-split-string (org-element-property :value element)
+

Re: [O] [org-publish] Error exporting my project

2014-10-01 Thread Brady Trainor
Nicolas Goaziou  writes:

> Hello,
>
> Leandro Noferini  writes:
>
>> Yes, I have on Debian unstable, either emacs24 and org-mode package: how
>> could I choose to use only org-mode package?


Do you use the built-in package manager? I do, so I think I simply need
(package-initialize) before anything calls org.


>
> You have to make sure that newer Org is loaded before bundled one, i.e.,
> nothing in your config requires (or autoloads) the bundled Org.
>
>
> Regards,


--
Brady




Re: [O] Adding new table rows/cols in a formula update

2014-10-01 Thread Nick Dokos
Nicolas Goaziou  writes:

> Hello,
>
> Dima Kogan  writes:
>
>> OK. Patch attached.
>
> Thanks for your patch. Some comments follow.
>
>> From 3b6581c647cb87f0d3e8cee94ce2fb1fb122d3fd Mon Sep 17 00:00:00 2001
>> From: Dima Kogan 
>> Date: Tue, 30 Sep 2014 22:36:21 -0700
>> Subject: [PATCH] Field formulas can now add columns as needed
>>
>> The org-table-formula-make-new-cols customization controls whether and how 
>> this
>> is done
>
> Your commit message is missing information and "TINYCHANGE" at its end.
> See http://orgmode.org/worg/org-contribute.html#sec-5
>
>> +(defcustom org-table-formula-make-new-cols nil
>
> What about `org-table-formula-create-columns'?
>
>> +  "Non-nil means that evaluation of a field formula can add new
>> +columns if an out-of-bounds field is being set."
>
> First line needs to be complete. E.g.,
>
>   "Non-nil means a field formula can create a new column."
>
>> +  :group 'org-table-calculation
>> +  :type '(choice
>> +  (const :tag "Setting an out-of-bounds field generates an error 
>> (default)" nil)
>> +  (const :tag "Setting an out-of-bounds field silently adds columns as 
>> needed" t)
>> +  (const :tag "Setting an out-of-bounds field adds columns as needed, 
>> but issues a warning message" warn)
>> +  (const :tag "When setting an out-of-bounds field, the user is
>> prompted" prompt)))
>
> You need to add :version and :package-version keywords.
>
>>  (defgroup org-table-import-export nil
>>"Options concerning table import and export in Org-mode."
>>:tag "Org Table Import Export"
>> @@ -3125,7 +3135,22 @@ known that the table will be realigned a little later 
>> anyway."
>>(while (setq eq (pop eqlname1))
>>  (message "Re-applying formula to field: %s" (car eq))
>>  (org-goto-line (nth 1 eq))
>> -(org-table-goto-column (nth 2 eq))
>> +(let* ((column-target (nth 2 eq))
>> +   (column-count (progn (end-of-line)
>> +(1- (org-table-current-column
>> +   (create-new-column
>> +(and (> column-target column-count)
>
> Is this check really necessary? Doesn't `org-table-goto-column' already
> figures it out before creating a new column?
>
>
> Regards,

Does it need sanity checking? A typo in a formula can create "billions
and billions"[fn:1] of columns inadvertently.

Footnotes:

[fn:1] with apologies to Carl Sagan (RIP)...




Re: [O] [patch, ox] #+INCLUDE resolves links

2014-10-01 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Changes are one sentence in the documentations, casing, and I changed
> the regexp so that :only-contents is valid (it's nil).

Thank you.

It isn't very important, but you forgot full stops at the end of
comments in the test file.

> Is it better now?

I think so.

> I want to discuss one more important potential issue before having the
> patch applied.  Currently, location is ignored if the included part is
> not an env (line 3381) and not a block (3392).  I'm not sure this is
> right.  I could do one of the following:
>
>1. Nothing (current state)
>2. Throw an error if location and env or block are combined.
>3. Try to use location even if block is set.  Recall, though, that
>   location is resolved using org-mode. 
>4. Let location be a general regexp if env or block is non-nil.
>   But then we are breaking with the org file-link idea.
>5. Make location work for org files when env or block, otherwise
>   throw an error.
>
> WDYT?

I think option 1 is perfect. If a block with org contents is needed, one
can always do

  #+begin_center
  #+include: "file.org::*headline"
  #+end_center

Block and environments are really meant for literal insertion, where
locations do not apply.

> Less important.  Should the  right term) prompt for a location, or change the cursor position to
> after the filename?

The "right term" is structure template. Since those are configurable,
I think the default, simple, behaviour is preferable.

> +  (only-contents
> +   (and (string-match ":only-contents *?\\([^: \r\t\n]\\S-*\\)?" 
> value)

Is the shy *? necessary?


Regards,

-- 
Nicolas Goaziou



Re: [O] Adding new table rows/cols in a formula update

2014-10-01 Thread Dima Kogan
Hi. Thanks for replying.


Nicolas Goaziou  writes:

> Thanks for your patch. Some comments follow.
>
>> From 3b6581c647cb87f0d3e8cee94ce2fb1fb122d3fd Mon Sep 17 00:00:00 2001
>> From: Dima Kogan 
>> Date: Tue, 30 Sep 2014 22:36:21 -0700
>> Subject: [PATCH] Field formulas can now add columns as needed
>>
>> The org-table-formula-make-new-cols customization controls whether and how 
>> this
>> is done
>
> Your commit message is missing information and "TINYCHANGE" at its end.
> See http://orgmode.org/worg/org-contribute.html#sec-5

OK. Added. By the way, I signed the copyright-assignment paperwork for
Emacs itself. Would I need to do this again for org-mode?



>> +(defcustom org-table-formula-make-new-cols nil
>
> What about `org-table-formula-create-columns'?

Sure, why not.



>> +  "Non-nil means that evaluation of a field formula can add new
>> +columns if an out-of-bounds field is being set."
>
> First line needs to be complete. E.g.,
>
>   "Non-nil means a field formula can create a new column."
>
>> +  :group 'org-table-calculation
>> +  :type '(choice
>> +  (const :tag "Setting an out-of-bounds field generates an error 
>> (default)" nil)
>> +  (const :tag "Setting an out-of-bounds field silently adds columns as 
>> needed" t)
>> +  (const :tag "Setting an out-of-bounds field adds columns as needed, 
>> but issues a warning message" warn)
>> +  (const :tag "When setting an out-of-bounds field, the user is
>> prompted" prompt)))
>
> You need to add :version and :package-version keywords.

OK. I'm not sure what those values should be, so please double-check.


>>  (defgroup org-table-import-export nil
>>"Options concerning table import and export in Org-mode."
>>:tag "Org Table Import Export"
>> @@ -3125,7 +3135,22 @@ known that the table will be realigned a little later 
>> anyway."
>>(while (setq eq (pop eqlname1))
>>  (message "Re-applying formula to field: %s" (car eq))
>>  (org-goto-line (nth 1 eq))
>> -(org-table-goto-column (nth 2 eq))
>> +(let* ((column-target (nth 2 eq))
>> +   (column-count (progn (end-of-line)
>> +(1- (org-table-current-column
>> +   (create-new-column
>> +(and (> column-target column-count)
>
> Is this check really necessary? Doesn't `org-table-goto-column' already
> figures it out before creating a new column?

This is necessary if we want to be able to warn the user or to prompt
them ONLY if a new column has to be made. I.e. if we're not looking past
the bounds of the table the user should never be pestered. If the
customization variable is only t/nil then this can be dramatically
simplified, as you have observed.

By the way, is (org-display-warning) the preferred way to produce a
warning? It does into a new buffer, not into *Messages*.

Tweaked patch attached.

>From 7b3ab8eeffb2047b966c624707766ec29a416583 Mon Sep 17 00:00:00 2001
From: Dima Kogan 
Date: Tue, 30 Sep 2014 22:36:21 -0700
Subject: [PATCH] org-table.el: field formulas can now create columns as needed

(org-table-recalculate): use the new org-table-formula-make-new-cols
customization to control whether org creates new columns when a
formula explicitly targets them

TINYCHANGE
---
 lisp/org-table.el | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 7607ead..090bb75 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -354,6 +354,18 @@ portability of tables."
 	  (const :tag "Stick to hline" nil)
 	  (const :tag "Error on attempt to cross" error)))
 
+(defcustom org-table-formula-create-columns nil
+  "Non-nil means that evaluation of a field formula can add new
+columns if an out-of-bounds field is being set."
+  :group 'org-table-calculation
+  :version "24.5"
+  :package-version '(Org . "8.3")
+  :type '(choice
+	  (const :tag "Setting an out-of-bounds field generates an error (default)" nil)
+	  (const :tag "Setting an out-of-bounds field silently adds columns as needed" t)
+	  (const :tag "Setting an out-of-bounds field adds columns as needed, but issues a warning message" warn)
+	  (const :tag "When setting an out-of-bounds field, the user is prompted" prompt)))
+
 (defgroup org-table-import-export nil
   "Options concerning table import and export in Org-mode."
   :tag "Org Table Import Export"
@@ -3125,7 +3137,22 @@ known that the table will be realigned a little later anyway."
   (while (setq eq (pop eqlname1))
 	(message "Re-applying formula to field: %s" (car eq))
 	(org-goto-line (nth 1 eq))
-	(org-table-goto-column (nth 2 eq))
+	(let* ((column-target (nth 2 eq))
+	   (column-count (progn (end-of-line)
+(1- (org-table-current-column
+	   (create-new-column
+		(and (> column-target column-count)
+		 (or (eq org-table-formula-create-columns t)
+			 (and
+			  (eq org-table-formula-create-columns 'warn)
+			  (progn
+			(org-display-warning "Out-of-bounds formul

Re: [O] Adding new table rows/cols in a formula update

2014-10-01 Thread Nicolas Goaziou
Hello,

Dima Kogan  writes:

> OK. Patch attached.

Thanks for your patch. Some comments follow.

> From 3b6581c647cb87f0d3e8cee94ce2fb1fb122d3fd Mon Sep 17 00:00:00 2001
> From: Dima Kogan 
> Date: Tue, 30 Sep 2014 22:36:21 -0700
> Subject: [PATCH] Field formulas can now add columns as needed
>
> The org-table-formula-make-new-cols customization controls whether and how 
> this
> is done

Your commit message is missing information and "TINYCHANGE" at its end.
See http://orgmode.org/worg/org-contribute.html#sec-5

> +(defcustom org-table-formula-make-new-cols nil

What about `org-table-formula-create-columns'?

> +  "Non-nil means that evaluation of a field formula can add new
> +columns if an out-of-bounds field is being set."

First line needs to be complete. E.g.,

  "Non-nil means a field formula can create a new column."

> +  :group 'org-table-calculation
> +  :type '(choice
> +   (const :tag "Setting an out-of-bounds field generates an error 
> (default)" nil)
> +   (const :tag "Setting an out-of-bounds field silently adds columns as 
> needed" t)
> +   (const :tag "Setting an out-of-bounds field adds columns as needed, 
> but issues a warning message" warn)
> +   (const :tag "When setting an out-of-bounds field, the user is
> prompted" prompt)))

You need to add :version and :package-version keywords.

>  (defgroup org-table-import-export nil
>"Options concerning table import and export in Org-mode."
>:tag "Org Table Import Export"
> @@ -3125,7 +3135,22 @@ known that the table will be realigned a little later 
> anyway."
>(while (setq eq (pop eqlname1))
>   (message "Re-applying formula to field: %s" (car eq))
>   (org-goto-line (nth 1 eq))
> - (org-table-goto-column (nth 2 eq))
> + (let* ((column-target (nth 2 eq))
> +(column-count (progn (end-of-line)
> + (1- (org-table-current-column
> +(create-new-column
> + (and (> column-target column-count)

Is this check really necessary? Doesn't `org-table-goto-column' already
figures it out before creating a new column?


Regards,

-- 
Nicolas Goaziou



Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-01 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> I have set this in my init file
>
> (setq org-image-actual-width '(600))
>
> It works great, unless I use:
> #+attr_latex: :width 4in
>
> This makes my images 4 inches wide in LaTeX, but it sets my images to
> approximately 4 pixels wide!
>
> I feel like it is worth modifying the regexp that gets the width to
> catch these cases and fall back on the variable value when they
> exist. Any thoughts?

I wonder if this kludge makes any sense in the general case. As you
noticed, units given in a LaTeX attributes line will probably be
different from pixels.

What about limiting the regexp to ATTR_HTML lines only?


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporting to multiple files

2014-10-01 Thread Nicolas Goaziou
Eric Abrahamsen  writes:

> Not many formats: many files. To be honest, it's not necessary for epub
> to export to many separate files, but it's often done. It is easier to
> deal with, if you're editing the epub afterwards. 

In this case, the back-end can generate multiple files. AFAIK, ox-odt
does something like that, except that the files are eventually zipped.


Regards,

-- 
Nicolas Goaziou



[O] clock table properties

2014-10-01 Thread Paul Rudin

Here's the contents of a file:

#+PROPERTY: test_ALL: X
* Eggs
  CLOCK: [2014-10-01 Wed 18:52]--[2014-10-01 Wed 19:52] =>  1:00

#+BEGIN: clocktable :maxlevel 2 :scope file :properties ("test") :inherit-props 
t
#+CAPTION: Clock summary at [2014-10-01 Wed 19:57]
| test | Headline | Time   |
|--+--+|
|  | *Total time* | *1:00* |
|--+--+|
|  | Eggs | 1:00   |
#+END:

I was expecting that the test column would include the value X for every
row in the table when the clocktable is regenerated. Is my expectation
wrong?




Re: [O] [patchattached] Store link to url of eww

2014-10-01 Thread Aaron Ecay
Hi Marco,

Excellent.  I have pushed your patch to the master branch of the org-mode
repo.  If you want commit access, you can follow the instructions in the
wiki: .

Org’s maintainer Bastien (cc’d) is the only one who can actually verify
the assignment with the FSF, AFAIK.  He’s been busy lately, but when he’s
back he can do that and officially add you to the list of contributors.
(Or maybe someone else who has this ability will do so.)

Thanks,

-- 
Aaron Ecay



Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-10-01 Thread Nick Dokos
Grant Rettke  writes:

>> On Tue, Sep 30, 2014 at 9:23 PM, Nick Dokos  wrote:
>>> Grant Rettke  writes:
>>> Yikes what a week sorry about that here is what you would need I shall
>>> be defining a function to provide all such details in the future and
>>> thanks Nick for addressing:
>>>
>>> ╭
>>> │ (setq org-babel-noweb-wrap-start "«")
>>> │ (setq org-babel-noweb-wrap-end "»")
>>> ╰
>>>
>>>
>>
>> And an OT question:
>>
>> Since on my keyboard I can type << much more easily than I can type «
>
> Totally agreed, I'm using a US QWERTY keyboard.
>
>> I was wondering: does your keyboard provide an easy way to type a
>> guillemet?
>
> No but I use the [key-chord] package to do so like this:
>
> ╭
> │ (key-chord-define-global "<<" (lambda () (interactive) (insert "«")))
> │ (key-chord-define-global ">>" (lambda () (interactive) (insert "»")))
> ╰
>
> It is the same amount of typing but you get the desired character.
>
>> Is that why you changed it? Or is it purely aesthetics?
>
> Aesthetic personal preferences. After the fact, this preference has
> proven to be valuable for non-org-users, though.
>
> When I use `org' at work and show literate documents to non-users, the
> guillemet makes it crystal clear that the text is somehow special, and
> not just "something enclosed by two less-than and greater-than
> symbols". Not totally sure why people react this way, but they do.
>
>
> [key-chord]
> https://github.com/emacsmirror/key-chord/blob/master/key-chord.el

Ok - thanks!
--
Nick




Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-10-01 Thread Grant Rettke
> On Tue, Sep 30, 2014 at 9:23 PM, Nick Dokos  wrote:
>> Grant Rettke  writes:
>> Yikes what a week sorry about that here is what you would need I shall
>> be defining a function to provide all such details in the future and
>> thanks Nick for addressing:
>>
>> ╭
>> │ (setq org-babel-noweb-wrap-start "«")
>> │ (setq org-babel-noweb-wrap-end "»")
>> ╰
>>
>>
>
> And an OT question:
>
> Since on my keyboard I can type << much more easily than I can type «

Totally agreed, I'm using a US QWERTY keyboard.

> I was wondering: does your keyboard provide an easy way to type a
> guillemet?

No but I use the [key-chord] package to do so like this:

╭
│ (key-chord-define-global "<<" (lambda () (interactive) (insert "«")))
│ (key-chord-define-global ">>" (lambda () (interactive) (insert "»")))
╰

It is the same amount of typing but you get the desired character.

> Is that why you changed it? Or is it purely aesthetics?

Aesthetic personal preferences. After the fact, this preference has
proven to be valuable for non-org-users, though.

When I use `org' at work and show literate documents to non-users, the
guillemet makes it crystal clear that the text is somehow special, and
not just "something enclosed by two less-than and greater-than
symbols". Not totally sure why people react this way, but they do.


[key-chord]
https://github.com/emacsmirror/key-chord/blob/master/key-chord.el



Re: [O] Exporting to multiple files

2014-10-01 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Hello,
>
> Marcin Borkowski  writes:
>
>> Is it a bad idea to write an /export/ backend with one-to-many
>> functionality?  (Epub is probably the most obvious use case, but there
>> are others.)
>
> I don't know if that is a bad idea, but it sounds odd. In particular,
> I don't get why it is "obvious" that ePub should export to many formats.

Not many formats: many files. To be honest, it's not necessary for epub
to export to many separate files, but it's often done. It is easier to
deal with, if you're editing the epub afterwards. Of course, the usual
Org-mode approach is: get the file right in Org, and the exported
results should just be used as-is. But I still don't know how epubs
should be approached.

E 




Re: [O] Multi-file and master files

2014-10-01 Thread Phillip Lord
Nicolas Goaziou  writes:
> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>
>> Slightly confusing. I would have expected ELPA to do a stable install,
>> and then git for those wanting the bleeding edge. Is the only purpose
>> for the org-mode ELPA to hold plus-contrib which probably includes no
>> FSF assigned code?
>
> ELPA installs the stable (i.e. bugfix-only) branch of Org. Bleeding-edge
> is 8.3_beta.


And the orgmode.org ELPA? As far as I can see, they have the same files
in their org package (org-mode.org has org-plus-contrib as well).

Phil



Re: [O] [org-publish] Error exporting my project

2014-10-01 Thread Nicolas Goaziou
Hello,

Leandro Noferini  writes:

> Yes, I have on Debian unstable, either emacs24 and org-mode package: how
> could I choose to use only org-mode package?

You have to make sure that newer Org is loaded before bundled one, i.e.,
nothing in your config requires (or autoloads) the bundled Org.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporting to multiple files

2014-10-01 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> Is it a bad idea to write an /export/ backend with one-to-many
> functionality?  (Epub is probably the most obvious use case, but there
> are others.)

I don't know if that is a bad idea, but it sounds odd. In particular,
I don't get why it is "obvious" that ePub should export to many formats.


Regards,

-- 
Nicolas Goaziou



Re: [O] Multi-file and master files

2014-10-01 Thread Nicolas Goaziou
Hello,

phillip.l...@newcastle.ac.uk (Phillip Lord) writes:

> Slightly confusing. I would have expected ELPA to do a stable install,
> and then git for those wanting the bleeding edge. Is the only purpose
> for the org-mode ELPA to hold plus-contrib which probably includes no
> FSF assigned code?

ELPA installs the stable (i.e. bugfix-only) branch of Org. Bleeding-edge
is 8.3_beta.


Regards,

-- 
Nicolas Goaziou



Re: [O] Multi-file and master files

2014-10-01 Thread Phillip Lord
Rasmus  writes:
> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>
>> Hmmm. I seem to have trashed by org install by loading from ELPA;
>> currently, interactively, I can't export at all.
>
> Do C-h f on some org functions and check that they are from the elpa
> installation.
>
> See also:
>
>  http://orgmode.org/org.html#Installation
>
> Namely:
>> Important: you need to do this in a session where no .org file has
>> been visited, i.e. where no Org built-in function have been
>> loaded. Otherwise autoload Org functions will mess up the
>> installation.
>
> If you didn't adhere to this, maybe try to delete your
> ~/.emacs.d/elpa/org... and try installing again from emacs -q.

Oh dear, yes, forgot to restart after org updated.



>> It's still working through by batch process which is using cask and
>> probably has a different version of org.
>
> I don't understand what you're trying to say here.

Cask is a command line tool that I use for doing installs from ELPA
while doing continuous integration, and some batch processes. So the
org-mode that I am using in my interactive emacs and the one that is
being used in my unit tests can be different.

>
>> Is there a stable org-mode package repo? At the moment, both ELPA and
>> the org-mode repo appear to be bleeding egde...
>
> Yeah, it's the maint branch in the git repo.  Are you sure that
> org-elpa isn't using maint?
>
>   http://orgmode.org/elpa.html

from org/archive-contents

(1 (org  . [(20140929) ( ) "Outline-based notes management and 
organizer" tar])
   (org-plus-contrib . [(20140929) ( ) "Outline-based notes management and 
organizer" tar]))

from elpa/archive-contents

 (org .
  [(20140929)
   nil "Outline-based notes management and organizer" tar nil])


Far as I can tell both ELPA and the Org elpa repo have the same
version, and it's recent and fast updated. The Download and Install info
on orgmode.org says...

Stable version 8.2.7c (Jui. 2014) — tar.gz or zip (release notes).

Development version (cgit):

~$ git clone git://orgmode.org/org-mode.git

M-x list-packages RET (see Org ELPA) 

i.e. ELPA is on dailies.

Slightly confusing. I would have expected ELPA to do a stable install,
and then git for those wanting the bleeding edge. Is the only purpose
for the org-mode ELPA to hold plus-contrib which probably includes no
FSF assigned code?

I can do a git based install if I have to, but would rather not if I
don't!

> BTW: I now see the bug you are talking about (missing footnotes for
> second file) when I start with emacs -Q, i.e. using the org version
> shipped with Emacs.


Okay, I will check this more carefully!

Thanks for the help.

Phil



Re: [O] Tangling and Exporting an Unsupported Language.

2014-10-01 Thread Ista Zahn
On Wed, Oct 1, 2014 at 3:10 AM, Malcolm Purvis  wrote:
>> "Ista" == Ista Zahn  writes:
>
> Ista> Exporting and tangling don't require any language support.
>
> Ista> #+begin_src foobarbas :tangle foo.bar
> Ista> +end_src
>
> Ista> is perfectly fine and will export and tangle just fine. Or did I
> Ista> misunderstand your question?
>
> Thanks, I wasn't aware that you could put an arbitrary string as the
> language.
>
> I also found that I had org-latex-listings set to t, which was making
> LaTeX error because it didn't know about the languages I was trying.
>
> I've now switched the using the minted LaTeX package, which supports
> 'text' as a language, and have started using that.

Yes, I find minted much nicer that listings, the only drawback being
that it has external dependencies. I guess you've already discovered
that you can do

(add-to-list 'org-export-latex-minted-langs '(foo "bar"))

where foo is the name of the language and bar is the pygments lexer
that should be used to typeset it.

Best,
Ista

>
> Thanks for your help.
>
> Malcolm
>
> --
>Malcolm Purvis 
>



Re: [O] Exporting to multiple files

2014-10-01 Thread Marcin Borkowski

On 2014-10-01, at 14:44, Nicolas Goaziou wrote:

> Hello,
>
> Eric Abrahamsen  writes:
>
>> I thought about using Org publishing mechanism instead of exporting,
>> but the two systems seem pretty locked in their paradigms: publishing
>> is many-to-many, exporting is one-to-one (or many-to-one, with
>> includes). There's no built-in option for one-to-many.
>
> Publishing can give you one-to-many since :publishing-function accepts
> a lists of functions.

Is it a bad idea to write an /export/ backend with one-to-many
functionality?  (Epub is probably the most obvious use case, but there
are others.)

> Regards,

Best,

-- 

Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Multi-file and master files

2014-10-01 Thread Rasmus
Hi Phillip,

phillip.l...@newcastle.ac.uk (Phillip Lord) writes:

> Hmmm. I seem to have trashed by org install by loading from ELPA;
> currently, interactively, I can't export at all.

Do C-h f on some org functions and check that they are from the elpa
installation.

See also:

 http://orgmode.org/org.html#Installation

Namely:
> Important: you need to do this in a session where no .org file has
> been visited, i.e. where no Org built-in function have been
> loaded. Otherwise autoload Org functions will mess up the
> installation.

If you didn't adhere to this, maybe try to delete your
~/.emacs.d/elpa/org... and try installing again from emacs -q.

> It's still working through by batch process which is using cask and
> probably has a different version of org.

I don't understand what you're trying to say here.

> Is there a stable org-mode package repo? At the moment, both ELPA and
> the org-mode repo appear to be bleeding egde...

Yeah, it's the maint branch in the git repo.  Are you sure that
org-elpa isn't using maint?

  http://orgmode.org/elpa.html

BTW: I now see the bug you are talking about (missing footnotes for
second file) when I start with emacs -Q, i.e. using the org version
shipped with Emacs.

—Rasmus

-- 
May contains speling mistake



Re: [O] Multi-file and master files

2014-10-01 Thread Phillip Lord

Hmmm. I seem to have trashed by org install by loading from ELPA;
currently, interactively, I can't export at all.


debugger entered--Lisp error: (invalid-function org-with-silent-modifications)
  org-with-silent-modifications(nil)
  org-refresh-category-properties()
  org-get-category()

It's still working through by batch process which is using cask and
probably has a different version of org.

Is there a stable org-mode package repo? At the moment, both ELPA and
the org-mode repo appear to be bleeding egde...

Phil


Rasmus  writes:

> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>
>> Rasmus  writes:
>>
>>> Hi Phillip,
>>>
>>> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>>>
>>> I might be misunderstanding your question here, so bear(?) with me.
>>>
>>> I think #+INCLUDE: "$FILE" should take care of what you want.
>>> Basically, at export time, INCLUDE is expanded to the content of $FILE
>>> in the buffer.  Footnotes should work.
>>
>> So
>>
>> master.org
>>   include  file1.org
>>   include  file2.org
>>
>> Now, in file1.org add a footnote gets --
>>
>>  [fn:1]
>>
>>
>> * Footnote
>>
>> [fn:1] Footnote one
>>
>>
>> In file2.org add a footnote gets
>>
>>  [fn:1]
>>
>> * Foonote
>>  [fn:1] Footnote two
>>
>> And footnote two gets lost.
>
>
> Here's a complete example that works as expected (footnotes and
> hyperlinks).  Perhaps one needs to specify :minlevel to get the
> desired output.  I don't know if this is desired behavior.  If not you
> can make another bug report.
>
>
>>$ for f in $(ls -A /tmp/include); do echo ""; echo "→ $f ←"; echo
>> "~~~"; echo ""; cat /tmp/include/$f; done
>
>
> → c1.org ←
> ~~~
>
> * chapter 1
> txt1[fn:1]
>
> * Footnotes
>
> [fn:1] fn1
>
>
> → c2.org ←
> ~~~
>
> * chapter 2
> txt2[fn:1]
>
> * Footnotes
>
> [fn:1] fn2 
>
>
>
> → m.org ←
> ~~~
>
>
> #+OPTIONS: toc:nil
> #+TITLE: Overall title
>
> #+INCLUDE: "/tmp/include/c1.org" :minlevel 1 
> #+INCLUDE: "/tmp/include/c2.org" :minlevel 1
>
> * chapter 3
>   Everything was said in [[*chapter 1]] and [[*chapter 2]]...
>
> → m.txt ←
> ~~~
>
>   ━━━
>OVERALL TITLE
>   ━━━
>
>
> 1 chapter 1
> ═══
>
>   txt1[1]
>
>
> 2 chapter 2
> ═══
>
>   txt2[2]
>
>
> 3 chapter 3
> ═══
>
>   Everything was said in 1 and 2…
>
>
>
> Footnotes
> ─
>
> [1] fn1
>
> [2] fn2
>
>
>
>> I have a similar problem with hyperlinks. The normal store link
>> remembers the input.org file that the link is too. So, if in the
>> example, above I like between file2.org and file1.org using the Store
>> Link menu item, the HTML is wrong (since there is no file2.html
>> generated).
>
> I was not able to reproduce.  But please make a receipt to get this
> behavior and it can be looked into.
>
> —Rasmus

-- 
Phillip Lord,   Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk
School of Computing Science,
http://homepages.cs.ncl.ac.uk/phillip.lord
Room 914 Claremont Tower,   skype: russet_apples
Newcastle University,   twitter: phillord
NE1 7RU 



Re: [O] Exporting to multiple files

2014-10-01 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> I thought about using Org publishing mechanism instead of exporting,
> but the two systems seem pretty locked in their paradigms: publishing
> is many-to-many, exporting is one-to-one (or many-to-one, with
> includes). There's no built-in option for one-to-many.

Publishing can give you one-to-many since :publishing-function accepts
a lists of functions.


Regards,

-- 
Nicolas Goaziou



Re: [O] Multi-file and master files

2014-10-01 Thread Rasmus
phillip.l...@newcastle.ac.uk (Phillip Lord) writes:

> Rasmus  writes:
>
>> Hi Phillip,
>>
>> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>>
>> I might be misunderstanding your question here, so bear(?) with me.
>>
>> I think #+INCLUDE: "$FILE" should take care of what you want.
>> Basically, at export time, INCLUDE is expanded to the content of $FILE
>> in the buffer.  Footnotes should work.
>
> So
>
> master.org
>   include  file1.org
>   include  file2.org
>
> Now, in file1.org add a footnote gets --
>
>  [fn:1]
>
>
> * Footnote
>
> [fn:1] Footnote one
>
>
> In file2.org add a footnote gets
>
>  [fn:1]
>
> * Foonote
>  [fn:1] Footnote two
>
> And footnote two gets lost.


Here's a complete example that works as expected (footnotes and
hyperlinks).  Perhaps one needs to specify :minlevel to get the
desired output.  I don't know if this is desired behavior.  If not you
can make another bug report.


>$ for f in $(ls -A /tmp/include); do echo ""; echo "→ $f ←"; echo 
>"~~~"; echo ""; cat /tmp/include/$f; done


→ c1.org ←
~~~

* chapter 1
txt1[fn:1]

* Footnotes

[fn:1] fn1


→ c2.org ←
~~~

* chapter 2
txt2[fn:1]

* Footnotes

[fn:1] fn2 



→ m.org ←
~~~

#+OPTIONS: toc:nil
#+TITLE: Overall title
#+INCLUDE: "/tmp/include/c1.org" :minlevel 1 
#+INCLUDE: "/tmp/include/c2.org" :minlevel 1
* chapter 3
  Everything was said in [[*chapter 1]] and [[*chapter 2]]...

→ m.txt ←
~~~

━━━
 OVERALL TITLE
━━━


1 chapter 1
═══

  txt1[1]


2 chapter 2
═══

  txt2[2]


3 chapter 3
═══

  Everything was said in 1 and 2…



Footnotes
─

[1] fn1

[2] fn2



> I have a similar problem with hyperlinks. The normal store link
> remembers the input.org file that the link is too. So, if in the
> example, above I like between file2.org and file1.org using the Store
> Link menu item, the HTML is wrong (since there is no file2.html
> generated).

I was not able to reproduce.  But please make a receipt to get this
behavior and it can be looked into.

—Rasmus

-- 
The Kids call him Billy the Saint



Re: [O] Multi-file and master files

2014-10-01 Thread Phillip Lord
Rasmus  writes:

> Hi Phillip,
>
> phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>
> I might be misunderstanding your question here, so bear(?) with me.
>
> I think #+INCLUDE: "$FILE" should take care of what you want.
> Basically, at export time, INCLUDE is expanded to the content of $FILE
> in the buffer.  Footnotes should work.

So

master.org
  include  file1.org
  include  file2.org

Now, in file1.org add a footnote gets --

 [fn:1]


* Footnote

[fn:1] Footnote one


In file2.org add a footnote gets

 [fn:1]

* Foonote
 [fn:1] Footnote two

And footnote two gets lost.



I have a similar problem with hyperlinks. The normal store link
remembers the input.org file that the link is too. So, if in the
example, above I like between file2.org and file1.org using the Store
Link menu item, the HTML is wrong (since there is no file2.html
generated).

With latex and reftex, to put in a crossref, reftex knows about the
document structure and puts the hyperlink in as an internal reference,
since it will be internal when generated.

Phil




Re: [O] [org-publish] Error exporting my project

2014-10-01 Thread Leandro Noferini
Nicolas Goaziou  writes:


[...]

>> I have this error trying to publish my project that worked fine:
>>
>> Loading /home/leandro/.org-timestamps/Blog.cache...done
>> Publishing file /home/leandro/Desktop/Documenti/org/blog.org using
>> org-html-publish-to-html'
>> org-html-publish-to-html: Wrong number of arguments: #[(format plist 
>> filename pub-dir)
>>  "ÆÇ!ˆÈ!„ÉÊ\"ˆË!ŠÌ
>> †Í !!ˆÎÊBBp`Ï Ð ÑÒ!ˆÓÔ!P!ÕÖ\"ÐÕ×\"% Ø !ƒjÙ
>> !ƒj qˆÑÚ!ˆÛ ƒeÜ ˆÝ !ˆqˆÛ!ƒ€Þ
>> ˆcˆÜ ˆbˆ
>> ?…ˆÝ!.‡" [pub-dir filename visiting plist init-buf
>> init-point require org file-exists-p make-directory ...]
>> 7 ("/usr/share/emacs/24.3/lisp/org/org-publish.elc" . 18806)], 5
>   ^^
>
> It looks like you have a mixed installation: you're using org-publish.el
> from Org 7.x instead of 8.x.

Yes, I have on Debian unstable, either emacs24 and org-mode package: how
could I choose to use only org-mode package?


-- 
leandro
http://6xukrlqedfabdjrb.onion


pgpPub_BJECiP.pgp
Description: PGP signature


Re: [O] Changed behaviours of LaTeX exporter in version 8.0+

2014-10-01 Thread Kyeong Soo (Joseph) Kim
On Mon, Sep 29, 2014 at 10:18 PM, Rasmus  wrote:
<- snip >

>
> It may be documented in chapter 4, entitled Hyperlinks.
>
>http://orgmode.org/org.html#Hyperlinks
>
> I don't know if this chapter describes export behavior.
>

It does not.


>
> You can skim through org-latex-link if you care.  For headlines this
> is the relevant part
>
> ;; LINK points to a headline.  If headlines are numbered
> ;; and the link has no description, display headline's
> ;; number.  Otherwise, display description or headline's
> ;; title.
> (headline
>  (let* ((custom-label
>  (and (plist-get info :latex-custom-id-labels)
>   (org-element-property :CUSTOM_ID destination)))
> (label
>  (or
>   custom-label
>   (format "sec-%s"
>   (mapconcat
>#'number-to-string
>(org-export-get-headline-number destination info)
>"-")
>(if (and (not desc)
> (org-export-numbered-headline-p destination info))
>(format "\\ref{%s}" label)
>  (format "\\hyperref[%s]{%s}" label
>  (or desc
>  (org-export-data
>   (org-element-property :title destination) info))
>

As I guessed, you got this information from the source code itself.

In this regard I do deeply appreciate your providing this information with
all the guidance for contribution to documentation; I will try to
contribute per your advice.

Regards,
Joseph


Re: [O] Exporting to multiple files

2014-10-01 Thread Rasmus
Marcin Borkowski  writes:

> On 2014-03-09, at 02:34, Marcin Borkowski wrote:
>
>> Hi all,
>>
>> I'd like to export an Org-mode file to /multiple/ HTML files.  For
>> instance, I might want to convert all first and second level headings
>> to files, and third-level headings to , fourth-level ones to 
>> inside these files etc.  Is that possible?  I looked into the docs, but
>> didn't find anything like this.
>
> Hi all,
>
> I'm now coming back to this old question of mine, now a bit more
> determined to actually code something (as opposed to just thinking about
> it).


> One question: is it a good idea to implement my custom options, set in
> the
>
> #+:OPTIONS
>
> line?

Sure; if you think so.

> If yes (that's what I assume), how to do it?

See `org-export-define-derived-backend'.  There's examples in the
contrib folder, e.g.

ox-confluence.el, ox-deck.el, ox-freemind.el, ox-gfm.el,
ox-koma-letter.el, ox-rss.el, ox-s5.el

—Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




Re: [O] [patchattached] Store link to url of eww

2014-10-01 Thread Marco Wahl
Hi!

Marco Wahl  writes:
> Aaron Ecay  writes:
>> 2014ko irailak 23an, Rasmus-ek idatzi zuen:
>> ...that’s in the section for tinychange contributors without papers on
>> file though.
>
> I just initiated the assignment process according to your hint.  AFAICS
> it's time for some patience now.  I will tell you when it's done.

The assignment process is complete.  The id is 946878.


All the best,  Marco
-- 
http://www.wahlzone.de
PGP: 0x0A3AE6F2




Re: [O] Multi-file and master files

2014-10-01 Thread Rasmus
Hi Phillip,

phillip.l...@newcastle.ac.uk (Phillip Lord) writes:

> I've been writing a long document in org-mode recently. I decided to use
> org-mode for two reasons: firstly, I wrote the outline plan in org
> anyway and switching tools was irritating; second, I want both PDF and
> HTML output. My tool of choice would have been latex and auctex where it
> not for the HTML requirement.
>
> Setting it up was a little difficult, but in general it's going okay
> now. However, I am really missing the notion of "master" documents from
> auctex. I have a "main" file which just includes other files each of
> which contain a specific section.
>
> Now, the export functionality works, but many org commands appear not
> to work propertly. So, for example, footnotes adds new footnotes
> starting from 1 in each file, but in the HTML export the earlier
> footnotes get overwritten. Likewise, there is no good tool for putting
> in crosslinks, compared to reftex in latex.
>
> Am I missing things here? Or would it make more sense to move to latex,
> with all the hacking that this entails for the HTML output.

I might be misunderstanding your question here, so bear(?) with me.

I think #+INCLUDE: "$FILE" should take care of what you want.
Basically, at export time, INCLUDE is expanded to the content of $FILE
in the buffer.  Footnotes should work.

Your structure should be something like:

> cat master.org
#+TITLE: my title
* intro
  Txt with footnotes
#+INCLUDE: "chapter1.org"

> cat chapter1.org
* chapter 1
  Txt with footnotes

To include something put "

[O] Multi-file and master files

2014-10-01 Thread Phillip Lord


I've been writing a long document in org-mode recently. I decided to use
org-mode for two reasons: firstly, I wrote the outline plan in org
anyway and switching tools was irritating; second, I want both PDF and
HTML output. My tool of choice would have been latex and auctex where it
not for the HTML requirement.

Setting it up was a little difficult, but in general it's going okay
now. However, I am really missing the notion of "master" documents from
auctex. I have a "main" file which just includes other files each of
which contain a specific section.

Now, the export functionality works, but many org commands appear not
to work propertly. So, for example, footnotes adds new footnotes
starting from 1 in each file, but in the HTML export the earlier
footnotes get overwritten. Likewise, there is no good tool for putting
in crosslinks, compared to reftex in latex.

Am I missing things here? Or would it make more sense to move to latex,
with all the hacking that this entails for the HTML output.

Phil



Re: [O] Tangling and Exporting an Unsupported Language.

2014-10-01 Thread Malcolm Purvis
> "Ista" == Ista Zahn  writes:

Ista> Exporting and tangling don't require any language support.

Ista> #+begin_src foobarbas :tangle foo.bar
Ista> +end_src

Ista> is perfectly fine and will export and tangle just fine. Or did I
Ista> misunderstand your question?

Thanks, I wasn't aware that you could put an arbitrary string as the
language.

I also found that I had org-latex-listings set to t, which was making
LaTeX error because it didn't know about the languages I was trying.

I've now switched the using the minted LaTeX package, which supports
'text' as a language, and have started using that.

Thanks for your help.

Malcolm

-- 
   Malcolm Purvis