Re: [O] moving into another time zone?

2015-04-01 Thread Eric S Fraga
On Monday, 30 Mar 2015 at 22:35, Toomas Rosin wrote:
 Hello!

 Is it possible to create timestamps (SCHEDULED:) for TODOs with
 respect to one timezone, but have Agenda view show them for another
 zone — so that when I move to another timezone, all I have to do is
 tell org-mode (via environment?) in which timezone I happen to be at
 the moment, to have the Agenda view display all times according to
 that zone, without me having to change anything in the .org file
 itself?

Not possible.

 And if it is not possible (which I suspect, not having found anything
 promising by grepping for zone in org-mode sources and docs, and by
 looking at `org-time-string-to-time' and `org-ts-regexp0'), what
 exactly would it take to make it possible?

The format of time stamps would have to change to include time zone
information, although I guess the change could be upwards compatible by
assuming the local time zone if a designator is not present.  The regex
specifications for time stamps would need to be updated and potentially
all functions using these would have to change as well.

And I'm sure there would be second order implications...

I think it would be doable.  The question is whether it is worth
it.  When I was in Australia for a year recently, flying back and forth
frequently, I would have loved to have had this feature.  However, I
managed without it by being careful about how I put the information into
my org files.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-921-gfd8c84



Re: [O] org-cite and org-citeproc

2015-04-01 Thread Andreas Leha
Hi,

Eric S Fraga e.fr...@ucl.ac.uk writes:
 On Tuesday, 31 Mar 2015 at 12:13, Richard Lawrence wrote:
 Hi Eric and all,

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 [...]

 However, for some reason, libreoffice doesn't display the citations in
 the ODT document you have included.  I have had a look at the actual ODT
 file and it looks fine.  Can you suggest what may be wrong?  

 Hmm, you're right.  I don't have LibreOffice on the machine where I am
 working on org-citeproc, but I tested it on another machine (OS X,
 LibreOffice version 4.2.8.2 I think), and the citation text is indeed
 missing.

 Thanks for confirming this.  At least it's not me!  I hope somebody
 can figure out what is going on here.

 [...]

 A second question: what will be required to use the new cite syntax with
 LaTeX/PDF which will remain my main target for export?

 I think this needs more discussion, actually.

 The citation syntax can basically be mapped directly to BibLaTeX syntax,
 so generating LaTeX that will be processed with BibLaTeX is a simple and
 straightforward modification to Org's LaTeX exporter, and compiling the

 Although I normally use bibtex, I am happy moving to biblatex if it
 means unifying org's citation approaches.  I don't need the extra
 features (e.g. multicite) in practice but I'm also not attached to
 bibtex.

I am a happy biblatex user for all my 'own' documents.  But (as was
mentioned previously) scientific journals that accept latex submissions
will require bibtex and won't support biblatex.  So, I'd say that one of
the other methods (preferably bibtex) is still necessary.

Regards,
Andreas




Re: [O] [BUG] S-tab shows sub-headlines of archived headlines when org-inlinetask is loaded

2015-04-01 Thread Francesco Pizzolante
Hi,

I would like to bump up this thread.

I'm still having this issue while using the latest ELPA version of
org-plus-contrib.

Thanks for your help.

Regards,
 Francesco
 
 Hi,

 Under normal cirscumstances, S-tab does not show up sub-headlines of
 archived headlines.

 When 'org-inlinetask' is loaded, the behavior of S-tab changes and it
 shows up sub-headlines of archived headlines (which is not what we
 expect).

 Here's an ECM in order to easily reproduce the issue:

 #+TITLE: ECM S-TAB

 * Problem

 When org-inlinetask is loaded, S-TAB displays the sublevels of ARCHIVE'd 
 tasks!

 * Example

 * DONE This task is DONE, but well archived   
 :ARCHIVE:

 ** Subpoint A (BUG IF YOU SEE ME!)

 ** Subpoint B (BUG IF YOU SEE ME!)

 * DONE This task is DONE, but not archived

 ** Subpoint A

 ** Subpoint B

 Thanks for your help.

 Regards,
  Francesco



Re: [O] [bug] Effort and column view

2015-04-01 Thread Myles English

Hello,

Nicolas Goaziou writes:

 Myles English writes:

 Hello,

 I reported a possible bug a couple of weeks ago and since then I have
 notice related bugs in todays HEAD (that may have existed before).

I haven't reviewed that situation.

My original 'bug' was reported here:

 http://article.gmane.org/gmane.emacs.orgmode/93312/match=myles

 1) The column view of TODO items only shows the total Effort at the
 top and the Effort for the last item,

 2) The column view of the org-agenda (restricted to current buffer with
 '', get list of todos with 't') only shows the Effort for the last item
 and the total Effort at the top shows the same value as for the last
 item

 3) Narrowing by tag (the original possible bug reported) shows similar
 behaviour as above

 I saw the bug report, but didn't find time to investigate yet. Could you
 git bisect in order to know if some commit changed that recently?

This is now an old issue but I just did a little investigation and it is
likely that it has always worked this way, so is probably more of a
feature request than a bug.

I tried versions 8.2 and 8.2.9 and they both have the same behaviour.

I may have a look (in the next few months) to see if I can make it work
the way I would like.

Myles



Re: [O] Custom agenda starting tomorrow

2015-04-01 Thread Anders Wirzenius
Ken Mankoff mank...@gmail.com writes:

 I have a custom agenda view that includes the today view:

  (agenda  ((org-agenda-ndays 1)
  (org-agenda-overriding-header Scheduled Today)
  (org-deadline-warning-days 0)))

 And the next week:

   (agenda  ((org-agenda-overriding-header Scheduled)
   (org-deadline-warning-days 0)))

 Is there any way to have an agenda view that does not include
 today? today gets repeated here, and for the second agenda
 view I'd like to have it start tomorrow and show the next ndays
 from then.

 Thanks,

   -k.



Try (org-agenda-start-day +1d)

-- 
Anders




Re: [O] [org.texi] New keywords tables

2015-04-01 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 An example of a structure change is attached.  It introduces a table
 similar to @ref{Export settings} in the beginning of most backend
 chapters.

 I have not (re)read it yet, but I want to make sure that we roughly agree
 on the structure before I put more time into it.  It does not touch
 texinfo (yet) 'cause it's complicated.

 What is complicated? I find it quite clear. I'm biased, tho.

 WDYT?

 Thanks. It is a good idea.

This time I read through the patches.

If there's no disagreements I would like to push the following patches.
After that I will update the doc changes of the SUBTITLE patch and push
that.

—Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer
From b4bd95c7c0078f8c58fab3e6ed5a6a5ddee66872 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 1 Apr 2015 13:10:57 +0200
Subject: [PATCH 1/5] org.texi: Subsections in Beamer export

* org.texi (Beamer export): Add menu and change subheading to
subsection.
---
 doc/org.texi | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 780bf6f..222a9d9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11005,7 +11005,17 @@ The @LaTeX{} class @emph{Beamer} allows production of high quality
 presentations using @LaTeX{} and pdf processing.  Org mode has special
 support for turning an Org mode file or tree into a Beamer presentation.
 
-@subheading Beamer export commands
+@menu
+* Beamer specific export settings:: Export settings for Beamer export.
+* Beamer export commands:: How to export Beamer documents.
+* Sectioning Frames and Blocks in Beamer:: Blocks and sections in Beamer.
+* Beamer specific syntax:: Syntax specific to Beamer.
+* Editing support:: Helper functions for Org Beamer export.
+* A Beamer Example:: An complete Beamer example.
+@end menu
+
+@node Beamer export commands
+@subsection Beamer export commands
 
 @table @kbd
 @orgcmd{C-c C-e l b,org-beamer-export-to-latex}
@@ -11020,7 +11030,8 @@ Export as @LaTeX{} and then process to PDF.
 Export as @LaTeX{} and then process to PDF, then open the resulting PDF file.
 @end table
 
-@subheading Sectioning, Frames and Blocks
+@node Sectioning Frames and Blocks in Beamer
+@subsection Sectioning, Frames and Blocks in Beamer
 
 Any tree with not-too-deep level nesting should in principle be exportable as
 a Beamer presentation.  Headlines fall into three categories: sectioning
@@ -1,6 +11122,8 @@ such as the inclusion of short titles.}.
 #+BEAMER_THEME: Rochester [height=20pt]
 #+BEAMER_COLOR_THEME: spruce
 @end example
+@node Beamer specific syntax
+@subsection Beamer specific syntax
 
 Table of contents generated from @code{toc:t} @code{OPTION} keyword are
 wrapped within a @code{frame} environment.  Those generated from a @code{TOC}
@@ -11157,7 +11170,8 @@ the last one inserts optional arguments in current list environment.
 - item 2
 @end example
 
-@subheading Editing support
+@node Editing support
+@subsection Editing support
 
 You can turn on a special minor mode @code{org-beamer-mode} for faster
 editing with:
@@ -11172,7 +11186,8 @@ In @code{org-beamer-mode}, this key offers fast selection of a Beamer
 environment or the @code{BEAMER_COL} property.
 @end table
 
-@subheading An example
+@node A Beamer Example
+@subsection A Beamer example
 
 Here is a simple example Org document that is intended for Beamer export.
 
-- 
2.3.4

From 7cbab3d413c9d0950817eac81cd54f4f798a1597 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 1 Apr 2015 13:12:20 +0200
Subject: [PATCH 2/5] org.texi: Change beamer example to @example

* org.texi (A Beamer Example): Change to @example.
---
 doc/org.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 222a9d9..f8599bb 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11191,7 +11191,7 @@ environment or the @code{BEAMER_COL} property.
 
 Here is a simple example Org document that is intended for Beamer export.
 
-@smallexample
+@example
 #+TITLE: Example Presentation
 #+AUTHOR: Carsten Dominik
 #+OPTIONS: H:2 toc:t num:t
@@ -11223,7 +11223,7 @@ Here is a simple example Org document that is intended for Beamer export.
 ** Frame 2 (where we will not use columns)
 *** Request
 Please test this stuff!
-@end smallexample
+@end example
 
 @node HTML export
 @section HTML export
-- 
2.3.4

From 8a37299acb5397e6f3e7c2693d7f1d6a312e2c97 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 1 Apr 2015 13:13:55 +0200
Subject: [PATCH 3/5] Manuals: Remove DESCRIPTION and KEYWORDS

* org.texi (Export settings)
  orgguide.texi (Export options): Remove DESCRIPTION and KEYWORDS.
---
 doc/org.texi  | 15 ---
 doc/orgguide.texi |  2 --
 2 files changed, 17 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index f8599bb..905d80b 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10679,26 

Re: [O] Function that splits a CLOCK interval

2015-04-01 Thread Peter Frings

On 31 Mar 2015, at 18:59, Christoph LANGE math.semantic@gmail.com wrote:

 I use org's clocking facility to clock all my working time.  I frequently 
 find myself clocking time for a task T1, but later realize that I actually 
 spent part of this time on some other task T2.
[snip]
 The following function now automates the task of splitting:

Fantastic, just what I needed! 

One little thing, though. When I interrupt the function with C-g at the prompt, 
the current line is already duplicated. It would by nice that C-g left the 
buffer unchanged.

But other than that, this is a godsend for sloppy time-loggers like me.

Cheers,
Peter.




[O] [ox-html, patch] Viewport

2015-04-01 Thread Rasmus
Hi,

I think ox-html should insert a viewport to make it mobile friendly.  I
think it's not a W3 standard, though, but it's also just an additional
meta tag.  I'd like to hear from somebody who knows about html.

This patch adds this tag by default.

—Rasmus

-- 
m-mm-mmm- bacon!
From 1a0e32d45b70877e9e52cf0fad3500b632259a12 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 1 Apr 2015 15:39:28 +0200
Subject: [PATCH 7/7] ox-html: Use viewport

* ox-html.el (org-html--build-meta-info): Insert viewport.
  (org-html-viewport): New custom variable.
* ORG-NEWS: Mention viewport.
* org.texi: Mention org-html-viewport.

Viewport makes org-generated html work well with small screens.
---
 doc/org.texi|  1 +
 etc/ORG-NEWS| 10 -
 lisp/ox-html.el | 63 -
 3 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 0342c07..947e6ca 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -14263,6 +14263,7 @@ however, override everything.
 @item @code{:html-use-infojs} @tab @code{org-html-use-infojs}
 @item @code{:html-use-unicode-chars}  @tab @code{org-html-use-unicode-chars}
 @item @code{:html-validation-link}@tab @code{org-html-validation-link}
+@item @code{:html-viewport}   @tab @code{org-html-viewport}
 @item @code{:html-xml-declaration}@tab @code{org-html-xml-declaration}
 @end multitable
 
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 28e8394..ec972c9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -327,6 +327,9 @@ leading spaces within table cells.
 *** New MathJax configuration options.
 Org uses the MathJax CDN by default.  See the manual and the docstring
 of ~org-html-mathjax-options~ for details.
+*** Viewport support in html export
+Viewport for mobile-optimized website is now automatically inserted
+when exporting to html.  See ~org-html-viewport~ for details.
 ** Miscellaneous
 *** Strip all meta data from ITEM special property
 ITEM special property does not contain TODO, priority or tags anymore.
@@ -1430,7 +1433,7 @@ See http://orgmode.org/elpa/
| =C-c C-x E= | =E=| [[doc::org-inc-effort][org-inc-effort]]  |
| | =#=| [[doc::org-toggle-comment][org-toggle-comment]]  |
| | =:=| [[doc::org-columns][org-columns]] |
-   | | =W=| Set =APPT_WARNTIME= |
+   | | =W=| Set =APPT_WARNTIME=  |
| =k= || [[doc::org-agenda-capture][org-agenda-capture]]  |
| C-c ,   | ,  | [[doc::org-priority][org-priority]]|
 
@@ -2824,3 +2827,8 @@ that Calc formulas can operate on them.
 
   You should have received a copy of the GNU General Public License
   along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.
+
+
+
+
+
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 8c6406b..7761cca 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -162,6 +162,7 @@
 (:html-use-infojs nil nil org-html-use-infojs)
 (:html-use-unicode-chars nil nil org-html-use-unicode-chars)
 (:html-validation-link nil nil org-html-validation-link)
+(:html-viewport nil nil org-html-viewport)
 (:html-inline-images nil nil org-html-inline-images)
 (:html-table-attributes nil nil org-html-table-default-attributes)
 (:html-table-row-tags nil nil org-html-table-row-tags)
@@ -1403,6 +1404,53 @@ or for publication projects using the :html-head-extra property.
 ;;;###autoload
 (put 'org-html-head-extra 'safe-local-variable 'stringp)
 
+ Template :: Viewport
+
+(defcustom org-html-viewport '((width device-width)
+			   (initial-scale 1)
+			   (minimum-scale )
+			   (maximum-scale )
+			   (user-scalable ))
+  Viewport options for mobile-optimized sites.
+
+The following values are recognized
+
+width  Size of the viewport.
+initial-scale  Zoom level when the page is first loaded.
+minimum-scale  Minimum allowed zoom level.
+maximum-scale  Maximum allowed zoom level.
+user-scalable  Whether zoom can be changed.
+
+The viewport meta tag is inserted if this variable is non-nil.
+
+See the following site for a reference:
+https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag;
+  :group 'org-export-html
+  :version 25.1
+  :package-version '(Org . 8.3)
+  :type '(list :greedy t
+	   (list :tag Width of viewport
+		 (const :format   width)
+		 (choice (const :tag unset )
+			 (string)))
+	   (list :tag Initial scale
+		 (const :format   initial-scale)
+		 (choice (const :tag unset )
+			 (string)))
+	   (list :tag Minimum scale/zoom
+		 (const :format   minimum-scale)
+		 (choice (const :tag unset )
+			 (string)))
+	   (list :tag Maximum scale/zoom
+		 (const :format   maximum-scale)
+		   

Re: [O] org-cite and org-citeproc

2015-04-01 Thread Richard Lawrence
Rasmus ras...@gmx.us writes:

 Richard Lawrence richard.lawre...@berkeley.edu writes:

 I don't really know anything about the ODT format, though.  My code
 more-or-less blindly pastes Pandoc-generated XML into the document
 during Org ODT export.  Can someone who knows more about the format take
 a look at the file and see if there is some subtle problem I'm not
 noticing?

 I can't test your code 'cause I, for personal/silly reasons, refuse to
 spend any more dealing with compiling Haskell.

Fair enough. :)

 That being said, my gut feeling is that you have to define the data
 elsewhere.

 For example, to add a (sub)title to a odt document the field/keyword is
 defined in a file different from contents.xml and will just not be printed
 if used in contents.xml only.

Hmm.  But the citations are all just represented as text:p
nodes...surely that doesn't have to be defined elsewhere?

I am now guessing that the problem is that you can't have one text:p
inside another.  Each paragraph is wrapped in a text:p, but so are the
citations within it...maybe that is not correct and so LibreOffice
doesn't like it.

 Also, the bibliography is not correct in the sense that if it was setup
 in the right semantic way, it would be gray in LO, like the TOC.

Do you know what other markup is required in this case?  It looks like
maybe the TOC is gray because it is marked with a text:protected
attribute, or maybe because it has an associated OrgIndexSection
style?
 
Thanks!

Best,
Richard




Re: [O] org-cite and org-citeproc

2015-04-01 Thread Richard Lawrence
Hi Tom and all,

Thanks for answering my questions!

t...@tsdye.com (Thomas S. Dye) writes:

 With natbib, it is possible to give a pre-note and a post-note to the
 citation as a whole, but not to individual citations within it.  In
 order to support your syntax fully, I think BibLaTeX is needed.

OK, good to know.

 (Also, do you think it is important to support plain BibTeX at all?  It
 seems like we should not bother with this problem unless it's important
 for a lot of people.  I personally would be fine with just targeting
 BibLaTeX, and it sounds like Eric would be too.)

 Well, one benefit of Aaron's function was to make this choice
 superfluous, both now and in the future.  It binds the two citation
 commands you've implemented to citation commands implemented in
 CITATION_STYLE.  As Aaron notes, it should be easy to modify this (to
 bind additional commands) when advanced citation support comes along.

I think I have to retract what I said earlier: I doubt this part of
Aaron's code still works in my branch, because I think Aaron was
assuming citation objects contain just one reference; in my branch, I've
merged in the parser support Nicolas later implemented for multi-cite
citations.  So a CITATION_MODE needs to know how to turn a list of
works, each with associated prefix and suffix data, into a complete
citation command.

This complicates things enough that probably custom citation modes
should be defined as Lisp functions, rather than via format
strings...what do you think?

I'm still having a hard time seeing what an analogous customization
would look like for non-LaTeX backends.  The LaTeX exporter is unique in
that Org produces output which must then be further processed by another
tool, so having customizable control over how a citation `looks' to that
tool makes sense.  But in other backends, the Org exporter itself
produces the final document; there's no intermediate representation
besides Org's own, plus whatever arguments are passed to a citation
processing tool like org-citeproc.  So, if that's right, the analogous
customization in a non-LaTeX backend would be something like a filter,
one that pre-processes citation objects before they are run through the
external tool, or that post-processes the strings that come back (or
both).  Does that make sense?  Certainly, both of those things are
possible.

 Typically, a bibliography style file defines several citation commands,
 which might belong to one or more modes.  ...
 I think you might be able to merge CSL_FILE and CITATION_STYLE, since
 they both point to a style file.

OK, I see, that makes things clearer.  Would it make sense to have two
keywords, say LATEX_CITE_STYLE and CSL_FILE or similar, so that the
style can vary independently when exporting to LaTeX vs. non-LaTeX?  I'm
thinking it will be tricky to come up with a single set of values for a
CITATION_STYLE keyword that can be correctly mapped to both kinds of
backend.  Or maybe CITATION_STYLE should have sub-keywords, like

#+CITATION_STYLE: biblatex:authoryear csl:chicago-author-date.csl

or something similar?

Best,
Richard




Re: [O] Define org-capture-templates with variables via customize

2015-04-01 Thread Xavier Maillard

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Nick Dokos ndo...@gmail.com writes:

 Trying to just read Xavier's email message in Gnus, I get the following
 backtrace (with unprintable characters replaced by periods) - to me, this
 looks like a bug somewhere, but not sure where:

 Debugger entered--Lisp error: (error Before first headline at position 114 
 in buffer *fontification*2)

 Fixed in c1a744659d2b44c067ecb195b3e5d51e837bddd1. Thank you.

Glad you fixed that bug. Now that I am visible, is there any way to achieve 
what I need
? :D

Regards

-- Xavier.



Re: [O] org-cite and org-citeproc

2015-04-01 Thread Rasmus
Hi,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 That being said, my gut feeling is that you have to define the data
 elsewhere.

 For example, to add a (sub)title to a odt document the field/keyword is
 defined in a file different from contents.xml and will just not be printed
 if used in contents.xml only.

 Hmm.  But the citations are all just represented as text:p
 nodes...surely that doesn't have to be defined elsewhere?

You are right.  Also, oolatex inserts citations as plain text as well.  As
I recall, it can be done semantically and section 6.3 of the odt
standard suggest that this may be true, but it's not immediately obvious
how to do it.

 I am now guessing that the problem is that you can't have one text:p
 inside another.  Each paragraph is wrapped in a text:p, but so are the
 citations within it...maybe that is not correct and so LibreOffice
 doesn't like it.

I don't think text:p can be nested cf.

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415138_253892949

 Also, the bibliography is not correct in the sense that if it was setup
 in the right semantic way, it would be gray in LO, like the TOC.

 Do you know what other markup is required in this case?  It looks like
 maybe the TOC is gray because it is marked with a text:protected
 attribute, or maybe because it has an associated OrgIndexSection
 style?

It has to be formatted as a bibliography.

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-text_bibliography

I've attached a minimal oolatex example (mk4ht oolatex test.tex) of

\documentclass{article}
\usepackage[english]{babel}
\usepackage[authordate]{biblatex-chicago}
\addbibresource{~/documents/literature/lit.bib}
\begin{document}
before \textcite[pre][post]{schulte12} and after
\printbibliography
\end{document}

Hope it helps,
Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding


test.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] replace letf with cl-letf in org-mime

2015-04-01 Thread Eric Abrahamsen
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 If I remove the two `eval's and treat hook like a normal variable, the
 call to `length' fails with:

 Wrong type argument: sequencep, org-mime-pre-org-hook

 So apparently `length' is seeing the symbol name, and not the symbol
 value.

 Indeed.

 I tried changing the `let' to look like:

 (let ((hook (symbol-value (intern (

 What about (length (symbol-value hook)) instead?

 Here's a fixed version of the previous patch.

 Thank you. Applied.

 I suppose I could also alter the bhook thing to use `symbol-value'
 instead of `eval', but that doesn't seem to be a net gain.

 IMO, anything is a net gain compared to using `eval'.

Makes sense -- here's a fix for that.

Eric

From fc2c492b0e511d157664bf79ce0ba44031f3223b Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Thu, 2 Apr 2015 09:29:29 +0800
Subject: [PATCH] org-mime.el: Avoid use of eval

* contrib/lisp/org-mime.el (org-mime-compose):  Use a different
  workaround for operating on the symbol vs symbol value.
---
 contrib/lisp/org-mime.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 1e7a3b8..3414876 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -292,11 +292,11 @@ export that region, otherwise export the entire body.
 	   (let ((hook (intern (concat org-mime-pre-
    (symbol-name fmt)
    -hook
-	 (if ( (eval `(length ,hook)) 0)
+	 (if ( (length (symbol-value hook)) 0)
 		 (with-temp-buffer
 		   (insert body)
 		   (goto-char (point-min))
-		   (eval `(run-hooks ',hook))
+		   (run-hooks hook)
 		   (buffer-string))
 	   body
 	(fmt (if (symbolp fmt) fmt (intern fmt
-- 
2.3.5



Re: [O] replace letf with cl-letf in org-mime

2015-04-01 Thread Nicolas Goaziou
Eric Abrahamsen e...@ericabrahamsen.net writes:

 If I remove the two `eval's and treat hook like a normal variable, the
 call to `length' fails with:

 Wrong type argument: sequencep, org-mime-pre-org-hook

 So apparently `length' is seeing the symbol name, and not the symbol
 value.

Indeed.

 I tried changing the `let' to look like:

 (let ((hook (symbol-value (intern (

What about (length (symbol-value hook)) instead?

 Here's a fixed version of the previous patch.

Thank you. Applied.

 I suppose I could also alter the bhook thing to use `symbol-value'
 instead of `eval', but that doesn't seem to be a net gain.

IMO, anything is a net gain compared to using `eval'.


Regards,



Re: [O] org-cite and org-citeproc

2015-04-01 Thread Thomas S. Dye
Aloha Richard,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 Hi Tom and all,

 Thanks for answering my questions!

 t...@tsdye.com (Thomas S. Dye) writes:

 With natbib, it is possible to give a pre-note and a post-note to the
 citation as a whole, but not to individual citations within it.  In
 order to support your syntax fully, I think BibLaTeX is needed.

 OK, good to know.

 (Also, do you think it is important to support plain BibTeX at all?  It
 seems like we should not bother with this problem unless it's important
 for a lot of people.  I personally would be fine with just targeting
 BibLaTeX, and it sounds like Eric would be too.)

 Well, one benefit of Aaron's function was to make this choice
 superfluous, both now and in the future.  It binds the two citation
 commands you've implemented to citation commands implemented in
 CITATION_STYLE.  As Aaron notes, it should be easy to modify this (to
 bind additional commands) when advanced citation support comes along.

 I think I have to retract what I said earlier: I doubt this part of
 Aaron's code still works in my branch, because I think Aaron was
 assuming citation objects contain just one reference; in my branch, I've
 merged in the parser support Nicolas later implemented for multi-cite
 citations.  So a CITATION_MODE needs to know how to turn a list of
 works, each with associated prefix and suffix data, into a complete
 citation command.

 This complicates things enough that probably custom citation modes
 should be defined as Lisp functions, rather than via format
 strings...what do you think?

 I'm still having a hard time seeing what an analogous customization
 would look like for non-LaTeX backends.  The LaTeX exporter is unique in
 that Org produces output which must then be further processed by another
 tool, so having customizable control over how a citation `looks' to that
 tool makes sense.  But in other backends, the Org exporter itself
 produces the final document; there's no intermediate representation
 besides Org's own, plus whatever arguments are passed to a citation
 processing tool like org-citeproc.  So, if that's right, the analogous
 customization in a non-LaTeX backend would be something like a filter,
 one that pre-processes citation objects before they are run through the
 external tool, or that post-processes the strings that come back (or
 both).  Does that make sense?  Certainly, both of those things are
 possible.

Yes, I think an export filter would work for LaTeX.

The general form for BibLaTeX is:

\cites(⟨multiprenote⟩)(⟨multipostnote⟩)[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}...[⟨prenote⟩][⟨postnote⟩]{⟨key⟩}

where \cites can also be \parencites, \textcites, etc.

For natbib it is:

\cite[⟨prenote⟩][⟨postnote⟩]{⟨key⟩,...⟨key⟩}

where \cite can also be \citep, \citet, etc.


 Typically, a bibliography style file defines several citation commands,
 which might belong to one or more modes.  ...
 I think you might be able to merge CSL_FILE and CITATION_STYLE, since
 they both point to a style file.

 OK, I see, that makes things clearer.  Would it make sense to have two
 keywords, say LATEX_CITE_STYLE and CSL_FILE or similar, so that the
 style can vary independently when exporting to LaTeX vs. non-LaTeX?  I'm
 thinking it will be tricky to come up with a single set of values for a
 CITATION_STYLE keyword that can be correctly mapped to both kinds of
 backend.  Or maybe CITATION_STYLE should have sub-keywords, like

 #+CITATION_STYLE: biblatex:authoryear csl:chicago-author-date.csl

Won't the backends sort this out without the additional mapping?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] INCLUDE heading

2015-04-01 Thread Joon Ro
Rob Richmond robbyr at gmail.com writes:

 
 
 Hi all,
 I use org-mode to write both papers and slides. The code to generate tables 
and figures is placed in source blocks. Most of the time I use the same 
tables in my slides as in my papers, but a lot of preprocessing code is 
needed to generate the tables. I'd like to put the generation of these tables 
in its own org-mode file and just be able to include certain headings in the 
paper or slide document. For example, I would have an org-mode document 
called mytables.org:
     * Heading 1
     ** Regressions
     #+BEGIN_SRC R
     cat(hello world)
     #+END_SRC R
     * Heading 2
 
 And another document mypaper.org:
     * Section 1
     #+INCLUDE: mytables.org :heading Heading 1/Regressions
     * Section 2
 The content from below the ** Regression headline in mytables.org would be 
included on export in mypaper.org. It would also be great to be able to 
follow the INCLUDE to the file with C-c '. Org provides some facilities for 
these includes, but does not allow for headings ( 
http://orgmode.org/manual/Include-files.html ). Obviously org does not have 
the :heading parameter, but any suggestions for a solution to make this work 
are greatly appreciated. It looks like org-export-expand-include-keyword is 
doing a lot of the magic of including the files, but I'm not sure where to go 
from there.
 

I would love to have this feature (include only a subtree from another org 
file) as well.




Re: [O] [org.texi] New keywords tables

2015-04-01 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 If there's no disagreements I would like to push the following patches.
 After that I will update the doc changes of the SUBTITLE patch and push
 that.

It looks good. Thank you.

Regards,



Re: [O] INCLUDE heading

2015-04-01 Thread Rasmus
Joon Ro joon...@outlook.com writes:

 I would love to have this feature (include only a subtree from another org 
 file) as well.

You can do this in Org v8.3.

-- 
Vote for proprietary math!




Re: [O] [org.texi] New keywords tables

2015-04-01 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 It looks good. Thank you.

Pushed.

-- 
Bang bang



Re: [O] [BUG] S-tab shows sub-headlines of archived headlines when org-inlinetask is loaded

2015-04-01 Thread Nicolas Goaziou


Hello,

Francesco Pizzolante
fpz-djc/ipccudyqhejpep6iedvlejwur...@public.gmane.org writes:

 I would like to bump up this thread.

 I'm still having this issue while using the latest ELPA version of
 org-plus-contrib.

Fixed in 03e81f0d240271d072fd155d41e59b6b353abaa9. Thank you.

Regards,

-- 
Nicolas Goaziou




[O] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-01 Thread John Hendy
I just pulled for the first time in a while and found I get question
marks in my agenda view instead of the former use of the file name
(see attached). I did a bunch of git pulling/make cleaning/making, and
traced it to this commit from Nicholas:
- 80bccca4e249cbb5812963863ccffbdcf4b25edd

Commit c1a744659d2b44c067ecb195b3e5d51e837bddd is working properly.

I verified with a minimal config containing only:

(add-to-list 'load-path ~/.elisp/org.git/lisp/)

My test file contained:

* TODO something

* TODO something else

Process:
- emacs -Q
- M-x load-file [RET] /path/to/min-config
- M-x org-agenda-file-to-front
- M-x org-agenda [RET] t

I get the attached view.


Thanks for any suggestions,
John


[O] getting an hline in a python generated table

2015-04-01 Thread John Kitchin
Hi everyone,

In emacs-lisp, I can get a table as output that has a horizontal line
in it like this:

(append '((name scopus-id h-index n-docs n-citations))
'(hline)
(some expression that generates a list))

The first row is header names, then a horizontal line, followed by a row
for each thing of interest. This seems to work because the result is an
emacs-lisp array.

I cannot figure out if this is possible in a Python block though. So far
my experiments have failed because I don't know how to make an hline
symbol in a Python array. Any kind of string just shows as a row. Any
thoughts on if this is possible?

thanks,

--
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



Re: [O] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-01 Thread Nicolas Goaziou
Hello,

John Hendy jw.he...@gmail.com writes:

 I just pulled for the first time in a while and found I get question
 marks in my agenda view instead of the former use of the file name
 (see attached). I did a bunch of git pulling/make cleaning/making, and
 traced it to this commit from Nicholas:
 - 80bccca4e249cbb5812963863ccffbdcf4b25edd

 Commit c1a744659d2b44c067ecb195b3e5d51e837bddd is working properly.

 I verified with a minimal config containing only:

 (add-to-list 'load-path ~/.elisp/org.git/lisp/)

 My test file contained:

 * TODO something

 * TODO something else

 Process:
 - emacs -Q
 - M-x load-file [RET] /path/to/min-config
 - M-x org-agenda-file-to-front
 - M-x org-agenda [RET] t

Fixed in 22bf1b8ae3c2842945b9b9d9ab2ca203eae17946. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] INCLUDE heading

2015-04-01 Thread Rasmus
Joon Ro joon...@outlook.com writes:

 From: ras...@gmx.us
 Date: Wed, 1 Apr 2015 21:42:43 +0200

 Subject: Re: [O] INCLUDE heading
 
 Joon Ro joon...@outlook.com writes:
 
  I would love to have this feature (include only a subtree from another org 
  file) as well.
 
 You can do this in Org v8.3.
 

 Thanks - I'm glad to hear that - in fact I just installed 8.3beta
 yesterday so I'm good to go. I couldn't find the relevant
 documentation though - could you please refer me to it?

Try:

(info (org) Include Files)

Be sure to check the 8.3 manual and not the 8.2 manual.


-- 
There are known knowns; there are things we know that we know



Re: [O] Function that jumps to an entry with a certain CUSTOM_ID

2015-04-01 Thread Nicolas Goaziou
Christoph Lange math.semantic@gmail.com writes:

 On Mar 31, 2015 9:53 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 The problem is that we're running out of interesting keybindings.

 Let me ask the question differently: as all reasonable key bindings are
 taken (a statement to which I tend to agree), is the suggestion of
 interactive functions to be added to the core of org-mode no longer
 appropriate?

IMO we can't afford maintaining all end-user functions imaginable in
org.el. What is possible, however is to extend some existing
behaviour.

For example, `org-open-at-point' could be a good candidate: with C-u
C-u, it could offer to type in a link and open it. So, in order to jump
to a custom-id, you can use

  C-u C-u C-o #my-custom RET

Of course, you lose completion, in this case, which is a serious
drawback.

Another option would be to extend `org-goto' (C-c C-j) and offer to jump
to custom-id.

 But I think I should rather aim at Worg's contrib directory,

There's no such thing as Worg contrib directory. There's Worg, OT1H,
and a contrib/ directory OTOH, but they are not related.

Worg is a good place to share useful code snippets.


Regards,



Re: [O] INCLUDE heading

2015-04-01 Thread Joon Ro
 From: ras...@gmx.us
 Date: Wed, 1 Apr 2015 21:42:43 +0200
 Subject: Re: [O] INCLUDE heading
 
 Joon Ro joon...@outlook.com writes:
 
  I would love to have this feature (include only a subtree from another org 
  file) as well.
 
 You can do this in Org v8.3.
 

Thanks - I'm glad to hear that - in fact I just installed 8.3beta yesterday so 
I'm good to go. I couldn't find  the relevant documentation though - could you 
please refer me to it? 
-Joon 

Re: [O] getting an hline in a python generated table

2015-04-01 Thread Rasmus
Hi John,

John Kitchin jkitc...@andrew.cmu.edu writes:

 In emacs-lisp, I can get a table as output that has a horizontal line
 in it like this:

 (append '((name scopus-id h-index n-docs n-citations))
 '(hline)
 (some expression that generates a list))

 The first row is header names, then a horizontal line, followed by a row
 for each thing of interest. This seems to work because the result is an
 emacs-lisp array.

 I cannot figure out if this is possible in a Python block though. So far
 my experiments have failed because I don't know how to make an hline
 symbol in a Python array. Any kind of string just shows as a row. Any
 thoughts on if this is possible?

I'd be lazy and just use the :post argument.  So something like the
following.  I'm pretty sure I once wrote a :post function that took
negative number (to add a final hline), but I couldn't find it...

#+BEGIN_SRC python :post add-hline(tbl=*this*)
return([ [a], [1], [2]])
#+END_SRC

#+RESULTS:
|---|
| a |
|---|
| 1 |
| 2 |

#+name: add-hline
#+BEGIN_SRC emacs-lisp :var tbl='((a) (b) (c)) hlines='(0 1)
  (loop for hline in
(mapcar* '+ hlines 
 (number-sequence 0 (length hlines)))
do (setq tbl (append (subseq tbl 0 hline)
 '(hline)
 (subseq tbl hline
tbl
#+END_SRC

Hope it helps,
Rasmus

-- 
With monopolies the cake is a lie!




Re: [O] [ox, patch] #+SUBTITLE

2015-04-01 Thread Rasmus
Hi,

 For the record, if the situation ever rises again, I think that
 a keyword can be added to ox.el only if

   - it is supported at least in every major back-end (ASCII, HTML,
 LaTeX, ODT and Texinfo)
   - it comes with a toggle in the OPTIONS line e.g. keyword:nil

 For subtitle I'm reusing :with-title.  If you think it necessary, I can
 add a :with-subtitle, but I didn't think it was necessary.

 It doesn't apply here since SUBTITLE isn't defined in ox.el. You can
 do whatever you think is appropriate for SUBTITLE.

I mainly changed documentation.

It would still be good if somebody who knows html and css would comment on
the implemented style in ox-html.

—Rasmus

-- 
I feel emotional landscapes they puzzle me
From 56af4153a12383de5b69f290d420f8f01b7b5f2a Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sun, 1 Mar 2015 22:09:19 +0100
Subject: [PATCH] ox: Add SUBTITLE property in some backends

* ox-ascii.el (org-ascii-template--document-title)
  (org-ascii-template--document-title)
  ox-deck.el (org-deck-title-slide-template)
  ox-s5.el (org-s5-title-slide-template)
  ox-html.el (org-html--build-meta-info, org-html-format-spec)
  (org-html--build-meta-info, org-html-format-spec)
  (org-html--build-meta-info, org-html-format-spec)
  ox-org.el (org), (org-org-keyword): Use SUBTITLE.
* ox-beamer.el (org-beamer-template)
  ox-html (org-html-template)
  ox-latex.el (org-latex-template)
  ox-org (org-org-template): Insert SUBTITLE.
* ox-html (org-html-preamble-format) (org-html-postamble-format):
  Update docstring.
* ox-html (org-html-style-default): Add .subtitle style and
  change .title style.
* ox-texinfo.el (org-texinfo-template): Interpret subtitle.
* org.texi (ASCII/Latin-1/UTF-8 export): New section.
  (Beamer specific export settings)
  (HTML Specific export settings)
  (@LaTeX{} specific export settings)
  (ODT specific export settings)
  (ASCII/Latin-1/UTF-8 export): Document SUBTITLE.
* ORG-NEWS: Add entry on SUBTITLE.

The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
---
 contrib/lisp/ox-deck.el |  7 +++
 contrib/lisp/ox-s5.el   |  7 +++
 doc/org.texi| 45 +++--
 etc/ORG-NEWS| 33 -
 lisp/ox-ascii.el| 22 +-
 lisp/ox-beamer.el   | 20 +++-
 lisp/ox-html.el | 37 +++--
 lisp/ox-latex.el| 49 -
 lisp/ox-odt.el  | 30 --
 lisp/ox-texinfo.el  | 10 +++---
 10 files changed, 207 insertions(+), 53 deletions(-)

diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index 7155863..915373f 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -38,6 +38,12 @@
 ;; See ox.el and ox-html.el for more details on how this exporter
 ;; works (it is derived from ox-html.)
 
+;; TODOs
+;; --
+;; The title page is formatted using format-spec.  This is error prone
+;; when details are missing and may insert empty tags, like h2/h2,
+;; for missing values.
+
 (require 'ox-html)
 (eval-when-compile (require 'cl))
 
@@ -261,6 +267,7 @@ Defaults to styles for the title page.
 
 (defcustom org-deck-title-slide-template
   h1%t/h1
+h2%s/h2
 h2%a/h2
 h2%e/h2
 h2%d/h2
diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index b003919..503bfd0 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -48,6 +48,12 @@
 ;; in an Org mode buffer.  See ox.el and ox-html.el for more details
 ;; on how this exporter works.
 
+;; TODOs
+;; --
+;; The title page is formatted using format-spec.  This is error prone
+;; when details are missing and may insert empty tags, like h2/h2,
+;; for missing values.
+
 (require 'ox-html)
 (eval-when-compile (require 'cl))
 
@@ -174,6 +180,7 @@ or an empty string.
 
 (defcustom org-s5-title-slide-template
   h1%t/h1
+h2%s/h2
 h2%a/h2
 h3%e/h3
 h4%d/h4
diff --git a/doc/org.texi b/doc/org.texi
index 2ab1bfe..6401399 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10926,6 +10926,17 @@ When the original file is @file{myfile.txt}, the resulting file becomes
 Export to a temporary buffer.  Do not create a file.
 @end table
 
+@subheading ASCII specific export settings
+
+ASCII export introduces a single of keywords, similar to the general options
+settings described in @ref{Export settings}.
+
+@table @samp
+@item SUBTITLE
+@cindex #+SUBTITLE (ASCII)
+The document subtitle.
+@end table
+
 @subheading Header and sectioning structure
 
 In the exported version, the first three outline levels become headlines,
@@ -11063,6 +11074,14 @@ inserted as metadata using @samp{hyperref}.  Document metadata can be
 configured via @code{org-latex-hyperref-template}.  Description can also be
 typeset as part of the front matter via @code{org-latex-title-command}.  You
 can use several @code{#+KEYWORDS} if the description is is long.
+
+@item