Re: [O] [PATCH] Prevent org-rss-headline dropping lower level headlines

2016-05-11 Thread Arun Isaac

> I mean that the HTML back-end adds data that may not be useful for the
> RSS back-end.

Yes, things like the  tags are not useful. But, technically,
they aren't wrong either. And, the alternative is to modify ox-rss so it
depends less on ox-html. That is a bigger modification, not within the
scope of this patch, I think.

> My remark about `org-export-data-with-backend' is orthogonal to the
> output of the function. It is usually better because it doesn't depend
> on the name of the translators in HTML back-end.

I have made this modification.

> Could you send an updated patch? Thank you.

Please find attached an updated patch.

Thank you.

>From a8fd0b0f4eca51a38a432ad942b695b9e565d4fe Mon Sep 17 00:00:00 2001
From: Arun Isaac 
Date: Thu, 12 May 2016 09:21:18 +0530
Subject: [PATCH] ox-rss: Prevent dropping lower level headlines

* contrib/lisp/ox-rss.el (org-rss-headline): Transcode lower level
  headlines (headlines with level > 1) using the html backend.  Do not
  drop them.

Previously, lower level headlines were dropped and did not appear in the
exported RSS output.
---
 contrib/lisp/ox-rss.el | 106 -
 1 file changed, 53 insertions(+), 53 deletions(-)

diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index 39fce30..0c4a2f2 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -228,59 +228,59 @@ Return output file name."
   "Transcode HEADLINE element into RSS format.
 CONTENTS is the headline contents.  INFO is a plist used as a
 communication channel."
-  (unless (or (org-element-property :footnote-section-p headline)
-	  ;; Only consider first-level headlines
-	  (> (org-export-get-relative-level headline info) 1))
-(let* ((author (and (plist-get info :with-author)
-			(let ((auth (plist-get info :author)))
-			  (and auth (org-export-data auth info)
-	   (htmlext (plist-get info :html-extension))
-	   (hl-number (org-export-get-headline-number headline info))
-	   (hl-home (file-name-as-directory (plist-get info :html-link-home)))
-	   (hl-pdir (plist-get info :publishing-directory))
-	   (hl-perm (org-element-property :RSS_PERMALINK headline))
-	   (anchor (org-export-get-reference headline info))
-	   (category (org-rss-plain-text
-		  (or (org-element-property :CATEGORY headline) "") info))
-	   (pubdate0 (org-element-property :PUBDATE headline))
-	   (pubdate (let ((system-time-locale "C"))
-		  (if pubdate0
-			  (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
-	   (publink
-	(or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
-		(concat
-		 (or hl-home hl-pdir)
-		 (file-name-nondirectory
-		  (file-name-sans-extension
-		   (plist-get info :input-file))) "." htmlext "#" anchor)))
-	   (guid (if org-rss-use-entry-url-as-guid
-		 publink
-		   (org-rss-plain-text
-		(or (org-element-property :ID headline)
-			(org-element-property :CUSTOM_ID headline)
-			publink)
-		info
-  (if (not pubdate0) "" ;; Skip entries with no PUBDATE prop
-	(format
-	 (concat
-	  "\n"
-	  "%s\n"
-	  "%s\n"
-	  "%s\n"
-	  "%s\n"
-	  "%s\n"
-	  (org-rss-build-categories headline info) "\n"
-	  "\n"
-	  "\n")
-	 title publink author guid pubdate contents)
+  (if (> (org-export-get-relative-level headline info) 1)
+  (org-export-data-with-backend headline 'html info)
+(unless (org-element-property :footnote-section-p headline)
+  (let* ((author (and (plist-get info :with-author)
+			  (let ((auth (plist-get info :author)))
+			(and auth (org-export-data auth info)
+	 (htmlext (plist-get info :html-extension))
+	 (hl-number (org-export-get-headline-number headline info))
+	 (hl-home (file-name-as-directory (plist-get info :html-link-home)))
+	 (hl-pdir (plist-get info :publishing-directory))
+	 (hl-perm (org-element-property :RSS_PERMALINK headline))
+	 (anchor (org-export-get-reference headline info))
+	 (category (org-rss-plain-text
+			(or (org-element-property :CATEGORY headline) "") info))
+	 (pubdate0 (org-element-property :PUBDATE headline))
+	 (pubdate (let ((system-time-locale "C"))
+			(if pubdate0
+			(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
+	 (publink
+	  (or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
+		  (concat
+		   (or hl-home hl-pdir)
+		   (file-name-nondirectory
+		(file-name-sans-extension

Re: [O] [BUG] Noweb reference eval syntax does not work

2016-05-11 Thread Charles C. Berry

On Wed, 11 May 2016, Nicolas Goaziou wrote:


Hello,

"Thomas S. Dye"  writes:


The motivation for noweb-ref is discussed in this thread from about 5
years ago:
http://thread.gmane.org/gmane.emacs.orgmode/42636/focus=42639

FWIW, I haven't used noweb-ref.


Thank you for the pointers. It seems that :noweb-ref is here for
a task, that NAME alone cannot fulfill. I guess we have to keep it,
then.

Although I understand that <> can refer to a concatenation
of source block contents, I cannot find any meaning in <>,
which would be the result of evaluation of a block that doesn't exist.

Maybe we should simply error out on this one.

WDYT?


Error out sounds good.

If one wants to do this

#+name: lotsa-blocks
#+begin_src my-lang :noweb yes :var a="this"
  <>
#+end_src

#+begin_src my-lang :noweb yes
<>
#+end_src

it seems concise enough already.

Chuck



Re: [O] [BUG] Noweb reference eval syntax does not work

2016-05-11 Thread Samuel Wales
i use noweb-ref to concatenate different blocks.

i use quick and dirty for speed.


On 5/11/16, Nicolas Goaziou  wrote:
> Hello,
>
> "Thomas S. Dye"  writes:
>
>> The motivation for noweb-ref is discussed in this thread from about 5
>> years ago:
>> http://thread.gmane.org/gmane.emacs.orgmode/42636/focus=42639
>>
>> FWIW, I haven't used noweb-ref.
>
> Thank you for the pointers. It seems that :noweb-ref is here for
> a task, that NAME alone cannot fulfill. I guess we have to keep it,
> then.
>
> Although I understand that <> can refer to a concatenation
> of source block contents, I cannot find any meaning in <>,
> which would be the result of evaluation of a block that doesn't exist.
>
> Maybe we should simply error out on this one.
>
> WDYT?
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>


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

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] [PATCH 2/2] org-capture.el: Support all target file specifiction variants in Customize

2016-05-11 Thread Phil Hudson
>From 9ca987e6580ef633c961bf2023813d8544a0d36b Mon Sep 17 00:00:00 2001
From: Phil Hudson 
Date: Wed, 11 May 2016 22:49:01 +0100
Subject: [PATCH 2/2] org-capture.el: Support all target file specifiction
 variants in Customize

* lisp/org-capture.el (`org-capture-templates'): Adjust the
  `org-capture-templates' defcustom template to support specifying the capture
  target file using either a literal pathname, a function, a variable or a
  form, as documented.  Previously the Customize UI supported specifying only a
  literal pathname.
  (org-capture-templates): Clarify the documentation for the 'function' method
  for setting up the capture target.

* doc/org.texi (Template elements): Copy the clarification regarding 'function'
  from org-capture.el above to the relevant section in the manual.
---
 doc/org.texi|  4 ++--
 lisp/org-capture.el | 58 +++--
 2 files changed, 49 insertions(+), 13 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 17b01c2..7a76744 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7206,8 +7206,8 @@ A function to find the right location in the file.
 File to the entry that is currently being clocked.
 
 @item (function function-finding-location)
-Most general way, write your own function to find both
-file and location.
+Most general way: write your own function which both visits the
+file and sets point at the right location.
 @end table
 
 @item template
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 34a6817..9842b13 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -166,8 +166,8 @@ target   Specification of where the captured item 
should be placed.
File to the entry that is currently being clocked
 
 (function function-finding-location)
-Most general way, write your own function to find both
-file and location
+Most general way: write your own function which both visits the
+file and sets point at the right location.
 
 template The template for creating the capture item.  If you leave this
 empty, an appropriate default template will be used.  See below
@@ -316,38 +316,74 @@ you can escape ambiguous cases with a backward slash, 
e.g., \\%i."
  (choice :tag "Target location"
  (list :tag "File"
(const :format "" file)
-   (file :tag "  File"))
+   (choice :tag "  Filename"
+   (file :tag "  Literal")
+   (function :tag "  Function")
+   (variable :tag "  Variable")
+   (sexp :tag "  Form")))
  (list :tag "ID"
(const :format "" id)
(string :tag "  ID"))
  (list :tag "File & Headline"
(const :format "" file+headline)
-   (file   :tag "  File")
+   (choice :tag "  Filename"
+   (file :tag "  Literal")
+   (function :tag "  Function")
+   (variable :tag "  Variable")
+   (sexp :tag "  Form"))
(string :tag "  Headline"))
  (list :tag "File & Outline path"
(const :format "" file+olp)
-   (file   :tag "  File")
+   (choice :tag "  Filename"
+   (file :tag "  Literal")
+   (function :tag "  Function")
+   (variable :tag "  Variable")
+   (sexp :tag "  Form"))
(repeat :tag "Outline path" :inline t
(string :tag "Headline")))
  (list :tag "File & Regexp"
(const :format "" file+regexp)
-   (file   :tag "  File  ")
+   (choice :tag "  Filename"
+   (file :tag "  Literal")
+   (function :tag "  Function")
+   (variable :tag "  Variable")
+   (sexp :tag "  Form"))
(regexp :tag "  Regexp"))
  (list :tag "File & Date tree"
(const :format "" file+datetree)
-   (file :tag "  File"))
+   (choice :tag "  Filename"
+

[O] [PATCH 1/2] org-agenda.el: Fix `org-agenda-bulk-custom-functions' supported Customize type

2016-05-11 Thread Phil Hudson

>From 256cf1f854e902de392a325ec4b9c8204fb84a21 Mon Sep 17 00:00:00 2001
From: Phil Hudson 
Date: Wed, 11 May 2016 15:34:12 +0100
Subject: [PATCH 1/2] org-agenda.el: Fix `org-agenda-bulk-custom-functions'
 supported Customize type

* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
  template to recognize that the code expects this alist's elements to be
  two-element lists like (?a b), not conses like (?a . b).  The Customize UI
  previously incorrectly presented the latter.  When saved, this led to the
  agenda bulk-commands menu correctly presenting the accelerator key 'a' but
  then erroring when it tried to execute the associated command 'b'.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ef41678..ab280fb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2008,7 +2008,7 @@ For example, this value makes those two functions 
available:
 With selected entries in an agenda buffer, `B R' will call
 the custom function `set-category' on the selected entries.
 Note that functions in this alist don't need to be quoted."
-  :type 'alist
+  :type '(alist :key-type character :value-type (group function))
   :version "24.1"
   :group 'org-agenda)
 
-- 
2.8.0.rc3


-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



Re: [O] [BUG] Noweb reference eval syntax does not work

2016-05-11 Thread Nicolas Goaziou
Hello,

"Thomas S. Dye"  writes:

> The motivation for noweb-ref is discussed in this thread from about 5
> years ago:
> http://thread.gmane.org/gmane.emacs.orgmode/42636/focus=42639
>
> FWIW, I haven't used noweb-ref.

Thank you for the pointers. It seems that :noweb-ref is here for
a task, that NAME alone cannot fulfill. I guess we have to keep it,
then. 

Although I understand that <> can refer to a concatenation
of source block contents, I cannot find any meaning in <>,
which would be the result of evaluation of a block that doesn't exist.

Maybe we should simply error out on this one.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]

2016-05-11 Thread Nicolas Goaziou
Hello,

David Dynerman  writes:

> When visiting an org-babel code block in a dedicated window (C-c ' in
> the block), I would like to manually save the buffer to a file by calling
> write-file (C-x C-w) 
>
> However, this doesn't work - it prompts you for a filename, as expected,
> but no matter what filename you enter it always just re-saves the .org
> file that contains the babel block you are editing.
>
> Is this expected? If it's not possible to have this functionality, some
> kind of error message would be helpful.

I changed this in developement version. If you get any chance to test
it, Please tell me if it behaves as expected. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Strange interactions between org-indent-mode and other overlays, including show-paren-mode

2016-05-11 Thread Kaushal Modi
What's the recipe to consistently recreate the issue you are seeing with
emacs -Q?

1. emacs -Q
2. ??
3. The insertion and/or removal of the dynamic overlays (paren highlights,
beacons, etc.) results in a temporary loss of indentation of the line in
question.


On Wed, May 11, 2016 at 12:43 AM Georgiy Tugai 
wrote:

> Minor modes which use dynamic overlays, such as
>
> - show-paren-mode
> - show-smartparens-mode
> - beacon-mode
>
> interact strangely with buffers in org-indent-mode.
>
> Expected behaviour: The org-indent-mode indentation is maintained.
>
> Observed behaviour: The insertion and/or removal of the dynamic overlays
> (paren highlights, beacons, etc.) results in a temporary loss of
> indentation of the line in question. Sometimes the indentation comes
> back once the overlay's gone or after a short period of time, sometimes
> it only comes back after point is moved.
>
> GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.3) of
> 2016-05-06 on arojas
> Org-mode version 8.3.4 (8.3.4-50-g83e373-elpaplus @
> ~/.emacs.d/elpa/org-plus-contrib-20160509/)
>
-- 

-- 
Kaushal Modi


Re: [O] [PATCH] org-agenda.el: Fix `org-agenda-bulk-custom-functions' supported Customize type

2016-05-11 Thread Nicolas Goaziou
Hello,

Phil Hudson  writes:

> Hope this is all correct now. If it is, I'll do the next, somewhat
> bigger patch tomorrow. If not, please feed back on what I need to do
> differently.

It is correct. Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



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

2016-05-11 Thread 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



Re: [O] second line for author field in org-mode to latex?

2016-05-11 Thread Sharon Kimble
Rasmus  writes:

> Sharon Kimble  writes:
>
>> How can I have a second line for the author field in an org-mode export
>> to latex please? For example -
>>
>> #+AUTHOR: Sharon
>> #+AUTHOR2: Kimble
>
> Maybe?
>
> #+title: test
> #+author: sharon\\
>
> #+author: kimble
>

Thanks Rasmus, this works perfectly :)

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.0.93


signature.asc
Description: PGP signature


Re: [O] eval code snippet before tangling config file

2016-05-11 Thread Stig Brautaset
"Charles C. Berry"  writes:
> On Wed, 11 May 2016, Stig Brautaset wrote:
>>
>> I'm trying to evaluate a line of shell code and put its output into a
>> snippet that will be tangled to a file. My best attempt so far:

[...]

> Try `<>'.
>
> See (info "(org) Noweb reference syntax")
>
> ... <> ...
>
> HTH,

It does indeed! Thank you. I clearly missed that section of the manual.

Stig




Re: [O] org-ref breaks org-repair-export-blocks

2016-05-11 Thread John Kitchin
What seems to be happening is those blocks are no longer special block, but
instead an export-block. If you change special-block to export block, then
it works for me with org-ref loaded.

I don't know why (or even how) org-ref would be changing that though.


On Wed, May 11, 2016 at 12:26 PM, Julien Cubizolles 
wrote:

> #+BEGIN_SRC elisp
> (require 'package)
> (setq package-archives '(("ELPA" . "http://tromey.com/elpa/";)
>  ("melpa" . "http://melpa.milkbox.net/packages/";)
>  ("gnu" . "http://elpa.gnu.org/packages/";)
>  ("org" . "http://orgmode.org/elpa/";)
>  ("marmalade" . "
> http://marmalade-repo.org/packages/";)
>  ))
> (package-initialize)
> (require 'org-ref)
> (defun org-repair-export-blocks ()
>   "Repair export blocks and INCLUDE keywords in current buffer."
>   (interactive)
>   (when (eq major-mode 'org-mode)
> (let ((case-fold-search t)
>   (back-end-re (regexp-opt
> '("HTML" "ASCII" "LATEX" "ODT" "MARKDOWN" "MD"
> "ORG"
>   "MAN" "BEAMER" "TEXINFO" "GROFF" "KOMA-LETTER")
> t)))
>   (org-with-wide-buffer
>(goto-char (point-min))
>(let ((block-re (concat "^[ \t]*#\\+BEGIN_" back-end-re)))
>  (save-excursion
>(while (re-search-forward block-re nil t)
>  (let ((element (save-match-data (org-element-at-point
>(when (eq (org-element-type element) 'special-block)
>  (save-excursion
>(goto-char (org-element-property :end element))
>(save-match-data (search-backward "_"))
>(forward-char)
>(insert "EXPORT")
>(delete-region (point) (line-end-position)))
>  (replace-match "EXPORT \\1" nil nil nil 1))
>(let ((include-re
>   (format "^[ \t]*#\\+INCLUDE: .*?%s[ \t]*$" back-end-re)))
>  (while (re-search-forward include-re nil t)
>(let ((element (save-match-data (org-element-at-point
>  (when (and (eq (org-element-type element) 'keyword)
> (string= (org-element-property :key element)
>  "INCLUDE"))
>(replace-match "EXPORT \\1" nil nil nil 1)
> #+END_SRC
>
> #+RESULTS:
> : org-repair-export-blocks
>
> #+BEGIN_LATEX
> \begin{equation*}
> P_{ext} = P_0
> \end{equation*}
> #+END_LATEX
>



John

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


[O] org-ref breaks org-repair-export-blocks

2016-05-11 Thread Julien Cubizolles
Consider the following

--8<---cut here---start->8---
#+BEGIN_SRC elisp
(require 'package)
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/";)
 ("melpa" . "http://melpa.milkbox.net/packages/";)
 ("gnu" . "http://elpa.gnu.org/packages/";)
 ("org" . "http://orgmode.org/elpa/";)
 ("marmalade" . "http://marmalade-repo.org/packages/";)
 ))
(package-initialize)
(require 'org-ref)
(defun org-repair-export-blocks ()
  "Repair export blocks and INCLUDE keywords in current buffer."
  (interactive)
  (when (eq major-mode 'org-mode)
(let ((case-fold-search t)
  (back-end-re (regexp-opt
'("HTML" "ASCII" "LATEX" "ODT" "MARKDOWN" "MD" "ORG"
  "MAN" "BEAMER" "TEXINFO" "GROFF" "KOMA-LETTER")
t)))
  (org-with-wide-buffer
   (goto-char (point-min))
   (let ((block-re (concat "^[ \t]*#\\+BEGIN_" back-end-re)))
 (save-excursion
   (while (re-search-forward block-re nil t)
 (let ((element (save-match-data (org-element-at-point
   (when (eq (org-element-type element) 'special-block)
 (save-excursion
   (goto-char (org-element-property :end element))
   (save-match-data (search-backward "_"))
   (forward-char)
   (insert "EXPORT")
   (delete-region (point) (line-end-position)))
 (replace-match "EXPORT \\1" nil nil nil 1))
   (let ((include-re
  (format "^[ \t]*#\\+INCLUDE: .*?%s[ \t]*$" back-end-re)))
 (while (re-search-forward include-re nil t)
   (let ((element (save-match-data (org-element-at-point
 (when (and (eq (org-element-type element) 'keyword)
(string= (org-element-property :key element) 
 "INCLUDE"))
   (replace-match "EXPORT \\1" nil nil nil 1)
#+END_SRC

#+RESULTS:
: org-repair-export-blocks

#+BEGIN_LATEX
\begin{equation*}
P_{ext} = P_0
\end{equation*}
#+END_LATEX
--8<---cut here---end--->8---

After evaluating the elisp source block, org-repair-export-blocks
doesn't repair the LATEX block. However, (require 'org-ref) is commented
out, org-repair-export-blocks does its job.

Julien.





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

2016-05-11 Thread 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,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




Re: [O] second line for author field in org-mode to latex?

2016-05-11 Thread Roger Mason
Hi Sharon,

Sharon Kimble  writes:

> How can I have a second line for the author field in an org-mode export
> to latex please? For example -
>
> #+AUTHOR: Sharon
> #+AUTHOR2: Kimble
>
> But that doesn't work. I tried "#+AUTHOR: Sharon \n Kimble" but that
> doesn't work either. So how can I do it please?
>
> Thanks
> Sharon.

Does something like this work:

#+TITLE: Executive Meeting January 18 2016 @@latex:\\@@ via Skype
 @@latex:\\ 1pm eastern time @@

Cheers,
Roger



Re: [O] eval code snippet before tangling config file

2016-05-11 Thread Charles C. Berry

On Wed, 11 May 2016, Stig Brautaset wrote:



Hi,

I'm trying to evaluate a line of shell code and put its output into a
snippet that will be tangled to a file. My best attempt so far:

 #+NAME: hostname
 #+BEGIN_SRC sh
   hostname -s
 #+END_SRC

 #+BEGIN_SRC conf :tangle /usr/local/etc/leafnode/config :noweb tangle
   expire = 20
   server = news.gmane.org
   initialfetch = 100
   hostname = <>.superloopy.io
 #+END_SRC




Try `<>'.

See (info "(org) Noweb reference syntax")

... <> ...

HTH,

Chuck












[O] [PATCH] org-agenda.el: Fix `org-agenda-bulk-custom-functions' supported Customize type

2016-05-11 Thread Phil Hudson
Hope this is all correct now. If it is, I'll do the next, somewhat
bigger patch tomorrow. If not, please feed back on what I need to do
differently.

Just to reiterate: I have signed the FSF papers, so I didn't include the
cookie about the change being tiny, which I read the instructions as
saying only applies if you haven't signed the papers.

Here's the git format-patch output:

>From 256cf1f854e902de392a325ec4b9c8204fb84a21 Mon Sep 17 00:00:00 2001
From: Phil Hudson 
Date: Wed, 11 May 2016 15:34:12 +0100
Subject: [PATCH] org-agenda.el: Fix `org-agenda-bulk-custom-functions'
 supported Customize type

* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
  template to recognize that the code expects this alist's elements to be
  two-element lists like (?a b), not conses like (?a . b).  The Customize UI
  previously incorrectly presented the latter.  When saved, this led to the
  agenda bulk-commands menu correctly presenting the accelerator key 'a' but
  then erroring when it tried to execute the associated command 'b'.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ef41678..ab280fb 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2008,7 +2008,7 @@ For example, this value makes those two functions 
available:
 With selected entries in an agenda buffer, `B R' will call
 the custom function `set-category' on the selected entries.
 Note that functions in this alist don't need to be quoted."
-  :type 'alist
+  :type '(alist :key-type character :value-type (group function))
   :version "24.1"
   :group 'org-agenda)
 
-- 
2.8.0.rc3


-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



Re: [O] Annotating org exporters

2016-05-11 Thread Richard Lawrence
Hi Sebastian and all,

Sebastian Fischmeister  writes:

> I'm still undecided between a regex replace and org-entities. Is there
> a straightforward way to define own directives for orgmode to then
> support something like the following?
>
> #+LaTeX_EXPORT: "=>":"$\rightarrow$"
>
> or more generic
>
> #+EXPORT_EXPAND: latex:"=>":"$\rightarrow$"
>
> Then I could just make these expansions part of the standard header in
> my org files.

Well, there are macros, which do something very similar.  As far as I
know, they are the only way to achieve this kind of thing without some
Elisp.

You could do something like:

#+MACRO: => @@latex:$\rightarrow$@@

but that actually doesn't seem to work as is, I suspect because "=>" is
not an allowable macro name.  (It works fine with an alphabetic name
like "ARR".)  But even if you got it to work, you'd then have to type

Some text {{{=>}}} other text after the arrow

in your document, which sort of defeats the point of the nice, simple
"=>".  If it were me, I'd opt for the regex replacement, and avoid
typing all the braces.
 
Best,
Richard



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

2016-05-11 Thread Rainer Stengele

Am 11.05.2016 um 14:18 schrieb Marco Wahl:

Hi!


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


Quick,


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?


Thank you.
Regards, Rainer



Re: [O] second line for author field in org-mode to latex?

2016-05-11 Thread Rasmus
Sharon Kimble  writes:

> How can I have a second line for the author field in an org-mode export
> to latex please? For example -
>
> #+AUTHOR: Sharon
> #+AUTHOR2: Kimble

Maybe?

#+title: test
#+author: sharon\\
#+author: kimble

Hope it helps,
Rasmus

-- 
Slaa Patienten ihjel, saa siger Feberen Pas




[O] eval code snippet before tangling config file

2016-05-11 Thread Stig Brautaset

Hi,

I'm trying to evaluate a line of shell code and put its output into a
snippet that will be tangled to a file. My best attempt so far:

  #+NAME: hostname
  #+BEGIN_SRC sh
hostname -s
  #+END_SRC

  #+BEGIN_SRC conf :tangle /usr/local/etc/leafnode/config :noweb tangle
expire = 20
server = news.gmane.org
initialfetch = 100
hostname = <>.superloopy.io
  #+END_SRC

However the result of that tangle includes the shell snippet in
verbatim: 

  #+RESULTS:
  : expire = 20
  : server = news.gmane.org
  : initialfetch = 100
  : hostname = hostname -s.superloopy.io

I suspect this is because it will be executed in the context of "conf"
mode, which does not really have an execution mode. Syntax highlighting
etc works fine, however. I could change to make a shell script to write
the config, but it's not as nice really.

PS: this is an improvement to my existing setup of Leafnode on OS X, if
anybody's interested:
http://github.com/stig/dot-files/tree/master/Leafnode.org

Stig




[O] second line for author field in org-mode to latex?

2016-05-11 Thread Sharon Kimble

How can I have a second line for the author field in an org-mode export
to latex please? For example -

--8<---cut here---start->8---
#+AUTHOR: Sharon
#+AUTHOR2: Kimble
--8<---cut here---end--->8---

But that doesn't work. I tried "#+AUTHOR: Sharon \n Kimble" but that
doesn't work either. So how can I do it please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.0.93


signature.asc
Description: PGP signature


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

2016-05-11 Thread Marco Wahl
Hi!

> 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


Quick,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




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

2016-05-11 Thread Rainer Stengele

Hi,

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?

Kind regards,
Rainer Stengele




Re: [O] Bug: missing header argument does not work any longer causing Gnuplot to misinterpret data [8.3.4 (8.3.4-47-gaf853d-elpaplus @ c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20

2016-05-11 Thread Eric S Fraga
On Tuesday, 10 May 2016 at 18:55, Harald Sanftmann wrote:
> Hi!
>
> I have some org-tables which contain empty fields. I specified
> :missing "?" to get the right results. When I try to plot them with
> Gnuplot the empty fields are not exported as '?' but just as empty
> strings ''. Gnuplot therefore just uses the next non empty field for
> the value and therefore shifts the columns of the given row.

[...]

>   #+begin_src gnuplot :var data=data-missing :exports both :file 
> data-missing.svg :missing "?" :set "xtics nomirror rotate by -45 font \",8\""

You could set data to be part of the table, not the whole table.  You
could exclude the first column entirely and avoid the problem with
missing data.

Check the documentation on the var header argument in the info manual.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



Re: [O] Annotating org exporters

2016-05-11 Thread Rasmus
Sebastian Fischmeister  writes:

>>
>> This sounds a bit like org-entities.  I use this together with cdlatex for
>
>> quickly inserting such things.
>>
>> Try to type \Rightarrow and type C-c C-x \
>> Also try to export to text (non-unicode).  You will get the desired symbol.
>>
>> Alternatively, you can use one of the many input methods such as TeX or
>> rfc1345 in which case you can get the ‘⇒’ by typing ‘\Rightarrow’ or
>> ‘&=>’, respectively.  In latex, you can setup unicode-math.
>
> That's interesting, because it's more robust to add something to the
> org-entities-user list than to regexp replace a portion of the whole
> document.
>
> However, there are two disadvantages to org-entities: (1) they have to
> start with a backslash (e.g., \Rightarrow) and (2) they don't seem to
> support alphabet-based names, so this doesn't work:
>
> (add-to-list 'org-entities-user '("=>" "\\rightarrow" t "=>" "=>" "»" "»"))

Correct.

You can add a hook to ‘org-export-before-parsing-hook’ to have a list of
non-standard entities that are to be changed into "correct" entities
beforehand, e.g. (("=>" . "\\rightarrow")).

Or you can use something like cdlatex to quickly insert the "correct"
entities, e.g. "\Rightarrow" is inserted with "’]" in my setup.  The added
benefit is that entities work out of the box so when I’m exporting on
another computer it just works.

Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]

2016-05-11 Thread Phil Hudson
On Wed, 11 May 2016 at 12:44:17 am BST, David Dynerman  
wrote:

> I would like to manually save the buffer to a file by calling
> write-file (C-x C-w) 

Would `write-region' not be what you want?

-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



Re: [O] Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/carlos/.emacs.d/elpa/org-20160502/)]

2016-05-11 Thread Carlos Noguera
excellent.

Thanks.


Carlos

On Tue, May 10, 2016 at 11:10 PM Nicolas Goaziou 
wrote:

> Hello,
>
> Carlos Noguera  writes:
>
> > FYI, I just discovered that the behaviour happens if  "Org Clock Into
> > Drawer" option in "Org Clock group" is set to "When at least N clock
> > entries: 3" and I go from two entries to 3.
> > If I change it to  "Into LOGBOOK drawer" I don't have the problem any
> more.
> >
> > For the moment, I'll keep in " Into LOGBOOK drawer" as a workaround.
> >
> > Hope this helps.
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>