Re: [O] LaTeX export with section number, name and page in internal links

2015-12-07 Thread Ilya Filippov
Thank you, it is work, but I hope to use something like (setq org-export-latex-hyperref-format "\\ref{%s}") for hyperref customization. (I want join \\ref{%s} and \\pageref{%s} for org-export-latex-hyperref-format). If it will be work we may simple use [[#section-1]] to different templates for internal references, also like ''Section 1.1 [Section name], page 99''.03.12.2015, 16:31, "John Kitchin" :Try this.* Chapter 1** Section 1.1  \label{manual-section-1}    :PROPERTIES:    :CUSTOM_ID: section-1    :END:* Chapter 2** Section 2.1I want reference to Section 1.1 from here (See Section \ref{manual-section-1} on page \pageref{manual-section-1})John---Professor John Kitchin Doherty Hall A207FDepartment of Chemical EngineeringCarnegie Mellon UniversityPittsburgh, PA 15213412-268-7803@johnkitchinhttp://kitchingroup.cheme.cmu.edu
On Thu, Dec 3, 2015 at 6:08 AM, Ilya  wrote:I export my Org-Mode notes with internal links to LaTeX and I want it to
look like this ''Section 1.1 [Section name], page 99'' (Like in the Org
Manual). I use this construction:

#+BEGIN_EXAMPLE
 * Chapter 1
 ** Section 1.1
    :PROPERTIES:
    :CUSTOM_ID: section-1
    :END:
 * Chapter 2
 ** Section 2.1
I want reference to Section 1.1 from here (See #section-1)
#+END_EXAMPLE

But as a result I get only the number of the section ''1.1'', not the
''Section 1.1 [Section name], page 99''.
What options I need to use?

Here
(http://emacs.stackexchange.com/questions/18547/org-mode-latex-export-with-section-number-name-and-page-in-internal-links),
I was advised to use a Fancyref, but I have no idea how I may use it with
Org-Mode syntax.



- - - - - - - - - - -Ilya FilippovYugra State University (Chekhova str. 16, Khanty-Mansiysk, Tyumen' Region, Russian Federation, 628012):  1. Environmental Dynamics & Global Climate Change Research Centre, Senior Engineer2. Biology Chair, Docent3. Journal of Environmental Dynamics & Global Climate Change, Editorial Board MemberGoogleScholar profile: http://scholar.google.ru/citations?user=Prc5qkMJ Tel: +79088817605

[O] [PATCH] org-table.el: Fix regexp used for splitting data rows when computing a formula

2015-12-07 Thread Piotr Gajewski
* lisp/org-table.el (org-table-eval-formula): Fix regexp
  used for splitting data rows.

* Explanation /root node/

*** Example 1: Spaces ' ' in front of a data row (OK)

    |---+-+--+---++-|
    | ! | sum |  | a |  b |   c |
    |---+-+--+---++-|
    | # | 111 | 1000 | 1 | 10 | 100 |
    |---+-+--+---++-|
    #+TBLFM: $2=$a+$b+$c

    List of values after splitting data row:
    ("#" "" "1000" "1" "10" "100")

    Formula is computed correctly.

*** Example 2: Tabulators '\t' in front of a data row (ERROR)

    |---+--+--+---++-|
    | ! |  sum |  | a |  b |   c |
    |---+--+--+---++-|
    | # | 1011 | 1000 | 1 | 10 | 100 |
    |---+--+--+---++-|
    #+TBLFM: $2=$a+$b+$c

    List of values after splitting data row:
    ("\t" "#" "" "1000" "1" "10" "100")

    There is an extra field containing '\t' character(s).
    All /genuine/ values are shifted to the right.
    Consequently, references to fields lookup the wrong values.

TINYCHANGE
---
 lisp/org-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 17424be..9ed8b6e 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2723,7 +2723,7 @@ not overwrite the stored one."
   (while (> ndown 0)
     (setq fields (org-split-string
           (buffer-substring-no-properties (point-at-bol) (point-at-eol))
-          " *| *"))
+          "[ \t]*|[ \t]*"))
     ;; replace fields with duration values if relevant
     (if duration
     (setq fields
-- 
1.9.5.msysgit.0

  


[O] footnote fontify causing massive slowdown

2015-12-07 Thread Derek Feichtinger

While diagnosing a server condition, I was listing parts of a system log
via a babel expression. The 130 lines in the babel output are wrapped in
an example block. This block caused massive slowdown of scrolling and
other operations.

Using the emacs profiler I see:

- redisplay_internal (C function) 8232  88%
 - jit-lock-function 8226  88%
  - jit-lock-fontify-now 8226  88%
   - funcall 8226  88%
- #  8226  88%
 - run-hook-with-args 8226  88%
  - font-lock-fontify-region 8226  88%
   - font-lock-default-fontify-region 8226  88%
- font-lock-fontify-keywords-region 8226  88%
 - org-activate-footnote-links 8158  87%
  - org-footnote-next-reference-or-definition 8158  87%
   - byte-code 8158  87%
- org-footnote-at-reference-p 4114  44%
 - org-footnote-in-valid-context-p 4106  44%
  + org-inside-LaTeX-fragment-p 2380  25%
  + org-in-block-p 1563  16%
  + org-in-verbatim-emphasis 159   1%
org-at-comment-p 4   0%

Checking for footnote pattern matches (org-footnote-re) in the wrapped 
block, I see that

every line matches based on the very simple and trivial pattern of
number enclosed in angular brackets, so all the process numbers
following the "sshd" in these lines like "sshd[1234]" do match and cause 
load.


#
/var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: 
Rhosts authentication refused for userXYZ: bad ownership or modes for 
home directory.
/var/log/secure-20151129:Nov 23 02:25:36 some-host sshd[20089]: 
Rhosts authentication refused for userXYZ: bad ownership or modes for 
home directory.
/var/log/secure-20151129:Nov 23 02:25:41 some-host sshd[20089]: 
pam_ldap: error trying to bind as user "x" (Invalid credentials)

#

Since this kind of pattern is so common in logs and 130 lines are really 
not a large number, it makes it hard to use

org for this purpose. Can this be turned off selectively, or can it be
prevented in example blocks?

Using [8.3.2 (8.3.2-37-gd45217-elpaplus @ 
/home/dfeich/.emacs.d/elpa/org-plus-contrib-20151116/)] with GNU Emacs 
24.5.1.


Best regards,
Derek




--
Paul Scherrer Institut
Dr. Derek Feichtinger   Phone:   +41 56 310 47 33
Section Head Scientific Computing   Email: derek.feichtin...@psi.ch
Building/Room No. WHGA/U126
CH-5232 Villigen PSI




[O] Base 64 inline images in html export

2015-12-07 Thread Greg Sexton
Hi,

I did find a post about this from around 2009 but I'm not sure it went
anywhere. It's very useful for me to be able to export a single html
file that I can distribute around. Base 64 encoding images directly in
to the exported html makes this possible.

The feature seems fairly well supported by browsers these days.[1]

I've hacked up this ugly proof of concept. I guess it wouldn't take too
much to productionize this and make the behavior configurable. Any
thoughts?

--8<---cut here---start->8---
(defun gs/b64-img (file-uri)
  (let ((file (s-replace "file://" "" file-uri)))
(if (f-exists? file)
;; src="data:image/png;base64,iVBORw0KGgoNSUh..."
(s-concat "data:image/"
  (f-ext file)
  ";base64,"
  (base64-encode-string (f-read-bytes file)))
  file-uri)))

(defun org-html--format-image (source attributes info)
  "Return \"img\" tag with given SOURCE and ATTRIBUTES.
SOURCE is a string specifying the location of the image.
ATTRIBUTES is a plist, as returned by
`org-export-read-attribute'.  INFO is a plist used as
a communication channel."
  (org-html-close-tag
   "img"
   (org-html--make-attribute-string
(org-combine-plists
 (list :src (gs/b64-img source)   ; <-- interesting line is here
   :alt (if (string-match-p "^ltxpng/" source)
(org-html-encode-plain-text
 (org-find-text-property-in-string 'org-latex-src source))
  (file-name-nondirectory source)))
 attributes))
   info))
--8<---cut here---end--->8---


[1]: http://stackoverflow.com/questions/1207190/embedding-base64-images

-- 
 Greg



Amazon Development Centre (London) Ltd. Registered in England and Wales with 
registration number 04543232 and which has its registered office at Leadenhall 
Court, One Leadenhall Street, London EC3V 1PP, United Kingdom.




Re: [O] what is atril?

2015-12-07 Thread Johann Spies
> What is atril


Atril is my preferred pdf-reader on Debian.  I think it comes with the
mate-desktop-environment.

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


[O] Bug: problems with named fields on Org spreadsheet [8.3.2 (release_8.3.2-338-g522ec9 @ /home/luke/.emacs.d/el-get/org-mode/lisp/)]

2015-12-07 Thread Lukasz Wiechec
Hi,



I just have updated from previous version of Org to the latest (from

git) and my timesheet table stopped working. After looking closer,

even the example sheet from the Org mode's info pages does not work.



Here's the table (from the info pages):



 |---+-++++---+--|

 |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |

 |---+-++++---+--|

 | ! | | P1 | P2 | P3 |   Tot |  |

 | # | Maximum | 10 | 15 | 25 |50 | 10.0 |

 | ^ | | m1 | m2 | m3 |mt |  |

 |---+-++++---+--|

 | # | Peter   | 10 |  8 | 23 |41 |  8.2 |

 | # | Sam |  2 |  4 |  3 | 9 |  1.8 |

 |---+-++++---+--|

 | # | Average |||| 0 |  0.0 |

 | ^ | ||||at |  |

 | $ | max=50  ||||   |  |

 |---+-++++---+--|

 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f



When I try to re-apply the formulas (C-c C-c), I am getting a message



'Invalid table range specifier $at'.





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.





Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)

of 2015-04-15 on luke-new-laptop

Package: Org-mode version 8.3.2 (release_8.3.2-338-g522ec9 @ 
/home/luke/.emacs.d/el-get/org-mode/lisp/)



current state:

==

(setq

org-tab-first-hook '(org-hide-block-toggle-maybe 
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)

org-babel-results-keyword "results"

org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

org-occur-hook '(org-first-headline-recenter)

org-metaup-hook '(org-babel-load-in-session-maybe)

org-confirm-shell-link-function 'yes-or-no-p

org-default-notes-file "~/Dropbox/org/notes.org"

org-capture-templates '(("t" "Todo" entry (file+headline 
"~/Dropbox/org/agenda.org" "Tasks") (file 
"~/Dropbox/org/templates/todo.orgtmpl")))

org-agenda-include-diary t

org-after-todo-state-change-hook '(org-clock-out-if-current)

org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

org-agenda-before-write-hook '(org-agenda-add-entry-text)

org-babel-pre-tangle-hook '(save-buffer)

org-mode-hook '(org-clock-load #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]

 #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]

 org-babel-result-hide-spec org-babel-hide-all-hashes 
org-eldoc-load)

org-archive-hook '(org-attach-archive-delete-maybe)

org-clock-persist 'history

org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)

org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)

org-babel-tangle-lang-exts '(("latex" . "tex") ("clojure" . "clj") ("ruby" . 
"rb") ("python" . "py") ("emacs-lisp" . "el") ("elisp" . "el"))

org-confirm-elisp-link-function 'yes-or-no-p

org-metadown-hook '(org-babel-pop-to-session-maybe)

org-babel-after-execute-hook '(bh/display-inline-images)

org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar"

org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (R . t) 
(python . t) (ruby . t) (gnuplot . t) (clojure . t) (sh . t) (ledger . t)

(org . t) (latex . t))

org-agenda-files '("~/Dropbox/org/timesheet.2015.org" 
"/home/luke/Dropbox/org/agenda.org" 
"/home/luke/Dropbox/org/blackberry-comparison.org"

"/home/luke/Dropbox/org/journal.org" 
"/home/luke/Dropbox/org/mobileorg.org" "/home/luke/Dropbox/org/notes.org"

"/home/luke/Dropbox/org/todos.org" 
"/home/luke/Dropbox/org/deft/deft-0.org" 
"/home/luke/Dropbox/org/deft/deft-1.org"

"/home/luke/Dropbox/org/deft/deft-10.org" 
"/home/luke/Dropbox/org/deft/deft-11.org" 
"/home/luke/Dropbox/org/deft/deft-12.org"

"/home/luke/Dropbox/org/deft/deft-13.org" 
"/home/luke/Dropbox/org/deft/deft-14.org" 
"/home/luke/Dropbox/org/deft/deft-15.org"

"/home/luke/Dropbox/org/deft/deft-16.org" 
"/home/luke/Dropbox/org/deft/deft-17.org" 
"/home/luke/Dropbox/org/deft/deft-18.org"

"/home/luke/Dropbox/org/deft/deft-19.org" 

[O] LaTeX export with section number, name and page in internal links

2015-12-07 Thread Ilya Filippov
I export my Org-Mode notes with internal links to LaTeX and I want it to look 
like this ''Section 1.1 [Section name], page 99'' (Like in the Org Manual). I 
use this construction:

#+BEGIN_EXAMPLE
 * Chapter 1
 ** Section 1.1
:PROPERTIES:
:CUSTOM_ID: section-1
:END:
 * Chapter 2
 ** Section 2.1
I want reference to Section 1.1 from here (See #section-1)
#+END_EXAMPLE

But as a result I get only the number of the section ''1.1'', not the ''Section 
1.1 [Section name], page 99''. 
What options I need to use?

Here 
(http://emacs.stackexchange.com/questions/18547/org-mode-latex-export-with-section-number-name-and-page-in-internal-links),
 I was advised to use a Fancyref, but I have no idea how I may use it with 
Org-Mode syntax.

- - - - - - - - - - -
Ilya Filippov
Yugra State University (Khanty-Mansiysk)




[O] org-ellipsis problem

2015-12-07 Thread Dan Griswold
 Hi all,

Setting org-ellipsis (either via setq or customize) has no effect for me.
Org buffers still show three dots at the end of folded lines instead of the
character I give to org-ellipsis. Even restarting emacs
does not give the intended result.

Any suggestions?

Thanks,

Dan


Re: [O] Proposal and RFC for improving ob-python

2015-12-07 Thread Ondřej Grover
Hello,

thank you all for confirming that I'm in the right place. If I felt
confident enough that this would work, I wold have already presented a
patch (I'm not an experienced ELisp programmer). That's why I want to
discuss this approach first.

Kyle, I'll be grateful for you feedback.

Kind regards,
Ondřej Grover

On Mon, Dec 7, 2015 at 9:27 PM, Kyle Meyer  wrote:

> Hi Ondřej,
>
> Ondřej Grover  writes:
>
> > TL;DR for those that may have been scared off by the length of my
> previous
> > email:
> > I propose a method of improving ob-python.el by using a progn-like eval()
> > Python function which can wrap and execute source blocks.
> >
> > If this list is not appropriate for discussion of improvements to
> > ob-python.el, could you please give me pointers how to reach people that
> > might be interested in helping and discussing?
>
> Thanks for your proposal.  This is the right place to discuss it.  I've
> only had the chance to briefly look at this, but I'll try to take a
> closer look soon.
>
> --
> Kyle
>


Re: [O] department logo/header image in koma/latex export?

2015-12-07 Thread Alan Schmitt
On 2015-12-05 11:16, Xebar Saram  writes:

> Hi all
>
> i am looking into using koma and orgmode to export to recommendation letters.
> Does anyone have an example of adding a department logo/header image to the
> top of the page and/or bottom?

Eric already replied, but here is another example that I use for my work
letters.

#+begin_src latex
\ProvidesFile{InriaRennesEN.lco}

\usepackage[english]{babel}
\usepackage{xltxtra}

\KOMAoption{fromalign}{right}

\setkomavar{fromname}{Alan Schmitt}
\setkomavar{fromaddress}{Celtique Project\\Inria Rennes}
\setkomavar{place}{Rennes}

\setkomavar{signature}{\includegraphics[width=2.5cm]{AlanSig}\\Alan 
Schmitt\\Researcher, Celtique team}
\renewcommand*{\raggedsignature}{\raggedleft}
\@setplength{sigindent}{30em}
\@setplength{sigbeforevskip}{1em}

\KOMAoptions{fromlogo=true,subject=left,addrfield=false,foldmarks=off,fromemail=true}
\setkomavar{fromlogo}{\includegraphics[width=59mm]{INRIA-SCIENTIFIQUE-UK}}
\@addtoplength{firstfootvpos}{-2cm}
\setkomavar{firstfoot}{\includegraphics[width=4cm]{Rennes-UK}}
\setkomavar{fromemail}{alan.schm...@inria.fr}

\endinput
#+end_src

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated December 6, 2015, Mauna Loa Obs.): 400.80 ppm


signature.asc
Description: PGP signature


Re: [O] elfeed and orgmode integaration?

2015-12-07 Thread Grégoire Jadi

Xebar Saram writes:

> Hi all
>
> I was wondering if anyone uses elfeed and org and how people integrate it 
> into orgmode.
>
> It would be great if anyone can share code dealing with capturing from elfeed 
> into org, linking and any other uses people are coming up with

There is elfeed-org[1] to manage entries from
an org file and I'm working on a PR to link to entries with org-mode[2].

1: https://github.com/remyhonig/elfeed-org
2: https://github.com/remyhonig/elfeed-org/pull/18

Best,

-- 
Grégoire Jadi


signature.asc
Description: PGP signature


[O] problem with org-babel-tangle

2015-12-07 Thread Uwe Brauer

Hello

I have the following minimal example

:tangle yes

#+BEGIN_SRC emacs-lisp
  (setq-default fill-column 79)
#+END_SRC


I put my cursor into the code block and execute C-c C-v t
and I obtain

Tangled 0 code blocks from new.org
C-c C-v f gives the same result.

What do I miss?

Thanks

Uwe Brauer 




Re: [O] More questions about CSL and org-mode

2015-12-07 Thread John Kitchin

Richard Lawrence writes:

> Hi John,
>
> John Kitchin  writes:
>
>> Hi all,
>>
>> This is mostly for the people working on citations in org-mode.
>>
>> I have been reading about CSL more this weekend. IIRC, one of the
>> reasons to develop the new citation syntax was to get the ability to
>> have pre/post text in citations more conveniently than what is currently
>> possible.
>
> Yes, that is my understanding, too.
>
>> I have not seen any possibility for this with CSL, however. Is my
>> understanding correct? Is this a problem, or something partially handled
>> by org-export and partially by a citeproc?
>
> The CSL processors I've looked at support prefix and suffix text for
> individual references within a citation.  See, for example, the
> citeproc-js documentation:
>
> http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#citation-data-object
>
> prefix, suffix, and some other fields are supported.  pandoc-citeproc
> supports the same set of fields.

Interesting. I guess these are not standard for all processors? It also
looks like it would be hard to get something like an inline reference
formatted as [1] but refer to Reference 1, e.g. from citenum. It is
possible to have (Kitchin 2007) and (2007) but not a citation reference
to Kitchin that is derived from e.g. a citeauthor command in LaTeX. I am
not raising any objections here, just getting a sense for what is
feasible.

>
> However, my understanding is that neither citeproc-js nor
> pandoc-citeproc support a BibLaTeX-style "common" prefix/suffix that
> belongs to the citation as a whole, rather than the individual
> references within it, as is available in the multi-cite commands.  We
> currently have support for such common prefixes/suffixes in Org syntax.
>
> My solution to this in my org-citeproc wrapper for pandoc-citeproc is to
> prepend the common prefix to the prefix for the first reference in a
> citation, and append the common suffix to the last reference.  This is
> not a great solution, because it is not really defined what kind of
> punctuation (if any) should separate the common prefix from the first
> item's prefix, and so on.  But I figured that was not an important issue
> to address until we actually have people making use of common prefix and
> suffix syntax who are not exporting to LaTeX...

agreed.

>
>> IIUC, the current aim is to get a citeproc that will do the following on
>> export:
>> 1. replace in-text citation syntax with org-formatted replacements
>> 2. Insert an org-formatted bibliography somewhere in the document
>> 3. proceed with org-to-something export, with built-in
>> exporters.
>
> That's basically my understanding too.  There is one snag with the
> "org-formatted replacement" plan, though, which I saw in a Zotero dev
> discussion yesterday.  CSL processing might result in multiple levels of
> formatting, e.g. nested italics like
>
> Something with an internal Title
>
> and that won't translate very well back to Org syntax in general:
>
> /Something with an internal /Title//
>
> The suggestion was to just use HTML output, and then parse the HTML to
> get a data structure that could be directly rendered into HTML, LaTeX,
> etc., which support nested italics just fine.  I think we could do this,
> though maybe there's a better solution.  That is, we can take HTML from
> the citation processor and go directly to org-element objects, without
> producing and re-parsing citations in Org format.

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Intermixed date in koma-letter export

2015-12-07 Thread Rasmus
York Zhao  writes:

> Let's say I have two letters:
>
>   * Letter1
>   ** Preamble :noexport:
>
>   #+DATE: 2015-10-26 Monday
>   ** To whom it may concern,
>
>
>   * Letter2
>   ** Preamble :noexport:
>
>   #+DATE: 2015-12-03 Thursday
>   ** Hi,

This should work:

* letter 1
:PROPERTIES:
:EXPORT_DATE: 2015-10-26 Monday
:END:
** To whom it may concern,

* letter 2
:PROPERTIES:
:EXPORT_DATE: 2015-12-03 Thursday
:END:
** hi,


-- 
Dobbelt-A




[O] Add time (duration) to timestamp

2015-12-07 Thread Jarmo Hurri

Greetings.

Is there a way to add time to a timestamp, say, in a table?

For example, say I have a series of events, each lasting 15 minutes,
starting at a specified time on a specific day. I want to create a table
of them as follows:

| time   | event |
|+---|
| <2015-12-07 Mon 12:00> | A |
| add 15 minutes to above| B |
| again, add 15 min to above | C |

Is there a way to automate the generation of the timestamps of events B
and C?

Jarmo





Re: [O] Add time (duration) to timestamp

2015-12-07 Thread Jarmo Hurri

Greetings again.

Answering my own question, the following seems to work (15 min is 1/96
of a day):

| time   | event |
|+---|
| <2015-12-07 Mon 12:00> | A |
| <2015-12-07 Mon 12:15> | B |
| <2015-12-07 Mon 12:30> | C |
#+TBLFM: @3$1..@4$1=(<@-1>+(1.0 / 96))

Jarmo




Re: [O] syncing my life (orgmode :)) to a mobile (android) device..cant find a holistic reliable way..how do you guys manage to do it?

2015-12-07 Thread Ramon Diaz-Uriarte

On Sat, 05-12-2015, at 08:10, Xebar Saram  wrote:
>
> So my question is (sorry for the long intro :)) what do orgmode users (who
> also are heavy mobile users) do? do they give up on contacts and
> calendaring on the mobile? maintain 2 separate databases? what tools do
> people use to overcome this issue?


I make a fairly standard, non-sophisticated, usage of MobileOrg. I set it
to update the entries in the built-in Google Calendar: I find Google
Calendar easier to read than what is provided by MobileOrg. I sync the
Mobile org directory between computer(s) and tablet(s)/phone using
syncthing (https://syncthing.net/), which requires that at least two
devices be up (but I have a server that is supposed to be up all the time,
so no problem here ---having a tablet and a phone, a tablet and a laptop,
etc, would also do).

So the computer -> tablet way works just fine. The other way around is
slightly more cumbersome (I capture in the tablet and then, in the
computer, process the flagged.org file created by MobileOrg --- this has
been discussed in this list before, and other people have much more
sophisticated procedures here).

Contacts I do not worry about (I rarely do email on a tablet/phone).


>
> I once had a nokia n900 which ran basically Debian linux, and thus emacs
> could be run naively , these days it seems like all are android devices. I
> still haven't found a gui friendly way to run emacs there.
>

A few years ago I tried using emacs for android, etc, in the tablet, but I
eventually gave up using it since it was too cumbersome for me. MobileOrg
covers my needs pretty well.


Note, however, that you can install Debian (or several other Linuxes)
relatively easily in rooted Android devices and maybe even in non-rooted
devices. There are two or three apps available; I use "Complete Linux
Installer", and you should be able to get X in there, etc (I use it without
X), so you might do Emacs and even start it from a shortcut in a desktop
linux environment running inside your Android. But I haven't tried it (and
it seems to me it'd probably not be the smoothest and most efficient
experience).


Best,


R.

> thanks so much
>
> best
>
> Z


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz



Re: [O] syncing my life (orgmode :)) to a mobile (android) device..cant find a holistic reliable way..how do you guys manage to do it?

2015-12-07 Thread Samuel Loury
Matt Lundin  writes:

> Xebar Saram  writes:
>>
>> So my question is (sorry for the long intro :)) what do orgmode users
>> (who also are heavy mobile users) do? do they give up on contacts and
>> calendaring on the mobile? maintain 2 separate databases? what tools
>> do people use to overcome this issue?
>
> There are lots of way to sync calendars. See
> http://orgmode.org/worg/org-tutorials/org-google-sync.html
>
> I've found the easiest method is a "poor man's sync" involving a
> read-only ics file (exported from org using the org-icalendar-*
> functions) and a writable calendar for new entries. (Trying to map org
> entries to ics entries gets messy.) The flow looks something like this:
>
> writable calendar (remote calendar for adding new items from android)
> > org files (with new entries pull from remote calendar) >
> read-only calendar (remote ics exported from org)
>
> I use a radicale server[fn:1] for this. Radicale has the advantage of
> using ics files as a backend (rather than a database), so I can pull new
> entries into org with Eric's ical2org.awk.

I do exactly the same thing, also with radicale running in a chrooted
debian in my android phone. I am not happy with this solution since it
is not bidirectional but I agree it is the easiest method as far as I am
concerned.

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


signature.asc
Description: PGP signature


Re: [O] More questions about CSL and org-mode

2015-12-07 Thread John Kitchin
Thanks.

Its an interesting jam. You want to have multiple outputs as a
possibility, but there isn't a robust markup that readily works across
all backends.

What about this. For now consider a bibliography database with
org-formatting in the entries, e.g. subscripts, superscripts, etc...
(but not like putting italics on titles or anything related to
bibliography formatting). So I can have a title like "The role of H_{2}O
in /d/-orbital splitting of \alpha particles" in an entry. I assume it
would also be ok to have utf-8 characters in it. Equations are still
problematic, as we use LaTeX syntax for those.

On export the in-text citations are transformed to unique text blobs,
e.g. uuids, and the document exported. The only important features of
these blobs is that they do not get changed on export, and they are
unique because we replace them later.

The strings in the bibliography entry are "exported" to convert the
org-markup to the output format. The in-text citations, expanded
bibliography and style are sent to the citation processor, which outputs
replacements and a formatted bibliography in the desired output format.

Finally, you replace each uuid with the appropriate replacement, and
insert the bibliography where it belongs. That should be the final
document.

If you did this with a bibtex file, it would probably break its use in
LaTeX without some clever transformation of the bibtex file to a new
file that was LaTeX formatted, and an on the fly change to the org
buffer to use this new file. But, since the point of this is for
non-LaTeX export, I guess this is ok.

I bet you could even expand the bibtex format to include journal
abbreviations, and directly use the fields that CSL uses (although I
strongly dislike "container-title" for the journal name!)

The downside is the processor now needs to output different formats, but
presumably there are a few standard ones that are a one-time investment
like html.


Richard Lawrence writes:

> Richard Lawrence  writes:
>
>>> IIUC, the current aim is to get a citeproc that will do the following on
>>> export:
>>> 1. replace in-text citation syntax with org-formatted replacements
>>> 2. Insert an org-formatted bibliography somewhere in the document
>>> 3. proceed with org-to-something export, with built-in
>>> exporters.
>>
>> That's basically my understanding too.  There is one snag with the
>> "org-formatted replacement" plan, though, which I saw in a Zotero dev
>> discussion yesterday.
>
> Here's the reference for that discussion, by the way:
>
> https://groups.google.com/d/msg/zotero-dev/Bz_IenruxX4/24QWuyEIp_IJ
>
> Best,
> Richard
>
> P.S.  John, thanks for your continued research on this.  I see that our
> procrastination habits are on the same schedule. :)

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] syncing my life (orgmode :)) to a mobile (android) device..cant find a holistic reliable way..how do you guys manage to do it?

2015-12-07 Thread Eric S Fraga
On Saturday,  5 Dec 2015 at 23:13, Bingo UV wrote:

[...]

> Hi Eric,
> Do you not find pandora too slow to run Emacs? My Asus EEEPC with
> celeron 900 MHz takes over a minute to generate agenda with 100-150
> kB of org files, not too complicated. Exporting to HTML too takes
> minutes for 30 kB org file. My guess is that 1GHz ARM of pandora
> should be much slower than this.
>
> Do you have some trick up your sleeve to speed it up, or do you make do
> with slow pandora? Have you hacked it to increase memory?


The Pandora is indeed slow when compared with some of my other systems
and, to make matters even more extreme, I only have the 600 MHz rebirth
edition, overclocked to 800 MHz.

I do alter my working approach when using it but I do so not only
because of the speed but also because of the keyboard and the
display.  It is very much not a desktop or laptop replacement.  For me,
it's about data at hand anywhere/everywhere and for taking notes and
processing emails.  Oh, and listening to music :-)

The only concession, with respect to org, that I make is to use sticky
agenda views to avoid the long delay in generating each view.

The Pyra will help, being significantly faster, but the screen and
keyboard will still be small so I doubt my use will change dramatically.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-362-g11291f



Re: [O] Bug: org-publish-find-title called before cache initialization signals "no cache present" [8.3.1 (release_8.3.1-505-g6b2c38 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]

2015-12-07 Thread Arun Isaac
Nicolas Goaziou  writes:

> IIUC, you are responsible for calling `org-publish-find-title', an
> internal "ox-publish" function, before `org-publish-cache' is
> initialized. In this case I tend to think that you are also responsible
> for taking care of the cache.

Is org-publish-find-title an internal function? If so, expecting the
user to be responsible for initializing the cache is acceptable.

But, is there some "external function" to find the title of an org file?
I couldn't find any, and hence resorted to using org-publish-find-title.

> You can suggest a patch, if you want to.
>
> The problem is that functions calling
> `org-publish-cache-get-file-property' do not usually know about the
> current project name. Calling `org-publish-get-project-from-filename'
> each time is a bit expensive, IMO.

How about initializing the cache before the execution of the preparation
function? I am calling org-publish-find-title in the preparation
function, and this would address my use case. If you think this is a
good idea, I can come up with a patch.

Else, we can close this issue. It's not really a major problem.

Regards,
Arun Isaac


signature.asc
Description: PGP signature


Re: [O] syncing my life (orgmode :)) to a mobile (android) device..cant find a holistic reliable way..how do you guys manage to do it?

2015-12-07 Thread Detlef Steuer
Am Sat, 5 Dec 2015 14:08:19 +
schrieb Eric S Fraga :

> On Saturday,  5 Dec 2015 at 09:10, Xebar Saram wrote:
> 
> [...]
> 
> > all this is great yet i travel alot to conferences and meeting and
> > do rely on a mobile device (in my case a android nexus 6) in many
> > situations. I check my emails on it as much as i do on my PC, look
> > at upcoming and schedule appointments, look at timed TODOS, add new
> > contacts i meet and collect info on the go (web links, food recipes
> > etc).
> >
> > Out of all the things i do only email (via offlineimap and mu4e)
> > seems to be able to Sync correctly.  
> 
> Yes, this is probably a valid summary of the current state of the art
> re: org and Android devices.
> 
> > So my question is (sorry for the long intro :)) what do orgmode
> > users (who also are heavy mobile users) do? do they give up on
> > contacts and calendaring on the mobile? maintain 2 separate
> > databases? what tools do people use to overcome this issue?
> >
> > I once had a nokia n900 which ran basically Debian linux, and thus
> > emacs could be run naively , these days it seems like all are
> > android devices. I still haven't found a gui friendly way to run
> > emacs there.  
> 
> I have two different working environments, depending on which mobile
> device I use:
> 
> Case 1: if I use an Android device (nexus 4 or 7), I rely on mobileorg
> heavily to synchronise my calendar.  I have mobileorg suck in any
> events I create in Google calendar and export all org events to
> Google.  This works quite well.  However, creating notes etc. on the
> mobile device in this case is not ideal as mobileorg is not a full
> implementation of org (and, to be fair, it wasn't intended to be).
> 
> Although there is an emacs distribution for Android, I've never really
> managed to get it working satisfactorily, with or without a bluetooth
> keyboard.  Android is a crippled Linux unfortunately... (in my
> opinion).
> 
> In the end, I primarily use my nexus devices as phones (really?) and
> for facebook (as one must).
> 
> Case 2: this is my preferred mobile solution.  I have an OpenPandora
> palmtop computer [1] running the full Debian testing distribution with
> Emacs and the org from git, not to mention gnus, LaTeX, Libreoffice,
> Octave, ...  The Pandora has WiFi and bluetooth but not 3/4G
> connectivity.  I use my phone to tether the Pandora to the 'net when I
> need to connect outside a WiFi zone.  In this case, the Pandora and my
> other systems are fully synchronised using unison.  Finally, the
> Pandora has 2 full SD slots which allow me to walk around with 128 GB
> of disk space.

Well, there is hope for Android users, too:

I bought an used ASUS TF 101 (but any such android tablet should do)
especially to try out various ways to install a real Linux on this
class of machines.

With linuxdeploy I was able to install a complete Linux (TeX, R, emacs,
git, rsync ...) on a *rooted* machine. Using a VNC viewer (bvnc in my
case) I get a complete graphical environment. emacs works nicely in the
terminal emulater session, too. Linux runs besides Android in a chroot
and I`m quite happy with this setup. 

On another *unrooted* machine (Galaxy Note something) I use gnuroot.
Only got it working without X11, but did not try too hard, because
solution 1 was working fine. According to the docs I´m just too stupid
to get a local X11-server working.

Both machines have physical keyboards attached, but in tablet mode
using HackersKeyboard emacs is usable, but obviously a keyboard is a
Good Thing(tm) for emacs users.

May be that helps someone
Detlef

> 
> I bought my Pandora specifically because I wanted a full org mobile
> experience!  I am awaiting the release of the Pyra, the upgrade of the
> Pandora, very eagerly indeed!
> 
> Oh, and the Pandora has a fantastic audio system :-)
> 
> Sorry if I have come across as an advert for the Pandora but I am
> obviously a satisfied customer.
> 
> HTH,
> eric
> 
> 
> Footnotes: 
> [1]  https://boards.openpandora.org/pandora/pandoramain.html/
> 






[O] Problems with capture

2015-12-07 Thread Thomas Holst
Hello org-moders,

I have a little trouble with capture. First here is the setup for one of
my capture templates:

#+begin_src emacs-lisp
(setq org-capture-templates
  '(
;; ...
("hr" "Rechnung erfassen" table-line (file+function 
"~/git/org-priv/Univ_Beih.org" th:capure-find-open-vers-regn)
 "| # | %^u | %^{Arzt/Apotheke} | %^{für wen|Lida|Oleg|Victor|Simon} | 
%^{Betrag} | %^u | | | |"
 :table-line-pos "III-1" :immediate-finish t)
;; ...
))
#+end_src

What this template shall achive:

- look if there is an entry (headline) with todo state OPEN
- if entry exists append a table line
- if entry does not exist, create a new headline, insert table structure
  and append line to newly created table.

The function `th:capture-find-open-vers-regn' does this. Creating works
fine, but a get an error:

  Error running timer `org-element--cache-sync': (error "Invalid search bound 
(wrong side of point)")

and:

  condition-case: Capture template `hr': Invalid table line specification "III-1

I use something like:

#+begin_src emacs-lisp
(org-element-map (org-element-parse-buffer) 'headline
   (lambda (hl)
 (and
  (string= "Rechnungen" (car (org-element-property :title hl)))
  (= 1 (org-element-property :level hl))
  (org-element-property :begin hl)))
   nil t)
#+end_src

To find the Position in the file and regular

: (insert "a huge string")

To insert new heading and table structure. The new structure is created,
but something breaks caching. How can I insert the new structure without
breaking caching?

Thanks for any pointers.

P.S.
Org-mode version 8.3.2 
(release_8.3.2-359-g6b2c38 @ /home/thommy/git-emacs/org-mode/lisp/)

GNU Emacs 24.5.1 (i686-pc-linux-gnu, GTK+ Version 2.24.23) 
of 2015-07-03 on thommy-desktop

-- 
Bis neulich ...
  Thomas



Re: [O] Proposal and RFC for improving ob-python

2015-12-07 Thread Ondřej Grover
TL;DR for those that may have been scared off by the length of my previous
email:
I propose a method of improving ob-python.el by using a progn-like eval()
Python function which can wrap and execute source blocks.

If this list is not appropriate for discussion of improvements to
ob-python.el, could you please give me pointers how to reach people that
might be interested in helping and discussing?

Kind regards,
Ondřej Grover

On Sat, Dec 5, 2015 at 6:17 PM, Ondřej Grover 
wrote:

> Hello,
>
> I've been playing around with the Org-mode Babel framework and I am
> grateful to all the contributors for making this wonderful library. After
> some time I noticed that Python support seems a little hacky and
> inconsistent and after reading through ob-python.el and consulting Python
> documentation I came up with a proposal for improving it.
>
> The ob-ipython project tries to solve this hackiness in a different way by
> using the client-server infrastructure of IPython/Jupyter. That works quite
> well too, but my hope is that improving ob-python.el would also make it
> simpler to use IPython as the python REPL, relying only on the core of the
> Python language.
>
> It essentially boils down to implementing progn-like eval() function in
> Python which would return the result of the last statement if it is an
> expression. I have come up with a prototype of such a function by diving
> into Python scope internals and its AST capabilities. It was written using
> Org-mode and tangling so it is thoroughly documented and explained, a test
> suite is included. This interesting exercise made me appreciate Lisp even
> more. Here it is
> https://github.com/smartass101/python_block_eval
> I haven't licensed it yet, because I'm not sure what license would be
> appropriate if it was used by org-mode. Any suggestions?
>
> My proposal is to implement an equivalent of the following bash pseudo
> code for non session mode
>
> python -i << HEREDOC_END
> ret = block_eval("""
> 
> """)
> open().write(str(ret))
> HEREDOC_END
>
> For session mode it would be even simpler, lines containing HEREDOC above
> would be dropped and the rest piped directly into the Python REPL.
>
> This also means that the 'org_babel_python_eoe' string indicator may not
> be necessary anymore because end of evaluation would be simply shown by a
> new line with the primary prompt appearing.
>
> The reason why `python -i` (force interactive mode) is used is the IMHO
> poor design choice in the CPython implementation (and other implementations
> have a similar issue AFAIK) to have fast but RO access to local variable
> scope in non-top-level (i.e. functions calling functions) frames/scopes. I
> tried to hack my way around it in the update_locals_after_eval branch of my
> repo to no avail, perhaps some Pythonista among you may know a solution.
>
> I also favor piping input into `python -i` because it means that a
> temporary file does not have to be created.
>
> As explained in the README.org in my repo, this inconsistency can be
> worked around by explicitly first evaluating the side-effect-only part of
> the block and than the last expression with a direct eval() call for each.
> This makes it longer by 2 lines, but has the advantage of properly handling
> variable scope and separating side-effects, which could be used to e.g.
> suppress output. Nevertheless, I think that for Org-mode Babel usage the
> `python -i` and block_eval() approach suffices, unless someone finds a way
> to use the advantages of the alternative approach to improve ob-python.el
> even further.
>
> I'm not a skilled Elisp programmer, so I wanted to ask around as to the
> feasibility of this endeavor or possibly availability of helping hands
> before I devote more time to this.
>
> Kind regards,
> Ondřej Grover
>


Re: [O] More questions about CSL and org-mode

2015-12-07 Thread Richard Lawrence
Hi John,

John Kitchin  writes:

> Thanks.
>
> Its an interesting jam. You want to have multiple outputs as a
> possibility, but there isn't a robust markup that readily works across
> all backends.

Yes, indeed.  

> On export the in-text citations are transformed to unique text blobs,
> e.g. uuids, and the document exported. The only important features of
> these blobs is that they do not get changed on export, and they are
> unique because we replace them later.
>
> The strings in the bibliography entry are "exported" to convert the
> org-markup to the output format. The in-text citations, expanded
> bibliography and style are sent to the citation processor, which outputs
> replacements and a formatted bibliography in the desired output format.
>
> Finally, you replace each uuid with the appropriate replacement, and
> insert the bibliography where it belongs. That should be the final
> document.

IIUC, the problem with this approach is that it will not work well when
the citation style is note-based rather than inline.  The main
motivation for going "back to Org" is that note-based styles require the
document structure to change as a result of citation processing: new
footnotes have to be inserted, and existing ones have to be renumbered.
That is relatively hard to do if the rest of the document is already in
the target format (except with LaTeX).  By doing citation processing
early in the export process and converting the results to Org, we can
rely on Org's footnote processing to handle this later in the export
process.

As far as I can see, if it weren't for note-based styles, this approach
would work fine.  (Indeed, it is pretty much what the existing org-cite
code does, except that the mapping between citations and their
replacements is done with Lisp data structures rather than via string
replacement in the output buffer.  I stopped work on that right about
the time I realized the existing approach wouldn't work very well with
note-based styles.)

But given the problem about nested formatting, going back to Org at the
level of text replacements doesn't work.  In other words: both of the
simple-minded approaches (process citations directly to text in the
target format, or process them to Org text, then let Org convert them to
the target format) face problems.

I think probably what we'll have to do to accommodate both note-based
styles and the possibility of nested formatting is to get the results of
citation processing in some unambiguous format like HTML or JSON, then
parse it, and then use the result to directly modify the parse tree for
the Org document before continuing the export process.  I can't see an
easier way...can anyone else?

Best,
Richard



Re: [O] Proposal and RFC for improving ob-python

2015-12-07 Thread Kyle Meyer
Hi Ondřej,

Ondřej Grover  writes:

> TL;DR for those that may have been scared off by the length of my previous
> email:
> I propose a method of improving ob-python.el by using a progn-like eval()
> Python function which can wrap and execute source blocks.
>
> If this list is not appropriate for discussion of improvements to
> ob-python.el, could you please give me pointers how to reach people that
> might be interested in helping and discussing?

Thanks for your proposal.  This is the right place to discuss it.  I've
only had the chance to briefly look at this, but I'll try to take a
closer look soon.

--
Kyle



Re: [O] Proposal and RFC for improving ob-python

2015-12-07 Thread Thomas S . Dye
Aloha Ondřej Grover,

Ondřej Grover  writes:

> TL;DR for those that may have been scared off by the length of my previous
> email:
> I propose a method of improving ob-python.el by using a progn-like eval()
> Python function which can wrap and execute source blocks.
>
> If this list is not appropriate for discussion of improvements to
> ob-python.el, could you please give me pointers how to reach people that
> might be interested in helping and discussing?
>
> Kind regards,
> Ondřej Grover

This is a good list to discuss improvements to ob-python.

The authors of Babel in Org mode no longer participate in its
development and AFAICT no one has taken over this responsibility.
Instead, there have been changes to one language or another as issues
arise.

I do know that the Babel authors found ob-python difficult to write and
that problems with it have been identified from time to time on this
list.  My sense is that it could be improved, though I don't use it
often enough myself to know.

At any rate, perhaps you could propose a patch and tests?  If the patch
breaks something, then you'll certainly find users interested in
discussing ob-python :)

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] problem with org-babel-tangle

2015-12-07 Thread Uwe Brauer
>>> "John" == John Kitchin  writes:

> Try


> #+BEGIN_SRC emacs-lisp :tangle yes
>   (setq-default fill-column 79)
> #+END_SRC


thanks works nicely!




Re: [O] problem with org-babel-tangle

2015-12-07 Thread Uwe Brauer
>>> "Thomas" == Thomas S Dye  writes:

   > Aloha Uwe Brauer,
   > Uwe Brauer  writes:

   >> Hello
   >> 
   >> I have the following minimal example
   >> 
   >> :tangle yes
   >> 
   >> #+BEGIN_SRC emacs-lisp
   >> (setq-default fill-column 79)
   >> #+END_SRC

thanks works also nicely.




Re: [O] Proposal and RFC for improving ob-python

2015-12-07 Thread Achim Gratz
Ondřej Grover writes:
> If this list is not appropriate for discussion of improvements to
> ob-python.el, could you please give me pointers how to reach people that
> might be interested in helping and discussing?

The best way to contribute to improving ob-python is by showing a patch
that implements your ideas and still passes all existing tests.  Bonus
points if you add new tests for better coverage or any new functionality
or improvements.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




[O] Embedding and extracting license/author information in an image file

2015-12-07 Thread Julien Cubizolles
I often include images in my org documents and would like to properly
cite the license, and/or author. I was thinking that this could be
simplified by:

* embedding the license/author information in some metadata of the jpg
  or png file (it seems that some standard called xmp can be used to
  embed data in png/jpg [fn:1]) preferably using some emacs tool

* getting org to add a footnote with this information when linking to a
  file with this kind of information.

Could it be done ? Do you know of an emacs package providing read/write
access to this metadata ?

Footnotes:

[fn:1] https://en.wikipedia.org/wiki/Extensible_Metadata_Platform






Re: [O] How to get sum from remote table + how to put in bold?

2015-12-07 Thread Fabrice Niessen
Hello,

Eric S Fraga  writes:
> On Sunday,  6 Dec 2015 at 15:16, Fabrice Niessen wrote:
>>
>> I'm trying to build a template for invoices written in
>> Org... exporting to PDF (and HTML). Will be officially public as soon
>> as it's DONE.
>>
>> Though, I have 2 problems currently:
>>
>> - I'd like to sum up, in table `total', the sub-total column of table
>>   `items'. But the `remote' call does not seem to accept the `vsum'
>>   expression. Is this a foreseen limitation?  Is there a workaround to
>>   this?
>>
>> - I'd like to get the computed amount (last line of `total' table) in
>>   bold (and, if possible, even in a bigger font). How is that doable?
>
> I've fixed your ECM:
>
> 1. moved attr_latex and other latex stuff to before the names of the
>tables and
> 2. inverted the order of vsum and remote so that you do a vsum over what
>the remote function returns.
>
> Seems to work.

I confirm that you *did* fix my first problem. Simple, neat, and smart.
Thanks a lot!

Any idea how to solve my problem #2: get the computed amount in bold
and/or in another color and/or in bigger font?

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] Embedding and extracting license/author information in an image file

2015-12-07 Thread Rasmus
Julien Cubizolles  writes:

> I often include images in my org documents and would like to properly
> cite the license, and/or author. I was thinking that this could be
> simplified by:
>
> * embedding the license/author information in some metadata of the jpg
>   or png file (it seems that some standard called xmp can be used to
>   embed data in png/jpg [fn:1]) preferably using some emacs tool
>
> * getting org to add a footnote with this information when linking to a
>   file with this kind of information.
>
> Could it be done ? Do you know of an emacs package providing read/write
> access to this metadata ?

You could probably use exiftool with org-babel or dynamic blocks to
extract the required data and generated the syntax you want.

Hope it helps,
Rasmus

-- 
ツ




Re: [O] How to get sum from remote table + how to put in bold?

2015-12-07 Thread Rasmus
Hi,

I didn't read OP.

Fabrice Niessen  writes:

> Any idea how to solve my problem #2: get the computed amount in bold
> and/or in another color and/or in bigger font?

Cf. the manual you can use printf syntax,

 
http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc

Thus,

| /Sub-total/  |   6600.00 | \EUR   |
|--+---+-|
| /Tax @ 21%/  |   1386.00 | \EUR   |
|--+---+-|
| *Amount Due* | *7986.00* | *\EUR* |
#+TBLFM: 
@1$2=vsum(remote(items,@3$7..@4$7));%.2f::@2$2=@1*0.21;%.2f::@3$2=vsum(@1..@-1);*%.2f*

Hope this was what you were after.
Rasmus

-- 
Together we will make the possible totay impossible!




Re: [O] Featur request org-table-iterate-table-subtree

2015-12-07 Thread Charles Millar

Hi Aaron,

On 12/03/2015 02:17 PM, Aaron Ecay wrote:

Hi Charlie,

2015ko azaroak 27an, Charles Millar-ek idatzi zuen:

Any thoughts? Any body?

Well, FWIW...

#+tblname’s should be unique within a document.  Your problems stem from
that, and your proposed solutions all work around it in some way.  I
can’t think of any better way to address your desired usage than the
ones you listed (and would caution you that using narrowing to defeat
the uniqueness assumption, while perhaps adequate for the short term, is
fragile and could break at any time).


Thanks for the input.

Charlie




Re: [O] [PATCH] org-protocol: Allow key=val=value2-style URLs

2015-12-07 Thread Sacha Chua
Sacha Chua  writes:

Hello, Aaron, all!

> Beats me, but the previous implementation made it a separate parameter
> for org-protocol-split-data, so I figured I'd carry it upwards into this
...
> Same notes as for hexify. Probably okay either way, but I don't know
> enough about who else uses this code to say. =) I can change it if you'd
> like to make that decision.

On second thought, your suggestion for always unhexifying makes the
calls from the other handlers simpler, so I've attached a corrected patch.
(In fact, my previous implementation forgot to unhexify something!
)

>From 080642a2452995f67709becc37e76ee5dd1dc8d3 Mon Sep 17 00:00:00 2001
From: Sacha Chua 
Date: Wed, 2 Dec 2015 10:53:07 -0500
Subject: [PATCH] org-protocol: Allow key=val=val2-style URLs

* lisp/org-protocol.el: Update documentation.
  (org-protocol-store-link, org-protocol-capture,
  org-protocol-open-source): Accept new-style links.
  (org-protocol-check-filename-for-protocol): Updated documentation.
  (org-protocol-parse-parameters, org-protocol-assign-parameters):
  New functions.

  This allows the use of org-protocol on KDE 5 and makes org-protocol
  links more URI-like. New-style links are of the form:
  org-protocol://store-link?title=TITLE=URL

* testing/lisp/test-org-protocol.el: New file.
---
 lisp/org-protocol.el  | 191 ++
 testing/lisp/test-org-protocol.el | 181 
 2 files changed, 315 insertions(+), 57 deletions(-)
 create mode 100644 testing/lisp/test-org-protocol.el

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 339f2b7..ce7cb36 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -49,7 +49,7 @@
 ;;   4.) Try this from the command line (adjust the URL as needed):
 ;;
 ;;   $ emacsclient \
-;; org-protocol://store-link://http:%2F%2Flocalhost%2Findex.html/The%20title
+;; org-protocol://store-link?url=http:%2F%2Flocalhost%2Findex.html=The%20title
 ;;
 ;;   5.) Optionally add custom sub-protocols and handlers:
 ;;
@@ -60,7 +60,7 @@
 ;;
 ;;   A "sub-protocol" will be found in URLs like this:
 ;;
-;;   org-protocol://sub-protocol://data
+;;   org-protocol://sub-protocol?key=val=val2
 ;;
 ;; If it works, you can now setup other applications for using this feature.
 ;;
@@ -94,20 +94,20 @@
 ;; You may use the same bookmark URL for all those standard handlers and just
 ;; adjust the sub-protocol used:
 ;;
-;; location.href='org-protocol://sub-protocol://'+
-;;   encodeURIComponent(location.href)+'/'+
-;;   encodeURIComponent(document.title)+'/'+
+;; location.href='org-protocol://sub-protocol?url='+
+;;   encodeURIComponent(location.href)+'='+
+;;   encodeURIComponent(document.title)+'='+
 ;;   encodeURIComponent(window.getSelection())
 ;;
 ;; The handler for the sub-protocol \"capture\" detects an optional template
 ;; char that, if present, triggers the use of a special template.
 ;; Example:
 ;;
-;; location.href='org-protocol://sub-protocol://x/'+ ...
+;; location.href='org-protocol://capture?template=x'+ ...
 ;;
-;;  use template ?x.
+;;  uses template ?x.
 ;;
-;; Note, that using double slashes is optional from org-protocol.el's point of
+;; Note that using double slashes is optional from org-protocol.el's point of
 ;; view because emacsclient squashes the slashes to one.
 ;;
 ;;
@@ -233,19 +233,27 @@ protocol - protocol to detect in a filename without trailing colon and slashes.
`org-protocol-the-protocol'.  Double and triple slashes are compressed
to one by emacsclient.
 
-function - function that handles requests with protocol and takes exactly one
-   argument: the filename with all protocols stripped.  If the function
-   returns nil, emacsclient and -server do nothing.  Any non-nil return
-   value is considered a valid filename and thus passed to the server.
+function - function that handles requests with protocol and takes
+   one argument. If a new-style link (key=val=val2)
+   is given, the argument will be a property list with
+   the values from the link. If an old-style link is
+   given (val1/val2), the argument will be the filename
+   with all protocols stripped.
 
-   `org-protocol.el provides some support for handling those filenames,
-   if you stay with the conventions used for the standard handlers in
-   `org-protocol-protocol-alist-default'.  See `org-protocol-split-data'.
+   If the function returns nil, emacsclient and -server
+   do nothing.  Any non-nil return value is considered a
+   valid filename and thus passed to the server.
+
+   `org-protocol.el' provides some support for handling
+   old-style filenames, if you stay with the conventions
+   used for the standard handlers in
+   

Re: [O] problem with org-babel-tangle

2015-12-07 Thread Thomas S . Dye
Aloha Uwe Brauer,

Uwe Brauer  writes:

> Hello
>
> I have the following minimal example
>
> :tangle yes
>
> #+BEGIN_SRC emacs-lisp
>   (setq-default fill-column 79)
> #+END_SRC
>
>
> I put my cursor into the code block and execute C-c C-v t
> and I obtain
>
> Tangled 0 code blocks from new.org
> C-c C-v f gives the same result.
>
> What do I miss?

You need to specify the header and eliminate the empty line before the
source code block.

#+header: :tangle yes
#+BEGIN_SRC emacs-lisp
  (setq-default fill-column 79)
#+END_SRC

Or, put the header argument with the source code block.

#+BEGIN_SRC emacs-lisp :tangle yes
  (setq-default fill-column 79)
#+END_SRC

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [PATCH] org-protocol: Allow key=val=value2-style URLs

2015-12-07 Thread Sacha Chua
Aaron Ecay  writes:

Hello, Aaron, all!

> API change to remove the ‘new-style’ arguments from these functions.
> I don’t have any clever ideas to solve this, and it’s not an objection

How about this approach? If it's new-style, we pass the new-style
property list as the only parameter to the org-protocol function. Since
the standard org-protocol handlers have been updated to deal with
property lists, they should cover maybe 95% of use cases. I've changed
the condition-case to a more general error handler, so anyone with
custom functions (who presumably uses old-style links too) will get the
old-style behaviour and a warning.

> (org-protocol-parse-parameters, org-protocol-assign-parameters): New
> functions.

Done.

> I also think the convention in Changelogs is not to put in details, but
> just to say “New function” or “Accept new-style links”.  A narrative
> explanation can be put in the git commit message below the changelog

I have no idea either. I've simplified the changelog message, though.

>> +(defun org-protocol-parse-parameters (info new-style  
>> default-order unhexify separator)
> Is there ever a case where we would want unhexify to be something other
> than t?  Hexification is imposed by the URL format, there is no optionality

Beats me, but the previous implementation made it a separate parameter
for org-protocol-split-data, so I figured I'd carry it upwards into this
new wrapper function. The previous implementation of
org-protocol-open-source unhexified after parsing the parameters instead
of passing the unhexify parameter to org-protocol-split-data directly.
I'm not sure if anyone's relying on the nuances of that, so I left it
roughly the same.

> about it.  Handler functions get access to the raw string if they need it
> for some reason, I don’t think our helper functions need to bother

Now that I've changed handler functions to use only one parameter, they
don't get the raw strings unless they're greedy handler functions or
they use old-style links... Hmm.

> unhexify != t case. Similarly, I would not have a separator argument,
> but use the value of ‘org-protocol-data-separator’ directly. In the
> rare case that a caller needs to influence the separator, they can
> let-bind that variable. TLDR: can we get rid of unhexify and separator
> arguments?

Same notes as for hexify. Probably okay either way, but I don't know
enough about who else uses this code to say. =) I can change it if you'd
like to make that decision.

>From dbe56d80028da9d335d91673c7871b6ebac0e6e7 Mon Sep 17 00:00:00 2001
From: Sacha Chua 
Date: Wed, 2 Dec 2015 10:53:07 -0500
Subject: [PATCH] org-protocol: Allow key=val=val2-style URLs

* lisp/org-protocol.el: Update documentation.
  (org-protocol-store-link, org-protocol-capture,
  org-protocol-open-source): Accept new-style links.
  (org-protocol-check-filename-for-protocol): Updated documentation.
  (org-protocol-parse-parameters, org-protocol-assign-parameters):
  New functions.

  This allows the use of org-protocol on KDE 5 and makes org-protocol
  links more URI-like. New-style links are of the form:
  org-protocol://store-link?title=TITLE=URL

* testing/lisp/test-org-protocol.el: New file.
---
 lisp/org-protocol.el  | 204 +++---
 testing/lisp/test-org-protocol.el | 181 +
 2 files changed, 328 insertions(+), 57 deletions(-)
 create mode 100644 testing/lisp/test-org-protocol.el

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 339f2b7..b350d40 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -49,7 +49,7 @@
 ;;   4.) Try this from the command line (adjust the URL as needed):
 ;;
 ;;   $ emacsclient \
-;; org-protocol://store-link://http:%2F%2Flocalhost%2Findex.html/The%20title
+;; org-protocol://store-link?url=http:%2F%2Flocalhost%2Findex.html=The%20title
 ;;
 ;;   5.) Optionally add custom sub-protocols and handlers:
 ;;
@@ -60,7 +60,7 @@
 ;;
 ;;   A "sub-protocol" will be found in URLs like this:
 ;;
-;;   org-protocol://sub-protocol://data
+;;   org-protocol://sub-protocol?key=val=val2
 ;;
 ;; If it works, you can now setup other applications for using this feature.
 ;;
@@ -94,20 +94,20 @@
 ;; You may use the same bookmark URL for all those standard handlers and just
 ;; adjust the sub-protocol used:
 ;;
-;; location.href='org-protocol://sub-protocol://'+
-;;   encodeURIComponent(location.href)+'/'+
-;;   encodeURIComponent(document.title)+'/'+
+;; location.href='org-protocol://sub-protocol?url='+
+;;   encodeURIComponent(location.href)+'='+
+;;   encodeURIComponent(document.title)+'='+
 ;;   encodeURIComponent(window.getSelection())
 ;;
 ;; The handler for the sub-protocol \"capture\" detects an optional template
 ;; char that, if present, triggers the use of a special template.
 ;; Example:
 ;;
-;; 

Re: [O] How to get sum from remote table + how to put in bold?

2015-12-07 Thread Eric S Fraga
On Sunday,  6 Dec 2015 at 15:16, Fabrice Niessen wrote:
> Hello,
>
> I'm trying to build a template for invoices written in Org... exporting
> to PDF (and HTML). Will be officially public as soon as it's DONE.
>
> Though, I have 2 problems currently:
>
> - I'd like to sum up, in table `total', the sub-total column of table
>   `items'. But the `remote' call does not seem to accept the `vsum'
>   expression. Is this a foreseen limitation?  Is there a workaround to this?
>
> - I'd like to get the computed amount (last line of `total' table) in bold 
> (and,
>   if possible, even in a bigger font). How is that doable?

I've fixed your ECM:

1. moved attr_latex and other latex stuff to before the names of the
tables and
2. inverted the order of vsum and remote so that you do a vsum over what
the remote function returns.

Seems to work.  See attached.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-379-g38fd09
#+TITLE: Invoice #001
#+OPTIONS:   H:2 num:nil toc:nil

#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper,table]
#+LaTeX_HEADER: \usepackage{tabu}
#+LaTeX_HEADER: \taburulecolor{gray}

* Items

#+ATTR_LaTeX: :environment tabu :align lXlrlrrl
#+name: items
|  | <35>|   |  ||  |   |  |
| Title of job | Description | Type  | Rate || Quantity | Sub-total |  |
|--+-+---+--++--+---+--|
| Consultancy  | Quote template  | Timed |  400 | \EUR/d |  6.5 |   2600.00 | \EUR |
|--+-+---+--++--+---+--|
| Research | Billing invoice template| Timed |  400 | \EUR/d | 10.0 |   4000.00 | \EUR |
#+TBLFM: $7=$6*400;%.2f

* Amount Due

#+latex: \hfill\colorbox{yellow}{\begin{minipage}{7.5cm}
#+ATTR_LaTeX: :environment tabu :align Xrl
#+name: total
| /Sub-total/  | 6600.00 | \EUR |
|+-+--|
| /Tax @ 21%/  | 1386.00 | \EUR |
|+-+--|
| *Amount Due* | 7986.00 | *\EUR* |
#+TBLFM: @1$2=vsum(remote(items,@3$7..@4$7));%.2f::@2$2=@1*0.21;%.2f::@3$2=vsum(@1..@-1);%.2f

#+latex: \end{minipage}}


Re: [O] Problems with capture

2015-12-07 Thread Nicolas Goaziou
Hello,

Thomas Holst  writes:

> I have a little trouble with capture. First here is the setup for one of
> my capture templates:
>
> #+begin_src emacs-lisp
> (setq org-capture-templates
>   '(
> ;; ...
> ("hr" "Rechnung erfassen" table-line (file+function 
> "~/git/org-priv/Univ_Beih.org" th:capure-find-open-vers-regn)
>  "| # | %^u | %^{Arzt/Apotheke} | %^{fr wen|Lida|Oleg|Victor|Simon} | 
> %^{Betrag} | %^u | | | |"
>  :table-line-pos "III-1" :immediate-finish t)
> ;; ...
> ))
> #+end_src
>
> What this template shall achive:
>
> - look if there is an entry (headline) with todo state OPEN
> - if entry exists append a table line
> - if entry does not exist, create a new headline, insert table structure
>   and append line to newly created table.
>
> The function `th:capture-find-open-vers-regn' does this. Creating works
> fine, but a get an error:
>
>   Error running timer `org-element--cache-sync': (error "Invalid search bound 
> (wrong side of point)")
>
> and:
>
>   condition-case: Capture template `hr': Invalid table line specification 
> "III-1
>
> I use something like:
>
> #+begin_src emacs-lisp
> (org-element-map (org-element-parse-buffer) 'headline
>(lambda (hl)
>  (and
>   (string= "Rechnungen" (car (org-element-property :title hl)))
>   (= 1 (org-element-property :level hl))
>   (org-element-property :begin hl)))
>nil t)
> #+end_src
>
> To find the Position in the file and regular
>
> : (insert "a huge string")
>
> To insert new heading and table structure. The new structure is created,
> but something breaks caching. How can I insert the new structure without
> breaking caching?

I think I fixed something related recently. Could you update Org and try
again?


Regards,

-- 
Nicolas Goaziou



Re: [O] problem with org-babel-tangle

2015-12-07 Thread John Kitchin

Try


#+BEGIN_SRC emacs-lisp :tangle yes
  (setq-default fill-column 79)
#+END_SRC

Uwe Brauer writes:

> Hello
>
> I have the following minimal example
>
> :tangle yes
>
> #+BEGIN_SRC emacs-lisp
>   (setq-default fill-column 79)
> #+END_SRC
>
>
> I put my cursor into the code block and execute C-c C-v t
> and I obtain
>
> Tangled 0 code blocks from new.org
> C-c C-v f gives the same result.
>
> What do I miss?
>
> Thanks
>
> Uwe Brauer

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu