Re: [O] HTML presentations using org-html-slideshow?

2017-03-07 Thread Peter Salazar
If anyone's interested, there's a new working version of
org-html-slideshow that's compatible with org-mode 9.x available here:
https://github.com/aiba/org-html-slideshow.

On Mon, Mar 6, 2017 at 10:04 AM, Peter Salazar 
wrote:

> Hi everyone,
>
> I've been using the excellent org-html-slideshow (
> https://github.com/relevance/org-html-slideshow) to generate HTML slides
> from org-mode, and it's been working well for me for years.
>
> It generates HTML slides from org-mode using the org-mode heading
> hierarchy. Tag any heading with the org-tag :slide: and that heading and
> its contents automatically become their own slide once you export to HTML
> using org-export-dispatch.
>
> I prefer org-html-slideshow to org-reveal since it allows me the ability
> to easily customize the look and feel of slides—by creating a custom
> slide—simply by adding an org-tag. So if I tag an org-heading with the tag
> :fullscreenslide: for example (so that the heading looks like * Heading
> :slide:fullscreenslide:), it will then export that slide to HTML with
> class="fullscreenslide" — and I can then use CSS to customize the look and
> feel of all slides with that class.
>
> Org-html-slideshow also offers a great Presenter View, which opens in a
> separate tab in your browser, and displays your speaker notes, the current
> slide, and the next slide. Unfortunately, org-html-slideshow is no longer
> being actively developed, and a recent update to org-mode has broken the
> way Presenter View functions. Somehow with the new org-mode updates, the
> "next slide" view in Presenter Notes mode no longer advances correctly. The
> "next slide" slide gets stuck in a loop of 4-5 slides, and just repeats
> those few slides. It does not reliably show you what the next slide is
> going to be.
>
> I notice that the output from example.org when I export to HTML is fairly
> different from the example.html that's in the repo. Something in those
> differences is breaking the ability of Presenter Notes to advance to the
> next slide:
> https://gist.github.com/incandescentman/dca040c750a3e9e7e687942d69ebd53f
>
> Anyone else using org-html-slideshow? Does anyone have any thoughts on how
> to get this working again? Thanks!
>


Re: [O] how to export to HTML using old-style numbered div ID's?

2017-03-07 Thread Peter Salazar
Thank you so much for the responses! In fact I did try filing a bug report
to the org-html-slideshow developers, but the project is no longer under
active development and I never heard back.

Fortunately, I was able to convince a friend who's a ClojureScript expert
to take a look. He forked the org-html-slideshow project and updated the
code to be compatible with the new org-mode export, as well as adding a
bunch of extra features like a play/pause keystroke for HTML5 videos and
YouTube videos.

So if anyone's interested in HTML presentations, a new and improved version
of org-html-slideshow that's compatible with org-mode 9.x is available at:
https://github.com/aiba/org-html-slideshow.

Thanks everyone!



On Tue, Mar 7, 2017 at 2:55 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Nick Dokos  writes:
>
> > Peter Salazar  writes:
> >
> >> Hi everyone,
> >>
> >> I figured out that the problem I've been having with
> >> org-html-slideshow
> >> (https://github.com/relevance/org-html-slideshow) is that it relies
> >> on the old-style numbered anchors that org-mode used to generate for
> >> div ID's in HTML export—the ones that looked like "sec-1-2".
> >>
> >> Example:
> >>
> >> 
> >> 
> >>
> >> As you know, the new 8.x org-mode HTML exporter generates this instead:
> >>
> >>  
> >>  
> >>
> >> This output confuses org-html-slideshow, preventing it from
> >> correctly advancing the slides in the presenter view.
> >>
> >> Does anyone know how can I direct org-mode 8.x to generate div tags
> >> with the old-style numbered anchors like it used to?
> >
> > The LaTeX exporter *does* have such a capability, through the
> > variable org-latex-prefer-user-labels,
>
> Not exactly. The variable above allows overriding the default naming
> scheme whenever the user provides additional information. However,
> AFAIU, the OP wants to alter the default scheme, without any user
> interaction.
>
> This is not possible. I suggest to report it as a bug to
> org-html-slideshow developers so they can update it.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>


Re: [O] Justifying a formula

2017-03-07 Thread Nick Dokos
Lawrence Bottorff  writes:

> Here's what I have in a buffer:
>
> * This basic pseudo-code tells of an internally-defined variable that holds, 
> /accumulates/ as the recursion drills down:
>
> \begin{align*}
> sumprod(x) \equiv if \; eq(x,NIL) \; then \; 2.list(s,p) \\
>  else \\
>   \{let \; z = sumprod(cdr(x)) \\
>     2.list(car(z) + car(x), car(cdr(z) \cdot car(x))\}
> \end{align*}
>
> which produces this as HTML:
>
> sumprod(x) ≡ if eq(x,NIL) then 2.list(s,p)
>                                                         else
>                          {let z = sumprod(cdr(x))
>  2.list(car(z) + car(x), car(cdr(z) ⋅ car(x))}
>
> which seems to be right justified. How can I get normal left justification?

pdflatex produces the same thing I believe, so I doubt that the HTML
exporter or MathJax is to blame. I imagine you are going to have to
find something more appropriate than an align`* environment. In any
case, you need some ampersands to tell it where to align. See e.g.

https://fr.sharelatex.com/learn/Aligning_equations_with_amsmath


>
> BTW,
>
> #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
>
> seems to be ignored. Latex seems to have
>
> \usepackage[fleqn]{amsmath}
>
> but I'm assuming org-mode HTML export doesn't really use this. (Actually, 
> Latex export ignores
>
> #+LaTeX_HEADER: \usepackage{mathtools}
> #+LaTeX_HEADER: \usepackage[fleqn]{mathtools}
>
> as well.)
>

Not here, it doesn't: I kept the second one in my org file, and latex export
produces this partial output:

,
| % Created 2017-03-07 Tue 22:58
| % Intended LaTeX compiler: pdflatex
| \documentclass[11pt]{article}
| \usepackage[utf8]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage{graphicx}
| \usepackage{grffile}
| \usepackage{longtable}
| \usepackage{wrapfig}
| \usepackage{rotating}
| \usepackage[normalem]{ulem}
| \usepackage{amsmath}
| \usepackage{textcomp}
| \usepackage{amssymb}
| \usepackage{capt-of}
| \usepackage{hyperref}
| \usepackage{minted}
| \usepackage[fleqn]{mathtools}
| \author{Nick Dokos}
| \date{\today}
| \title{}
| \hypersetup{
|  pdfauthor={Nick Dokos},
|  pdftitle={},
|  pdfkeywords={},
|  pdfsubject={},
|  pdfcreator={Emacs 26.0.50.2 (Org mode 9.0.5)}, 
|  pdflang={English}}
| \begin{document}
| 
| \tableofcontents
`

> Latest, greatest everything.
>
> LB
>
>  
>

-- 
Nick




Re: [O] Writing exams

2017-03-07 Thread Doyley, Marvin M.
Thanks for the list.  I will try them out.

Cheers,
M
> On Mar 7, 2017, at 11:01 AM, Samuel Loury  wrote:
> 
> Samuel Loury  writes:
> 
>> "Doyley, Marvin M."  writes:
>> 
>>> Does anybody have a good system for writing exam in Org-mode ?
> 
>> - 
>> http://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/
>> - https://github.com/jkitchin/jmax/tree/master/techela
>> - http://www-public.tem-tsp.eu/~berger_o/org-teaching/
>> - https://github.com/gjkerns/samplequiz
> 
> Forgot https://github.com/mbork/org-edu-html
> 
> --
> Konubinix
> GPG Key: 7439106A
> Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] ascii section references for id links can be inline?

2017-03-07 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> On 3/7/17, Nicolas Goaziou  wrote:
>>> === possible new output
>>> Some recent test results are in section 6.2.2.2
>>> ===
>
>> You can remove the description. Otherwise, Org will do its best to use
>> it.
>
> in maint, [[id:...]] results in the filename, rather than the section
> number.

Odd. In maint, the following document

  * Headline
  :PROPERTIES:
  :id:   whatever
  :END:


  See [[id:whatever]] !

results in

  1 Headline
  ══

See 1 !


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-export-as

2017-03-07 Thread Nicolas Goaziou
Hello,

drymer  writes:

> I'm trying to debug the package org2nikola, which works on emacs-24.5
> but not on >emacs-25. What I'm trying to see is why the title is
> exported when using >emacs-25 but not when prior versions. For what I've
> being testing, it doesn't seem related to the package but to org-mode or
> emacs. I'll explain why I think this. An example text I want to export would 
> be:
>
>  ,---
>  | * TODO Testing:test:
>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>  |   pulvinar nibh.  Nam a sapien.
>  `---
>
> I would execute the function `org2nikola-export-subtree' in the
> header. More or less, this function would guide us until the next
> function with the above text, but not the header, marked as a region:
>
>  ,
>  | (org-export-as 'html t nil t)
>  `
>
> In emacs-24.5 this function returns:
>
>  ,
>  | 
>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec 
> facilisis
>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc 
> porta
>  | vulputate tell us.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam 
> posuere.
>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, 
> quis
>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit 
> hendrerit,
>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur 
> vulputate
>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci 
> ultrices
>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est 
> convallis
>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>  | 
>  `
>
> In >emacs-25 this function returns:
>
>  ,
>  | 
>  | Testing
>  | 
>  | 
>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec 
> facilisis
>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc 
> porta
>  | vulputate tellus.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam 
> posuere.
>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, 
> quis
>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit 
> hendrerit,
>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur 
> vulputate
>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci 
> ultrices
>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est 
> convallis
>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>  | 
>  | 
>  | 
>  `

FWIW, I cannot reproduce it. When calling (org-export-as 'html t nil t)
gets me the the first output. However, I get the latter when region
includes the heading.

Actually you cannot have both a region and subtree export. Pick the one
you need.

Regards,

-- 
Nicolas Goaziou



Re: [O] verse html export

2017-03-07 Thread Nicolas Goaziou
Hello,

Skip Collins  writes:

> The following block exports to LaTeX/PDF as expected, with a break
> between the first and second line:
>
> #+BEGIN_VERSE
> First line
> Second line
> #+END_VERSE
>
> The HTML export does not have a line break, so the text runs together
> on the same line when shown in the browser:
> 
> First line
> Second line
> 
>
> I expect that there should be a  tag at the end of the first
> line.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] ascii section references for id links can be inline?

2017-03-07 Thread Samuel Wales
On 3/7/17, Nicolas Goaziou  wrote:
>> === possible new output
>> Some recent test results are in section 6.2.2.2
>> ===

> You can remove the description. Otherwise, Org will do its best to use
> it.

in maint, [[id:...]] results in the filename, rather than the section number.



[O] Justifying a formula

2017-03-07 Thread Lawrence Bottorff
Here's what I have in a buffer:

* This basic pseudo-code tells of an internally-defined variable that
holds, /accumulates/ as the recursion drills down:

\begin{align*}
sumprod(x) \equiv if \; eq(x,NIL) \; then \; 2.list(s,p) \\
 else \\
  \{let \; z = sumprod(cdr(x)) \\
2.list(car(z) + car(x), car(cdr(z) \cdot car(x))\}
\end{align*}

which produces this as HTML:

sumprod(x) ≡ if eq(x,NIL) then 2.list(s,p)
else
 {let z = sumprod(cdr(x))
 2.list(car(z) + car(x), car(cdr(z) ⋅ car(x))}

which seems to be right justified. How can I get normal left justification?

BTW,

#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler

seems to be ignored. Latex seems to have

\usepackage[fleqn]{amsmath}

but I'm assuming org-mode HTML export doesn't really use this. (Actually,
Latex export ignores

#+LaTeX_HEADER: \usepackage{mathtools}
#+LaTeX_HEADER: \usepackage[fleqn]{mathtools}

as well.)

Latest, greatest everything.

LB


[O] verse html export

2017-03-07 Thread Skip Collins
The following block exports to LaTeX/PDF as expected, with a break
between the first and second line:
#+BEGIN_VERSE
First line
Second line
#+END_VERSE

The HTML export does not have a line break, so the text runs together
on the same line when shown in the browser:

First line
Second line


I expect that there should be a  tag at the end of the first line.



[O] Bug: org-export-as

2017-03-07 Thread drymer

Hi,

I'm trying to debug the package org2nikola, which works on emacs-24.5
but not on >emacs-25. What I'm trying to see is why the title is
exported when using >emacs-25 but not when prior versions. For what I've
being testing, it doesn't seem related to the package but to org-mode or
emacs. I'll explain why I think this. An example text I want to export would be:

 ,---
 | * TODO Testing:test:
 |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
 |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
 |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
 |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
 |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
 |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
 |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
 |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
 |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
 |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
 |   pulvinar nibh.  Nam a sapien.
 `---

I would execute the function `org2nikola-export-subtree' in the
header. More or less, this function would guide us until the next
function with the above text, but not the header, marked as a region:

 ,
 | (org-export-as 'html t nil t)
 `

In emacs-24.5 this function returns:

 ,
 | 
 | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec 
facilisis
 | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc 
porta
 | vulputate tell us.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam 
posuere.
 | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, 
quis
 | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit 
hendrerit,
 | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur 
vulputate
 | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci 
ultrices
 | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est 
convallis
 | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
 | 
 `

In >emacs-25 this function returns:

 ,
 | 
 | Testing
 | 
 | 
 | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec 
facilisis
 | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc 
porta
 | vulputate tellus.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam 
posuere.
 | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, 
quis
 | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit 
hendrerit,
 | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur 
vulputate
 | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci 
ultrices
 | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est 
convallis
 | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
 | 
 | 
 | 
 `

In both emacs versions I have same results until I arribe here. I'm
not sure how to proceed to debug, any idea? Just ask me more information if 
needed.

PD: I attach my org-mode configuration since it's what is sugested,
but I don't know if it's relevant. I've only removed agenda related
variables.

Regards

 --



 Emacs : GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version
  3.18.9) of 2017-01-21 Package: Org mode version 9.0.5
  (release_9.0.5-28-g4108f5-git @
  /home/drymer/.emacs.d/el-get/org-mode-maint/lisp/)

 current state: `' (setq org-tab-first-hook
 '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-habit-show-all-today t org-footnote-section nil
 org-habit-preceding-days 7 org-speed-command-hook
 '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-time-clocksum-format '(:hours "%d" :require-hours t :minutes
 ":%02d" :require-minutes t) org-occur-hook
 '(org-first-headline-recenter) org-tab-follows-link t
 org-src-tab-acts-natively t org-metaup-hook
 '(org-babel-load-in-session-maybe) org-imenu-depth 9
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
 CONTENTS)"] org-latex-format-inlinetask-function
 'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function
 'org-ascii-format-inlinetask-default org-link-translation-function
 'toc-org-unhrefify org-export-default-language "es" org-emphasis-alist
 '(("`" (:foreground "cyan")) ("*" bold) ("/" italic) ("_" underline)
 ("'" org-verbatim verbatim) ("~" org-code verbatim) ("+"
 (:strike-through t))) org-pretty-entities t org-return-follows-link t
 org-latex-format-headline-function
 'org-latex-format-headline-default-function org-habit-following-days 0
 org-agenda-remove-tags t 

Re: [O] Writing exams

2017-03-07 Thread Samuel Loury
Samuel Loury  writes:

> "Doyley, Marvin M."  writes:
>
>> Does anybody have a good system for writing exam in Org-mode ?

> - http://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/
> - https://github.com/jkitchin/jmax/tree/master/techela
> - http://www-public.tem-tsp.eu/~berger_o/org-teaching/
> - https://github.com/gjkerns/samplequiz

Forgot https://github.com/mbork/org-edu-html

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] Writing exams

2017-03-07 Thread Samuel Loury
"Doyley, Marvin M."  writes:

> Does anybody have a good system for writing exam in Org-mode ?

Not tested personally, but with a quick look at my mailing archive
(notmuch search to:org-mode exams) , I could find:

- http://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/
- https://github.com/jkitchin/jmax/tree/master/techela
- http://www-public.tem-tsp.eu/~berger_o/org-teaching/
- https://github.com/gjkerns/samplequiz

Hope that helps.
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


[O] Writing exams

2017-03-07 Thread Doyley, Marvin M.
Does anybody have a good system for writing exam in Org-mode ?

Thanks,
M


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] Make target "card"

2017-03-07 Thread J. David Boyd
Thomas Rikl  writes:

> Hello,
>
> "make help" doesn't display the card target.
>
> "make doc"  doesn't make the orgcards.
>
> Is this behaviour intended?
>
> Thanks.


Does on mine.  You seeing any errors go by?




Re: [O] Editing the taskreport plan width value in taskjuggler taskreport output

2017-03-07 Thread Christian Egli
Rob Stewart  writes:

> The contents of the exported TaskJuggler .tjp file includes:
>
> # A traditional Gantt chart with a project overview.
> taskreport plan "" {
> headline "Project Plan"
> columns bsi, name, start, end, effort, chart
> loadunit shortauto
> hideresource 1
> }
>
> This renders HTML with a fairly narrow Gannt chart on wide screens.
>
> To widen the rendered Gannt chart, I modify the .tjp file manually
> using { width 1000 }, i.e.:
>
> columns bsi, name, start, end, effort, chart { width 1000 }
>
> Is there a way to set an option at the top of my org file, to
> manipulate the "columns... " line in the taskreport { .. } ?

Have you tried to customize org-taskjuggler-default-global-properties?
That might do what you're after.

HTH
Christian

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




[O] Make target "card"

2017-03-07 Thread Thomas Rikl
Hello,

"make help" doesn't display the card target.

"make doc"  doesn't make the orgcards.

Is this behaviour intended?

Thanks.




Re: [O] org-bbdb-anniversaries-future

2017-03-07 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Hello,
>
> Michael Welle  writes:
>
>> Maybe it's a tiny change, if we strip the comments ;). It's not too
>> sophisticated, everyone could have done it.
>
> I definitely think it _is_ a tiny change.
>
> Some comments follow.
thank you for the valuable comments. I think I've incorporated them all.
Furthermore I reworded some of the comments and I introduced a defvar,
so that the point in time, when to switch to the more general
descriptive text isn't hardcoded anymore, but customisable. 


> Also, could you provide a commit message?

Make anniversaries' time span information more descriptive in agenda.

* lisp/org-bbdb.el (org-bbdb-anniversary-description): New function.
(org-bbdb-general-anniversary-description-after): New variable.
(org-bbdb-anniversaries-future): Incorporate calculation of the description.


Regards
hmw

diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index f851668..0aa1ddb 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -138,6 +138,19 @@
   :group 'org-bbdb-anniversaries
   :require 'bbdb)
 
+(defcustom org-bbdb-general-anniversary-description-after 7
+  "When to switch anniversary descriptions to a more general format.
+Anniversary descriptions include the point in time, when the
+anniversary appears.  This is, in its most general form, just the
+date of the anniversary.  Or more specific terms, like 'today',
+'tomorrow' or 'in n days' are used to describe the time span.  If
+the anniversary is ORG-BBDB-GENERAL-ANNIVERSARY-DESCRIPTION-AFTER
+or more days in the future, the general description is used,
+otherwise the more specific description is used."
+  :type  'integer
+  :group 'org-bbdb-anniversaries
+  :require 'bbdb)
+
 (defcustom org-bbdb-anniversary-format-alist
   '(("birthday" .
  (lambda (name years suffix)
@@ -412,7 +425,25 @@ This is used by Org to re-create the anniversary hash table."
 (mapcar (lambda (i) (calendar-gregorian-from-absolute (+ abs i)))
 	(number-sequence 0 (1- n)
 
-;;;###autoload
+(defun org-bbdb-anniversary-description (agenda-date anniv-date)
+  "Return a string used to incorporate into an agenda anniversary entry.
+The calculation of the anniversary description string is based on
+the difference between the anniversary date, given as ANNIV-DATE,
+and the date on which the entry appears in the agenda, given as
+AGENDA-DATE.  This makes it possible to have different entries
+for the same event depending on if it occurs in the next few days
+or far away in the future."
+  (let ((delta (- (calendar-absolute-from-gregorian anniv-date)
+  (calendar-absolute-from-gregorian agenda-date
+
+(cond
+ ((= delta 0) " -- today\\&")
+ ((= delta 1) " -- tomorrow\\&")
+ ((< delta org-bbdb-general-anniversary-description-after) (format " -- in %d days\\&" delta))
+ ((pcase-let ((`(,month ,day ,year) anniv-date))
+	(format " -- %d-%02d-%02d\\&" year month day))
+
+
 (defun org-bbdb-anniversaries-future ( n)
   "Return list of anniversaries for today and the next n-1 days (default n=7)."
   (let ((n (or n 7)))
@@ -425,19 +456,17 @@ must be positive"))
 	  ;; Function to annotate text of each element of l with the
 	  ;; anniversary date d.
 	  (annotate-descriptions
-	   (lambda (d l)
+	   (lambda (agenda-date d l)
 	 (mapcar (lambda (x)
 		   ;; The assumption here is that x is a bbdb link
 		   ;; of the form [[bbdb:name][description]].
 		   ;; This function rather arbitrarily modifies
 		   ;; the description by adding the date to it in
 		   ;; a fixed format.
-		   (string-match "]]" x)
-		   (replace-match (format " -- %d-%02d-%02d\\&"
-	  (nth 2 d)
-	  (nth 0 d)
-	  (nth 1 d))
-  nil nil x))
+		   (let ((desc (org-bbdb-anniversary-description
+agenda-date d)))
+			 (string-match "]]" x)
+			 (replace-match desc nil nil x)))
 		 l
   ;; Map a function that generates anniversaries for each date
   ;; over the dates and nconc the results into a single list. When
@@ -447,12 +476,13 @@ must be positive"))
   (apply #'nconc
 	 (mapcar
 	  (lambda (d)
-		(let ((date d))
+		(let ((agenda-date date)
+		  (date d))
 		  ;; Rebind 'date' so that org-bbdb-anniversaries will
 		  ;; be fooled into giving us the list for the given
 		  ;; date and then annotate the descriptions for that
 		  ;; date.
-		  (funcall annotate-descriptions d (org-bbdb-anniversaries
+		  (funcall annotate-descriptions agenda-date d (org-bbdb-anniversaries
 	  dates)
 
 (defun org-bbdb-complete-link ()


Re: [O] Clock setup stopped working after update

2017-03-07 Thread Nicolas Goaziou
Hello,

Markus Heller  writes:

> So, I did some more digging into this.  First, I installed an older version
> of org:
>
> M-x org -version: Org-mode version 8.2.10 (8.2.10-41-g42228a-elpa @
> c:/Users/mheller/AppData/Roaming/.emacs.d/elpa/org-20150601/)

I cannot help you with such an old release.

However, did you check that `bh/organization-task-id' points to an
actual headline?

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Fix issue with ob-clojure not returning output

2017-03-07 Thread Nicolas Goaziou
Hello,

Tim Cross  writes:

> Sure. Commit message
>
> Fix incorrect argument call in ob-clojure.el
>
> org-babel-execute-clojure was calling nrepl-sync-request:eval and
> nrepl-request:eval with the session ID as the 3rd argument when the
> functions expected a clojure namespace. Replaced (cider-current-session)
> with (cider-current-ns).

Applied to master, since it doesn't apply correctly on maint.

I added TINYCHANGE at the end of the commit message since I don't know
if you signed FSF papers already.

Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738