Re: [O] Calc: Multiply time (hours) with a float

2016-09-18 Thread Michael Welle
Hello,

Michael Welle  writes:
[...]
> #+TBLFM: @2$3='(* $2 (org-time-string-to-hours "$1"));L
or converting $2 to a number before the calculation should work also,
but is more to write ;).

Regards
hmw



Re: [O] Calc: Multiply time (hours) with a float

2016-09-18 Thread Michael Welle
Hello,

Karl Voit  writes:

> * Michael Welle  wrote:
[...]
> ... which is working:
>
> | time [h:m:s] |   value | hours [float] |   product |
> |--+-+---+---|
> | 09:15:00 | 2.54321 |  9.25 | 23.524693 |
>
> #+TBLFM: $4=$2*$3::@2$3='(org-time-string-to-hours $1)
>
> However, when I try to calculate the product in one step, I get an error:
>
> | time [h:m:s] |   value | product |
> |--+-+-|
> | 09:15:00 | 2.54321 | #ERROR  |
>
> #+TBLFM: @2$3='(* $2 (org-time-string-to-hours $1))
>
> When I replace "$2" in TBLFM with an integer value, it works.
>
> How can I calculate the product in /one/ step?
chapter 3.5.3 of Org's info manual might be of interest here. I haven't
fully 'inhaled' it, but like this should work:

#+TBLFM: @2$3='(* $2 (org-time-string-to-hours "$1"));L

Regards
hmw



[O] [PATCH] Fix the call to `org-expiry-handler-function'

2016-09-18 Thread Samuel Loury
`org-expiry-handler-function' is meant to be a variable containing the symbol of
a function to be called.

Therefore, calling (funcall 'org-expiry-handler-function) results in a
void function error while (funcall org-expiry-handler-function)
correctly calls the contained function.

From 8eedc132e7524b78bf435cf41cf303257b4c73dc Mon Sep 17 00:00:00 2001
From: Konubinix 
Date: Thu, 6 Nov 2014 09:20:22 +0100
Subject: [PATCH 1/2] Fix the call to `org-expiry-handler-function'

* contrib/lisp/org-expiry.el (org-expiry-process-entry): Fix the call to
`org-expiry-handler-function'.

`org-expiry-handler-function' is meant to be a variable containing the symbol of
a function to be called. Therefore, calling
(funcall 'org-expiry-handler-function) results in a void function error while
(funcall org-expiry-handler-function) correctly calls the contained function.
---
 contrib/lisp/org-expiry.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/org-expiry.el b/contrib/lisp/org-expiry.el
index cd36d08..67dc89e 100644
--- a/contrib/lisp/org-expiry.el
+++ b/contrib/lisp/org-expiry.el
@@ -253,7 +253,7 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
 		 (not (interactive)))
 		(and org-expiry-confirm-flag
 		 (y-or-n-p (format "Entry expired by %d days.  Process? " d
-	  (funcall 'org-expiry-handler-function))
+	  (funcall org-expiry-handler-function))
 	(delete-overlay ov)
 
 (defun org-expiry-process-entries (beg end)
-- 
2.9.3

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


signature.asc
Description: PGP signature


[O] [PATCH] Indicate what happens to CLOCK entries in cloned subtrees

2016-09-18 Thread Samuel Loury
Hello,

This is a very small documentation patch to explain to the user what
will happen to the CLOCK entries of a cloned subtree.

From ea902d50e85c406376f5d54cf0e1652b7afaef26 Mon Sep 17 00:00:00 2001
From: Konubinix 
Date: Fri, 23 Jan 2015 08:53:47 +0100
Subject: [PATCH] Indicate what happens to CLOCK entries in cloned subtrees

* lisp/org.el (org-clone-subtree-with-time-shift): Add into the documentation
  string a precision about the deletion of the CLOCK entries into the cloned
  subtrees. Indicate the rational for this decision.
---
 lisp/org.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index a8ede1d..357731a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8903,6 +8903,9 @@ stamps in the subtree shifted for each clone produced.  If SHIFT
 is nil or the empty string, time stamps will be left alone.  The
 ID property of the original subtree is removed.
 
+In each clone, all the CLOCK entries will be removed. This prevents
+org-mode for considering that the clocked times overlap.
+
 If the original subtree did contain time stamps with a repeater,
 the following will happen:
 - the repeater will be removed in each clone
-- 
2.9.3

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


signature.asc
Description: PGP signature


[O] Captioning arbitrarily on HTML export?

2016-09-18 Thread David A. Gershman
Hello,

I have an HTML block:

   #+Caption: Diagram Caption
   #+Label: fig:diacap
   #+begin_html
 
  
   
   function drawme() {
  // code to draw on canvas object
   }
   
   #+end_html

and was wondering if there was a way to get an Org Export caption
generated?  According to the manual:
   
"12.9.10  Labels and captions in ODT export
  You can label and caption various category of objects—an inline
image, a table, a LATEX fragment
  or a Math formula—using #+LABEL and #+CAPTION lines."

While this is for ODT export, I've seen example online with people
putting captions on in-line images:

#+Caption: A pretty picture
#+Label: fig:ppic
[[file:path/to/image.jpg]]

But as you can see, I'm using JS to draw on a canvas and was wondering
if OrgExport could generate the captions.  I could always generate the
images via some other language and generate the file to do the
[[file:path/to/image.jpg]] method, but just thought I'd inquire first.

Thanks!

--dag




[O] Babel: a way to get the org-heading into source block

2016-09-18 Thread Benjamin Andresen
Hello,

small intro in case there is a better way than I thought up: I've just
started using Ledger and wanted to use Babel to tangle the ledger file.

Every entry is its own heading:

* <2016-07-01 Fri> * Hollywood | Monthly rent
#+begin_src ledger :tangle yes
07-01 * Hollywood | Monthly rent
Expenses:Rent 500.00 USD
Expenses:Rent:Parking spot 50.00 USD
Assets:BOA:Checking
#+end_src

I've written a function to basically do what I want:
(defun org-header-to-ledger (&optional point)
  (save-excursion
(re-search-backward org-ts-regexp)
(let* ((context (org-element-context))
   (year (org-element-property :year-start context))
   (month (org-element-property :month-start context))
   (day (org-element-property :day-start context))
   (title (cadr (split-string (org-element-property
   :title (org-element-property
   :parent context))
  (rx (or "]" ">"))
  (format "%04d-%02d-%02d%s" year month day title
;; (There are known bugs but for illustraton purposes this is suitable)

Now in babel I would basically want to not have repeated data, so my
entry should look like this:

* <2016-07-01 Fri> * Hollywood | Monthly rent
#+begin_src ledger :tangle yes
<>
Expenses:Rent 500.00 USD
Expenses:Rent:Parking spot 50.00 USD
Assets:BOA:Checking
#+end_src

The actual syntax is not that important, but something to that effect so
I only have to keep one headline up to date is what I'm looking for.

Is there a way to accomplish this right now? If there isn't, can you
point me to where I would add such functionality? AFAIK named src block
can already be inserted, I just don't know where in the source that is
found.

Thanks in advance and best regards,
Benny



Re: [O] Time to push the latest org to emacs-25 branch?

2016-09-18 Thread Achim Gratz
Nicolas Goaziou writes:
> Besides, I don't know what is the status of Org wrt Emacs, since some
> packages are going to be moved outside of Emacs core for development and
> bundled with Emacs only at the time of release.

My understanding of this discussion is that this will not happen for
Emacs 25.x.  Master is going to feed into Emacs 26, while the Emacs 25
branch stays open for bugfixes that didn't make it into 25.1, for a
possibly quick(er) release of 25.2.


Regards
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] docs don't make

2016-09-18 Thread Colin Baxter
On Sun, Sep 18 2016, Nicolas Goaziou wrote:

> Hello,
>
> Colin Baxter  writes:
>
>> The docs do not make in release_8.3.6-1140-gc74f4c. There is the
>> following error:
>>
>> makeinfo --no-split org.texi -o org
>> org.texi:10008: misplaced {
>> org.texi:10008: misplaced }
>
> It is the usual 1 am typo.
>
> Fixed. Thank you.
>
> Regards,

Yes, release_8.3.6-1141-ga1f51c is ok. Thank you.

Best wishes,

Colin.



[O] how to modify caption styles in odt file exported with org-odt-export-to-odt

2016-09-18 Thread Qiang Fang
Hello everyone,
My work requires me to use libreoffice. I have several questions using
org mode with libreoffice.

1 How to remove colon seperator in figure caption in odt files
exported from org mode?

2 How to change equation numbering to latex style, like  e=mc2
(Equation 1-1)

I am trying to get equation numbers aligned to the right, with section
number before equaiton number in that section, such as 1-1, 1-2, 2-1
... Just like the libreoffice TexMaths extension. Is there a way to
number the png images of the converted equations. The following is an
excerpt from my file:

#+OPTIONS: AUTHOR:nil toc:nil tex:imagemagick

#+name: eq:sinh
#+begin_equation
\begin{equation*}
\label{eq:sinh}
\dot{\epsilon}=AFexp[-Q/(RT)]
\end{equation*}
#+end_equation

Thank you so much!



Re: [O] Calc: Multiply time (hours) with a float

2016-09-18 Thread Karl Voit
* Michael Welle  wrote:
> Hello,

Hello Michael,

> Karl Voit  writes:
>
>> * Karl Voit  wrote:
>>> Hi!
>>>
>>> I do have following situation: I'd like to multiply a float with hours
>>> which results in an error, obviously. However, I was not able to find
>>> out how to do it.
>>>
>>> Minimal example with expected product:
>>> 
>>> | time [h:m:s] |   value | h * value |
>>> |--+-+---|
>>> | 09:15:00 | 2.54321 | 23.524693 |
>>>  #+TBLFM: @2$3=$2*$1
>>
> do you really need the result to be in decimal notation? 

If I want to implement my original idea (see my original posting):
yes.

> If not, 
> #+TBLFM:@2$3=$2*$1;T would work. If you need decimal notation you have
> to provide your own function, I think.

So I wrote some Elisp code:

  (defun org-time-string-to-seconds (s)
"Convert a string HH:MM:SS to a number of seconds.
 Omitted third element will be interpreted as MM:SS with missing hours."
;; test with:
;; (message (concat "result is: " (number-to-string 
(org-time-string-to-seconds "57:45:03"
;; (message (concat "result is: " (number-to-string 
(org-time-string-to-seconds "57:45"
(cond
 ((and (stringp s)
   (string-match "\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)" s))
  (let ((hour (string-to-number (match-string 1 s)))
(min (string-to-number (match-string 2 s)))
(sec (string-to-number (match-string 3 s
(+ (* hour 3600) (* min 60) sec)))
 ((and (stringp s)
   (string-match "\\([0-9]+\\):\\([0-9]+\\)" s))
  (let ((min (string-to-number (match-string 1 s)))
(sec (string-to-number (match-string 2 s
(+ (* min 60) sec)))
 ;;((stringp s) (string-to-number s))
 ;;(t s)
 )
)

  (defun org-time-string-to-hours (s)
"Convert a string HH:MM:SS to hours (float).
 When only two values given, they will be interpreted as MM:SS with missing 
hours."
;; test via:
;; (message (concat "result is: " (number-to-string 
(org-time-string-to-hours "57:45:03"
;; (message (concat "result is: " (number-to-string 
(org-time-string-to-hours "57:45"
(/ (org-time-string-to-seconds s) 3600.0)
)

... which is working:

| time [h:m:s] |   value | hours [float] |   product |
|--+-+---+---|
| 09:15:00 | 2.54321 |  9.25 | 23.524693 |
#+TBLFM: $4=$2*$3::@2$3='(org-time-string-to-hours $1)

However, when I try to calculate the product in one step, I get an error:

| time [h:m:s] |   value | product |
|--+-+-|
| 09:15:00 | 2.54321 | #ERROR  |
#+TBLFM: @2$3='(* $2 (org-time-string-to-hours $1))

When I replace "$2" in TBLFM with an integer value, it works.

How can I calculate the product in /one/ step?

Thanks again!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] bug#24073: 25.1-rc2

2016-09-18 Thread Bastien Guerry
Nicolas Goaziou  writes:

> This fix looks fine, obviously. You can go ahead as far as Org is
> concerned.

+1

-- 
 Bastien



Re: [O] [RFC] Release Org 9.0 by the end of the next week?

2016-09-18 Thread Bastien Guerry
Hi Nicolas,

Nicolas Goaziou  writes:

> If there is no objection, then I suggest to start the release process by
> the end of the next week.
>
> Bastien, do you agree?

Sure I do, no problem.

-- 
 Bastien



[O] [RFC] Release Org 9.0 by the end of the next week?

2016-09-18 Thread Nicolas Goaziou
Hello,

Now that Emacs 25.1 is out, I'd like to have Org 9.0 become the new
stable branch.

Are there outstanding bugs left out? Is there and pending patch
important enough to block the release?

If there is no objection, then I suggest to start the release process by
the end of the next week.

Bastien, do you agree?


Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Time to push the latest org to emacs-25 branch?

2016-09-18 Thread Kaushal Modi
On Sun, Sep 18, 2016 at 10:48 AM Nicolas Goaziou 
wrote:

> Hello,
>
> Kaushal Modi  writes:
>
> > Is this a good time to update the org version in emacs-25 branch?
>
> I'd like to release Org 9.0 first, but that's the topic of another
> thread.
>

OK.


> Besides, I don't know what is the status of Org wrt Emacs, since some
> packages are going to be moved outside of Emacs core for development and
> bundled with Emacs only at the time of release.


John and Eli can correct me on this, but from what I understand, major
infrastucture changes like moving the current core Emacs packages to GNU
Elpa and such would only happen in version 26.1 or later.
-- 

Kaushal Modi


Re: [O] Time to push the latest org to emacs-25 branch?

2016-09-18 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> Is this a good time to update the org version in emacs-25 branch?

I'd like to release Org 9.0 first, but that's the topic of another
thread.

Besides, I don't know what is the status of Org wrt Emacs, since some
packages are going to be moved outside of Emacs core for development and
bundled with Emacs only at the time of release.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug#24073: 25.1-rc2

2016-09-18 Thread Nicolas Goaziou
Hello,

Eli Zaretskii  writes:

> Bastien, could you or someone else please look into this and provide
> your comments?  TIA.

This fix looks fine, obviously. You can go ahead as far as Org is
concerned.

Thank you for letting us know.

Regards,

-- 
Nicolas Goaziou



Re: [O] bug#24073: 25.1-rc2

2016-09-18 Thread Eli Zaretskii
Ping!

Bastien, could you or someone else please look into this and provide
your comments?  TIA.

> From: Paul Rankin 
> Cc: 24...@debbugs.gnu.org, emacs-orgmode@gnu.org
> Date: Sat, 03 Sep 2016 14:38:55 +1000
> 
> Eli Zaretskii  on Wed, 31 Aug 2016 17:25 +0300:
> > > From: Paul Rankin 
> > > Date: Wed, 31 Aug 2016 12:56:13 +1000
> > > Cc: 24...@debbugs.gnu.org
> > > 
> > > >> The fix seems trivial to me so I'm wondering if there is anything 
> > > >> holding it 
> > > >> up from being included in 25?
> > > > 
> > > > Yes, the fact that Emacs 25 is for all practical purposes already
> > > > released.
> > > 
> > > Okay. 25.2?
> > 
> > I don't see why not, provided that Org developers give us their
> > blessing.  Please bring this to their attention on the Org list, or
> > ask them to speak up here.  I don't want us to make any changes that
> > could adversely affect Org without consulting them first.
> 
> Dear Org Mode maintainers,
> 
> Looping you in on a proposed bug fix for `outline-invisible-p'.
> 
> Briefly, the problem is the function returns non-nil for any invisible
> text property when it should only do so for the outline property. As a
> defsubst, it is difficult to patch for other affected programs.
> 
> Diff pasted:
> 
> --- /usr/local/Cellar/emacs/25.1-rc2/share/emacs/25.1/lisp/outline.el.gz
> +++ #
> @@ -388,9 +388,9 @@
> nil 'move))
>  
>  (defsubst outline-invisible-p (&optional pos)
> -  "Non-nil if the character after POS is invisible.
> +  "Non-nil if the character after POS has outline invisible property.
>  If POS is nil, use `point' instead."
> -  (get-char-property (or pos (point)) 'invisible))
> +  (eq (get-char-property (or pos (point)) 'invisible) 'outline))
>  
>  (defun outline-back-to-heading (&optional invisible-ok)
>"Move to previous heading line, or beg of this line if it's a heading.
> 
> Diff finished.  Sat Sep  3 14:35:22 2016
> 



Re: [O] docs don't make

2016-09-18 Thread Nicolas Goaziou
Hello,

Colin Baxter  writes:

> The docs do not make in release_8.3.6-1140-gc74f4c. There is the
> following error:
>
> makeinfo --no-split org.texi -o org
> org.texi:10008: misplaced {
> org.texi:10008: misplaced }

It is the usual 1 am typo.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Time to push the latest org to emacs-25 branch? (Was: Emacs 25.1 released)

2016-09-18 Thread Kaushal Modi
Is this a good time to update the org version in emacs-25 branch?

-- Forwarded message -
From: Nicolas Petton 
Date: Sat, Sep 17, 2016 at 1:25 PM
Subject: Emacs 25.1 released
To: emacs-devel 


Version 25.1 of the Emacs text editor is now available.

For more information on Emacs, see:
  http://www.gnu.org/software/emacs

You can retrieve the source from your nearest GNU mirror by using one
of the following links:
  http://ftpmirror.gnu.org/emacs/emacs-25.1.tar.xz
  http://ftpmirror.gnu.org/emacs/emacs-25.1.tar.gz

You can get the PGP signatures at
  http://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.xz.sig
  http://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.gz.sig

You can choose a mirror explicitly from the list at:
  http://www.gnu.org/prep/ftp.html

Mirrors may take some time to update; the main GNU ftp server is at:
  http://ftp.gnu.org/gnu/emacs/

Highlights of this release include:

  - Emacs can now load shared/dynamic libraries (modules)

  - Experimental support for Cairo drawing

  - Enhanced network security (TLS/SSL certificate validity and the
like)

  - New minor mode 'electric-quote-mode' for using curved quotes as you
type

  - Character folding support in isearch.el

  - Xwidgets: a new feature for embedding native widgets inside Emacs
buffers

  - New and improved facilities for inserting Unicode characters


There are many more changes; for a summary see the etc/NEWS file,
which you can view from Emacs with `C-h n'.

For the complete list of changes and the people who made them, see the
various ChangeLog files in the source distribution.  For a summary
of all the people who have contributed to Emacs, see the etc/AUTHORS
file.

Printed copies of the Emacs manual are available for purchase from the
Free Software Foundation's online store at:
  http://shop.fsf.org/product/emacs-manual/

(The version on sale is updated for Emacs 24.2, but it remains a great
reference book for current Emacs, and buying a copy is a great way to
support the work of the FSF.)

Regards,
Nico
-- 

Kaushal Modi
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQEcBAEBCAAGBQJX3XxVAAoJECM1h6R8IHkQ8CwIAIys9ec+wby7SLthopmXX+Ga
ePghdKBuZp5+749K2CJ6NzZ40HV7eXCpu2OHMVRxrV+uPChA9st0VmbEiq1n3i8s
m35SmzJ0+G26Jw65f8U4bxlezlwF3uz+B+OnDqI1l7ZDcUzFo7389Lc1owZDOKUC
a6VumsvTQXRsUCOBQCHeXFVaUj6l0YnjAIQ5xVikXtInpfLAipmZfTJox1bh8/Sx
2q/bq8V0dJcfBgVeqxEeAnGVUlSKpQeDf5SZ4CQUdco0t24e4/jnQDcta03mf1+8
q5yeI5Of1JLAuiKazb74eyBnNzg9MmLn79geTM7WKtnH+BJzkclVg61JvKUu9WY=
=pIdM
-END PGP SIGNATURE-

[O] docs don't make

2016-09-18 Thread Colin Baxter

The docs do not make in release_8.3.6-1140-gc74f4c. There is the
following error:

makeinfo --no-split org.texi -o org
org.texi:10008: misplaced {
org.texi:10008: misplaced }

Colin.