[O] org-calendar-holiday and local holidays

2015-03-01 Thread Melleus
Hi to all.

I'm afraid to ask. But... Anyway. Does %%(org-calendar-holiday) know
about holiday-local-holidays? I'm not programmer, sorry. I've set up
those local holidays but cannot see them in my agenda.

Thanks in advance.




Re: [O] Citation syntax: a revised proposal

2015-03-01 Thread Rasmus
Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 That would be wonderful!  Will you publish a patch or, better, a branch
 somewhere, even if it's not ready for master?

 I created a new branch: wip-cite. It introduces support for @key
 [@key] [cite:pre @key post] and [(cite):pre @key post] constructs.

Cool.  I'll check it out.

 However, opinion from advanced citation users on this ML has more weight
 that mine. Instead of trying to figure out hypothetical crazy uses for
 citations (e.g., using 50 different citation commands), I'd rather hear
 from people with real citation requirements who are willing to use this
 machinery.

I use a similar setup and beside the above I use citeauthor a lot.
Cite/(cite) covers something like 80% of my needs, but (later) I think
something like org-cite-add-new-subtype should be there.  With a nice API.
Or we can add a couple of more subtypes.

 At this point, we probably need to implement a BIBLIOGRAPHY keyword
 (files) and BIBLIOGRAPHY_BACKEND (bibtex, zotero, jabref...) and provide
 basic tools to handle citations in an Org document.

Probably a CITATION_STYLE as well, e.g. numeric, author-year, etc.

I'll try to look at biblatex support for ox-latex, which should be the
easiest target, but ATM I'm a bit busy.  For bibtex-outside-of-latex,
reftex-cite.el is decent, but not great¹.  Still, it may be easier to fix
it up that to write our own bibtex parser.  

Or did John already solve this problem?  Perhaps, org-bibtex offer good
support for parsing data?

Note, something like author-parsing is non-trivial, since bibtex both
support firstname lastname and lastname, firstname.  Further, for
author-year style, you'd sometimes want to support no. of authors (see %a
in reftex-format-citation).

I have noticed tex4ht manages to do proper citations in odt.  Perhaps we
can study the resulting xml and how it adds a entries.  Formatting is
tricky...  Perhaps only zotero is useful here.

Latexml has some support for bibtex in html, but I haven't studied it
properly.  In any case for author-year html is easy up to the point of
creating the bibliography (as with odt).

Cheers,
Rasmus

Footnotes: 
¹   E.g. if curly brackets are not removed from year it will
include it, it only understands lastname, firstname for author (not
firstname lastname) etc.


-- 
The Kids call him Billy the Saint




Re: [O] org-calendar-holiday and local holidays

2015-03-01 Thread Nick Dokos
Melleus mell...@openmailbox.org writes:

 Hi to all.

 I'm afraid to ask. But... Anyway. Does %%
 about holiday-local-holidays? I'm not programmer, sorry. I've set up
 those local holidays but cannot see them in my agenda.


Can you see them in the calendar? If so, I think you should
be able to see them in the agenda too. If you can't see them
in the calendar, then read the doc for calendar-holidays
carefully, in particular this paragraph:

,
| ...
| They also initialize the default value of `calendar-holidays',
| which is the default list of holidays used by the function
| `holiday-list' in the non-interactive case.  Note that these
| variables have no effect on `calendar-holidays' after it has been
| set (e.g. after the calendar is loaded).  In that case, customize
| `calendar-holidays' directly.
| ...
`

-- 
Nick




Re: [O] Bug: `org-edit-special` doesn't respect dedicated windows

2015-03-01 Thread Nicolas Goaziou
Hello,

Alexis flexibe...@gmail.com writes:

 ECM:

 1. emacs -Q
 2. Split frame into two windows via `C-x 3`.
 3. Make one *scratch* buffer window dedicated via:
(a) `M-:`
(b) (set-window-dedicated-p (selected-window) t)
 4. Select the other window.
 5. Visit file `test.org`, containing:

 * Test
 #+begin_src emacs-lisp
   (message Test.)
 #+end_src

 6. Move point within source block, do `org-edit-special`.
 7. The *scratch* buffer window will have its contents changed to 
contain an Org buffer.

Org uses `org-src-window-setup' to control the display, which overrides
dedicated windows. You may want to customize the former.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Table's documentation -- a non patch proposal

2015-03-01 Thread ML

Hi,
   finally I will give a first version not as a patch (my ideas implies 
some changes in section  numbering and I fear to break something as a 
non-texi user).


*First:*reorganization of Tables part

3. Tables

3.1 Tables operations

3.1.1 Table syntax

here the introduction section of 3.1

3.1.2 The build-in table editor

...

3.1.3 Column width an alignment

3.1.3 Column groups

3.2 The spreadsheet

...

 move Named references after Range references

 swap Field coordinates in formulas and Remote references

  ...

3.3 Other functionalities

3.3.1 The Orgtlb minor mode

...

3.3.2 Org-plot

...

*Second:*  in (the new) § 3.1.1 add

A table can be named for references operations ( in other tables link to Remote 
reference in §3.5.1 or in source code link to 14.8.2.1 ) babel Remote references) 
using #+NAME: option:

here an exemple

Furthermore, during export (see ...) a caption can be attached to the table 
using #+CAPTION: option :

here an exemple

part Image an tables can be modified consequently


If you think this can be a good idea, I will try to encore it in texi 
without breaking the file...


Thierry


Hi,
   I will try to make a patch.
Thierry



Le 25/02/2015 14:11, Nicolas Goaziou a écrit :

Hello,

POSTMASTER @THIERRY-PELLE.EU postmas...@thierry-pelle.eu writes:


reading the 8.3beta manual, I note that *#+NAME: *and *#+CAPTION:*
were not clearly introduced in the Chapter on tables. (the first in
Remote References the last in Images and Tables).
I wonder if it is a good a idea to introduce them in the Chapter or
tables (just befor The Orgtbl minor mode), refering Remote
References and Images and Tables.

What do you suggest instead?


Regards,







Re: [O] Firefox 36 and Links

2015-03-01 Thread Stefan-W. Hahn
Mail von Scott Randby, Thu, 26 Feb 2015 at 17:23:56 -0500:

Hello,

 I know this isn't exactly a question about org, but it affects org,
 so I'm hoping someone on this list might be willing to help me.
 
 The -remote command line option has been removed from Firefox 36:

I ran in the same problem on linux. 

 I can't get the patch to work with Emacs 24.3 or 24.2. This could be
 due to my very poor knowledge of elisp or that the patch isn't
 compatible with those versions of Emacs.

I worked around it with a little elisp:

#+BEGIN_SRC elisp
(use-package browse-url
  :if running-linux
  :init
  (progn
(let ((str (shell-command-to-string firefox -v)))
  (when (and (string-match Mozilla Firefox \\([0-9]+\\)\\.[0-9]+ str)
 (= (string-to-number (match-string 1 str)) 36))
(advice-add 'browse-url-firefox :around 'browse-url-firefox-version-36)
(message Advice added for `browse-url-firefox' to call firefox = v36)
))
)
  :config
  (progn

(defun browse-url-firefox-version-36 (orig-fun url optional new-window)
  Linux version of firefox (=v36.0) does not know the command
  \-remote openURL(...)\. So act in linux as on windows and
  give just the requested URL as command line parameter.
  (let ((system-type 'windows-nt))
(apply orig-fun url new-window)))
)
  )

#+END_SRC

If you're not using use-package then the following minimal code will suffice:

#+BEGIN_SRC elisp

  (require 'browse-url)
  (advice-add 'browse-url-firefox :around 'browse-url-firefox-version-36)
  (defun browse-url-firefox-version-36 (orig-fun url optional new-window)
Linux version of firefox (=v36.0) does not know the command
  \-remote openURL(...)\. So act in linux as on windows and
  give just the requested URL as command line parameter.
(let ((system-type 'windows-nt))
  (apply orig-fun url new-window)))

#+END_SRC

With kinde regards,
Stefan

-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.



Re: [O] refiling with helm

2015-03-01 Thread Stefan-W. Hahn
Mail von Xebar Saram, Sat, 28 Feb 2015 at 08:19:17 +0200:

Hello,

 I was wondering if anyone uses helm for refiling org capture data. and if
 so can anyone share his methods/setup?

I switched from ido to helm around last christmas and it is hard to retrain
my fingers and habbits...

Here is, what I'm doing with refiling with helm:

#+BEGIN_SRC elisp

  (defun helm-refile-completing-read (orig-func prompt collection optional 
predicate require-match
initial-input hist def 
inherit-input-method)
Completing function for org-refile
(helm-completing-read-default-1
 prompt collection predicate require-match
 initial-input hist def inherit-input-method
 org-refile nil t)
)

  (advice-add 'org-olpath-completing-read :around #'helm-refile-completing-read)

#+END_SRC

With kind regards,
Stefan

-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.



Re: [O] refiling with helm

2015-03-01 Thread Ian Barton
On Sat, Feb 28, 2015 at 08:19:17AM +0200, Xebar Saram wrote:
 I was wondering if anyone uses helm for refiling org capture data. and if
 so can anyone share his methods/setup?

 googling for it didnt yield to many results (especially for people like me
 who dont know to code :))

I tried using the patch mentioned in
http://comments.gmane.org/gmane.emacs.orgmode/87651. However, I
encountered some problems. The main one was that completion wasn't
showing all possible targets. I went back to using ido for
refile. However, I wold be interested if someone has got this to work.
--
Best wishes,

Ian.



Re: [O] Bug: `org-edit-special` doesn't respect dedicated windows

2015-03-01 Thread Alexis


On 2015-03-01T20:20:06+1100, Nicolas Goaziou said:

NG Org uses `org-src-window-setup' to control the display, which 
NG overrides dedicated windows. You may want to customize the 
former.


Thanks for bringing my attention to this variable! However, 
setting it to 'current-window seems to have no effect; rather than 
the Org buffer being replaced by an Emacs Lisp buffer, either a 
new window is created for the latter, or an existing 
(non-dedicated) window is taken over by the latter. Am i missing 
something / doing something else wrong?


(Btw, i'm using version 20150223 of Org from the orgmode.org ELPA 
- sorry i didn't mention that in my previous message!)



Alexis.



Re: [O] refiling with helm

2015-03-01 Thread Stefan-W. Hahn
Mail von Stefan-W. Hahn, Sun, 01 Mar 2015 at 09:13:26 +0100:

Hello,

sorry, on addition:

 
 #+BEGIN_SRC elisp

  (setq org-completion-use-ido nil
org-completion-use-iswitchb nil
org-refile-use-outline-path nil
org-completion-handler nil)

 
   (defun helm-refile-completing-read (orig-func prompt collection optional 
 predicate require-match
 initial-input hist def 
 inherit-input-method)
 Completing function for org-refile
 (helm-completing-read-default-1
  prompt collection predicate require-match
  initial-input hist def inherit-input-method
  org-refile nil t)
 )
 
   (advice-add 'org-olpath-completing-read :around 
 #'helm-refile-completing-read)
 
 #+END_SRC

With kind regards,
Stefan

-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.



[O] Running Org Babel code blocks on Mesos!

2015-03-01 Thread Waldemar Quevedo
Hello Org mode users,

I've had the idea for a while of combining Org Babel with Mesos,
since I believe that such mix could be an interesting alternative
for having descriptive deployments of workloads on a cluster
by using Org syntax.

I finished a very, very, very early version of it already so I'd like to
share.
(yes, it supports Docker...)

I named it 'Borges', hope the name makes sense :)
https://github.com/wallyqs/borges

This is very early experiment, but any feedback is very appreciated!

Regards,

- Waldemar


Re: [O] Citation syntax: a revised proposal

2015-03-01 Thread Thomas S. Dye
Rasmus ras...@gmx.us writes:

 Probably a CITATION_STYLE as well, e.g. numeric, author-year, etc.

I suggest we keep Patrick Daly's distinction between citation style
and citation mode.  Hence, #+CITATION_MODE instead
of #+CITATION_STYLE. 
 
IIUC, there are three citation modes:
 1. Harvard, author-date, author-year, etc.  In this mode, some
citation detail is given at the point of the Org mode citation.
 2. Vancouver, footnote, etc.  In this mode, the point of the Org mode
citation is indicated by a number that references a footnote or
endnote where some citation detail is given.  In some variants of
this mode, the full citation information is provided in the
footnote or endnote and no separate bibliography is used, while in
others only partial citation detail is provided in the footnote or
endnote and a bibliography is provided.
 3. Numerical.  In this mode, no citation detail is inserted, only a
number that references an entry in the bibliography.

Within each of these three modes, there are numerous citation styles,
which refer to the placement of items and the kinds of punctuation in
the citation.

In the wild, a particular citation style might appear with one
bibliographic style or another.  Hence, the separation of citation
styles from bibliographic styles in systems such as biblatex.

The following tables describe my uncertainty about how the Org mode
citations map to these three modes.  The tables show example (modulo
style) replacement text at the point of the Org mode citation.  Note
that the Vancouver mode will also require the addition of citation
information in a footnote or endnote, separate from the position of the
Org mode citation.

#+name: first-map
| citation | Harvard   | Vancouver | numerical |
|--+---+---+---|
| @key | author year   | 1 | 1 |
| [@key]   | (author year) |   (1) |   (1) |
| cite:| author year   | 1 | 1 |
| (cite):  | (author year) |   (1) |   (1) |

#+name: second-map
| citation | Harvard   | Vancouver  | numerical  |
|--+---++|
| @key | author (year) | author (1) | author (1) |
| [@key]   | (author year) | (1)| (1)|
| cite:| author (year) | author (1) | author (1) |
| (cite):  | (author year) | (1)| (1)|

Or, is there a third-map that better captures what we're discussing?

All the best,
Tom

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



Re: [O] org-calendar-holiday and local holidays

2015-03-01 Thread Alexis


[Crossposted to the help-gnu-emacs list, for possible advice on 
whether or not this involves a bug in GNU Emacs.]


On 2015-03-02T09:29:09+1100, Melleus said:

M I'm afraid to ask. But... Anyway. Does 
%%(org-calendar-holiday) M know about holiday-local-holidays? 
I'm not programmer, sorry. I've M set up those local holidays 
but cannot see them in my agenda.


You can examine the definition of an ELisp function by:

1. typing C-h f whilst on a function;
2. typing RET to take you to the documentation for that function;
3. typing TAB then RET to take you to the function definition.

Starting with point on `org-calendar-holiday`, we find that:

- `org-calendar-holiday` calls (if available) 
 `calendar-check-holidays` or (otherwise) 
 `check-calendar-holidays`;


- `calendar-check-holidays` calls `calendar-holiday-list`;

- `calendar-holiday-list` makes use of the `calendar-holidays` 
 variable.


We can examine the documentation for the `calendar-holidays` 
variable by moving point onto and typing C-h v RET. On my setup 
(manually compiled Emacs 24.4.1 on Debian Wheezy(+updates) x86_64 
together with Org 20150223), the documentation suggests that 
`calendar-holidays` makes use of the `holiday-local-holidays` 
variable; and the documentation for `holiday-local-holidays` 
merely refers us back to the documentation for 
`calendar-holidays`.


When i scroll down to look at the current value of 
`calendar-holidays`, however, i see that neither the current value 
nor the original value makes any reference to the 
`holiday-local-holidays` variable. And indeed, when i examine my 
agenda for next Monday, which is a local holiday i've specified in 
`holiday-local-holidays`, i can't see that local holiday. To fix 
this, i use M-: to evaluate:


   (setq calendar-holidays (append calendar-holidays 
   holiday-local-holidays))


after which the local holiday next Monday appears in my Org 
agenda.


Given the documentation for the `calendar-holidays` variable, the 
fact that i need to manually add the value of the 
`holiday-local-holidays` variable to `calendar-holidays` seems to 
me like it might be a coding or documentation bug in Emacs  ?



Alexis.



Re: [O] Citation syntax: a revised proposal

2015-03-01 Thread Thomas S. Dye
Rasmus ras...@gmx.us writes:

 I have noticed tex4ht manages to do proper citations in odt.  Perhaps we
 can study the resulting xml and how it adds a entries.  Formatting is
 tricky...  Perhaps only zotero is useful here.

IIUC, tex4ht uses the dvi (device independent format of Knuth) file
produced by LaTeX.  Thus, it is able to take advantage of the work of
sophisticated citations managers built on bibtex.  I think of it,
perhaps naively, as a program that can be configured to generate dvi
drivers for odt, html, xml, etc.

hth,
Tom

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



Re: [O] Citation syntax: a revised proposal

2015-03-01 Thread Thomas S. Dye
Aloha Aaron,

Aaron Ecay aarone...@gmail.com writes:

 By way of illustration, Biblatex (AFAICT) doesn’t provide a possessive
 citation command, which was mentioned by someone in this thread (or its
 predecessor) as a desideratum.  I’d expect a savvy latex user to put in
 their preamble:

 \newcommand{\citeposs}[1]{\citeauthor{#1}’s (\citeyear{#1})}

 That doesn’t really work in org.  (It could be put together with an org
 macro, but would lose the kind of click-to-view functionality that
 org-ref already provides and which would be ported to the new syntax as
 well.)

#+name: define-citeposs-link
#+begin_src emacs-lisp :results silent :exports none
(org-add-link-type 
 citeposs 'ebib-open-org-link
 (lambda (path desc format)
   (cond
((eq format 'html)
 (format (cite%s/cite) path))
((eq format 'latex)
 (format \\citeauthor{%s}'s (\\citeyear{%s}) path path)
#+end_src

I haven't tested this, but I think it would work in Org mode.

All the best,
Tom

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



[O] org-babel-execute: being exported

2015-03-01 Thread Jarmo Hurri

Greetings.

I have now partially implemented support for the Processing programming
language in Babel. In particular, in my working branch Babel now
recognizes Processing blocks, and shows the resulting sketch in an
external viewer when the block is executed.

The second part is HTML export. When the results are exported as HTML,
the Processing code will be embedded in HTML using processing.js
module. The browser then draws the sketch when the HTML is viewed. So
although technically the code is exported, in reality the results (the
sketch) are exported.

For the HTML export to work as described above, in the Org file one must
have :exports results. The Processing code will thus be executed for
the results to be available for exporting. But as described above, I
want code execution to show the sketch when not exporting. So it seems
to me that function org-babel-execute:processing should work differently
during HTML export (produces a file with embedded Processing code) and
for example when the code is evaluated using C-c C-c (shows the sketch
in an external viewer).

Which brings me to my questions.

1. How can I identify, in org-babel-execute:processing, if the code is
   executed for export or for some other reason?

2. Or do I need to navigate through this problem via another route: for
   example, tie sketch viewing to another function/key sequence? In this
   case evaluation of the code would _always_ produce the code embedded
   in HTML.

Jarmo




Re: [O] refiling with helm

2015-03-01 Thread Kyle Meyer
Stefan-W. Hahn stefan.h...@s-hahn.de wrote:
[...]
 sorry, on addition:
 #+BEGIN_SRC elisp

   (setq org-completion-use-ido nil
 org-completion-use-iswitchb nil
 org-refile-use-outline-path nil
 org-completion-handler nil)

   (defun helm-refile-completing-read (orig-func prompt collection optional 
 predicate require-match
 initial-input hist def 
 inherit-input-method)
 Completing function for org-refile
 (helm-completing-read-default-1
  prompt collection predicate require-match
  initial-input hist def inherit-input-method
  org-refile nil t)
 )

   (advice-add 'org-olpath-completing-read :around 
 #'helm-refile-completing-read)

 #+END_SRC

Are you sure the advice is necessary?  If either
org-refile-use-outline-path (as above) or
org-outline-path-complete-in-steps is nil, it doesn't seem that
org-olpath-completing-read will be called.  The relevant part of
org-refile-get-location (master, f8731ea) is

(cfunc (if (and org-refile-use-outline-path
org-outline-path-complete-in-steps)
   'org-olpath-completing-read
 'org-icompleting-read))

Then, if org-completion-use-ido and org-completion-use-iswitchb are nil,
org-icompleting-read will use completing-read, which helm-mode should be
able to override.

So, given the default values, I think the only setup needed to get
generic helm completion is

(setq org-outline-path-complete-in-steps nil)

(require 'helm)
(require 'helm-config)
(helm-mode 1)

However, I'm not an experienced helm user, so perhaps others are
noticing issues that I'm not.

--
Kyle



[O] Colors for tags in Column View

2015-03-01 Thread Gonzalo Camarillo
Hi,

I am using Org Mode 8.2.10 with Emacs 24.4.1 on Windows 7.

I have assigned colors to my tags as follows:

 (setq org-tag-faces
   '((Tag1 :background LawnGreen) (Tag2  :background yellow)))

The colors work fine in an org file and in the Agenda View. However,
when I am in Column View, the tags do not get those colors. I guess it
is an issue with the faces used by the Column View overlay.

Is there a way to assign a color to a tag so that it works in Column View?

Thanks,

Gonzalo




Re: [O] Citation syntax: a revised proposal

2015-03-01 Thread Nicolas Goaziou
Richard Lawrence richard.lawre...@berkeley.edu writes:

 That would be wonderful!  Will you publish a patch or, better, a branch
 somewhere, even if it's not ready for master?

I created a new branch: wip-cite. It introduces support for @key
[@key] [cite:pre @key post] and [(cite):pre @key post] constructs.

As a reminder, I prefer subkeys over plists because they have a smaller
footprint in the document. Also, as already explained, having many
subkeys is not a problem with proper tooling (e.g., some completion with
descriptions). Note that this is closer to org-ref requirements,
probably making easier to port some features into core.

However, opinion from advanced citation users on this ML has more weight
that mine. Instead of trying to figure out hypothetical crazy uses for
citations (e.g., using 50 different citation commands), I'd rather hear
from people with real citation requirements who are willing to use this
machinery.

At this point, we probably need to implement a BIBLIOGRAPHY keyword
(files) and BIBLIOGRAPHY_BACKEND (bibtex, zotero, jabref...) and provide
basic tools to handle citations in an Org document.


Regards,