[O] agenda column view and CLOCKSUM

2016-03-24 Thread Makmiller Pedroso
Dear all,

The agenda column view only updates the value of CLOCKSUM after I run
column view in each one of my agenda files individually. Is this the
expected behavior? If it is, do you have any suggestions of how I can
update the value of CLOCKSUM when using the agenda column view without
having to visit each agenda file individually?

My column view uses the following format:

(setq org-columns-default-format "%1PRIORITY %5TODO %20ITEM(Task)
%10SCHEDULED %10CLOCKSUM_T %10CLOCKSUM %10Effort(Effort) %TAGS")

My agenda view uses a custom dispatcher:

(setq org-agenda-custom-commands
  '(("h" "Things to do today"
((tags "@Today")
 (agenda "" ((org-agenda-ndays 1)
 (org-agenda-show-all-dates nil)))

Thanks!
mak


Re: [O] A proposed enhancement in entering timestamps

2016-03-24 Thread Marcin Borkowski

On 2016-03-24, at 16:30, Robert Horn  wrote:

 On 2016-03-18, at 17:51, Marcin Borkowski  wrote:

> I'm now reading org-read-date-analyze to be able to enable US military
> format for hours (e.g., 2100 instead of 21:00).  This is potentially
> very useful (at least for me), since I'll be able to enter the hour with
>
> This would be very convenient for me, but when it comes time to document
> it a more proper name is 24-hour notation.  It's used by much more than
> the US military.  It's standard for railway schedules in most of the
> world, medical records in most of the world, aviation worldwide, and
> other places.

Well, this seems not that obvious to me:
https://en.wikipedia.org/wiki/24-hour_clock#Description .  It seems that
"24-hour notation" can also refer to the one with colon or full stop, so
it is ambiguous.  But if anyone comes up with a better name than "US
military time", I'm all for it.

> I work mostly in 24-hr notation and putting that colon in the right
> place is mistake prone.

Not only that, but it is plain old inconvenient.

> R Horn

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Multipart/Alternative reply to email?

2016-03-24 Thread Eric S Fraga
On Thursday, 24 Mar 2016 at 10:23, Peter Davis wrote:
> Ah, so you just reply to the text part in Gnus or whatever, but then
> use org-mime to html-ize that? Cool, though some of the
> HTML-ness of the original message may be lost.

Yes.

I must admit that losing some of that structure has never been an issue
for me.  The only reason I ever htmlize an email is because of very
specific requirements in my response... e.g. inline LaTeX equations or
maybe the need to send something with links.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83



Re: [O] Multipart/Alternative reply to email?

2016-03-24 Thread Peter Davis
Eric S Fraga  writes:

> On Thursday, 24 Mar 2016 at 09:51, Peter Davis wrote:
>> I've used org-mime to send MIME emails that are multipart/alternative
>> with both text and HTML parts. It's great, especially for
>> including tables, etc.
>>
>> Is there a way to reply to message with this?
>
> Not sure what you mean. You can htmlize the reply… as I've done here 
> (apologies for email purists for the HTML content here ;-).
> –

Ah, so you just reply to the text part in Gnus or whatever, but then use 
org-mime to html-ize that? Cool, though some of the
HTML-ness of the original message may be lost.

Thanks!

-pd



Re: [O] long delay after selecting capture template

2016-03-24 Thread Allan Streib
Eric S Fraga  writes:

> I've had this problem in the past. I found that setting this variable helps:
>
> ,[ C-h v x-selection-timeout RET ]
> | x-selection-timeout is a variable defined in ‘C source code’.
> | Its value is 10
> | 
> | Documentation:
> | Number of milliseconds to wait for a selection reply.
> | If the selection owner doesn’t reply in this time, we give up.
> | A value of 0 means wait as long as necessary.  This is initialized from the
> | "*selectionTimeout" resource.
> `
>
> For me, a value of 10 works well in most cases.  Sometimes this means
> that the selection from another application (e.g. the browser) is not
> found but at least it doesn't stall.

Thanks, mine was set to 5000. Seems like I've seen it stall for longer
than 5 seconds, but perhaps in those cases one of the primary or
clipboard selections timed out as well.

I'm on OpenBSD by the way.

-- 
Allan Streib
Indiana University School of Informatics and Computing
Digital Science Center :: Community Grids Lab :: FutureSystems

Allan



Re: [O] A proposed enhancement in entering timestamps

2016-03-24 Thread Robert Horn

>>> On 2016-03-18, at 17:51, Marcin Borkowski  wrote:
>>>
 I'm now reading org-read-date-analyze to be able to enable US military
 format for hours (e.g., 2100 instead of 21:00).  This is potentially
 very useful (at least for me), since I'll be able to enter the hour with

This would be very convenient for me, but when it comes time to document
it a more proper name is 24-hour notation.  It's used by much more than
the US military.  It's standard for railway schedules in most of the
world, medical records in most of the world, aviation worldwide, and
other places.

I work mostly in 24-hr notation and putting that colon in the right
place is mistake prone.

R Horn



Re: [O] long delay after selecting capture template

2016-03-24 Thread Eric S Fraga
On Thursday, 24 Mar 2016 at 09:27, Allan Streib wrote:

[...]

> Debugging the function, the "stall" happens on the indicated line below,
> the call to org-get-x-clipboard with the value 'SECONDARY

[...]

> I've heard of primary and clipboard X11 selections, but not secondary. I
> found a web post[1] suggesting it's a "near-extinct" feature.
>
> If I comment out that line the delay vanishes.

I've had this problem in the past. I found that setting this variable helps:

,[ C-h v x-selection-timeout RET ]
| x-selection-timeout is a variable defined in ‘C source code’.
| Its value is 10
| 
| Documentation:
| Number of milliseconds to wait for a selection reply.
| If the selection owner doesn’t reply in this time, we give up.
| A value of 0 means wait as long as necessary.  This is initialized from the
| "*selectionTimeout" resource.
`

For me, a value of 10 works well in most cases.  Sometimes this means
that the selection from another application (e.g. the browser) is not
found but at least it doesn't stall.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83



Re: [O] A proposed enhancement in entering timestamps

2016-03-24 Thread Marcin Borkowski

On 2016-03-24, at 14:09, Nicolas Goaziou  wrote:

> Hello,
>
> Marcin Borkowski  writes:
>
>> On 2016-03-18, at 17:51, Marcin Borkowski  wrote:
>>
>>> I'm now reading org-read-date-analyze to be able to enable US military
>>> format for hours (e.g., 2100 instead of 21:00).  This is potentially
>>> very useful (at least for me), since I'll be able to enter the hour with
>>> one hand (colon is on shift-semicolon on my keyboard).  Another idea
>>> would be to enable 21.00 (this notation is sometimes used in Poland).
>>> Would there be demand for such a feature?
>>
>> Hi all,
>>
>> and thanks Eric and Sam for positive feedback.
>
> I agree that US military format can be interesting. However, I think
> 21.00 could conflict with European format for dates.

Well, both can.  I've been thinking about it today and decided that the
easiest way to accomplish this without breaking anything would be to
replace "" (i.e., four digits) or "dd.dd" at the end of `ans' in
`org-read-date-analyze' with "dd:dd", possibly with some added test for
the case when this could be mistaken for a date (or its part).  This way
I wouldn't have to touch `parse-time-string' (which I'm quite afraid to
touch, as I wrote).

A quick test I've done right now shows that "dd.dd" on itself is not
interpreted in any special way by `org-read-date-analyze', but /is/ by
`org-read-date'.  This looks like a bug to me.

I'll come back to this issue after Easter.

>> One thing that would tremendously help is tests.  I think these
>> functions are rather fragile, in the sense that it's very easy to break
>> something (`parse-time-string' is a total mess, for example - it is
>> "clever", yes, but proving that it actually works seems next to
>> impossible), so without an extensive test suite I wouldn't touch these
>> functions.  Does anyone have - or can make - a set of valid (in
>> `org-read-date' sense) strings to make tests first and then modify these
>> functions?  (I could make it myself, but I might forget about some cases -
>> and there are a lot of them!  And it's even nontrivial to test the
>> coverage, since large part of the `parse-time-string' /logic/ is hidden
>> in the /variable/ `parse-time-rules', which btw has a 1-line
>> docstring...)
>
> I cannot speak for `parse-time-string', but `org-read-date' already has
> some tests in `test-org/org-read-date'. You can add more if you want to.

Thanks!

> Regards,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] problem in orgtbl-to-latex math (Tabular)

2016-03-24 Thread Nick Dokos
Uwe Brauer  writes:

> On 03/24/2016 01:01 PM, Nicolas Goaziou wrote:
>> Hello,
>> 
>> Uwe Brauer  writes:
>> 
>>> Take the following radio table in a latex file
>>>
>>> % BEGIN RECEIVE ORGTBL test
>>> % END RECEIVE ORGTBL test
>>> \begin{comment}
>>> #+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment 
>>> tabular
>>> |/|<>|
>>> | |  |
>>> | | $\int$
>>> \end{comment}
>>>
>> 
>> Fixed. Thank you.
>
> thank you, when will this fix be in ELPA? if it takes long, could you
> send me the patch?
>

Nicolas committed it to the maint branch (and merged it to master), so
it should be in next Monday's ELPA release.

--
Nick





Re: [O] Multipart/Alternative reply to email?

2016-03-24 Thread Eric S Fraga
On Thursday, 24 Mar 2016 at 09:51, Peter Davis wrote:
> I've used org-mime to send MIME emails that are multipart/alternative
> with both text and HTML parts. It's great, especially for
> including tables, etc.
>
> Is there a way to reply to message with this?

Not sure what you mean.  You can htmlize the reply...  as I've done here 
(apologies for email purists for the HTML content here ;-).
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83


[O] Multipart/Alternative reply to email?

2016-03-24 Thread Peter Davis

I've used org-mime to send MIME emails that are multipart/alternative with both 
text and HTML parts. It's great, especially for
including tables, etc.

Is there a way to reply to message with this?

I realize this would require somehow converting the original message to 
org-mode markup, and that seems very tricky. I just wondered
if anyone had taken a stab at building something like this.

Thanks!
-pd



Re: [O] long delay after selecting capture template

2016-03-24 Thread Eric Abrahamsen
Allan Streib  writes:

> Eric Abrahamsen  writes:
>
>> Another thing you can try is edebugging `org-capture-fill-template' and
>> stepping through it, and just see if anything weird happens. See the
>> Elisp manual for how to edebug, if you haven't before.
>>
>> Does it only happen for the "t" template? What's the "t" template look
>> like?
>
> I've really just started with org mode and task capture; so far I've
> only used the default "todo" (t) template.
>
> Debugging the function, the "stall" happens on the indicated line below,
> the call to org-get-x-clipboard with the value 'SECONDARY
>
>  [...]
>  
>;; Is the link empty?  Then we do not want it...
>(v-a (if (equal v-a "[[]]") "" v-a))
>(clipboards (remove nil (list v-i
>  (org-get-x-clipboard 'PRIMARY)
>  (org-get-x-clipboard 'CLIPBOARD)
>>>>   (org-get-x-clipboard 'SECONDARY)  <<<
>  v-c)))
>
>  [...]
>
> I've heard of primary and clipboard X11 selections, but not secondary. I
> found a web post[1] suggesting it's a "near-extinct" feature.
>
> If I comment out that line the delay vanishes.

Well that's some fairly successful sleuthing. The bad news is you know
now as much as (or more than) I do about your problem, and I don't know
what to tell you from here. I'd say tell the list what system you're
using, and what desktop environment, and hope someone has some wisdom to
bestow.

Otherwise... just comment that line out.

E




Re: [O] How to export casual letter without from and to address?

2016-03-24 Thread rbenit68

El 2016-03-04 06:12, York Zhao escribió:

Hi list,

I've been wondering for a while that when using org-mode to write 
letters, how
do you export casual a letter that doesn't have from address and to 
address?


Thanks in advance,

York


I would like to share a lightweight solution based on groff.

I have assembled an ob-groff.el file mostly coping the essential parts 
from ox-asymptote.el.


Once this is done, you can C-c C-c a groff source block and get the link 
to the output file in the same buffer.



Notes:

- Tested with emacs 24.5 and 25.0.92, org-plus-contrib ELPA 20160321, on 
OS 10.10.5.


- groff last version 1.22.3, which has -D option; remove from 
:cmdline if your groff version is < 1.22.3


- pdf output is hardcoded in ob-groff.el; you can remove from there and 
add to :cmdline to get .ps or .dvi files if you prefer.


- Groff examples are from:

http://etutorials.org/Linux+systems/red+hat+linux+bible+fedora+enterprise+edition/Part+II+Using+Red+Hat+Linux/Chapter+6+Publishing+with+Red+Hat+Linux/Creating+Documents+in+Groff+or+LaTeX/

http://pipeline.lbl.gov/code/3rd_party/licenses.win/groff/1.19.2/html/mom/letters.html

I hope not to have forgotten acknowledgment to some of those wonderful 
people that write and share FOSS.


Thanks all!

#+STARTUP: hideblocks


#+BEGIN_SRC emacs-lisp
;; Author: Tim Krones (itsjeyd)
;; Date: Jan 14 '15 at 15:03:48Z
;; http://emacs.stackexchange.com/questions/7211/collapse-src-blocks-in-org-mode-by-default

(defvar org-blocks-hidden nil)
(defun org-toggle-blocks ()
  (interactive)
  (if org-blocks-hidden
  (org-show-block-all)
(org-hide-block-all))
  (setq-local org-blocks-hidden (not org-blocks-hidden)))
#+END_SRC


#+BEGIN_SRC emacs-lisp
;; Author: John Kitchin
;; Date: 2016 Feb 27 at 02:12:20Z
;; http://emacs.stackexchange.com/questions/20577/org-babel-load-all-languages-on-demand
;;
(defadvice org-babel-execute-src-block (around load-language nil activate)
  "Load language if needed"
  (let ((language (org-element-property :language (org-element-at-point
(unless (cdr (assoc (intern language) org-babel-load-languages))
  (add-to-list 'org-babel-load-languages (cons (intern language) t))
  (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages))
ad-do-it))
#+END_SRC


#+BEGIN_SRC emacs-lisp
;;;
;;; ob-groff.el --- Babel Functions for GNU troff (groff)  -*- lexical-binding: t; -*-

;; Copyright (C) 2016 rbenit68

;; Author: rbenit68 at openmailbox dot org
;; Contributors:
;; Version: 0.1
;; Keywords: org, babel, source block, groff

;; This file is not part of GNU Emacs.

;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see .

;;; Commentary:

;; GNU troff (groff) from org-mode source blocks.
;; 

;;; Code:
(require 'ob)

(defvar org-babel-default-header-args:groff '())

(defvar org-babel-groff-command "groff"
  "Name of command to use for executing groff code.")

(defun org-babel-execute:groff (body params)
  "Execute a block of groff code.
This function is called by `org-babel-execute-src-block'."
  (let* ((out-file (cdr (assoc :file params)))
 (format (or (and out-file
  (string-match ".+\\.\\(.+\\)" out-file)
  (match-string 1 out-file))
 "pdf"))
 (cmdline (cdr (assoc :cmdline params)))
 (in-file (org-babel-temp-file "groff-"))
 (cmd
	  (concat "groff "
		  " -Tpdf " cmdline
		  " " (org-babel-process-file-name in-file)
		  (if out-file
		  (concat
		   " > " (org-babel-process-file-name out-file))
		)
)))
(with-temp-file in-file
  (insert (org-babel-expand-body:generic
	   body params
	   )))
(message cmd) (shell-command cmd)
nil)) ;; signal that output has already been written to file

(defun org-babel-prep-session:groff (_session _params)
  "Return an error if the :session header argument is set.
groff does not support sessions."
  (error "groff sessions are nonsensical"))

(provide 'ob-groff)

;;; ob-groff.el ends here

#+end_src


#+BEGIN_SRC emacs-lisp
;; Author: Nicholas Van Horn
;; Date: 2016, last seen: Mar 23 '16 21:45CET
;; http://nicholasvanhorn.com/posts/org-structure-completion.html 

;;(eval-after-load 'org
;;  '(progn
 (add-to-list 'org-structure-template-alist
  '("g" "#+BEGIN_SRC groff :file foo.pdf :cmdline -Dutf-8 \n?\n#+END_SRC" "\n\n"))
;;   )
;;

Re: [O] long delay after selecting capture template

2016-03-24 Thread Allan Streib
Eric Abrahamsen  writes:

> Another thing you can try is edebugging `org-capture-fill-template' and
> stepping through it, and just see if anything weird happens. See the
> Elisp manual for how to edebug, if you haven't before.
>
> Does it only happen for the "t" template? What's the "t" template look
> like?

I've really just started with org mode and task capture; so far I've
only used the default "todo" (t) template.

Debugging the function, the "stall" happens on the indicated line below,
the call to org-get-x-clipboard with the value 'SECONDARY

 [...]
 
 ;; Is the link empty?  Then we do not want it...
 (v-a (if (equal v-a "[[]]") "" v-a))
 (clipboards (remove nil (list v-i
   (org-get-x-clipboard 'PRIMARY)
   (org-get-x-clipboard 'CLIPBOARD)
 >>>   (org-get-x-clipboard 'SECONDARY)  <<<
   v-c)))

 [...]

I've heard of primary and clipboard X11 selections, but not secondary. I
found a web post[1] suggesting it's a "near-extinct" feature.

If I comment out that line the delay vanishes.


Footnotes: 
[1]  
https://sjohannes.wordpress.com/2010/02/28/what-is-the-x11-secondary-selection/

Allan



Re: [O] problem in orgtbl-to-latex math (Tabular)

2016-03-24 Thread Uwe Brauer
On 03/24/2016 01:01 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Uwe Brauer  writes:
> 
>> Take the following radio table in a latex file
>>
>> % BEGIN RECEIVE ORGTBL test
>> % END RECEIVE ORGTBL test
>> \begin{comment}
>> #+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment 
>> tabular
>> |/|<>|
>> | |  |
>> | | $\int$
>> \end{comment}
>>
> 
> Fixed. Thank you.

thank you, when will this fix be in ELPA? if it takes long, could you
send me the patch?

regards

Uwe
> 
> Regards,
> 





Re: [O] Duplicate word in org-mode manual online

2016-03-24 Thread Nicolas Goaziou
Hello,

Eduardo Mercovich  writes:

> Sorry I'm writing this to the list, but don't know who can touch the org
> manual.
>
> In http://orgmode.org/manual/LaTeX-specific-attributes.html
> you can read: "You can specify specify image...". .
>
> I know it's important to be specific specific, but isn't this a little
> too too much? ;)

This very typo has been specifically handled. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] A proposed enhancement in entering timestamps

2016-03-24 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> On 2016-03-18, at 17:51, Marcin Borkowski  wrote:
>
>> I'm now reading org-read-date-analyze to be able to enable US military
>> format for hours (e.g., 2100 instead of 21:00).  This is potentially
>> very useful (at least for me), since I'll be able to enter the hour with
>> one hand (colon is on shift-semicolon on my keyboard).  Another idea
>> would be to enable 21.00 (this notation is sometimes used in Poland).
>> Would there be demand for such a feature?
>
> Hi all,
>
> and thanks Eric and Sam for positive feedback.

I agree that US military format can be interesting. However, I think
21.00 could conflict with European format for dates.

> One thing that would tremendously help is tests.  I think these
> functions are rather fragile, in the sense that it's very easy to break
> something (`parse-time-string' is a total mess, for example - it is
> "clever", yes, but proving that it actually works seems next to
> impossible), so without an extensive test suite I wouldn't touch these
> functions.  Does anyone have - or can make - a set of valid (in
> `org-read-date' sense) strings to make tests first and then modify these
> functions?  (I could make it myself, but I might forget about some cases -
> and there are a lot of them!  And it's even nontrivial to test the
> coverage, since large part of the `parse-time-string' /logic/ is hidden
> in the /variable/ `parse-time-rules', which btw has a 1-line
> docstring...)

I cannot speak for `parse-time-string', but `org-read-date' already has
some tests in `test-org/org-read-date'. You can add more if you want to.

Regards,

-- 
Nicolas Goaziou



Re: [O] problem in orgtbl-to-latex math (Tabular)

2016-03-24 Thread Nicolas Goaziou
Hello,

Uwe Brauer  writes:

> Take the following radio table in a latex file
>
> % BEGIN RECEIVE ORGTBL test
> % END RECEIVE ORGTBL test
> \begin{comment}
> #+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment tabular
> |/|<>|
> | |  |
> | | $\int$
> \end{comment}
>
>
> This is expanded to
>
> % BEGIN RECEIVE ORGTBL test
> \begin{tabular}{|l|}
> \\ \hline
> \int\\ \hline
> \end{tabular}
> % END RECEIVE ORGTBL test
> \begin{comment}
> #+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment tabular
> | / | <>  |
> |   | |
> |   | $\int$ |
> \end{comment}
>
> Which is incorrect.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] problem in orgtbl-to-latex math (Tabular)

2016-03-24 Thread Uwe Brauer
Hello

Take the following radio table in a latex file

% BEGIN RECEIVE ORGTBL test
% END RECEIVE ORGTBL test
\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment tabular
|/|<>|
| |  |
| | $\int$
\end{comment}


This is expanded to

% BEGIN RECEIVE ORGTBL test
\begin{tabular}{|l|}
\\ \hline
\int\\ \hline
\end{tabular}
% END RECEIVE ORGTBL test
\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment tabular
| / | <>  |
|   | |
|   | $\int$ |
\end{comment}

Which is incorrect.

Strangely enough if I take that table in an org buffer and export it to
latex, then the math gets sourounded by \( \) as it should, but
org-radio-table fails.
What can I do? (You might point out that I should have used a matrix and
not used $ in the table, that is correct but does not help me here.

Uwe Brauer