[O] Bug: org-ellipsis face not applied correctly [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.1/lisp/org/)]

2016-10-03 Thread Vasilij Schneidermann
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


In Emacs 24.5, folded content was displayed with a distinctly colored
ellipsis.  I was somewhat bothered why its appearance could not be
styled by customizing the org-ellipsis face, but did not bother figuring
out at that time.  In Emacs 25.1 however, the ellipsis has the same face
as the preceding element, be it a headline or a cookie.  Judging from
the code, the org-ellipsis face has never been used, rather the old
behavior happened to be dependent on how Emacs decides to handle buffer
display table slots without any specified face.

That being said, would it make sense to default to the default or
org-ellipsis face if none is specified?  Or alternatively, to drop the
face argument and always use the org-ellipsis face, then let the user
customize it?

Emacs  : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9)
 of 2016-09-18
Package: Org-mode version 8.2.10 (release_8.2.10 @
/usr/share/emacs/25.1/lisp/org/)



Re: [O] Kanban board as an agenda view

2016-10-03 Thread Adam Porter
e...@fea.st writes:

> I started thinking if this kind of visualization could be done
> automatically by implementing a view like the agenda, that would use
> `org-todo-keywords' as column headings and layout TODO items from
> `org-agenda-files' into a columnar view.
>
> Is there any prior work on this, or is anyone willing to implement it?
> If not, could you kindly point me to the right direction, so I can start
> hacking?

A simple way to emulate this would be to create multiple vertical
windows within a frame, and load a custom agenda view into each one,
with desired TODO keywords in each.

However, I just realized that Org does not seem to allow more than one
agenda view to be open simultaneously, I guess because of its use of
global state.  Maybe it would be possible to hack something up using
org-agenda-append-agenda to "append" into a different frame...




Re: [O] Gmane search and link

2016-10-03 Thread Adam Porter
They're working on it.  You can watch the Gmane blog for updates:
http://home.gmane.org/




Re: [O] Bug? org-export-babel-evaluate setting breaks :exports results

2016-10-03 Thread Grant Rettke
On Mon, Oct 3, 2016 at 8:22 PM, William Denton  wrote:
> There's always something new to learn in Org---and something new to be
> learned from this mailing list.

Never evaluating on export or tangle is my favorite way, too:

https://www.wisdomandwonder.com/article/10400/the-fifteen-questions-that-you-must-answer-in-your-org-mode-literate-programming-configuration



Re: [O] Bug? org-export-babel-evaluate setting breaks :exports results

2016-10-03 Thread William Denton

On 29 September 2016, Charles C. Berry wrote:

I'm working on a big Org file on a slow machine, so I set 
org-export-babel-evaluate to nil so exporting to PDF just generates the 
file from what's in the buffer, without doing any calculating.


Actually it does a lot LESS than that.


My sincere thanks for pointing this out.

I spent an hour narrowing down the problem to one variable, but then didn't read 
the documentation on it.  To help myself remember to try to never do this again, 
I wrote it up:


https://www.miskatonic.org/2016/10/03/orgexportbabelevaluate/

There's always something new to learn in Org---and something new to be learned 
from this mailing list.


Bill
--
William Denton :: Toronto, Canada :: https://www.miskatonic.org/
Caveat lector.



Re: [O] Bug with capture template having %? cursor in the tags section

2016-10-03 Thread Michael Fiano
Curious, has anyone been able to look into this and my other bug report
that has gone unnoticed, or is more information needed?

On Fri, Sep 30, 2016 at 6:42 PM, Michael Fiano 
wrote:

> If I create a capture template that creates a headline such as:
>
> "* %? :note:\n", then upon capturing the note tag is correctly shifted
> over to org-tags-column.
>
> However, if I position the %? cursor to be:
>
> %?:note:
> :note:%?
>
> or anywhere in between, the tags are not written to the correct column,
> instead with 1 space after the headline. I just wanted to manually define
> some extra tags, instead of using %^g/%^G, but this messes up the column
> placement.
>


Re: [O] Fwd: comment lines inside org tables

2016-10-03 Thread Rolf Sander

Hello Nicolas,


Allowing to comment anything is a can of worms I really don't want to
open.


Maybe you are misinterpreting what I wrote. I don't want to comment
"anything". All I want is that a table line starting with "|-/" is not
expanded to "|---+---+---|" on the next re-align. Instead, it should
remain unchanged.


It complicates a lot of code for little benefit.


Well, regarding the benefit we seem to have different opinions. The
table that I use for my work has 871 lines, 20 columns and a width of
234 characters. With such a big table, I would highly benefit from
comment lines.

Regarding the code, I already wrote a few lines for org-table-align
adding this feature and I don't think it is too complicated.


Sorry, but you're barely scratching the surface of the problem.


It is quite possible that you are right. Indeed, there is a possibility
that my addition has some negative side effects. To find out if this is
really the case, I have written to this email list, asking for advise.


Formulas don't handle these special lines, neither do exported tables.


I don't understand why you say this. I have tested formulas and
exporting, taking an example table from the manual and adding two
comment lines. Everything still works fine:

|---+-++++---+--|
|   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
|---+-++++---+--|
| ! | | P1 | P2 | P3 |   Tot |  |
| # | Maximum | 10 | 15 | 25 |50 | 10.0 |
| ^ | | m1 | m2 | m3 |mt |  |
|---+-++++---+--|
|-/ students in Mr Miller's class:
|---+-++++---+--|
| # | Peter   | 10 |  8 | 23 |41 |  8.2 |
| # | Sam |  2 |  4 |  3 | 9 |  1.8 |
|---+-++++---+--|
|-/ students in Mr Smith's class:
|---+-++++---+--|
| # | Tom | 16 |  8 | 28 |52 | 10.4 |
| # | Andy|  8 |  4 |  3 |15 |  3.0 |
|---+-++++---+--|
|   | Average ||||  25.0 |  |
| ^ | ||||at |  |
| $ | max=50  ||||   |  |
|---+-++++---+--|
#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

So I'm asking again: Does anyone see any negative side effects when my
modification is introduced? It only prevents that a table line starting
with "|-/" is expanded to "|---+---+---|" on a re-align.

As mentioned in a previous post, if you want to test my modification,
you can find it here:

http://www.rolf-sander.net/tmp/org-table-align-new.el

 Best regards
Rolf

--
---
 www.rolf-sander.net
---



Re: [O] Is there a *Org PDF LaTeX Output* buffer ?

2016-10-03 Thread Nick Dokos
Eric S Fraga  writes:

> On Friday, 30 Sep 2016 at 21:09, Julien Cubizolles wrote:
>> When an export from org to pdf fails, the error message refers to a *Org
>> PDF LaTeX Output* buffer that doesn't seem to have been created on my
>> setup. Is it an old message from a previous behaviour long gone ?
>
> No, this is current behaviour.  The buffer should definitely be created
> but probably only if the org is exported to LaTeX without error.  It could
> be the exporter is failing before it attempts to compile the LaTeX into
> PDF.  Check your messages (C-h e)?  Typical error that causes the first
> step to fail would be dangling links, for instance.

It's there even if there is an error (and arguably, that's the most useful 
case).
But I didn't try the async case which seems to cause the problem that the OP ran
into.

-- 
Nick




Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Rainer M Krug  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
 I started using attachments and really like them. But I have a problem
 with the completion of file names. I use ido usually and it works fine -
 but not here. How can I register ido completion for org-attach?
>>>
>>> Forgot to mention - it always points to the .org file in which I want to
>>> attach the file and I can't change the directory.
>>
>> I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
>> a headline, I get a completion window where I can change directory.
>
> OK - I'll try to explain.
>
> I am in a file called attach.org.
> I press C-c C-a m in a headline and I get the completion window in the
> mini buffer - so far so good.
> But I can't change the directory.
>
> I disabled ido, and it is working now. So this is a problem in IDO. I
> will see if I can figure out what it is.

OK - the culprit is the following code from
https://www.emacswiki.org/emacs/InteractivelyDoThings#toc15 :

,
| (defvar ido-enable-replace-completing-read t
|   "If t, use ido-completing-read instead of completing-read if possible.
| 
| Set it to nil using let in around-advice for functions where the
| original completing-read is required.  For example, if a function
| foo absolutely must use the original completing-read, define some
| advice like this:
| 
| (defadvice foo (around original-completing-read-only activate)
|   (let (ido-enable-replace-completing-read) ad-do-it))")
| 
| ;; Replace completing-read wherever possible, unless directed otherwise
| (defadvice completing-read
|   (around use-ido-when-possible activate)
|   (if (or (not ido-enable-replace-completing-read) ; Manual override 
disable ido
|   (and (boundp 'ido-cur-list)
|ido-cur-list)) ; Avoid infinite loop from ido calling this
|   ad-do-it
| (let ((allcomp (all-completions "" collection predicate)))
|   (if allcomp
|   (setq ad-return-value
| (ido-completing-read prompt
|allcomp
|nil require-match initial-input hist def))
| ad-do-it
`

Any suggestion why this is happening? For the moment, I just disabled
this code completely.

Cheers,

Rainer

>
> Thanks,
>
> Rainer
>
>
>
>
>> I do not use Ido, tho.
>>
>> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Bug: Feature request: more automatic updating of cookies [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)]

2016-10-03 Thread Jorge
lock-fontify-now jit-lock-function
redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 16
[font-lock-default-fontify-region font-lock-fontify-region "#" run-hook-wrapped jit-lock--run-functions
jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\
function\) nil nil nil nil nil nil nil nil] 8 [jit-lock-fontify-now
jit-lock-function redisplay_internal\ \(C\ function\) nil nil nil nil
nil nil nil nil nil nil nil nil nil] 4 [column-enforce-warn-on-region
"#" run-hook-wrapped jit-lock--run-functions
jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\
function\) nil nil nil nil nil nil nil nil nil] 12
[org-font-lock-add-priority-faces font-lock-fontify-keywords-region
font-lock-default-fontify-region font-lock-fontify-region "#" run-hook-wrapped jit-lock--run-functions
jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\
function\) nil nil nil nil nil nil] 4 [org-do-emphasis-faces
font-lock-fontify-keywords-region font-lock-default-fontify-region
font-lock-fontify-region "#" run-hook-wrapped
jit-lock--run-functions jit-lock-fontify-now jit-lock-function
redisplay_internal\ \(C\ function\) nil nil nil nil nil nil] 4
[org-activate-bracket-links font-lock-fontify-keywords-region
font-lock-default-fontify-region font-lock-fontify-region "#" run-hook-wrapped jit-lock--run-functions
jit-lock-fontify-now jit-lock-function redisplay_internal\ \(C\
function\) nil nil nil nil nil nil] 8 [timer-activate run-at-time
apply run-with-timer jit-lock-fontify-now jit-lock-function
redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil
nil] 4 [smex-detect-new-commands smex funcall-interactively
call-interactively command-execute nil nil nil nil nil nil nil nil nil
nil nil] 4 ["#" mapc ido-set-matches-1
ido-set-matches ido-exhibit read-from-minibuffer ido-read-internal
ido-completing-read smex-completing-read smex-read-and-run smex
funcall-interactively call-interactively command-execute nil nil] 8
[profiler-cpu-profile profiler-report-cpu profiler-report
funcall-interactively call-interactively command-execute
execute-extended-command smex-read-and-run smex funcall-interactively
call-interactively command-execute nil nil nil nil] 4 [Automatic\ GC]
272)) (22514 29042 741706 932000) nil]



My configuration:
Emacs  : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-09-18
Package: Org-mode version 8.3.6 (8.3.6-6-g194e51-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20161003/)

current state:
==
(setq
 org-capture-prepare-finalize-hook '(J-insert-created-and-id-all)
 org-export-backends '(ascii html icalendar latex odt)
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-footnote-section "Notas de rodapé"
 org-insert-heading-hook '(org-id-get-create t)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-agenda-entry-text-maxlines 3
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-priority-faces '((65 :slant italic :weight bold :foreground "red"
   :background "black")
  (66 :slant italic :weight bold :foreground "red"
   :background "cyan")
  (67 :slant italic :weight bold :foreground "red") (68
 :slant 
italic :weight bold)
  (69 . italic) (70 . default) (71 :foreground "gold") (72

:foreground "yellow")
  (73 :foreground "#50"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id 'create-if-interactive
 org-finalize-agenda-hook '(J-org-agenda-to-appt-refresh)
 org-after-tags-change-hook '(org-expiry-insert-created)
 org-agenda-sticky t
 org-list-allow-alphabetical t
 org-special-ctrl-a/e t
 org-agenda-custom-commands '(("p" "Now, agenda and TODOs (personal)"
   ((tags "now" nil)
(agenda "" ((org-agenda-span 1)
(org-agenda-time-grid (quote (nil 
nil nil)
(tags-todo "-dia-@GYNO"
 ((org-agenda-todo-ignore-deadlines (quote
 all))
  (org-agenda-todo-ignore-scheduled (quote
 all))
  (org-agenda-todo-ignore-times

Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>>> I started using attachments and really like them. But I have a problem
>>> with the completion of file names. I use ido usually and it works fine -
>>> but not here. How can I register ido completion for org-attach?
>>
>> Forgot to mention - it always points to the .org file in which I want to
>> attach the file and I can't change the directory.
>
> I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
> a headline, I get a completion window where I can change directory.

OK - I'll try to explain.

I am in a file called attach.org.
I press C-c C-a m in a headline and I get the completion window in the
mini buffer - so far so good.
But I can't change the directory.

I disabled ido, and it is working now. So this is a problem in IDO. I
will see if I can figure out what it is.

Thanks,

Rainer




> I do not use Ido, tho.
>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]

2016-10-03 Thread Nicolas Goaziou
Hello,

"Tamulis, Andrius"  writes:

> 1) I've just spent a lot of time trying various searches at the
> emacs-orgmode Archives, and reading through many pages of results, but
> I can't find the mailing list discussion mentioned below by Nicolas.
> Can anyone help? Until I read that, I won't comment further on whether
> it was a good idea to insist that PROPERTIES and dates immediatly
> follow the headline.

The most recent involved John Wiegley, who didn't like this change
either. You also may want to look for a subject tagged with [ANN] where
this change is announced.

Anyway, the main motivation is speed, and removing some pathological
cases, e.g., with entries containing inlinetasks. Now property API runs
in constant time, it scales much better than before.

> 2) If there is good code for fixing the properties drawers, why
> isn't it in the org-agenda-set-property function? The code there now
> just creates new PROPERTIES drawers, ignoring existing ones.

The code in ORG-NEWS do not really "fix" drawers. Your drawers are
perfectly valid in Org 8.3, but they do not have the same meaning. This
function turns them into an equivalent for Org 9.0. This is only
a helper function for the transition.

OTOH, `org-agenda-set-property' function tries to repair wrong drawers,
e.g., when they are missing the :END: part, IIRC.

Regards,

-- 
Nicolas Goaziou



Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

>> I started using attachments and really like them. But I have a problem
>> with the completion of file names. I use ido usually and it works fine -
>> but not here. How can I register ido completion for org-attach?
>
> Forgot to mention - it always points to the .org file in which I want to
> attach the file and I can't change the directory.

I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
a headline, I get a completion window where I can change directory. I do
not use Ido, tho.

Regards,

-- 
Nicolas Goaziou



Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Rainer M Krug  writes:

> Hi
>
> I started using attachments and really like them. But I have a problem
> with the completion of file names. I use ido usually and it works fine -
> but not here. How can I register ido completion for org-attach?

Forgot to mention - it always points to the .org file in which I want to
attach the file and I can't change the directory.

>
> Thanks,
>
> Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Hi

I started using attachments and really like them. But I have a problem
with the completion of file names. I use ido usually and it works fine -
but not here. How can I register ido completion for org-attach?

Thanks,

Rainer


-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Is there a *Org PDF LaTeX Output* buffer ?

2016-10-03 Thread Julien Cubizolles
Nick Dokos  writes:


> No, it should be present: it is created when you export to PDF through
> LaTeX (it is created by org-latex-compile which is called by
> org-latex-export-to-pdf). I just tried a (successful, but I don't
> think it matters) export and was able to visit it afterwards.

I found it, but only when publishing a project synchronously. Actually
that's not surprising since in this case it's another emacs process
that's running but the message about the *Org PDF LaTeX Output* is then
misleading.

Here is a MWE[1]:

--8<---cut here---start->8---
#+LATEX_HEADER:\RequirePackage{nosuchpackage}

#+begin_src emacs-lisp :exports none
 (add-to-list 'load-path "~/git-repositories/org-mode/lisp")
 (add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp")
 (org-reload)
 (require 'ox)
 (require 'ox-latex)
 (setq org-export-in-background t)
 (setq org-export-async-init-file "~/tmp/test-init.el")
 (setq org-publish-project-alist
`(("test"
   :base-directory "./"
   :publishing-directory "./"
   :publishing-function org-latex-publish-to-pdf
   :exclude ".*"
   :include ,(list (file-name-nondirectory buffer-file-name))
   )))
#+end_src
--8<---cut here---end--->8---

with
~/tmp/test-init.el:

--8<---cut here---start->8---
(add-to-list 'load-path "~/git-repositories/org-mode/lisp")
(add-to-list 'load-path "~/git-repositories/org-mode/contrib/lisp")
(require 'org)
(require 'ox)
--8<---cut here---end--->8---

Julien.

[1] Actually it's not really working when running emacs -Q: there are
some error messages about for instance org-link-set-parameters which I
can't iron out but I don't think it's relevant to the problem exhibited
here.



Re: [O] Fwd: comment lines inside org tables

2016-10-03 Thread Eric S Fraga
Sorry to interrupt this conversation but I wonder: could you not simply
use the / label and then have a comment in one of the existing columns,
a column that is width restricted so that a large amount of text doesn't
affect alignent?  You can then use the special edit mode (C-c `) for
long entries to see the full comment.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.2.50.1, Org release_8.3.6-1184-g29830f



Re: [O] Fwd: comment lines inside org tables

2016-10-03 Thread Rolf Sander (MPI)

Hello Nicolas,


Allowing to comment anything is a can of worms I really don't want to
open.


Maybe you are misinterpreting what I wrote. I don't want to comment
"anything". All I want is that a table line starting with "|-/" is not
expanded to "|---+---+---|" on the next re-align. Instead, it should
remain unchanged.


It complicates a lot of code for little benefit.


Well, regarding the benefit we seem to have different opinions. The
table that I use for my work has 871 lines, 20 columns and a width of
234 characters. With such a big table, I would highly benefit from
comment lines.

Regarding the code, I already wrote a few lines for org-table-align
adding this feature and I don't think it is too complicated.


Sorry, but you're barely scratching the surface of the problem.


It is quite possible that you are right. Indeed, there is a possibility
that my addition has some negative side effects. To find out if this is
really the case, I have written to this email list, asking for advise.


Formulas don't handle these special lines, neither do exported tables.


I don't understand why you say this. I have tested formulas and
exporting, taking an example table from the manual and adding two
comment lines. Everything still works fine:

|---+-++++---+--|
|   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
|---+-++++---+--|
| ! | | P1 | P2 | P3 |   Tot |  |
| # | Maximum | 10 | 15 | 25 |50 | 10.0 |
| ^ | | m1 | m2 | m3 |mt |  |
|---+-++++---+--|
|-/ students in Mr Miller's class:
|---+-++++---+--|
| # | Peter   | 10 |  8 | 23 |41 |  8.2 |
| # | Sam |  2 |  4 |  3 | 9 |  1.8 |
|---+-++++---+--|
|-/ students in Mr Smith's class:
|---+-++++---+--|
| # | Tom | 16 |  8 | 28 |52 | 10.4 |
| # | Andy|  8 |  4 |  3 |15 |  3.0 |
|---+-++++---+--|
|   | Average ||||  25.0 |  |
| ^ | ||||at |  |
| $ | max=50  ||||   |  |
|---+-++++---+--|
#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

So I'm asking again: Does anyone see any negative side effects when my
modification is introduced? It only prevents that a table line starting
with "|-/" is expanded to "|---+---+---|" on a re-align.

As mentioned in a previous post, if you want to test my modification,
you can find it here:

http://www.rolf-sander.net/tmp/org-table-align-new.el

  Best regards
 Rolf

--
---
  www.rolf-sander.net
---



Re: [O] manipulate org tables using emacs-lisp

2016-10-03 Thread Alan Schmitt
Thanks a lot for all the suggestions. For the moment I’ve put the table
at the beginning of the file, but I’ll probably tweak the following
functions to use Heikki’s trick of using a regexp to find the named
table.

I don’t think I want to convert the table to a lisp structure, work on
it, and output back the table as I want to preserve the formulas at the
end of the table. So what I do instead is convert it to a lisp structure
to find the row and column numbers I’m interested in, then use org-table
functions to directly change the table.

Here is the code, if it’s helpful to others.

Thanks again,

Alan

#+BEGIN_SRC emacs-lisp
  (defun as/get-row-by-name (name)
"This assumes the table is at the beginning of the file"
(save-excursion
  (goto-char (point-min))
  (let ((tb (org-table-to-lisp))
(row 1)
(res))
(while (and (not res) tb)
  (unless (equal (car tb) 'hline)
(if (equal (caar tb) name)
(setq res row)
  (setq row (+ row 1
  (setq tb (cdr tb)))
res)))

  (defun as/get-column-by-name (name)
"This assumes the table is at the beginning of the file"
(save-excursion
  (goto-char (point-min))
  (let ((first-row (car (org-table-to-lisp)))
(col 1)
(res))
(while (and (not res) first-row)
(if (equal (car first-row) name)
(setq res col)
  (setq col (+ col 1)))
  (setq first-row (cdr first-row)))
res)))

  (defun as/get-clean-value (rowname colname)
"This assumes the table is at the start of the file"
(save-excursion
  (goto-char (point-min))
  (let ((row (as/get-row-by-name rowname))
(col (as/get-column-by-name colname)))
(unless (and row col) (error "row name or column name not found"))
(let ((res (org-trim (org-table-get row col
  (set-text-properties 0 (length res) nil res)
  res

  (defun as/set-table-value (rowname colname value)
"This assumes the table is at the start of the file"
(save-excursion
  (goto-char (point-min))
  (let ((row (as/get-row-by-name rowname))
(col (as/get-column-by-name colname)))
(unless (and row col) (error "row name or column name not found"))
(org-table-goto-line row)
(org-table-get-field col value)
(org-table-align
#+END_SRC

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-08: 402.25, 2015-08: 398.93


signature.asc
Description: PGP signature


Re: [O] Making DocBook xml books from org mode?

2016-10-03 Thread Peter Davis

On Sun, Oct 2, 2016, at 10:09 PM, Norman Walsh wrote:
> Joost Kremers  writes:
> > There's also a `docbook' writer,
> > which has been part of Pandoc much longer and which outputs to (I
> > assume) DocBook v4. So I suspect you either need to upgrade your Pandoc
> > or make sure ox-pandoc sets the output format to `docbook'.
> 
> Depending on what your down-stream processing is like, you could
> just go with V4 DocBook from org and then convert that to V5 with
> the upgrade stylesheet.
> 

Thank you, Norm. I'll keep that in mind, but if I can get directly to
DocBook5, that seems easier and less "lossy."

Cheers,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Making DocBook xml books from org mode?

2016-10-03 Thread Peter Davis

On Sun, Oct 2, 2016, at 11:38 PM, Marcin Borkowski wrote:
> 
> On 2016-10-02, at 23:23, Peter Davis  wrote:
> 
> > I'm trying this again, on a Mac instead of Windows. I managed to get
> > ox-pandoc working. (It now displays an org export menu too big to fit on
> > my screen, and I can't figure out how to scroll it.)
> 
> Space/backspace?

I'll give it a try. Thanks, Marcin!

Now here's the real problem. I get this slew of pandoc output options on
my Mac, but on my Win10 machine, also with pandoc 1.117.2, I only get
two options:

[P] Markdown to buffer
[p] To file

I seem to be running the right ox-pandoc, so I'm not sure how to get all
the other options. 

I could run pandoc on the org file from a command line, but then the
embedded dot diagrams won't be evaluated. Perhaps export to HTML (or
some other format?) and then use pandoc to convert to docbook?

Thanks,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]

2016-10-03 Thread Colin Baxter

Hi  Andrius,


On Sun, Oct 02 2016, Tamulis, Andrius wrote:

> I hope this gets to the mailing list. I'm not sure how the mailing
> list works.
>
> As for the below,
> 1) I've just spent a lot of time trying various searches at the
> emacs-orgmode Archives, and reading through many pages of results, but
> I can't find the mailing list discussion mentioned below by
> Nicolas. Can anyone help? Until I read that, I won't comment further
> on whether it was a good idea to insist that PROPERTIES and dates
> immediatly follow the headline.
>
> 2) If there is good code for fixing the properties drawers, why
> isn't it in the org-agenda-set-property function? The code there now
> just creates new PROPERTIES drawers, ignoring existing ones.
>
> Thanks,
>
> Andrius
>
--- Snip ---

ORG-NEWS is located at /etc/ORG-NEWS in the git distribution. (It's not
obvious, I know.) I think Nicolas is referring to the information
beginning Line 536.

Best wishes,

Colin Baxter.