Re: [O] PATCH: ox: Starting source code export at non-zero (-n value)

2016-05-25 Thread Brian Carlson


On 2016-05-24 16:33, Nicolas Goaziou wrote:
> Completing myself

Great. Thanks! Very much appreciated. I went back and forth on the tests
with the "string formatting." I should have gone with my original thoughts ;)
The fixes to (org-export-get-loc) were a bit beyond my skill level.
I don't work in lisp/scheme/emacs-lisp too much. Usually I know just enough
to be dangerous ;)

So Thanks!

>> Applied, with a small refactoring. Thank you.

No problem. Hope it helps others.

>> Please let us know when the FSF paperwork is done

I put the signed paperwork into the mail this evening.


> Also, could you provide and ORG-NEWS entry for that patch?

Sure. I'll use previous entries as a starting point.
I was thinking that the entry should go under: Version 9.0/New Features/Export/
unless there's a more appropriate place in the Document.

Here's what I thought about putting. I can make a patch if that is preferred
means of submission. If what I've written doesn't make sense let me know.

--8<---cut here---start->8---
 Line Numbering in SRC/EXAMPLE blocks support arbitrary start number
The -n option to SRC and EXAMPLE blocks can now take an numeric argument to 
specify
the staring line number for the source or example block. The +n option can now
take a numeric argument that will be added to the last line number from the
previous block as the starting point for the SRC/EXAMPLE block.
#+BEGIN_SRC emacs-lisp -n 20
;; this will export with line number 20
(message "This is line 21")
#+END_SRC

#+BEGIN_SRC emacs-lisp +n 10
;; This will be listed as line 31
(message "This is line 32")
#+END_SRC
--8<---cut here---end--->8---

I realize that the org texinfo manual probably needs to be updated, as well. I'll take a stab at updating that unless 
someone else wants to take that on.


Thanks,
;-b



Re: [O] Displaying deadline datestamp in todo agenda list?

2016-05-25 Thread Karl Fogel
Matt Lundin  writes:
>Here's a working implementation, using org-agenda-add-custom-command and
>the built-in mechanism for skipping non-deadline entries (you can get
>rid of ots-org-entry-skip-non-deadline). I also added some justification
>(the -22) to accommodate my rather long timestamp strings. Adjust as
>needed:
>
>(org-add-agenda-custom-command
> '("d" "Deadlines and scheduled work" alltodo ""
>   ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
>(org-agenda-prefix-format '((todo . " %i %-22(org-entry-get nil 
> \"DEADLINE\") %-12:c %s")))
>(org-agenda-sorting-strategy '(deadline-up)
>
>Matt

Matt, I can't thank you enough -- this is great.  (Our company runs on Org 
Mode, so this will help more free software hackers than just me :-) .)

The core trick is obviously "(org-entry-get nil \"DEADLINE\")".  I knew about 
embedding a Lisp expression into the format string, but didn't know about that 
particular function -- now that I know it exists, I suspect we'll be using it a 
lot.  And the "(org-agenda-skip-entry-if 'notdeadline)" part saves us a bunch 
of custom code too.

This is the best kind of solution: it solved the immediate problem and gives us 
infrastructure for solving future problems as well.

Thanks!

-Karl



[O] Restrict org-agenda to weekdays only?

2016-05-25 Thread John Hendy
I was a little surprised not to see org-mode have an option for
viewing only weekdays. Is there relatively elisp-light mechanism for
this, or some other built in method I'm not seeing to, say, calculate
the days to this past Monday and through this Fri and only show those?

Ideally I'd start from whatever workday is today and go through the
next 5-10 workdays, or at least this the view I'd like to try.


Thanks,
John



[O] [Bug] org-protocol does not kill client process with org-protocol-capture

2016-05-25 Thread Matt Lundin
I would like to report two bugs in org-protocol.

1. The call to (server-edit) on line 626 of org-protocol.el does not
succeed in terminating the server process or signaling to the client to
stop waiting for org-protocol-capture (despite the :kill-server
property). This can have potentially dangerous side-effects when calling
org-protocol from a web browser. On Linux, for instance, if I call
org-protocol-capture via a bookmark from Chromium or Firefox and then
abort the capture within emacs (with "q" in the capture buffer or with
"C-g"), xdg receives an error signal and then tries to send the command
to another application. In my case, because of the default xdg settings,
this leads to a search being run in firefox that contains the entire
org-protocol string (thus raising the possibility of leaking private
information to a third-party server).

A long time ago (in 2009) server-delete-client was replaced by
server-edit (commit 13fe6b1858033eca882c38dd8bc422c0c4c6bb9b):

--8<---cut here---start->8---
-  (if (plist-get (cdr prolist) :kill-client)
-  (server-delete-client client t))
+  (when (plist-get (cdr prolist) :kill-client)
+   (message "Greedy org-protocol handler. Killing client.")
+   (server-edit))
--8<---cut here---end--->8---

Does anyone remember the reason for change? I tried server-delete-client
and it succeeds in killing the process and signaling to client to stop
waiting. By contrast, server-edit does not successfully kill the
process.

2. The condition-case added with commit
25eb14bc2cadab293e200c018284870a1eeb4490 on December 2, 2015 (lines
631-635) causes org-protocol-capture to run twice when the process is
aborted, warning one (often incorrectly) to use new-style links. This is
because typing "q" in the capture buffer signals an error, which
triggers the condition case, leading to the warning and causing
org-protocol-capture to be run a second time with the false warning.

Here are the steps to replicate these bugs:

1. /usr/bin/emacs -Q -l minimal.el

...where minimal contains the following

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

(require 'org-protocol)

(setq org-capture-templates
  '(("n" "A note" entry (file "~/test.org") "* %a\n %U\n %?\n %i")))

(server-start)
--8<---cut here---end--->8---

2. open a terminal and enter the following:

emacsclient "org-protocol://capture?url=http://orgmode.org/=Org mode for 
Emacs – Your Life in Plain Text=Testing"

3. abort the capture process with "q" or C-g

What happens:

1. The emacsclient continues to wait. The terminal reads: "Waiting for
Emacs..." (Bug #1)

Please note that using the "-n" flag with emacsclient will do nothing in
this context, since org-protocol is hijacks the server process before
the no-wait flag is processed.

2. Upon pressing C-g or q, a warning appears in Emacs ("Please update
your org protocol handler to deal with new-style links") and org-capture
runs again, requiring a second abort. (Bug #2)

3. emacsclient in the terminal outputs ("*ERROR*: Abort). (Bug #1)

What I would expect to happen:

When using the capture protocol, emacsclient would not wait and instead
would simply exit (because of the :kill-server property in
org-protocol-protocol-alist-default). Likewise, aborting a capture
process would not send an error message to the client.

Thanks,
Matt



[O] populating macros by parsing file name?

2016-05-25 Thread Stig Brautaset
Hello!

Currently I have these three lines at the start of my invoices:

#+BEGIN_EXAMPLE
#+macro: invoice-no 11
#+date: 2016-06-01
#+title: Invoice #{{{invoice-no}}}
#+END_EXAMPLE

However, sometimes I forget to update the invoice number or date when copying
the old invoice. Since I name my invoices in the format =NN_-mm-dd.org=
I'm wondering if there's any way I can automatically populate the =invoice-no=
and date macros by parsing the file name? I found the {{{input-file}}}
macro, but I haven't been able to do anything useful with it.

Any help appreciated!

Stig




Re: [O] BUG: org-beamer-select-environment select multiple environments not working?

2016-05-25 Thread John Hendy
Just to comment on the original attempt, block and column (which is |,
not c which is columnS) are not mutually exclusive. I just did a
presentation and used both together. I'm not sure on the use-case for
columnS, but my structure was two side by side columns in a slide:

#+begin_src org
* slide
** col1  :B_block:BMCOL:
   :PROPERTIES:
   :BEAMER_env: block
   :BEAMER_col: 0.5
   :END:

- list
- of
- items

** col2  :B_block:BMCOL:
   :PROPERTIES:
   :BEAMER_env: block
   :BEAMER_col: 0.5
   :END:

[[pic]]
#+end_src

Probably not that helpful, just wanted to clarify that some
environments are still compatible (in case someone finds this and
thinks that *all* multiple combos are not possible anymore).


John


On Wed, May 25, 2016 at 3:31 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Rasmus  writes:
>
>> Not necessarily.  On the top of my head, you could have a column group
>> with columns inside.  This example used to be possible.  I haven't checked
>> now.
>
> This one is not possible anymore. A column environment implies columns.
> You can also provide a columns environment explicitly, at a higher
> level, e.g., to provide specific options.
>
> Regards,
>
> --
> Nicolas Goaziou
>



[O] Inquiry about ical2org

2016-05-25 Thread John Hendy
Greetings,


I was looking to get my Outlook calendar into Orgmode to better
schedule my work (this way I can see my official meetings in Org
already where I do task management).

I found ical2org, and implemented it successfully via the "Share
calendar" .ics link that Outlook can generate. I have a question on
repeated meetings. The default appears to be this format:

<2016-05-19 Thu 08:00-09:00 +2w>--<2016-11-17 Thu>

I interpret this to be a bi-weekly meeting which runs through
2016-11-17, however agenda puts the meeting on every single day. From
reading around, this doesn't appear to be a valid format for
accomplishing period recurrences:
- 
http://stackoverflow.com/questions/2464598/org-mode-schedule-weekly-event-for-a-period

I just wanted to reach out and see if this is a setup issue or if
recursion + a range is not the right way to go about this. If not, my
quick fix would see if I can hack the awk script to not include the
end date for the range, as deleting that appears to work. That would
incorrectly show future appts that may not be real, though.


Thanks for any suggestions,
John



Re: [O] BUG: org-beamer-select-environment select multiple environments not working?

2016-05-25 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Not necessarily.  On the top of my head, you could have a column group
> with columns inside.  This example used to be possible.  I haven't checked
> now.

This one is not possible anymore. A column environment implies columns.
You can also provide a columns environment explicitly, at a higher
level, e.g., to provide specific options.

Regards,

-- 
Nicolas Goaziou



Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-05-25 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> Makes sense - I just wasn't aware of the tags:nil property. Probably it
> should be added to the beamer template headers (C-ce#)?

It belongs to the default template, since this is a generic option.
I don't think it's a good idea to add duplicates in templates.

> I had
>
> #+OPTIONS: tags:not-in-toc
>
> in my org file, but the tags were still in the toc of the beamer
> export.

>From your document, adding tags:not-in-toc, I get

  \begin{document}

  \begin{frame}{Outline}
  \tableofcontents
  \end{frame}


  \section[Level 1]{Level 1\hfill{}\textsc{presentation}}
  \label{sec:org057dfd7}
  \begin{frame}[label={sec:org1551704}]{Frame 1}
  Some Text
  \end{frame}
  \end{document}

Do you know what should be generated instead?

Regards,

-- 
Nicolas Goaziou



Re: [O] HTML

2016-05-25 Thread Eric S Fraga
On Wednesday, 25 May 2016 at 14:49, Uwe Brauer wrote:
> Great, BTW, can I have something similar in HTML, I mean lists in tables
> using your approach. That might come in  handy as well.

This is outside my area of expertise indeed...  I would assume you
should be able to define a suitable CSS element akin to a new LaTeX
environment but, again, I'll let others chime in!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.93.1, Org release_8.3.4-775-g3308a5



Re: [O] Displaying deadline datestamp in todo agenda list?

2016-05-25 Thread Matt Lundin
Karl Fogel  writes:

> I'm using the DEADLINE keyword with TODO entries, and I'd like the
> DEADLINE date to be displayed as a datestamp next to each TODO item,
> when I list deadlined todo items. In other words, I don't want to have
> to duplicate the DEADLINE timestamp as a timestamp on the TODO line
> itself in my Org Mode file -- since the timestamp is already present
> as the value of the DEADLINE keyword, can't Org Mode just use it?
>
> Assume I have these Org Mode entries:
>
>   * STARTED Org Mode scheduling test KIWI.
> DEADLINE: <2016-05-23>
>
>   * TODO Org Mode scheduling test MELON.
> DEADLINE: <2016-05-25>
>
>   * STARTED Org Mode scheduling test LIME.
> DEADLINE: <2016-05-24>
>
>   * STARTED Org Mode scheduling test TARDIGRADE.
> SCHEDULED: <2016-05-23> DEADLINE: <2016-06-16>
>
> And I have this custom code to bind "d" to show just the TODO items that have 
> deadlines, in my `org-agenda' keymap:
>
>   (defun ots-org-entry-skip-non-deadline ()
> "Return non-nil iff this org entry does not have the DEADLINE keyword."
> (if (not (org-entry-get (point) "DEADLINE"))
> (progn (outline-next-heading) (1- (point)
>   
>   (defvar ots-org-agenda-custom-commands-updated-p nil
> "If non-nil, we've already updated `org-agenda-custom-commands',
>   so don't do it again.")
>   
>   ;; TBD: Oh, could use `org-add-agenda-custom-command' to do this.
>   (unless ots-org-agenda-custom-commands-updated-p
> (unless (boundp 'org-agenda-custom-commands)
>   (setq org-agenda-custom-commands ()))
> (setq org-agenda-custom-commands
>   (cons '("d" "Deadlines and scheduled work" alltodo ""
>   ((org-agenda-skip-function 'ots-org-entry-skip-non-deadline)
>;; Add code here to control deadline date display?
>(org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% 
> s")
>(timeline . "  % s")
>(todo . " %i %-12:c %s")
>(tags . " %i %-12:c")
>(search . " %i %-12:c")))
>(org-agenda-sorting-strategy '(deadline-up
> org-agenda-custom-commands))
> (setq ots-org-agenda-custom-commands-updated-p t))
>

[My apologies for the previous email: I accidentally had format=flowed
enabled.]

Here's a working implementation, using org-agenda-add-custom-command and
the built-in mechanism for skipping non-deadline entries (you can get
rid of ots-org-entry-skip-non-deadline). I also added some justification
(the -22) to accommodate my rather long timestamp strings. Adjust as
needed:

(org-add-agenda-custom-command
 '("d" "Deadlines and scheduled work" alltodo ""
   ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
(org-agenda-prefix-format '((todo . " %i %-22(org-entry-get nil 
\"DEADLINE\") %-12:c %s")))
(org-agenda-sorting-strategy '(deadline-up)

Matt



Re: [O] Displaying deadline datestamp in todo agenda list?

2016-05-25 Thread Matt Lundin

Karl Fogel  writes:


I'm using the DEADLINE keyword with TODO entries, and I'd like 
the DEADLINE date to be displayed as a datestamp next to each 
TODO item, when I list deadlined todo items. In other words, I 
don't want to have to duplicate the DEADLINE timestamp as a 
timestamp on the TODO line itself in my Org Mode file -- since 
the timestamp is already present as the value of the DEADLINE 
keyword, can't Org Mode just use it? 

Assume I have these Org Mode entries: 

  * STARTED Org Mode scheduling test KIWI. 
DEADLINE: <2016-05-23> 

  * TODO Org Mode scheduling test MELON. 
DEADLINE: <2016-05-25> 

  * STARTED Org Mode scheduling test LIME. 
DEADLINE: <2016-05-24> 

  * STARTED Org Mode scheduling test TARDIGRADE. 
SCHEDULED: <2016-05-23> DEADLINE: <2016-06-16> 

And I have this custom code to bind "d" to show just the TODO 
items that have deadlines, in my `org-agenda' keymap: 

  (defun ots-org-entry-skip-non-deadline () 
"Return non-nil iff this org entry does not have the 
DEADLINE keyword."  (if (not (org-entry-get (point) 
"DEADLINE")) 
(progn (outline-next-heading) (1- (point) 
   (defvar ots-org-agenda-custom-commands-updated-p nil 
"If non-nil, we've already updated 
`org-agenda-custom-commands', 
  so don't do it again.")   ;; TBD: Oh, could use 
  `org-add-agenda-custom-command' to do this.  (unless 
  ots-org-agenda-custom-commands-updated-p 
(unless (boundp 'org-agenda-custom-commands) 
  (setq org-agenda-custom-commands ())) 
(setq org-agenda-custom-commands 
  (cons '("d" "Deadlines and scheduled work" alltodo "" 
  ((org-agenda-skip-function 
  'ots-org-entry-skip-non-deadline) 
   ;; Add code here to control deadline date 
   display?  (org-agenda-prefix-format '((agenda 
   . " %i %-12:c%?-12t% s") 
   (timeline . "  % 
   s") (todo . " %i 
   %-12:c %s") (tags 
   . " %i %-12:c") 
   (search . " %i 
   %-12:c"))) 
   (org-agenda-sorting-strategy 
   '(deadline-up 
org-agenda-custom-commands)) 
(setq ots-org-agenda-custom-commands-updated-p t)) 



Hi Karl,

Here's a working implementation, using 
org-agenda-add-custom-command and the built-in mechanism for 
skipping non-deadline entries (you can get rid of 
ots-org-entry-skip-non-deadline). I also added some justification 
(the -22) to accommodate my rather long timestamp strings. Adjust 
as needed:


(org-add-agenda-custom-command 
'("d" "Deadlines and scheduled work" alltodo "" 
((org-agenda-skip-function '(org-agenda-skip-entry-if 
'notdeadline)) 
 (org-agenda-prefix-format '((todo . " %i 
 %-22(org-entry-get nil \"DEADLINE\") %-12:c %s"))) 
 (org-agenda-sorting-strategy '(deadline-up)


Matt



Re: [O] org-agenda repeated tasks showing multiple times

2016-05-25 Thread Matt Lundin

Paul Harper  writes:

Hello, 

I am getting the following in my org-agenda everyday with 
repeated tasks. 

"Sunday 15 May 2016 
  schedule:   Sched.16x:  Backup KeepassX Local schedule: 
  Sched.16x:  PC Backup to External Drive schedule:   Sched.16x: 
  Review Weekly schedule:   Sched.16x:  Backup KeepassX Local 
 Sunday 15 May 2016 
  schedule:   Sched.16x:  Backup KeepassX Local schedule: 
  Sched.16x:  PC Backup to External Drive schedule:   Sched.16x: 
  Review Weekly schedule:   Sched.16x:  Backup KeepassX Local 
  schedule:   Sched.16x:  PC Backup to External Drive schedule: 
  Sched.16x:  Review Weekly 
And so on 

How do I stop that and only see the task for one particular day 
in my agenda? 



Try setting org-agenda-repeating-timestamp-show-all to nil.

Also, I'm not sure why there are two agendas for "Sunday" shown 
above.  Are you using a custom agenda command? 


Matt



Re: [O] [patch] more robust footnotes

2016-05-25 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> Nicolas Goaziou  writes:
>>>
>>> I suggest to avoid calling repeatedly
>>> `org-export-get-footnote-definition'. Also, if the footnote reference is
>>> anonymous, there is no point in calling `org-element-map'. The following
>>> is more efficient:
>>>
>>>   (format "\\footnote{%s%s}"
>>>   (org-trim (org-export-data def info))
>>>   ;; Only insert a label if there exist another reference to def.
>>>   (cond
>>>((not label) "")
>>>((org-element-map (plist-get info :parse-tree) 
>>> 'footnote-reference
>>>   (lambda (f)
>>> (and (not (eq f footnote-reference))
>>>  (equal (org-element-property :label f) label)
>>>  (org-latex--label def info t t)))
>>>   info t))
>>>(t "")))
>>
>> Thanks.
>>
>> I have pushed the change.
>
> Thank you. 
>
> However, the patch you committed doesn't short-circuit on anonymous
> footnotes, per above (the (not label) part). As a consequence, every
> anonymous footnote (as long as there is more than one) gets a label,
> AFAICT.

You are right.  I missed that case.  I've pushed your suggested fix.

Rasmus

-- 
Spil noget med Slayer!




Re: [O] [patch] more robust footnotes

2016-05-25 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Nicolas Goaziou  writes:
>>
>> I suggest to avoid calling repeatedly
>> `org-export-get-footnote-definition'. Also, if the footnote reference is
>> anonymous, there is no point in calling `org-element-map'. The following
>> is more efficient:
>>
>>   (format "\\footnote{%s%s}"
>>   (org-trim (org-export-data def info))
>>   ;; Only insert a label if there exist another reference to def.
>>   (cond
>>((not label) "")
>>((org-element-map (plist-get info :parse-tree) 'footnote-reference
>>   (lambda (f)
>> (and (not (eq f footnote-reference))
>>  (equal (org-element-property :label f) label)
>>  (org-latex--label def info t t)))
>>   info t))
>>(t "")))
>
> Thanks.
>
> I have pushed the change.

Thank you. 

However, the patch you committed doesn't short-circuit on anonymous
footnotes, per above (the (not label) part). As a consequence, every
anonymous footnote (as long as there is more than one) gets a label,
AFAICT.

Regards,

-- 
Nicolas Goaziou



Re: [O] Footnotes problem when exporting from org to org

2016-05-25 Thread Nick Dokos
Rasmus  writes:

> Nick Dokos  writes:
>
>> Bug? Or am I expecting too much?
>
> Yeah, that's a bug.  It should work now.
>

It does.

And I learned something about the structure of org documents:
after export, the footnote definitions are at the end of each section,
rather than at the end of the document, which I previously
thought was the mandatory place.

I tried the toy example but also my "real" document: I can export the
resulting org document (at least to HTML) with no problems at all.

Thanks for the quick fix!

--
Nick





Re: [O] looking for a variable which allows formatting the agenda clock report

2016-05-25 Thread Rainer Stengele

Am 25.05.2016 um 09:44 schrieb Rainer Stengele:

Am 19.05.2016 um 22:15 schrieb Rainer Stengele:

Am 13.05.2016 um 13:04 schrieb Rainer Stengele:

Am 11.05.2016 um 21:45 schrieb Rainer Stengele:

Am 11.05.2016 um 18:22 schrieb Marco Wahl:

Hi Rainer,


I could not find a variable which allows formatting the clock
report
that is created in the org agenda by "v R".
Any quick pointer to such one or other ideas?


org-agenda-clockreport-parameter-plist



Thanks Marco,

now my question is how can I extract the category of a clock entry
and
display it in the report? I tried a bit with properties but have no
real clue. Can somebody help here?


You can filter a certain category for the clock report afaics.

E.g.

org-agenda-clockreport-parameter-plist value

(:link t :maxlevel 2 :tags "+CATEGORY=\"busi\"")

only takes the clockings from items in category "busi" for the
org-agenda-clockreport.


HTH,


Hi Marco,

thanks for this, very useful.
What I really meant was how can I change the output format of the
clock report,
so how do I change the first column from "File" to "Category" of the
clock entry.

Thanks,
Rainer




Hi,

does anybody have an example for the :formatter item to format the
clocktable output as needed?

Thank you.
Regards, Rainer




Anybody?



Hi all,

I really try hard to find any example of how to use the :formatter to
format the clocktable report in an agenda. All I really want to do is
display the category property instead of the filename for clocked times.
Does anybody have an example please?

Thank you.
Regards, Rainer




I finally found an example here:
https://blog.c11k.de/blog/2015/03/29/custom-clock-report-table-for-orgmode/

Thank you.
Regards, Rainer




[O] HTML (was: lists in tables (latex export))

2016-05-25 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > On Tuesday, 24 May 2016 at 09:59, Uwe Brauer wrote:
   > [...]

   >> That is interesting, I could not get your example to work, but this is
   >> due to lack of knowledge from my side. I will look into this in the
   >> coming days. Thanks for pointing it out!

   > Try the attached.  I've put the individual boxes in actual drawn boxes
   > which may look silly if the boxes have different heights...

Great, BTW, can I have something similar in HTML, I mean lists in tables
using your approach. That might come in  handy as well.

thanks

Uwe 




Re: [O] lists in tables (latex export)

2016-05-25 Thread Uwe Brauer

> On Tuesday, 24 May 2016 at 21:00, Uwe Brauer wrote:

> Interesting.  If you want to get this approach to work with org, you are
> more likely to need to put in the LaTeX directives into the org file
> directly instead of the solution I suggested:

> #+latex: \begin{tcbraster}[raster columns=2, boxrule=0mm, arc=0mm]
> #+latex: \begin{tcolorbox}[equal height group=A, size=fbox, 
colback=swotS!60, colframe=swotS!80!black, title=\textsc{strengths}]

> - business 1
> - business 2


Thanks I will try this out and report back.




Re: [O] Bug: XML entities in the ox-rss exporter

2016-05-25 Thread Arun Isaac

>> I can provide a patch for this. 

Please find attached the patch.

> Since "ox-rss.el" loads "ox-html", could you re-use code in the latter?

I think even ox-html could benefit from using an XML/HTML generation
library that can convert s-expressions to XML/HTML. xml.el has
`xml-parse-region' to convert XML strings to an s-expression tree, but
unfortunately has no function to do the inverse, that is, convert an
s-expression tree to an XML string. If it had such a function, we
needn't have to depend on an external library such as xmlgen, and things
would have been more convenient.

Anyways, for now, I have implemented a patch which uses
`org-rss-plain-text' (which, in turn uses `org-html-encode-plain-text')
to encode the disallowed characters to their XML entities.



signature.asc
Description: PGP signature
>From 2b310b32234e6193154c9850d51aaa8ed312f2df Mon Sep 17 00:00:00 2001
From: Arun Isaac 
Date: Wed, 25 May 2016 15:11:34 +0530
Subject: [PATCH] ox-rss: Encode characters to their XML entities

* contrib/lisp/ox-rss.el (org-rss-build-channel-info, org-rss-headline):
  Encode disallowed characters in `title' to their XML entities

The `title' field is user specified and may contain characters such as
"&", "<" or ">" that are disallowed in XML. These characters should be
encoded into their corresponding XML entities.
---
 contrib/lisp/ox-rss.el | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index 0c4a2f2..95d20ec 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -248,12 +248,13 @@ communication channel."
 			(format-time-string
 			 "%a, %d %b %Y %H:%M:%S %z"
 			 (org-time-string-to-time pubdate0)
-	 (title (or (org-element-property :RSS_TITLE headline)
-			(replace-regexp-in-string
-			 org-bracket-link-regexp
-			 (lambda (m) (or (match-string 3 m)
-	 (match-string 1 m)))
-			 (org-element-property :raw-value headline
+	 (title (org-rss-plain-text
+		 (or (org-element-property :RSS_TITLE headline)
+			 (replace-regexp-in-string
+			  org-bracket-link-regexp
+			  (lambda (m) (or (match-string 3 m)
+	  (match-string 1 m)))
+			  (org-element-property :raw-value headline))) info))
 	 (publink
 	  (or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
 		  (concat
@@ -318,7 +319,7 @@ as a communication channel."
 (defun org-rss-build-channel-info (info)
   "Build the RSS channel information."
   (let* ((system-time-locale "C")
-	 (title (plist-get info :title))
+	 (title (org-rss-plain-text (or (plist-get info :title) "") info))
 	 (email (org-export-data (plist-get info :email) info))
 	 (author (and (plist-get info :with-author)
 		  (let ((auth (plist-get info :author)))
-- 
2.8.2



Re: [O] looking for a variable which allows formatting the agenda clock report

2016-05-25 Thread Rainer Stengele

Am 19.05.2016 um 22:15 schrieb Rainer Stengele:

Am 13.05.2016 um 13:04 schrieb Rainer Stengele:

Am 11.05.2016 um 21:45 schrieb Rainer Stengele:

Am 11.05.2016 um 18:22 schrieb Marco Wahl:

Hi Rainer,


I could not find a variable which allows formatting the clock report
that is created in the org agenda by "v R".
Any quick pointer to such one or other ideas?


org-agenda-clockreport-parameter-plist



Thanks Marco,

now my question is how can I extract the category of a clock entry and
display it in the report? I tried a bit with properties but have no
real clue. Can somebody help here?


You can filter a certain category for the clock report afaics.

E.g.

org-agenda-clockreport-parameter-plist value

(:link t :maxlevel 2 :tags "+CATEGORY=\"busi\"")

only takes the clockings from items in category "busi" for the
org-agenda-clockreport.


HTH,


Hi Marco,

thanks for this, very useful.
What I really meant was how can I change the output format of the
clock report,
so how do I change the first column from "File" to "Category" of the
clock entry.

Thanks,
Rainer




Hi,

does anybody have an example for the :formatter item to format the
clocktable output as needed?

Thank you.
Regards, Rainer




Anybody?



Hi all,

I really try hard to find any example of how to use the :formatter to 
format the clocktable report in an agenda. All I really want to do is 
display the category property instead of the filename for clocked times.

Does anybody have an example please?

Thank you.
Regards, Rainer




Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-05-25 Thread Rainer M Krug
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
>>> But in my document, I have
>>>
>>> #+SELECT_TAGS: export presentation
>>>
>>> in which case, I would have expected, that the tags defined here are not
>>> exported?
>>
>> It's arguably better. 
>>
>> OTOH, it is easier to remove them with a filter (or globally with
>> tags:nil) than to add them back if we automatically delete them. So,
>> I tend to think we shouldn't remove them automatically.
>>
>> WDYT?
>
> FWIW I agree with not being clever here.  It becomes a too convoluted
> definition of tags.  Aside, I can’t think of single case where I would
> *export* tags (but that’s another story).

Different usage scenarios I guess. But most certainly not in my usage
pattern of org (literate programming, data analysis, R, paper,
presentations, ...)

Cheers,

Rainer
-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-05-25 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> But in my document, I have
>>
>> #+SELECT_TAGS: export presentation
>>
>> in which case, I would have expected, that the tags defined here are not
>> exported?
>
> It's arguably better. 
>
> OTOH, it is easier to remove them with a filter (or globally with
> tags:nil) than to add them back if we automatically delete them. So,
> I tend to think we shouldn't remove them automatically.
>
> WDYT?

Makes sense - I just wasn't aware of the tags:nil property. Probably it
should be added to the beamer template headers (C-ce#)?

>
>> But I already have =tags:not-in-toc= but they were in the TOC?
>
> I don't understand that question.

I had

#+OPTIONS: tags:not-in-toc

in my org file, but the tags were still in the toc of the beamer export.

Rainer

>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] BUG: org-beamer-select-environment select multiple environments not working?

2016-05-25 Thread Rainer M Krug
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
>>> It seems that I can not longer select multiple environments at the same
>>> time by using org-beamer-select-environment.
>>>
>>> - I am on a header
>>> - I press C-c C-b
>>> - then C-c to enable multiple selections
>>> - press (b)lock and (c)olumn and both are selected
>>> - press [RET] to accept
>>> - only one gets applied (in my case column)
>>
>> Aren't environments mutually exclusive?

An environment per level - you might be right.
But one environment *in* another makes sense.

>
> Not necessarily.  On the top of my head, you could have a column group
> with columns inside.  This example used to be possible.  I haven't checked
> now.

So the proper way to do it, would than to have one block environment
encapsulated in a column environment:

** A column :B_column:
*** A Block in a column :B_block:

Makes actually sense, as a column in a block would be something different.

So there is actually no reason to be able to assign multiple
environments to an org header.

Couldn't this than be removed from the dialog?

Also: what does the ! (Groups) mean in the dialog?

Thanks,

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] [patch] more robust footnotes

2016-05-25 Thread Rasmus
Nicolas Goaziou  writes:

> You don't seem to use the latter. Does it still make sense to provide
> it?

No.

> I suggest to avoid calling repeatedly
> `org-export-get-footnote-definition'. Also, if the footnote reference is
> anonymous, there is no point in calling `org-element-map'. The following
> is more efficient:
>
>   (format "\\footnote{%s%s}"
>   (org-trim (org-export-data def info))
>   ;; Only insert a label if there exist another reference to def.
>   (cond
>((not label) "")
>((org-element-map (plist-get info :parse-tree) 'footnote-reference
>   (lambda (f)
> (and (not (eq f footnote-reference))
>  (equal (org-element-property :label f) label)
>  (org-latex--label def info t t)))
>   info t))
>(t "")))

Thanks.

I have pushed the change.

Rasmus

-- 
Er du tosset for noge' lårt!




Re: [O] lists in tables (latex export)

2016-05-25 Thread Rasmus
Eric S Fraga  writes:

> etc. as I believe it would be difficult to pass options to org special
> blocks.  But maybe others can chime in: can ATTR_LATEX, for instance, be
> used to specify options for a #+BEGIN_ block?

Yes.

#+attr_latex: :options [foo]
#+begin_bar
x
#+end_bar

-- 
Warning: Everything saved will be lost




Re: [O] Footnotes problem when exporting from org to org

2016-05-25 Thread Rasmus
Nick Dokos  writes:

> Bug? Or am I expecting too much?

Yeah, that's a bug.  It should work now.

Rasmus

-- 
Dung makes an excellent fertilizer




Re: [O] lists in tables (latex export)

2016-05-25 Thread Eric S Fraga
On Tuesday, 24 May 2016 at 21:00, Uwe Brauer wrote:
> I will try to make it work with the solution as proposed by
>
> http://www.mostlycolor.ch/2015/07/swot-matrices-in-latex.html
>
> In case you are interested :-D

Interesting.  If you want to get this approach to work with org, you are
more likely to need to put in the LaTeX directives into the org file
directly instead of the solution I suggested:

#+latex: \begin{tcbraster}[raster columns=2, boxrule=0mm, arc=0mm]
#+latex: \begin{tcolorbox}[equal height group=A, size=fbox, colback=swotS!60, 
colframe=swotS!80!black, title=\textsc{strengths}]
- business 1
- business 2

etc. as I believe it would be difficult to pass options to org special
blocks.  But maybe others can chime in: can ATTR_LATEX, for instance, be
used to specify options for a #+BEGIN_ block?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.93.1, Org release_8.3.4-775-g3308a5