Re: [O] unlinking links

2014-11-06 Thread John Kitchin
Adam Spiers  writes:

Try this:

(defun unlinkify ()
  "replace an org-link with the path, or description."
  (interactive)
  (let ((eop (org-element-context)))
(when (eq 'link (car eop))
(message "%s" eop)
  (let* ((start (org-element-property :begin eop))
 (end (org-element-property :end eop))
 (contents-begin (org-element-property :contents-begin eop))
 (contents-end (org-element-property :contents-end eop))
 (path (org-element-property :path eop))
 (desc (and contents-begin
contents-end
(buffer-substring contents-begin contents-end
(setf (buffer-substring start end) (or desc path))


> Hi all,
>
> Is it just me or is there no quick way to remove the link from some
> hyperlinked text? If so, please consider this a feature request ;-)
>
> Regards,
> Adam
>

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



Re: [O] Translating 'Table of Contents' string on exports

2014-11-06 Thread Nicolas Goaziou
Leslie Harlley Watter  writes:

> Again the same patch but with the commit message included.

Applied. Thank you.

> Could anyone please test if it works with your configuration ?

I tested it. It works as expected. With the following document

  #+language: pt_BR
  #+caption: This is a table.
  | a | b |

utf-8 export returns

  ━━
   a  b 
  ━━
  Tabela 1 This is a table.


Regards,



Re: [O] Including HTML text verbatim in html export

2014-11-06 Thread Giuseppe Lipari
Thanks a lot Nicolas, that's exactly was I was looking for!

Best regards,

Giuseppe Lipari

2014-11-06 18:40 GMT+01:00 Nicolas Goaziou :

> Hello,
>
> Giuseppe Lipari  writes:
>
> > I tried #+INCLUDE: but it interprets the html file as an org file. If I
> > specify src html, it renders the html code in the page.
>
> On a recent Org, you could try:
>
>  #+INCLUDE: file.html html
>
>
> Regards,
>
> --
> Nicolas Goaziou
>



-- 
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com  (Italian)

  http://okpanico,wordpress.com  (Italian)
  http://algoland.wordpress.com   (English)


Re: [O] Bug: commit a197236bde2e6 breaks one of my agenda views [8.3beta (release_8.3beta-530-g31b56b @ /home/whirm/.emacs.d/var/el-get/org-mode/lisp/)]

2014-11-06 Thread Karl Voit
* Elric Milon  wrote:
>
> ("i" "Incoming" ((tags "REFILE" ((org-agenda-overriding-header "Tasks to 
> Refile") (org-tags-match-list-sublevels nil))) (tags-todo 
> "-SOMEDAY-NOTES-@office-@home-@errands" ((org-agenda-overriding-header "Tasks 
> with no context") (org-tags-match-list-sublevels t nil)
>
> And the stacktrace top:
>
> Debugger entered--Lisp error: (wrong-type-argument listp 
> #("-{\\<\\(?:@office\\)\\>}" 0 20 (grouptag t)))

I did not bisect the issue yet but I got an issue as well: when I
filter my agenda using "/ - mytag" I get "org-tags-expand: Wrong
type argument: listp, #("{\\<\\(?:@alw\\)\\>}" 0 16 (grouptag t))".

Some of my Org-files are using file-local tags.

When I switch to the commit before a197236bde2e6, it works. With
a197236bde2e6, I get the endless loop error which Nicolas was able
to fix for me.

HTH




[O] What is the Preferred Method for Logging Creation Date?

2014-11-06 Thread Dominic Surano
I'm a huge fan of Org-mode and have been using it daily for a little over a 
year. I've been following this list for about 8 months and really benefit 
from 
the level of technical discussion. I've finally encountered a methodology 
problem that I haven't quite been able to wrap my head around and I'm 
curious 
how other people implement this functionality.

I'm a heavy user of capture templates. One thing I've been struggling with 
for a while now is how to appropriately log the creation time of such 
templates 
in a way that can be useful for agenda views. Knowing WHEN I created a 
heading is often just as useful as the content in the heading. The end goal 
is to 
be able to quickly pull up an agenda view that shows each entry on the day / 
time it was created.

For all the examples below, I've just included the FINAL output from org-
capture rather than the templates themselves. I feel I have a pretty good 
understanding of capture templates, but can provide them if you think 
they'll help in formulating a solution.

Org-mode currently has built in support for DEADLINE, SCHEDULED, and CLOSED 
times. Ideally, for my use cases, CREATED would also be built in such that 
headings would look like:

* DONE Task
  CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu> CREATED: [2014-
11-06 Thu 10:50]
  :LOGBOOK:  
  - State "DONE"   from "TODO"   [2014-11-06 Thu 10:59]
  :END:
  :PROPERTIES:
  :Via:  Origin of this task
  :Note: Note describing task
  :ID:   64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
  :END:

And I would be able to pull up an agenda view using a similarly named 
special property (http://orgmode.org/manual/Special-properties.html#Special-
properties). Unfortunately, since CREATED is not a special property, I end 
up with:

* DONE Task
  CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
  :LOGBOOK:  
  - State "DONE"   from "TODO"   [2014-11-06 Thu 10:59]
  :END:
  CREATED: [2014-11-06 Thu 10:50]
  :PROPERTIES:
  :Via:  Origin of this task
  :Note: Note describing task
  :ID:   64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
  :END:

I consider this similar to Bernt Hansen's approach 
(http://doc.norang.ca/org-mode.html#InsertInactiveTimestamps). Turning on 
inactive timestamps, using v 
[ in the agenda view, doesn't just pull up the CREATED time, but also the 
state change time in LOGBOOK in addition to any other inactive timestamps 
(either in the entry, notes in LOGBOOK, etc.). I've considered using the 
special property TIMESTAMP_IA, but unfortunately, as shown above "CREATED: 
..." 
always ends up getting bumped down when a state change is made or note is 
taken, and the :LOGBOOK: drawer is created.

I have no doubt that implementing CREATED as a special time would be non-
trivial.

Here are some solutions I've contemplated implementing:

1) Including the creation date in the logbook using a format consistent with 
org-todo state changes:

* DONE Task
  CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
  :LOGBOOK:  
  - State "DONE"   from "TODO"   [2014-11-06 Thu 10:59]
  - State "TODO"   from ""   [2014-11-06 Thu 10:50]
  :END:
  :PROPERTIES:
  :Via:  Origin of this task
  :Note: Note describing task
  :ID:   64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
  :END:

This seems to make a lot of sense (although I'm still unclear about how to 
generate the aforementioned agenda view), but it breaks down for capture 
templates that don't use org-todo-keywords (i.e. are ALWAYS stateless).

2) Including the creation date in the logbook using something similar to 
note (C-c z):

* DONE Task
  CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
  :LOGBOOK:  
  - State "DONE"   from "TODO"   [2014-11-06 Thu 10:59]
  - Created from capture template on [2014-11-06 Thu 10:50]
  :END:
  :PROPERTIES:
  :Via:  Origin of this task
  :Note: Note describing task
  :ID:   64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
  :END:

This makes sense, but breaks consistency with org-todo state changes and has 
the same agenda problem described in (1).

3) Including the creation date in a the property drawer:

* DONE Task
  CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
  :LOGBOOK:  
  - State "DONE"   from "TODO"   [2014-11-06 Thu 10:59]
  - State "TODO"   from ""   [2014-11-06 Thu 10:50]
  :END:
  :PROPERTIES:
  :Via:  Origin of this task
  :Note: Note describing task
  :Created:  [2014-11-06 Thu 10:50]
  :ID:   64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
  :END:

This would maintain consistency with org-todo, but I'm not sure how I would 
generate the agenda view. It seems to be the preferred method for users of 
org-expiry.el. 

What do other people do? What makes the most sense?

Here are some previous threads I found and read that either directly or 
tangentially address this topic:

http://comments.gmane.org/gmane.emacs.orgmode/89968/
http://comments.gmane.org/gmane.emacs.orgmode/68252
http://com

Re: [O] Bug: org-babel-detangle broken [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/24.4/share/emacs/24.4/lisp/org/)]

2014-11-06 Thread Grant Rettke
Jaakko and I were working on this together, hence the different
version information.

On Wed, Nov 5, 2014 at 8:04 PM, Jaakko Järvi  wrote:
> The org-babel-detangle function is not working.
> Below is a description of how the issue manifests.
> (Thanks to Grant Rettke for crafting the detailed description).
>
> 1 Attempt
> =
>
> 1.1 Source input: ex1.org
> ─
>
>  ┌
>  │ * Heading
>  │
>  │ #+BEGIN_SRC js :comments noweb :tangle yes :padline no
>  │   function foo() {}
>  │ #+END_SRC
>  └
>
>
> 1.2 Tangled output: ex1.js
> ──
>
>  ┌
>  │ // [[file:~/tmp/ex1.org::*Heading][Heading:1]]
>  │   function foo() {}
>  │ // Heading:1 ends here
>  └
>
>
> 2 Comments & Questions
> ══
>
>  When I open the tangled output file, opened it in a buffer, put the
>  cursor on line 2, and call `org-babel-detangle', the buffer switches
>  to ex1.org, and then I get the message:
>
>Return to existing edit buffer ([n] will revert changes)?
>(y or n)
>
>  Whether I choose yes or not, the current buffer always returns to
>  ex1.js. Further,
>  any modifications made in file ex1.js are reverted back to the state
>  of what existed after orgmode's export.
>
>
> 3 Environment
> ═
>
>  ┌
>  │ (print emacs-version)
>  └
>
>  ┌
>  │ "24.4.1"
>  └
>
>  ┌
>  │ (print org-version)
>  └
>
>  ┌
>  │ "8.2.8"
>  └
>
>  ┌
>  │ (print (pp-to-string org-babel-default-header-args))
>  └
>
>  ┌
>  │ "((:session . \"none\")
>  │  (:results . \"replace\")
>  │  (:exports . \"code\")
>  │  (:cache . \"no\")
>  │  (:noweb . \"no\")
>  │  (:hlines . \"no\")
>  │  (:tangle . \"no\"))
>  │ "
>  └
> 
>
>
> Emacs  : GNU Emacs 24.4.1 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14)
>  of 2014-11-05 on somemachine
> Package: Org-mode version 8.2.10 (release_8.2.10 @ 
> /usr/local/Cellar/emacs/24.4/share/emacs/24.4/lisp/org/)
>
> current state:
> ==
> (setq
>  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-confirm-shell-link-function 'yes-or-no-p
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  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 '((lambda nil
>   (org-add-hook (quote change-major-mode-hook) (quote 
> org-show-block-all) (quote append)
>(quote local))
>   )
>  (lambda nil
>   (org-add-hook (quote change-major-mode-hook) (quote 
> org-babel-show-result-all)
>(quote append) (quote local))
>   )
>  #[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-hide-inline-tasks
>   org-cycle-show-empty-lines 
> org-optimize-window-after-visibility-change)
>  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)
>  )
>
>



-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] patch to add new link type "infoi" that leverages Info-index command

2014-11-06 Thread Nicolas Goaziou
Hello,

Richard Kim  writes:

> A patch is provided below which implements a new link type called "infoi"
> as a complement to "info" type that exist already.

Thanks for your patch.

> Why new link type?  Because info index is almost always finer grain
> than info nodes.  For example [[infoi:libc#close]] brings up not only
> "(libc)Opening and Closing Files" info node, but also place the cursor
> on the line that documents "open" function within the node.  Hence it
> is more useful to link function, variable and other names that are in
> the index.  Most info documents have very rich indexes.

OK. I would have preferred to merge both features into the same link
type, but I see no elegant syntax to distinguish between a node and an
index search.

> I am not familiar with org coding style, so I share this patch to
> present the idea rather than as a finished patch that can be checked
> in.  I assume that name changes and other changes will be needed prior
> to being acceptable for check in assuming that the idea is ok.

The idea is OK. Some comments follow.

> org-info.el: Add new link type "infoi" that looks up info file index.

No full stop at the end of the summary.

> * lisp/org-info.el (org-info-index-open): New function to implement
> new link type named "infoi".

"New function" is enough here.

You can describe the motivation behind the patch farther in the commit
message, after another blank line.

> +;;; info-index
> +
> +(org-add-link-type "infoi" 'org-info-index-open)
> +
> +(declare-function Info-index "info" (topic))
> +
> +(defun org-info-index-open (name)
> +  "Follow an Info file and look up index item specified by NAME."
> +  (if (or (string-match "\\(.*\\)[#:]:?\\(.*\\)" name)
> +  (string-match "\\(.*\\)" name))
> +  (let ((nodename (match-string 2 name)))
> +(require 'info)
> +(Info-find-node (match-string 1 name) "Top")
> +(if nodename ; If there isn't a node, choose "Top"
> +(Info-index nodename)))

Prefer `when' over one-armed `if'.

> +(message "Could not open: %s" name)))

This introduce some code duplication in "org-info.el". Could you factor
it out?


Regards,

-- 
Nicolas Goaziou



Re: [O] Best way to include references/license

2014-11-06 Thread Nicolas Goaziou
Julien Cubizolles  writes:

> Consider the following example, org-footnote-section being "Footnotes"
> #+STARTUP: nofinline
>
> * Premier heading
>
> + voici une photo [fn:1]
>
> * Footnotes
>
> + [fn:1] Crédit photo1
>
> The Beamer export pdf creates a footnote in the first frame, I'd like to
> have it as an item in a frame named Footnotes. This section isn't
> exported anyway.

Indeed. Anything in footnote section is ignored. All is good here.

> * Premier heading
>
> + voici une photo [[photo1]]
>
> * Références
>
> + <> crédit photo 1
>
> I can't reproduce the \texttt{} I had yesterday. Now I get an
> \ref{photo1}/\hypertarget{photo2}{} pair. pdflatex complains about an
> undefined reference.

It should be \ref{photo1}/\label{photo1} in this case. I pushed a fix
for that in maint.


Regards,



Re: [O] Translating 'Table of Contents' string on exports

2014-11-06 Thread Nicolas Goaziou
Hello,

Leslie Harlley Watter  writes:

> I've been trying to translate 'Table of contents' on some exporting methods 
> like HTML, PDF export and beamer PDF.
>
> Some of my findings let me to ox.el which have org-export-dictionary list.
>
> Despite having pt_BR terms added to the list and chosen #LANGUAGE as
> pt_BR I don't get a successfull change of the term.

It should be

  #+LANGUAGE: pt_BR


> Attached is a patch against master to add pt_BR terms to the list.

Thank you for the patch.

> If somebody could please point me out what I'm missing I would be glad
> to send some patches to have the translation working.

I think it should work with the advice above, and your patch. However,
would you format your commit message according to guidelines at

   http://orgmode.org/worg/org-contribute.html#unnumbered-10


> + ("pt_BR" :html "Notas de Rodapé" :default "Notas de Rodapé")

Since default value is not compatible with plain ASCII export, maybe
a specific :ascii entry could be used.

> + ("pt_BR" :default "Índice de Tabelas")

Ditto.

> + ("pt_BR" :html "Veja a seção %s" :default "Veja a seção 
> %s")

Ditto.

>   ("fr" :ascii "Destination inconnue" :default "Référence inconnue")
> + ("pt_BR" :default "Referência desconhecida")

Ditto.


Regards,

-- 
Nicolas Goaziou



[O] org links and outshine (Was: How do you interact with org src blocks for your gmane.emacs.orgmode correspondence?)

2014-11-06 Thread Alan Schmitt
On 2014-11-03 09:06, Thorsten Jolitz  writes:

> Grant Rettke  writes:
>
>> On Sat, Nov 1, 2014 at 5:58 AM, Thorsten Jolitz  wrote:
>>> And there is a new library
>>>
>>> [[http://goo.gl/pYYzS6][outorg-export]]
>>
>> I just used http://goo.gl/pYYzS6 and it worked fine; that looks like
>> an org mode link.
>
> It is an Org-mode link inserted with C-c C-l while writing the post in
> the *outorg-edit-buffer*, in case this was a question.

I'll seize this opportunity to ask about this: I have my emacs init file
in outshine syntax, and inside it there are several links (to info
pages, to gnus messages, and so on). They look great and can be acted
upon in org mode, but not so great in lisp mode. Could it be possible
for outshine to nicely display these links?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


[O] unlinking links

2014-11-06 Thread Adam Spiers
Hi all,

Is it just me or is there no quick way to remove the link from some
hyperlinked text?  If so, please consider this a feature request ;-)

Regards,
Adam


[O] Translating 'Table of Contents' string on exports

2014-11-06 Thread Leslie Harlley Watter
Hi Folks,

I've been trying to translate 'Table of contents' on some exporting methods 
like HTML, PDF export and beamer PDF.

Some of my findings let me to ox.el which have org-export-dictionary list.

Despite having pt_BR terms added to the list and chosen #LANGUAGE as pt_BR I 
don't get a successfull change of the term.

Attached is a patch against master to add pt_BR terms to the list. 

If somebody could please point me out what I'm missing I would be glad to send 
some patches to have the translation working.

Cheers,

LEslie
PS: I've already tested with pt-BR language code but it also doesn't work.

-- 
Leslie H. Watter
 "Always do right.  This will gratify some people and astonish the rest."
-- Mark Twain
From 22e55d8fe0b4f9e5d96ab3ec9c6f7ba2ec5b93c2 Mon Sep 17 00:00:00 2001
From: "Leslie H. Watter" 
Date: Fri, 31 Oct 2014 09:30:37 -0200
Subject: [PATCH] pt_BR translation of org-export-dictionary

---
 lisp/ox.el | 13 +
 1 file changed, 13 insertions(+)

diff --git a/lisp/ox.el b/lisp/ox.el
index 07239a0..01fa175 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5229,6 +5229,7 @@ them."
  ("nb" :default "Forfatter")
  ("nn" :default "Forfattar")
  ("pl" :default "Autor")
+ ("pt_BR" :default "Autor")
  ("ru" :html "Автор" :utf-8 "Автор")
  ("sv" :html "Författare")
  ("uk" :html "Автор" :utf-8 "Автор")
@@ -5251,6 +5252,7 @@ them."
  ("nb" :default "Dato")
  ("nn" :default "Dato")
  ("pl" :default "Data")
+ ("pt_BR" :default "Data")
  ("ru" :html "Дата" :utf-8 "Дата")
  ("sv" :default "Datum")
  ("uk" :html "Дата" :utf-8 "Дата")
@@ -5264,6 +5266,7 @@ them."
  ("no" :default "Ligning")
  ("nb" :default "Ligning")
  ("nn" :default "Likning")
+ ("pt_BR" :html "Equação" :default "Equação")
  ("sv" :default "Ekvation")
  ("zh-CN" :html "方程" :utf-8 "方程"))
 ("Figure"
@@ -5274,6 +5277,7 @@ them."
  ("no" :default "Illustrasjon")
  ("nb" :default "Illustrasjon")
  ("nn" :default "Illustrasjon")
+ ("pt_BR" :default "Figura")
  ("sv" :default "Illustration")
  ("zh-CN" :html "图" :utf-8 "图"))
 ("Figure %d:"
@@ -5285,6 +5289,7 @@ them."
  ("no" :default "Illustrasjon %d")
  ("nb" :default "Illustrasjon %d")
  ("nn" :default "Illustrasjon %d")
+ ("pt_BR" :default "Figura %d:")
  ("sv" :default "Illustration %d")
  ("zh-CN" :html "图%d " :utf-8 "图%d "))
 ("Footnotes"
@@ -5305,6 +5310,7 @@ them."
  ("nb" :default "Fotnoter")
  ("nn" :default "Fotnotar")
  ("pl" :default "Przypis")
+ ("pt_BR" :html "Notas de Rodapé" :default "Notas de Rodapé")
  ("ru" :html "Сноски" :utf-8 "Сноски")
  ("sv" :default "Fotnoter")
  ("uk" :html "Примітки"
@@ -5327,6 +5333,7 @@ them."
  ("no" :default "Tabeller")
  ("nb" :default "Tabeller")
  ("nn" :default "Tabeller")
+ ("pt_BR" :default "Índice de Tabelas")
  ("sv" :default "Tabeller")
  ("zh-CN" :html "表格目录" :utf-8 "表格目录"))
 ("Listing %d:"
@@ -5336,18 +5343,21 @@ them."
  ("fr" :default "Programme %d :" :html "Programme %d :")
  ("no" :default "Dataprogram")
  ("nb" :default "Dataprogram")
+ ("pt_BR" :default "Listagem %d")
  ("zh-CN" :html "代码%d " :utf-8 "代码%d "))
 ("See section %s"
  ("da" :default "jævnfør afsnit %s")
  ("de" :default "siehe Abschnitt %s")
  ("es" :default "vea seccion %s")
  ("fr" :default "cf. section %s")
+ ("pt_BR" :html "Veja a seção %s" :default "Veja a seção %s")
  ("zh-CN" :html "参见第%d节" :utf-8 "参见第%s节"))
 ("Table"
  ("de" :default "Tabelle")
  ("es" :default "Tabla")
  ("fr" :default "Tableau")
  ("ja" :html "表" :utf-8 "表")
+ ("pt_BR" :default "Tabela")
  ("zh-CN" :html "表" :utf-8 "表"))
 ("Table %d:"
  ("da" :default "Tabel %d")
@@ -5358,6 +5368,7 @@ them."
  ("no" :default "Tabell %d")
  ("nb" :default "Tabell %d")
  ("nn" :default "Tabell %d")
+ ("pt_BR" :default "Tabela %d")
  ("sv" :default "Tabell %d")
  ("zh-CN" :html "表%d " :utf-8 "表%d "))
 ("Table of Contents"
@@ -5378,6 +5389,7 @@ them."
  ("nb" :default "Innhold")
  ("nn" :default "Innhald")
  ("pl" :html "Spis treści")
+ ("pt_BR" :html "Índice" :utf8 "Índice")
  ("ru" :html "Содержание"
   :utf-8 "Содержание")
  ("sv" :html "Innehåll")
@@ -5389,6 +5401,7 @@ them."
  ("de" :default "Unbekannter Verweis")
  ("es" :default "referencia desconocida")
  ("fr" :ascii "Destination inconnue" :default "Référence inconnue")
+ ("pt_BR" :default "Referência desconhecida")
  ("zh-CN" :html "未知引用" :utf-8 "未知引用")))
   "Dictionary for export engine.
 
-- 
2.0.2.731.g247b4d5



signature.asc
Description: Digital signature


Re: [O] Including HTML text verbatim in html export

2014-11-06 Thread Nicolas Goaziou
Hello,

Giuseppe Lipari  writes:

> I tried #+INCLUDE: but it interprets the html file as an org file. If I
> specify src html, it renders the html code in the page.

On a recent Org, you could try:

 #+INCLUDE: file.html html


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-06 Thread Nicolas Goaziou
Christian Egli  writes:

> OK, the fix is pushed to maint and merged to master.

Thank you.

As a side note, two spaces after sentences are required in commit
messages.


Regards,



Re: [O] Org and ledger

2014-11-06 Thread Alan Schmitt
On 2014-10-31 12:32, Vikas Rawal  writes:

> 2. Generating reports: Babel results do not use the standard Org table
> syntax. Given my limited knowledge of lisp, I am finding it difficult
> to programme customising these reports in Org. It would be of much
> benefit if other users could share how they customise ledger reports
> in Org. Some examples would be great.

I generate reports and deal with my budget using org. I describe my
setup here:
http://lists.gnu.org/archive/html/emacs-orgmode/2014-04/msg00727.html

Since then, I've slightly refined these functions, here is the current
version:

#+begin_src org
#+name: call_ledger
#+begin_src emacs-lisp :var lcmd="bal" :var bucket="Quotidien" :var 
prefix="Expenses:" :var period=()
  (let* ((name (org-trim bucket))
 (bname (concat "'^" prefix name "'"))
 (ledger "ledger -f ~/Documents/Org/mescomptes.ledger")
 (parg (when period (concat " -p '" period "'")))
 (cutcmd "tail -1 | cut -d ' ' -f 2")
 (cmd 
  (concat ledger " -J " parg " " lcmd " " bname " | " cutcmd))
 (res (org-trim (shell-command-to-string cmd
(if (equal res "") 0 res))
#+end_src

#+name: monthly_average_since
#+begin_src emacs-lisp :var start-date="2014-03-01" :var amount=100
  (let ((nbdays (- (time-to-days (current-time))
   (time-to-days (org-read-date nil t start-date)
(calc-eval "round($ / (12 * ($$ / 365.25)), 2)" nil amount nbdays))
#+end_src

#+name: monthly_average
#+begin_src emacs-lisp :var starty=2014 :var startm=3 :var amount=100 
  (let* ((tm (decode-time))
 (cmonth (nth 4 tm))
 (cyear (nth 5 tm))
 (nbmonths (+ (* 12 (- cyear starty)) (- cmonth startm
(calc-eval "round($ / $$, 2)" nil amount nbmonths))
#+end_src

#+name: ledger_average
#+begin_src emacs-lisp :var b="Quotidien" :var sy=2014 :var sm=3  :var 
sd="2014-03-01" :var p="Expenses:"
  (let* ((per (format "from %d-%d-01 to this month" sy sm))
 (a (org-sbe call_ledger (bucket (eval b)) (prefix (eval p)) (period 
(eval per)
(org-sbe monthly_average (amount (eval a)) (starty (eval sy)) (startm (eval 
sm
#+end_src

#+name: ledger_budget
#+BEGIN_SRC emacs-lisp :results output :var table=budget :var year=2014 :var 
month=04
  (princ (format "%d-%02d-01 * Budget %d %02d\n" year month year month))
  (mapcar
   (lambda (tuple)
 (princ (format "Bucket:Expenses:%s%d €\n" (car tuple) (cadr 
tuple
   (butlast (cdr table) 1))
  (princ "Bucket:Unallocated:EUR\n")
#+END_SRC
#+end_src

The table looks like this now

#+begin_src org
#+name: budget
| Bucket | Planned | Remaining | This Month | Last Month | Average |
|+-+---+++-|
| Name   | …   | … | …  | …  | …   |
|+-+---+++-|
| Total  | …   | … | …  | …  | …   |
#+TBLFM: @2$3..@>>$3='(org-sbe call_ledger (bucket (concat "\"" $1 "\"")) 
(prefix "\"Bucket:Expenses:\""))
#+TBLFM: @2$4..@>>$4='(org-sbe call_ledger (bucket (concat "\"" $1 "\"")) 
(period "\"this month\""))
#+TBLFM: @2$5..@>>$5='(org-sbe call_ledger (bucket (concat "\"" $1 "\"")) 
(period "\"last month\""))
#+TBLFM: @2$6..@>>$6='(org-sbe ledger_average (b (concat "\"" $1 "\"")))
#+TBLFM: @>$2..@>$6=vsum(@2..@-1)
#+end_src

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Best way to include references/license

2014-11-06 Thread Julien Cubizolles
Nicolas Goaziou  writes:

>> I first thought of using footnotes but according to Org documentation
>> they won't be exported if they are collected in a special heading.
>
> This doesn't sound right. What do you mean?

Consider the following example, org-footnote-section being "Footnotes"
--8<---cut here---start->8---
#+STARTUP: nofinline

* Premier heading

+ voici une photo [fn:1]

* Footnotes

+ [fn:1] Crédit photo1
--8<---cut here---end--->8---

The Beamer export pdf creates a footnote in the first frame, I'd like to
have it as an item in a frame named Footnotes. This section isn't
exported anyway.


>> Bracket links (like <>)
>
> These are called targets.
>
>> create a \texttt{} \hypertarget{} pair instead of a \label{} \ref{}
>> pair in the latex file. Should I go with explicit \label{} \ref{} in
>> the org file ?
>
> An example would help understanding the issue.

--8<---cut here---start->8---
* Premier heading

+ voici une photo [[photo1]]

* Références

+ <> crédit photo 1
--8<---cut here---end--->8---

I can't reproduce the \texttt{} I had yesterday. Now I get an
\ref{photo1}/\hypertarget{photo2}{} pair. pdflatex complains about an
undefined reference.

Julien.










Re: [O] Including HTML text verbatim in html export

2014-11-06 Thread Jaakko Järvi
One way I’ve done such a thing is this: 

#+BEGIN_SRC sh :exports results :results raw 
echo "#+BEGIN_HTML"
cat file.html
echo "#+END_HTML"
#+END_SRC

I, too, would be interested to know if there is a simpler way.

Best, 

  Jaakko Järvi


> On Nov 6, 2014, at 6:44 AM, Giuseppe Lipari  wrote:
> 
> Hi,
> 
> I am writing my personal web page with org-mode, and I would like to include 
> a list of my publications. I am using bibtex2html for generating the html 
> from my bibtex file in more or less complex ways (i.e. separating articles 
> from conferences, and sorting by year), because I like the customization 
> features. 
> bibtex2html produces the body of an html file that I would like then to put 
> together with my headers and footers as generated by the org exporter, for 
> making everything uniform. 
> 
> I tried #+INCLUDE: but it interprets the html file as an org file. If I 
> specify src html, it renders the html code in the page.
> 
> One solution I see is to generate the org-file with some script which will 
> put copy html generated code between #+BEGIN_HTML  ... #+END_HTML, but before 
> going this way I would like to know if there is a simpler way of doing it. 
> 
> All the best,
> 
> Giuseppe Lipari
> 
> -- 
> Giuseppe Lipari
> LIFL
> Université de Lille 1
> blogs: http://scacciamennule.blogspot.com  (Italian)
>   http://okpanico,wordpress.com  (Italian)
>   http://algoland.wordpress.com   (English)




[O] Including HTML text verbatim in html export

2014-11-06 Thread Giuseppe Lipari
Hi,

I am writing my personal web page with org-mode, and I would like to
include a list of my publications. I am using bibtex2html for generating
the html from my bibtex file in more or less complex ways (i.e. separating
articles from conferences, and sorting by year), because I like the
customization features.
bibtex2html produces the body of an html file that I would like then to put
together with my headers and footers as generated by the org exporter, for
making everything uniform.

I tried #+INCLUDE: but it interprets the html file as an org file. If I
specify src html, it renders the html code in the page.

One solution I see is to generate the org-file with some script which will
put copy html generated code between #+BEGIN_HTML  ... #+END_HTML, but
before going this way I would like to know if there is a simpler way of
doing it.

All the best,

Giuseppe Lipari

-- 
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com  (Italian)

  http://okpanico,wordpress.com  (Italian)
  http://algoland.wordpress.com   (English)


[O] [bug?, ox-odt] Format DATE

2014-11-06 Thread Rasmus
Hi,

ox-odt.el ignores `org-export-date-timestamp-format'.

Instead, it uses a variable `org-odt-use-date-fields', which maps
/all/ dates to the styles "OrgDate1" and "OrgDate2".  I'm not sure if
these are meant to be customizable or not.  In LO I'm able to change
the style by clicking on the timestamp so probably the style has to be
specified that way, somehow.

Unfortunately, the undocumented `org-odt--format-timestamp' does not
seem to support alternative formats, but again, this may be due to
fact that dates are formatted in LO.

I /might/ have time to look at this myself over the weekend, unless
someone knows how to fix it.

—Rasmus

-- 
May contains speling mistake




Re: [O] Bug: commit a197236bde2e6 breaks one of my agenda views [8.3beta (release_8.3beta-530-g31b56b @ /home/whirm/.emacs.d/var/el-get/org-mode/lisp/)]

2014-11-06 Thread Elric Milon

Nicolas Goaziou  writes:

> Hello,
>
> Elric Milon  writes:
>
>> The commands for the agenda that breaks are:
>>
>> ("i" "Incoming" ((tags "REFILE" ((org-agenda-overriding-header "Tasks to 
>> Refile") (org-tags-match-list-sublevels nil))) (tags-todo 
>> "-SOMEDAY-NOTES-@office-@home-@errands" ((org-agenda-overriding-header 
>> "Tasks with no context") (org-tags-match-list-sublevels t nil)
>>
>> And the stacktrace top:
>>
>> Debugger entered--Lisp error: (wrong-type-argument listp 
>> #("-{\\<\\(?:@office\\)\\>}" 0 20 (grouptag t)))
>>   delete-dups(#("-{\\<\\(?:@office\\)\\>}" 0 20 (grouptag t)))
>>   (let ((res (copy-sequence list))) (delete-dups res))
>>   org-uniquify(#("-{\\<\\(?:@office\\)\\>}" 0 20 (grouptag t)))
>>   (append (org-uniquify rpl) (assoc tag tal))
>>   (setq rpl (append (org-uniquify rpl) (assoc tag tal)))
>>   (progn (setq rpl (append (org-uniquify rpl) (assoc tag tal))) (setq rpl 
>> (concat dir "{\\<" (regexp-opt rpl) "\\>}")) (if (stringp rpl) 
>> (org-add-props rpl (quote (grouptag t (setq rtnmatch (replace-match rpl 
>> t t rtnmatch)))
>>   ...
>>
>> Full stacktrace at:
>>
>> http://paste.lisp.org/+33BI
>
> I cannot reproduce it.
>
> This patch is related to setup keywords, e.g. "#+FILETAGS:". Do you have
> a file containing such keywords? If so, what happens if you remove them?

I updated to current master, removed all lines starting with # from my
.org files and I still get the same error.

cheers,

>
> Regards,

--
Elric
PGP: 3939C2B494084E2F



Re: [O] [RFC] Change property drawer syntax

2014-11-06 Thread Sebastien Vauban
Nicolas Goaziou wrote:
> Nicolas Goaziou  writes:
>
>>> As discussed previously, I would like to modify property drawers syntax.
>>> The change is simple: they must be located right after a headline and
>>> its planning line, if any.
>>
>> [...]
>>
>>> I pushed a new branch, "top-properties" in the repository for code
>>> review and testing. It includes unit tests, documentation and an
>>> ORG-NEWS entry.
>
>> If there is no more feedback or objection, I will merge the branch on
>> Tuesday.
>
> Done.

Thanks for this (and, moreover, for your very handy repair function!).

One question, now that this syntax is stabilized, can the following
long-standing bug be fixed: sometimes the SCHEDULED line (or DEADLINE,
or ...) is moved synchronously with the heading when promoting/demoting,
sometimes not.

I found in which cases it does and when it does not: it depends on the
presence of text in the entry.

So, for example:

--8<---cut here---start->8---
* The SCHED will be moved
  SCHEDULED: <2011-08-18 Thu>

* This one won't be moved along with the heading
  SCHEDULED: <2011-08-18 Thu>

Because of this text here...
--8<---cut here---end--->8---

becomes, when *demoted*:

--8<---cut here---start->8---
* New section

** The SCHED will be moved
   SCHEDULED: <2011-08-18 Thu>

** This one won't be moved along with the heading
  SCHEDULED: <2011-08-18 Thu>

Because of this text here...
--8<---cut here---end--->8---

This had been fixed by Bastien in August 2011, but the fix had reverted
afterward.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] font colour in a table row

2014-11-06 Thread Eric S Fraga
On Wednesday,  5 Nov 2014 at 21:06, kevin.lemorzadec wrote:

[...]

> in org mode. I don't see how to include replace the \begin{tabular}
> generated automaticly by the following code by \begin{tabu}

Try

#+attr_latex: :environment tabu

just before the table, assuming you are using a relatively recent
version of org.  This is described in the org manual in the exporting ->
LaTeX and PDF export section.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf



Re: [O] Recording Time - org-clock-sum

2014-11-06 Thread Sebastien Vauban
Just a side note...

Fredrik Unger wrote:
> I am not a full out user of Orgmode and I do not keep project files.
> I use one simple file per month to record my work, and it has been a good 
> choice
> for me. Maybe someday I can switch to some other structure but as the CLOCK
> lines takes some space, I'd rather "forget" CLOCK history on a monthly
> basis. Projects do not last more than 2-3 month anyway and the catch-all
> internal project that is "never ending" would become too crowded with CLOCK
> lines.
> It is also easier to spot clocking mistakes if the file is limited to a month.

I use CLOCKING for several years now (around 4) and commit to the same
entries for repeating tasks such as "read emails". One information for
you : there is no problem to spot clocking mistakes if you use `v c'
("clockcheck"); you can easily trap clocking gaps and overlaps. Without
that, yes, that'd be pretty unusable...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] behaviour of org-export--get-subtree-options vs inbuffer-options

2014-11-06 Thread Per Unneberg
Hi,

Nicolas Goaziou  writes:
>
> Yes, you cannot have duplicate property names in the same property
> drawer. OTOH you can append values to a property with :NAME+: syntax
> (e.g. :EXPORT_LATEX_HEADER+:). You can also try to make everything fit
> in a single line.
>

thanks for the clarifications and the pointer to the nifty :NAME+:
syntax. It all makes sense now. I temporarily played around with a
tentative alternative solution, in which I defined a derived backend
with a modified template translator, modifying the property list sent to
org-latex-template. Works, but slightly more cumbersome.

Cheers,

Per





Re: [O] [BUG] ox-taskjuggler: unable to use depends {gapduration}

2014-11-06 Thread Christian Egli
Nicolas Goaziou  writes:

>> Nicolas, I can push this myself but I haven't pushed to the repo in
>> years. What is the current way? Do I just push to master?
>
> I think you should push to maint, so that users of org+contrib package
> can benefit from your fix soon enough.  You then need to merge maint
> into master.

OK, the fix is pushed to maint and merged to master.

Thanks
Christian

-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland