Charles Millar | 31 Jul 03:49 2015
Picon
Picon

Infinite loop using :post header argument that calls a emacs-lisp src block

emacs version GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 
3.10.7) of 2014-03-07 on lamiak, modified by Debian
Org-mode version 8.3beta (release_8.3beta-1302-g00142f  <at>  
/usr/share/emacs/site-lisp/org-mode/lisp/)

the following produces a table with header, hline, a row with TOTAl and 
#+TBLFM immediately after the table

#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type bar :fields 
AssetDate,Description,Basis :results silent
  (some recutils sexes)
#+end_src
#+NAME: SCHEDA
#+begin_src emacs-lisp :var table=SCHEDAP :export results
   (setq table (cons 'hline table))
   (setq table (cons '("Date" "Description" "Basis") table))
   (setq table (append table '(("|Total"))))
   (setq table (append table '(("\n#+TBLFM: 
 <at> >$>=vsum( <at> I$>.. <at> >>$>);%.2f::"))))
   table
#+end_src
#+TBLNAME: SCHEDA

What I would like to use is

#+NAME: insertstuff
#+begin_src emacs-lisp :var table=() :results silent
   (setq table (cons 'hline table))
   (setq table (cons '("Date" "Description" "Basis") table))
(Continue reading)

Miguel Ruiz | 30 Jul 15:43 2015

TBLFM added to updated table as result of a emacs-lisp src block

Hi,

I'm trying to make the following (modified) code works:
(https://eschulte.github.io/org-scraps/scraps/2011-08-19-updating-a-table.html)

#+name: OneTable
| 0 | 0 | 0 |
| 0 | 0 | 0 |
| 0 | 0 | 0 |

#+name: AnotherTable
#+begin_src emacs-lisp :var table=OneTable
  (setf (nth 1 table) '(2 2 2))
  (setq table (cons 'hline table))  
  (setq table (append table '(hline)))
  (setq table (append table '(("Total"))))
  (setq table (append table '(("\n#+TBLFM:  <at> >$>=vsum( <at> I$>.. <at> >>$>):: <at> >$>>=vsum( <at> I$>>.. <at> >>$>>)::"))))
  table
#+end_src

At this point, it's ok for me but I need to put :: at the end to make it calculates sums because the | remaining. 
I'm aware I'm appending TBLFM to the table in a not orthodox way.

Is there a canonical way I could proceed in?

TIA

Miguel Ruiz.

____________________________________________________________
(Continue reading)

Xebar Saram | 30 Jul 14:17 2015
Picon

match on any TODO state

Hi 
I created this function which works well.

 (defun z/org-sparse-todo ()
    (interactive)
    (org-match-sparse-tree t "+TODO=\"TODO\""))

my question is how can i match on ANY todo state and not just literaly TODO
ie if i have this in my org file 

#+TODO: TODO(t) EXP(e) | SUBMITTED(s) K_TRACK(k) PAUSED(p) DONE(d) 

how can i match it by all the todos like TODO and EXP

Best

Z

Oleh Krehel | 30 Jul 12:18 2015
Picon

Re: Commit ceae5d651b80295f35c01ecfc53661c7e8eceba7 Breaks syncing with Android


Hi Charles,

Charles Philip Chan <cpchan <at> bell.net> writes:

>
> Just want to let you know, this commit:
>
> ,----
> | commit ceae5d651b80295f35c01ecfc53661c7e8eceba7
> | Author: Oleh Krehel <ohwoeowho <at> gmail.com>
> | Date:   Tue Jul 28 15:06:25 2015 +0200
> | 
> |     lisp/org.el (org-set-tags): Simplify the code
> | 
> |     * lisp/org.el (org-set-tags): Prefer let* to multi-variable setq,
> | ...skipping...
> |     org-mobile: Tiny fix in creating index.org file
> | 
> |     * lisp/org-mobile.el (org-mobile-create-index-file):
> |     Eliminate cloning of `#+READONLY' property in the `index.org' file.
> |     A sublists of `org-todo-keywords' don't need to contain the `|'.
> | 
> |     TINYCHANGE
> `----
>
> broke syncing with mobileorg on Android. After I revert to commit
> 5f3d8037a5099ca92db7edbf95ced22f0adefbef everything was fine.
>

I'm pretty sure my commit isn't to blame  and you meant this one:

c15db80e32d22dace184203f6f03a0b586bb4b50
Author: Sergey Gordienko <gordienkos <at> gmail.com>
Date:   Fri Jun 26 17:44:20 2015 +0300

    org-mobile: Tiny fix in creating index.org file

    * lisp/org-mobile.el (org-mobile-create-index-file):
    Eliminate cloning of `#+READONLY' property in the `index.org' file.
    A sublists of `org-todo-keywords' don't need to contain the `|'.

    TINYCHANGE

--Oleh

Charles Philip Chan | 30 Jul 04:41 2015
X-Face
Picon

Commit ceae5d651b80295f35c01ecfc53661c7e8eceba7 Breaks syncing with Android

Hello:

Just want to let you know, this commit:

,----
| commit ceae5d651b80295f35c01ecfc53661c7e8eceba7
| Author: Oleh Krehel <ohwoeowho <at> gmail.com>
| Date:   Tue Jul 28 15:06:25 2015 +0200
| 
|     lisp/org.el (org-set-tags): Simplify the code
| 
|     * lisp/org.el (org-set-tags): Prefer let* to multi-variable setq,
| ...skipping...
|     org-mobile: Tiny fix in creating index.org file
| 
|     * lisp/org-mobile.el (org-mobile-create-index-file):
|     Eliminate cloning of `#+READONLY' property in the `index.org' file.
|     A sublists of `org-todo-keywords' don't need to contain the `|'.
| 
|     TINYCHANGE
`----

broke syncing with mobileorg on Android. After I revert to commit
5f3d8037a5099ca92db7edbf95ced22f0adefbef everything was fine.

Thanks.

Charles

--

-- 
"Never make any mistaeks."
(Anonymous, in a mail discussion about to a kernel bug report.)
Xebar Saram | 29 Jul 17:57 2015
Picon

auto pack empty space between last line of header and next header

Hi list

i seem to get alot of empty spaces between the headers due to more then 1 empty line at the end of a header. I can manually delete all empty lines at the end of the section which will remove the gaps but this is tiring. i was wondering if there was any command to auto pack empty space between headers?

best

Z
Julien Cubizolles | 29 Jul 16:08 2015
Picon

using holiday dates from an ICAL calendar

I need to define weekly appointments, except during the school
holidays. I know org-class provides a way to exclude some weeks from
recurring events but I was wondering if some clever use of sexp would
make it possible to use the weeks/days of holiday from a public ical
calendar (like
https://www.google.com/calendar/ical/bubn5utkn054pluh4v44nu6ok62e1dbo%40import.calendar.google.com/public/basic.ics).

Did somebody ever try it ?

Julien Cubizolles | 29 Jul 15:41 2015
Picon

org-bbdb-birthday reminder

I'm using org-bbdb-anniversaries to use the bbdb-anniversaries. At the
moment, it only displays the birthdays of the day. How can I generate a
reminder for a few days before the actual birthday ?

Julien.

Cook, Malcolm | 28 Jul 21:29 2015

capture htmlwidgets for export - a pattern in search of a new :results type???

I have been playing with exporting htmlwidgets [1] generated in R code-blocks.

[1] http://www.htmlwidgets.org/  and

Here is a worked example that exports to html

	#+BEGIN_SRC R :session *R* :exports both :results html 
	library(htmlwidgets)
	library(d3heatmap)
	widget<-d3heatmap(mtcars, scale="column", colors="Blues")
	saveWidget(widget,'d3heatmap_widget.html')
	print('<iframe height=700px width=700px src=./d3heatmap_widget.html></iframe>')
	#+END_SRC
	#+RESULTS:
	#+BEGIN_HTML
	<iframe height=700px width=700px src=./d3heatmap_widget.html></iframe>
	#+END_HTML

After doing a few of these, a pattern emerges:  using ':results html' in the code bock header, and the last 2
lines of:
	saveWidget(...)
	print('<iframe ... ')

I think this pattern motivates considering developing support for "htmlwidget" as a new :results type (in
addition to 'raw, org, html, latex, code, pp, drawer') 

It could be used in combination with :file and understood by the R/org "glue" and exporters.

Allowing to write, instead of the above, something like:

	#+BEGIN_SRC R :session *R* :exports both :file d3heatmap_widget.html :results htmlwidget :height 700
:width 700
	library(htmlwidgets)
	library(d3heatmap)
	d3heatmap(mtcars, scale="column", colors="Blues")
	#+END_SRC
	#+RESULTS:
	file: d3heatmap_widget.html

The org-to-R glue would have to behave somewhat similarly to how graphics are currently handled, however,
instead of "printing" the value to the :file, the value would need to be saveWidget-ed.

And, similar to image handling, the exported value would be "in-lined" into the html, wrapped in an iframe
(I presume).

Perhaps there is  a better or more useful abstraction.

Or a better workaround than simply following the pattern when needed (which is not too hard anyway).

Any ideas along these lines?

Thanks

Malcolm Cook
mec <at> stowers.org

Oleh Krehel | 28 Jul 17:23 2015
Picon

Is it possible to remove org-completing-read and org-completing-read-no-i?


Hi all,

I'd like to remove them in favor of using `org-icompleting-read'
everywhere (or better yet, `completing-read').

`org-completing-read-no-i' doesn't do much, is called twice and can be
replaced with a let binding wrapper.

`org-completing-read' could be updated this way:

    (defmacro with-org-minibuffer-keys (&rest body)
      "Minibuffer read with SPACE being a normal character."
      `(let ((enable-recursive-minibuffers t)
             (minibuffer-local-completion-map
              (copy-keymap minibuffer-local-completion-map)))
         (org-defkey minibuffer-local-completion-map " " 'self-insert-command)
         (org-defkey minibuffer-local-completion-map "?" 'self-insert-command)
         (org-defkey minibuffer-local-completion-map (kbd "C-c !") 'org-time-stamp-inactive)
         , <at> body))

    (with-org-minibuffer-keys
        (org-icompleting-read args))

This change will simplify the code nicely.  One example that bothers me
is `org-tags-completion-function': it's essentially a hacky closure that
relies on several dynamic variables being set:
`org-last-tags-completion-table' and
`org-add-colon-after-tag-completion' are implicit arguments to this
function.

With the proposed change, each use of `org-tags-completion-function'
will be in conjunction with `org-icompleting-read'. That means a new
function can be written:

(defun org-read-tags (tag-list &optional colon)
  (let ((org-last-tags-completion-table tag-list)
        (org-add-colon-after-tag-completion colon))
    (org-icompleting-read
     "Tag: " 'org-tags-completion-function
     ;; ...
     )))

I think it's a better interface, since the coupling is now made
explicit, instead of having to remember to set
`org-last-tags-completion-table' and
`org-add-colon-after-tag-completion' each time
`org-tags-completion-function' is to be used.

An even better thing to do would be to use "lexical-binding: t", remove
`org-tags-completion-function' and have it be a real closure inside
`org-read-tags'. Is there any wish or effort to move Org to
lexical-binding? Adding it would allow us to get rid of those dynamic
variables and `org-tags-completion-function' altogether and have the
lambda enclose on tag-list and colon instead.

regards,
Oleh

Paolo Bientinesi | 28 Jul 09:05 2015
Picon
Picon

agenda events from table?

Hello,

I am facing what seems to be a common situation, yet I can't find a way 
out. Imagine this scenario: A list of people, a number of 
fields/properties per person, and the date for a personal meeting.
For convenience, I handle this information through tables.
Example:

| Name | Address | Sex | Rank | Date                   |
|------+---------+-----+------+------------------------|
| A    | blah    | M   |    3 | <2015-07-30 Thu 10:00> |
| B    |         | F   |   10 | <2015-08-11 Tue 15:00> |
| C    | blah2   |     |   13 |                        |
| D    | blah3   | M   |   15 | <2015-09-28 Mon 07:00> |
|      |         |     |      |                        |

Question:
How can I get the meetings (the Names) to show up as Agenda events?

One of the successful approaches I tried is to use properties (instead 
of table columns), and edit via column view. However, this is 
significantly slower (for me) than using straight tables; also the 
column view is nice, but not as clean as a straight table.

I tried to transpose a table into properties, but could not do that.

Any help or suggestions, please?

Thank you!
--

-- 
Prof. Paolo Bientinesi, Ph.D.

AICES, RWTH Aachen


Gmane