Re: [O] [RFC] removing all results WAS: Re: idempotency ... org-babel-remove-inline-result

2015-02-04 Thread Daniele Pizzolli
Hello Charles,

"Charles C. Berry" writes:

> Further Daniele's response to '[bug] Removing the Babel results':
>
> http://article.gmane.org/gmane.emacs.orgmode/94604
>
> See below.
>
>> But why a `native' function? You know how to achieve this result and
>> can
>>
>> 1. add a customized function to your init file,
>> 2. submit a snippet to Worg, and/or
>> 3. contribute an *add on*, and/or
>> 4. argue for changes/additions to the Org code base, what you call a
>>   `native' function.
>>
>> Option 4 generates work for those who maintain Org code, so it needs
>> to be justified in terms of usefulness to other users and
>> issues in the code that it might fix or complicate.
>>
>> Even if 4 is the right path, a decision is needed on whether to add
>> new functions, or change the behavior of existing functions (possibly
>> adding a new variable or customization). The latter might be cleaner,
>> but runs the risk of breaking someone's code.
>
> The latter notion is along these lines:

Thanks for your reasoning and conclusion.

>
> #+BEGIN_SRC emacs-lisp
>(defun org-babel-remove-result-one-or-many (x &optional keep-keyword)
>  "Remove the result of the current source block.
>If called with a prefix argument, remove all result blocks and
>results macros in the buffer. When KEEP-KEYWORD is non-nil, allow
>RESULTS keywords to remain."
>  (interactive (list current-prefix-arg
> (y-or-n-p "Keep RESULTS keyword(y/n):")))

(y/n) seems to be redundant: y-or-n-p prints the options by itself.

>  (if x
>  (org-babel-map-executables nil
>(org-babel-remove-result nil keep-keyword)
>(org-babel-remove-inline-result))
>(org-babel-remove-result nil keep-keyword)
>(org-babel-remove-inline-result)))
> #+END_SRC
>
> which seems to handle Sebastien's `bug' if the user responds with 'y' (or 
> a calling function has a non-nil `keep-keyword'.

Seems reasonable to me.  But I still think that one-or-many does not
have a lot of sense since there is the one-case function already.

Is it possible to call it by something like C-u C-u M-x
org-babel-remove-result-one-or-many or by a custom keystroke and avoid
the interactive prompt and have it to clean all the result keeping the
keyword (without writing a function or using lambda)?

As a novice I like interactive prompt because you can be lead through
the choices, but I do not want to be annoyed by them when I become
expert and have the answer ready and it is almost always the same one.

If not, no worries, I think I will wrap in a custom one.

Thanks again,
Daniele



[O] Reference not found in buffer

2015-02-04 Thread Thierry Pellé

Hello,
I try to export a somewhat long file but the process fails echoing
"Reference wdp not fond in buffer"
I didn't manage to locate the wpd related occurence using I-Search.
Is there another method to locate it?

Thanks,
Thierry



Re: [O] Reference not found in buffer

2015-02-04 Thread Sebastien Vauban
Thierry Pellé wrote:
> I try to export a somewhat long file but the process fails echoing
> "Reference wdp not fond in buffer"
 ^^^

> I didn't manage to locate the wpd related occurence using I-Search.
^^^

> Is there another method to locate it?

Didn't you make the same mistake as now?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Citations, continued

2015-02-04 Thread Julian M. Burgos
Thanks everyone for thinking about citations.  I wish I knew enough lisp
to make a contribution to this work... for now I can only sit on the
side and clap.

I am also a big fan of org-ref.  Although my needs are not complex
(basically citing from a BibLatex file and exporting to LaTex), I found
that having "actionable" citations is tremendously useful.  In
particular, clicking on the citation allows to open the pdf file with
the reference, the .bib file, or an org mode file with notes.  I hope
this feature is kept in whatever new org-mode reference system you guys
develop.

Keep up the good work!
All the best,

Julian

Vikas Rawal writes:

> Org-ref is very functional and has so far been able to deal with much of my 
> needs. So, I just hope we are not trying to fix something that is not broken.
>
> The real need in the context of citations is to somehow extend the 
> bibtex/biblatex integration to other export formats (odt/html, most 
> importantly). Will all the new stuff that is being proposed take us in that 
> direction? 
>
> Vikas
>
>
>
>> On 03-Feb-2015, at 7:26 am, Richard Lawrence  
>> wrote:
>> 
>> Hi Rasmus and all,
>> 
>> Thanks for your comments!
>> 
>> Rasmus  writes:
>> 
 ** Backend-agnostic formatting properties
 *** Selecting specific fields
 Selecting specific fields to display could be done by appending field
 names to cite keys after colons, much like Org tags:
 #+BEGIN_QUOTE
 [See @Doe99, pp. 34--45; also @Doe00:year, section 6] 
 
 [See their article in @Doe99:journal:year.] 
 #+END_QUOTE

-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is



Re: [O] Citations, continued

2015-02-04 Thread Nicolas Goaziou
Hello,

Erik Hetzner  writes:

> I concentrated on getting the parser to recognize valid citations
> first. I have now finished this part (excepting any bugs, of course :)
> and will need to add code to generate a proper parse tree. Then it can
> be integrated into org-element.el.

The point of "org-element.el" is to generate a parse tree. If you
generate it yourself, you do not need the library. Therefore, I'm not
sure to understand the "integration" part.

Also, AFAIU, the syntax for valid citations is not defined explicitly so
far. For example, I don't think it was discussed if any subset of Org
objects (e.g., macros or bold text) is allowed in a citation. Is there
any document we could merge into Org syntax document?


Regards,

-- 
Nicolas Goaziou



[O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
I plan out my days in the agenda using `i d` (org-agenda-diary-entry). I then 
move to the newly added entry to edit todo status, the hour of the item, 
deadlines, tags, and schedules. This would be tremendously facilitated if point 
automatically moved to the newly created item, rather than my having to search 
through my lengthy list of items to find the new entry. How can I implement 
this, and shouldn't it be a default? 



Re: [O] Agenda add item, move point

2015-02-04 Thread John Kitchin
This sounds interesting, but I don't understand what you are trying to
do.

In my agenda, when I press `i d` i get a new diary entry, and the point
is on that entry. But it is a diary entry with no todo, and no new org
entry. Do you do something else for that?

Tory S. Anderson writes:

> I plan out my days in the agenda using `i d` (org-agenda-diary-entry). I then 
> move to the newly added entry to edit todo status, the hour of the item, 
> deadlines, tags, and schedules. This would be tremendously facilitated if 
> point automatically moved to the newly created item, rather than my having to 
> search through my lengthy list of items to find the new entry. How can I 
> implement this, and shouldn't it be a default?

--
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] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Your point is on the created entry? When I do `i d` the entry is created 
somewhere down in the midst of my big list, and I have to use C-s to search for 
it and then I add things (such as with `t` for todo, `C-d` for deadline, `>` 
for additional time details). The trouble is finding it in the list, which 
seems to require something like `C-s` and searching for some of the text I just 
entered. 

I'm using Org-mode version 8.2.10 (8.2.10-30-gca21b7-elpa). I'm also not using 
regular diary, but the following (perhaps relevant?). I would LOVE to have my 
point automatically go to the newly created item, as yours seems to. 

--8<---cut here---start->8---
(setq org-agenda-include-diary nil)
;; org-agenda
(setq org-agenda-diary-file "~/emacs/agenda.org"
  org-special-ctrl-o nil
  org-agenda-span 'day)
--8<---cut here---end--->8---


John Kitchin  writes:

> This sounds interesting, but I don't understand what you are trying to
> do.
>
> In my agenda, when I press `i d` i get a new diary entry, and the point
> is on that entry. But it is a diary entry with no todo, and no new org
> entry. Do you do something else for that?
>
> Tory S. Anderson writes:
>
>> I plan out my days in the agenda using `i d` (org-agenda-diary-entry). I 
>> then move to the newly added entry to edit todo status, the hour of the 
>> item, deadlines, tags, and schedules. This would be tremendously facilitated 
>> if point automatically moved to the newly created item, rather than my 
>> having to search through my lengthy list of items to find the new entry. How 
>> can I implement this, and shouldn't it be a default?
>
> --
> 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



[O] [bug?] Link to be exported only in HTML

2015-02-04 Thread Sebastien Vauban
#+TITLE: ECM Links for HTML only

* Test

If I want to include a link (GPL logo, here) to the HTML export, I should put it
in a block, right?

#+begin_html
[[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
#+end_html

Well, that does not work: the link is not rendered as a link; it's copied
"verbatim".

OTOH, the link on its own is correctly exported to HTML:

[[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]

... but it fails to be exported to LaTeX (causing a "TeX capacity exceeded"
error), reason why I must not have the link when exporting to LaTeX.

Is this a bug?  Is there an alternative?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug?] Link to be exported only in HTML

2015-02-04 Thread Ista Zahn
On Wed, Feb 4, 2015 at 10:15 AM, Sebastien Vauban
 wrote:
>
> #+TITLE: ECM Links for HTML only
>
> * Test
>
> If I want to include a link (GPL logo, here) to the HTML export, I should put 
> it
> in a block, right?
>
> #+begin_html
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
> #+end_html
>
> Well, that does not work: the link is not rendered as a link; it's copied
> "verbatim".


You need to write the link in html, not org:

#+begin_html
  http://opensource.org/licenses/GPL-3.0";>http://img.shields.io/:license-gpl-blue.svg";
alt=":license-gpl-blue.svg" />
#+end_html


>
>
> OTOH, the link on its own is correctly exported to HTML:
>
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
>
> ... but it fails to be exported to LaTeX (causing a "TeX capacity exceeded"
> error), reason why I must not have the link when exporting to LaTeX.

I can't replicate that, for me it exports to

\href{http://opensource.org/licenses/GPL-3.0}{\url{http://img.shields.io/:license-gpl-blue.svg}}

and compiles just fine.

>
> Is this a bug?  Is there an alternative?
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>



Re: [O] Citations, continued

2015-02-04 Thread Richard Lawrence
Erik Hetzner  writes:

>> The ideal would be if citeproc would take care of proper formatting
>> of all such citation types, given just an ordered list of the fields
>> that should appear.  I don't know if CSL supports this, though; do
>> you?
>
> I’m not entirely sure what you mean. The authors of citeproc have come
> up with a huge number of styles which seem to satisfy people’s needs.
> What appears in the in-text citation is configurable, see:
>
>   
> http://citationstyles.org/downloads/specification-csl101-20120903.html#citation

Sorry, I wasn't clear.  What I mean is, is there a way to tell an
implementation of CSL "hey, this particular citation right here should
only contain the author (or year, or journal...) of the referenced work,
even though the citation style for this document is (e.g.) numeric?"

The link you referenced makes it seem like the  element
describes how citations should be formatted for a whole document, but
maybe I don't understand it.  (Can there be multiple citation formatting
styles specified by a CSL stylesheet? or multiple stylesheets used to
format the citations in a document?)

The idea is, a citation like "As Doe says in @Doe99:title, ..." should
render like "As Doe says in /The Title/, ...", not like "As Doe says in
Doe (1999), ...", even if "@Doe99" citations in the document generally
render like the latter.  I suspect this must be possible with
citeproc/CSL, but I don't actually know, since Pandoc doesn't provide
syntax for this kind of case.
 
Best,
Richard




Re: [O] [bug?] Link to be exported only in HTML

2015-02-04 Thread Richard Lawrence
Hi Sebastien,

Sebastien Vauban 
writes:

> #+TITLE: ECM Links for HTML only
>
> * Test
>
> If I want to include a link (GPL logo, here) to the HTML export, I should put 
> it
> in a block, right?
>
> #+begin_html
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
> #+end_html
>
> Well, that does not work: the link is not rendered as a link; it's copied
> "verbatim".
>
> OTOH, the link on its own is correctly exported to HTML:
>
> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
>
> ... but it fails to be exported to LaTeX (causing a "TeX capacity exceeded"
> error), reason why I must not have the link when exporting to LaTeX.
>
> Is this a bug?  Is there an alternative?

As far as I understand, this is not a bug: #+begin_html ... #+end_html
is for writing literal HTML that will be included in HTML output.

Thus, if you only care about the link appearing in HTML output, just use
literal HTML:

#+begin_html
http://opensource.org/licenses/GPL-3.0";>http://img.shields.io/:license-gpl-blue.svg";>
#+end_html

(That is hand-translated...you should check whether it is the right HTML for 
your document.)
 
Best,
Richard




Re: [O] Citations, continued

2015-02-04 Thread John Kitchin
None of those features need to change, don't worry!

Julian M. Burgos writes:

> Thanks everyone for thinking about citations.  I wish I knew enough lisp
> to make a contribution to this work... for now I can only sit on the
> side and clap.
>
> I am also a big fan of org-ref.  Although my needs are not complex
> (basically citing from a BibLatex file and exporting to LaTex), I found
> that having "actionable" citations is tremendously useful.  In
> particular, clicking on the citation allows to open the pdf file with
> the reference, the .bib file, or an org mode file with notes.  I hope
> this feature is kept in whatever new org-mode reference system you guys
> develop.
>
> Keep up the good work!
> All the best,
>
> Julian
>
> Vikas Rawal writes:
>
>> Org-ref is very functional and has so far been able to deal with much of my 
>> needs. So, I just hope we are not trying to fix something that is not broken.
>>
>> The real need in the context of citations is to somehow extend the 
>> bibtex/biblatex integration to other export formats (odt/html, most 
>> importantly). Will all the new stuff that is being proposed take us in that 
>> direction?
>>
>> Vikas
>>
>>
>>
>>> On 03-Feb-2015, at 7:26 am, Richard Lawrence 
>>>  wrote:
>>>
>>> Hi Rasmus and all,
>>>
>>> Thanks for your comments!
>>>
>>> Rasmus  writes:
>>>
> ** Backend-agnostic formatting properties
> *** Selecting specific fields
> Selecting specific fields to display could be done by appending field
> names to cite keys after colons, much like Org tags:
> #+BEGIN_QUOTE
> [See @Doe99, pp. 34--45; also @Doe00:year, section 6]
>
> [See their article in @Doe99:journal:year.]
> #+END_QUOTE

--
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



[O] fix is with another glitch when adding two dates (was: Re: Bug: org-agenda-diary-entry messes with datetree in org-agenda-diary-file [8.3beta (release_8.3beta-785-gb5d9f4 @ /home/grfz/src/org-mode

2015-02-04 Thread Gregor Zattler
Hi Nicolas, org-mode developers,

there is still a glitch.  If I now add two items at the same day.:

rm /tmp/*diary* ; emacs-snapshot -Q -L /home/grfz/src/org-mode/lisp/ -nw --eval 
'(setq org-agenda-diary-file „/tmp/diary.org“)'  "/tmp/diary.org" -f org-agenda
a
i
d
error1
i
d
error2


the result is:
>>

* 2015
** 2015-02 Februar
*** 2015-02-04 Mittwoch
 error2
 <2015-02-04 Mi> error1
  <2015-02-04 Mi>

<<

instead of:
>>

* 2015
** 2015-02 Februar
*** 2015-02-04 Mittwoch
 error2
 <2015-02-04 Mi>
 error1
 <2015-02-04 Mi>

<<


With org-mode as of f9ab1e8ab6b5b6604e838ac992ad51a594ed7130 it’s
correct and „error1“ is above „error2“.  This seems more natural
(at least for me).


I did a git bisect and the first bad commit is Nicolas fix for my
original bug report:
1d4c79d41525113f9e43b82dc9b24d353dc311bd is the first bad commit
commit 1d4c79d41525113f9e43b82dc9b24d353dc311bd
Author: Nicolas Goaziou 
Date:   Mon Feb 2 18:19:30 2015 +0100

org-agenda: Fix agenda diary corruption

* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Do not
  save excursion or final position is lost.

Reported-by: Gregor Zattler 


:04 04 9226a2e0b05d53fcc633f89663ee9cb6803e2701 
dc0856aa67db029d63f64b9159626468bd93f7f7 M  lisp


Thanks for your attention, gregor

* Gregor Zattler  [03. Feb. 2015]:
> * Nicolas Goaziou  [02. Feb. 2015]:
>> Gregor Zattler  writes:
>>> adding a date to the datetree in the org-agenda-diary-file
>>> produces a mess:
>>>
>>> - emacs-snapshot -Q -L /home/grfz/src/org-mode/lisp/ -nw –eval (setq 
>>> org-agenda-diary-file "/tmp/diary.org")
>>> - Mx org-agenda
>>> - a
>>> - i
>>> - d
>>> - error
>>>
>>> gives:
>>>
>>
>>>
>>> * 2015
>>> ** 2015-02 Februar
>>> <2015-02-01 So>*** 2015-02-01 Sonntag
>>>  error
>>>
>>> 
>>>
>>>
>>> instead of:
>>>
>>
>>> * 2015
>>> ** 2015-02 Februar
>>> *** 2015-02-01 Sonntag
>>>  error
>>> <2015-02-01 So>
>>> 
>> 
>> This should be fixed. Thank you.
> 
> Confirmed, thank you.
> 
> Ciao, Gregor
> -- 
>  -... --- .-. . -.. ..--.. ...-.-
> 

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



[O] [bug] Export to FreeMind (HTML) fails due to ampersant in URL

2015-02-04 Thread Karl Voit
Hi!

Org-mode version 8.3beta (release_8.3beta-721-gd1c5dc) on GNU Emacs
24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17

When I export a simple heading like below, which contains an URL
with an ampersant (&), FreeMind throws an error:

,[ The exported heading ]
| ** Freemind-Tests
|
| - 
[[https://www.youtube.com/watch?v=qwtVtcQQfqc&feature=player_embedded][Emacs 
Rocks 11 - swank-js]]
`

,[ FreeMind v1.0.1 Error Message ]
| Error while parsing file:freemind.main.XMLParseException: XML Parse Exception
| during parsing of the XML definition at line 1: Unexpected end of data reached
`

,[ resulting mm-file ]
| 
|
| 
| 
| 
| 
| 
| 
| Freemind-Tests
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| https://www.youtube.com/watch?v=qwtVtcQQfqc&feature=player_embedded";>Emacs
 Rocks 11 - swank-js
| 
| 
| 
| 
| 
| 
`

When I remove the "&" from the mm-file, FreeMind is able to
import/show the mind-map without any issues.

This might be related with the HTML exporter since ox-freemind.el is
using ox-html.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Citations, continued

2015-02-04 Thread Richard Lawrence
Hi Nicolas,

Nicolas Goaziou  writes:

> Also, AFAIU, the syntax for valid citations is not defined explicitly so
> far. For example, I don't think it was discussed if any subset of Org
> objects (e.g., macros or bold text) is allowed in a citation.

This is a good question that, as you say, deserves more discussion.

I am not sure, but I am *thinking* that inline citations are objects
(not elements) that can contain some other objects.

Specifically I think we need the following categories, all of which
would be objects:
  - key
  - prefix / pre-text
  - suffix / post-text
  - locator
  - individual citation
  - bracketed citation
  - unbracketed citation

These should have a grammar like the following, based on my
(reverse-engineered) understanding of the Pandoc syntax for citations:

  - A bracketed citation is a list of one or more individual citations, 
separated by ';' if there are two or more, and surrounded by '[' ']'
  - An individual citation is formatted like: PREFIX KEY LOCATOR SUFFIX
The key is obligatory, and the prefix, locator and suffix
are optional.
  - A key optionally begins with '-', and obligatorily contains '@'
followed by a string of charcters which begins with a letter or '_',
and may contain alphanumeric characters and the following internal
punctuation characters:
   :.#$%&-+?<>~/
  - A prefix or suffix is a text object (that may contain markup like
emphasis or macros)
  - An unbracketed citation consists of a key, optionally followed by a
locator which is enclosed in '[' ']'

I am not sure about the syntax of locators.  In particular, I do not
know if they should allow internal markup, I do not know if they have an
internal syntax, and I do not know if a comma is required to separate
them from a key in a bracketed citation.

Best,
Richard




Re: [O] Citations, continued

2015-02-04 Thread Erik Hetzner
On Wed,  4 Feb 2015 at 04:06:36 PST,
Nicolas Goaziou  wrote:
> 
> Hello,
> 
> Erik Hetzner  writes:
> 
> > I concentrated on getting the parser to recognize valid citations
> > first. I have now finished this part (excepting any bugs, of course :)
> > and will need to add code to generate a proper parse tree. Then it can
> > be integrated into org-element.el.
> 
> The point of "org-element.el" is to generate a parse tree. If you
> generate it yourself, you do not need the library. Therefore, I'm not
> sure to understand the "integration" part.
> 
> Also, AFAIU, the syntax for valid citations is not defined explicitly so
> far. For example, I don't think it was discussed if any subset of Org
> objects (e.g., macros or bold text) is allowed in a citation. Is there
> any document we could merge into Org syntax document?

Hi Nicolas,

I didn’t mean to push too far ahead. I’m hoping that when we have
working code, we can work out some of these tricky issues and get the
syntax properly documented. Embedding italic text and links in
citations is, for instance, something that I think is important to
support.

Regarding org-element.el, I meant that this code would extend
org-element to generate org-element.el compatible objects for the
citations. Does that make sense? I admit that I have not read
org-element.el carefully, so I might be wrong about how to proceed.

The pandoc grammar is, I believe, more complicated than any structure
currently present in org-mode, and so the parser was a little
trickier.

best, Erik
--
Sent from my free software system .



Re: [O] Agenda add item, move point

2015-02-04 Thread e.fraga
Have you defined org-agenda-diary-file?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-717-gd36bd8.dirty



Re: [O] Reference not found in buffer

2015-02-04 Thread Thierry Pellé

Hi,
   Unfortunately no... this is just a typo in mél.
Thierry

Le 04/02/2015 11:36, Sebastien Vauban a écrit :

Thierry Pellé wrote:

I try to export a somewhat long file but the process fails echoing
"Reference wdp not fond in buffer"

  ^^^


I didn't manage to locate the wpd related occurence using I-Search.

 ^^^


Is there another method to locate it?

Didn't you make the same mistake as now?

Best regards,
   Seb



--
Mon adresse mél changera à compter de début 2015
Celle-ci sera désormais (mutatis mutandis) *soliavos [AROBASE] 
thierry-pelle [POINT] eu*.


Re: [O] Citations, continued

2015-02-04 Thread Erik Hetzner
On Wed,  4 Feb 2015 at 07:59:46 PST,
Richard Lawrence  wrote:
> 
> Erik Hetzner  writes:
> 
> >> The ideal would be if citeproc would take care of proper formatting
> >> of all such citation types, given just an ordered list of the fields
> >> that should appear.  I don't know if CSL supports this, though; do
> >> you?
> >
> > I’m not entirely sure what you mean. The authors of citeproc have come
> > up with a huge number of styles which seem to satisfy people’s needs.
> > What appears in the in-text citation is configurable, see:
> >
> >   
> > http://citationstyles.org/downloads/specification-csl101-20120903.html#citation
> 
> Sorry, I wasn't clear.  What I mean is, is there a way to tell an
> implementation of CSL "hey, this particular citation right here should
> only contain the author (or year, or journal...) of the referenced work,
> even though the citation style for this document is (e.g.) numeric?"
> 
> The link you referenced makes it seem like the  element
> describes how citations should be formatted for a whole document, but
> maybe I don't understand it.  (Can there be multiple citation formatting
> styles specified by a CSL stylesheet? or multiple stylesheets used to
> format the citations in a document?)
> 
> The idea is, a citation like "As Doe says in @Doe99:title, ..." should
> render like "As Doe says in /The Title/, ...", not like "As Doe says in
> Doe (1999), ...", even if "@Doe99" citations in the document generally
> render like the latter.  I suspect this must be possible with
> citeproc/CSL, but I don't actually know, since Pandoc doesn't provide
> syntax for this kind of case.

Hi Richard,

Thanks for the reply. I believe there is some discussion of this here:

  https://groups.google.com/d/msg/pandoc-discuss/QcAnk7hsZD8/e9MYHu0BA5IJ

and probably elsewhere on the pandoc-discuss list if you search the
archives.

It’s not supported in existing citeproc implementations, but I think
it would be possible to support something like this. On the other
hand, this is also something that is easily done by hand, so I don’t
know if it’s worth the trouble.

best, Erik
--
Sent from my free software system .



[O] Help: Saving Agenda Views

2015-02-04 Thread Tory S. Anderson
I'm trying to save an agenda view that I can arrive at in the following way: 

1. Load agenda  (default 1-day view)
2. / TAB "English_Class"(reduce to only entries tagged English_Class)   
3. \ - TAB "schedule"   (further reduce by removing entries having a 
:schedule tag)
4. w(load a 7-day span, week-view)

However, I've been unable to grok the directions at 
http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html 

The closest I've come is this: 

--8<---cut here---start->8---
(setq org-agenda-custom-commands
  '(("c" "Class agendas" agenda "" 
((org-agenda-tag-filter '("+LMC_6215"))
 (org-agenda-span 7)
--8<---cut here---end--->8---

But while this successfully sets the span, it fails to filter the buffer (let 
alone getting to my second filter). Where am I going wrong? 



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Yes. I use the following (possibly relevant) code definition, which sets my 
diary to agenda.org. 

--8<---cut here---start->8---
(setq org-agenda-include-diary nil)
;; org-agenda
(setq org-agenda-diary-file "~/emacs/agenda.org"
  org-special-ctrl-o nil
  org-agenda-span 'day)
--8<---cut here---end--->8---


 writes:

> Have you defined org-agenda-diary-file?



Re: [O] Citations, continued

2015-02-04 Thread Richard Lawrence
Erik Hetzner  writes:

> On Wed,  4 Feb 2015 at 07:59:46 PST,
> Richard Lawrence  wrote:
 
>> The idea is, a citation like "As Doe says in @Doe99:title, ..." should
>> render like "As Doe says in /The Title/, ...", not like "As Doe says in
>> Doe (1999), ...", even if "@Doe99" citations in the document generally
>> render like the latter.  I suspect this must be possible with
>> citeproc/CSL, but I don't actually know, since Pandoc doesn't provide
>> syntax for this kind of case.

> It’s not supported in existing citeproc implementations, but I think
> it would be possible to support something like this. On the other
> hand, this is also something that is easily done by hand, so I don’t
> know if it’s worth the trouble.

Actually, I've changed my mind; it occurs to me that there is a good
argument for /not/ adopting this syntax.  First of all, the cases it is
meant to cover are not really cases of /citations/ so much as cases of
/indirections/.  Writing "@Doe99:title" instead of the title of the work
is just to aid the author; it does not produce enough information in the
output to let the reader look up the referenced work, so it isn't really
a citation.

Second, it would be difficult to get the formatting of these selected
fields right in general.  Should titles be emphasized, or put in
quotes?  When do we insert commas between fields? etc.

Instead, I think Org should provide functions that provide the same
aid to document authors without the indirection, functions like:
  - org-get-fields-from-citation
  - org-insert-fields-from-citation-at-point
  - org-replace-citation-at-point-with-fields
These would take care of looking up the desired data in the reference
database and inserting it into the Org document, where the author
could format it as desired.

Furthermore, if someone *really* needs the indirection, I think it
would be relatively straightforward to implement as an export filter,
especially if the above functions are provided.  This case should be
uncommon enough that users can be expected to handle it themselves.

So, unless someone thinks it's really important to find a workable
solution, I hereby drop this (the `field selectors') part of my
proposal.  That means citations in the inline case can remain fully
compatible with Pandoc.

Best,
Richard




Re: [O] Agenda add item, move point

2015-02-04 Thread Eric S Fraga
On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
> Yes. I use the following (possibly relevant) code definition, which sets my 
> diary to agenda.org. 
>
> (setq org-agenda-include-diary nil)
> ;; org-agenda
> (setq org-agenda-diary-file "~/emacs/agenda.org"
>   org-special-ctrl-o nil
>   org-agenda-span 'day)

Ah, yes, sorry.  You said this in another response.

Maybe post a snippet from your agenda.org file?

In my case, my diary file is in date-tree format and the entries are
inserted in the current day's section.  More to the point, the entries
appear in my agenda and all I have to do is RET or TAB to go to the
entry in the diary file.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org 
release_8.3beta-750-gb6fce5.dirty



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
Fragment from my agenda.org; basically, it's almost completely just what is 
automatically created when you tell agenda to use an org file. It should be 
similar to what you have; yes, hitting tab or enter takes me to entries just 
fine. 

--8<---cut here---start->8---
* 2015
** 2015-02 February
*** 2015-02-01 Sunday
 DONE Give John ride to church
 <2015-02-01 Sun 09:30>
--8<---cut here---end--->8---

My problem is just trying to find my new entry (e.g. "Give John ride to 
church") in the actual agenda view after creating the item; rather than going 
there by default when I create the item, I have to i-search my point to it. 


Eric S Fraga  writes:

> On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
>> Yes. I use the following (possibly relevant) code definition, which sets my 
>> diary to agenda.org. 
>>
>> (setq org-agenda-include-diary nil)
>> ;; org-agenda
>> (setq org-agenda-diary-file "~/emacs/agenda.org"
>>   org-special-ctrl-o nil
>>   org-agenda-span 'day)
>
> Ah, yes, sorry.  You said this in another response.
>
> Maybe post a snippet from your agenda.org file?
>
> In my case, my diary file is in date-tree format and the entries are
> inserted in the current day's section.  More to the point, the entries
> appear in my agenda and all I have to do is RET or TAB to go to the
> entry in the diary file.



Re: [O] Agenda add item, move point

2015-02-04 Thread John Kitchin
How do you go back to the agenda from the diary file?

Tory S. Anderson writes:

> Fragment from my agenda.org; basically, it's almost completely just what is 
> automatically created when you tell agenda to use an org file. It should be 
> similar to what you have; yes, hitting tab or enter takes me to entries just 
> fine.
>
> --8<---cut here---start->8---
> * 2015
> ** 2015-02 February
> *** 2015-02-01 Sunday
>  DONE Give John ride to church
>  <2015-02-01 Sun 09:30>
> --8<---cut here---end--->8---
>
> My problem is just trying to find my new entry (e.g. "Give John ride to 
> church") in the actual agenda view after creating the item; rather than going 
> there by default when I create the item, I have to i-search my point to it.
>
>
> Eric S Fraga  writes:
>
>> On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
>>> Yes. I use the following (possibly relevant) code definition, which sets my 
>>> diary to agenda.org.
>>>
>>> (setq org-agenda-include-diary nil)
>>> ;; org-agenda
>>> (setq org-agenda-diary-file "~/emacs/agenda.org"
>>>   org-special-ctrl-o nil
>>>   org-agenda-span 'day)
>>
>> Ah, yes, sorry.  You said this in another response.
>>
>> Maybe post a snippet from your agenda.org file?
>>
>> In my case, my diary file is in date-tree format and the entries are
>> inserted in the current day's section.  More to the point, the entries
>> appear in my agenda and all I have to do is RET or TAB to go to the
>> entry in the diary file.

--
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] Agenda add item, move point

2015-02-04 Thread Eric S Fraga
On Wednesday,  4 Feb 2015 at 15:23, Tory S. Anderson wrote:

[...]

> My problem is just trying to find my new entry (e.g. "Give John ride
> to church") in the actual agenda view after creating the item; rather
> than going there by default when I create the item, I have to i-search
> my point to it.

Ah, I didn't understand before.  Okay, in this case, I don't know the
answer because I use sticky agenda views and so I need to explicitly
refresh to get the new entry to appear and, in that case, the cursor
will be at the top of the view.

Sorry I cannot help any further.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org 
release_8.3beta-764-ga1f540.dirty



Re: [O] Agenda add item, move point

2015-02-04 Thread Tory S. Anderson
I actually rarely visit the diary file; I do everything from the agenda view. 
In the rare cases I do need to visit the agenda file, I just switch buffers 
like usual (`C-x b RET`). 

John Kitchin  writes:

> How do you go back to the agenda from the diary file?
>
> Tory S. Anderson writes:
>
>> Fragment from my agenda.org; basically, it's almost completely just what is 
>> automatically created when you tell agenda to use an org file. It should be 
>> similar to what you have; yes, hitting tab or enter takes me to entries just 
>> fine.
>>
>> --8<---cut here---start->8---
>> * 2015
>> ** 2015-02 February
>> *** 2015-02-01 Sunday
>>  DONE Give John ride to church
>>  <2015-02-01 Sun 09:30>
>> --8<---cut here---end--->8---
>>
>> My problem is just trying to find my new entry (e.g. "Give John ride to 
>> church") in the actual agenda view after creating the item; rather than 
>> going there by default when I create the item, I have to i-search my point 
>> to it.
>>
>>
>> Eric S Fraga  writes:
>>
>>> On Wednesday,  4 Feb 2015 at 13:27, Tory S. Anderson wrote:
 Yes. I use the following (possibly relevant) code definition, which sets 
 my diary to agenda.org.

 (setq org-agenda-include-diary nil)
 ;; org-agenda
 (setq org-agenda-diary-file "~/emacs/agenda.org"
   org-special-ctrl-o nil
   org-agenda-span 'day)
>>>
>>> Ah, yes, sorry.  You said this in another response.
>>>
>>> Maybe post a snippet from your agenda.org file?
>>>
>>> In my case, my diary file is in date-tree format and the entries are
>>> inserted in the current day's section.  More to the point, the entries
>>> appear in my agenda and all I have to do is RET or TAB to go to the
>>> entry in the diary file.
>
> --
> 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] Help: Saving Agenda Views

2015-02-04 Thread Tory S. Anderson
Okay, I've attempted to use my newbie elisp skills to hack together a solution 
but it doesn't work, yelling at me about wrong number of arguments (why?). 
Here's what I've put together (clearly inspired by the 
`org-agenda-filter-by-tag` function). Can anyone help me piece together what's 
wrong here? 

--8<---cut here---start->8---
;; saving views
(setq org-agenda-custom-commands
  '(("x" agenda)
("y" agenda*)
("c" "Class agendas"
 ((agenda "" ((org-agenda-span 7)))
  (my-org-agenda-filter-by-tag "LMC_6215" "-"))
 ;;(org-agenda-filter-apply "+LMC_6215" "tag") ;; This one doesn't work 
because I can't see what  "tag" should be
 ;; (org-agenda-redo)) ;; would be needed after org-agenda-filter-apply
 )
 ))

;; For my usage
(defun my-org-agenda-filter-by-tag (tag char)
  "A non-interactive version for use in custom commands.  Keep only
those lines in the agenda buffer that have a specific tag. Char should be +
or -, filtering or narrowing."
;  (interactive "P")
  (let* ((alist org-tag-alist-for-agenda)
 (tag-chars (mapconcat
 (lambda (x) (if (and (not (symbolp (car x)))
  (cdr x))
 (char-to-string (cdr x))
   ""))
 alist ""))
 (efforts (org-split-string
   (or (cdr (assoc (concat org-effort-property "_ALL")
   org-global-properties))
   "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00"
   "")))
 (effort-op org-agenda-filter-effort-default-operator)
 (effort-prompt "")
 (inhibit-read-only t)
 (current org-agenda-tag-filter)
 maybe-refresh a n tag)
(when (member char '(?+ ?-))
  ;; Narrowing down
  (cond ((equal char ?-) (setq strip t narrow t))
((equal char ?+) (setq strip nil narrow t
(cond
 ((equal char ?/)
  (org-agenda-filter-show-all-tag)
  (when (get 'org-agenda-tag-filter :preset-filter)
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
  (setq maybe-refresh t))


 ((equal char ?. )
  (setq org-agenda-tag-filter
(mapcar (lambda(tag) (concat "+" tag))
(org-get-at-bol 'tags)))
  (org-agenda-filter-apply org-agenda-tag-filter 'tag)
  (setq maybe-refresh t))
 ((or (equal char ?\ )
  (setq a (rassoc char alist))
  (and (>= char ?0) (<= char ?9)
   (setq n (if (= char ?0) 9 (- char ?0 1))
 tag (concat effort-op (nth n efforts))
 a (cons tag nil)))
  (and (= char ??)
   (setq tag "?eff")
   a (cons tag nil))
  (and tag (setq a (cons tag nil
  (org-agenda-filter-show-all-tag)
  (setq tag (car a))
  (setq org-agenda-tag-filter
(cons (concat (if strip "-" "+") tag)
  (if narrow current nil)))
  (org-agenda-filter-apply org-agenda-tag-filter 'tag)
  (setq maybe-refresh t))
 (t (error "Invalid tag selection character %c" char)))
(when maybe-refresh
  (org-agenda-redo
--8<---cut here---end--->8---




torys.ander...@gmail.com (Tory S. Anderson) writes:

> I'm trying to save an agenda view that I can arrive at in the following way: 
>
> 1. Load agenda(default 1-day view)
> 2. / TAB "English_Class"  (reduce to only entries tagged English_Class)   
> 3. \ - TAB "schedule" (further reduce by removing entries having a 
> :schedule tag)
> 4. w  (load a 7-day span, week-view)
>
> However, I've been unable to grok the directions at 
> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html 
>
> The closest I've come is this: 
>
> --8<---cut here---start->8---
> (setq org-agenda-custom-commands
>   '(("c" "Class agendas" agenda "" 
>   ((org-agenda-tag-filter '("+LMC_6215"))
>(org-agenda-span 7)
> --8<---cut here---end--->8---
>
> But while this successfully sets the span, it fails to filter the buffer (let 
> alone getting to my second filter). Where am I going wrong? 



[O] Bug: bulk TODO state change creates a LOGBOOK state change note only for one task

2015-02-04 Thread Maxim Baz
The important piece of org-mode configuration is:

org-minimal.el

(setq org-todo-keywords '(
  (sequence "TODO(t)" "NEXT(n!)" "|" "DONE(d)")))

So I expect the following note to appear in LOGBOOK once I change the state
from TODO to NEXT:

:LOGBOOK:
- State "NEXT"   from "TODO"   [2015-02-04 Wed 22:11]
:END:

It works perfectly fine if I change a state of a single task.
But if select multiple TODO tasks in Agenda view and change all of them to
NEXT in bulk, only the last task will have such "state change" record.

I expect org-mode to create such "state change" note in LOGBOOK drawer for
every task I'm changing.

Now I'll describe my steps in a bit more detailed way, and afterwards you
will find the system information I use.

1. emacs -Q -l ~/org-minimal.el ~/test.org
2. Create 3 tasks:
* TODO task1
* TODO task2
* TODO task3
3. M-x -> org-agenda-file-to-front
3. M-x -> org-agenda -> t
4. Mark those 3 tasks
5. M-x -> org-agenda-bulk-action -> t -> NEXT

The ACTUAL contents of ~/test.org is:

* NEXT task1
* NEXT task2
* NEXT task3
:LOGBOOK:
- State "NEXT"   from "TODO"   [2015-02-04 Wed 22:11]
:END:

The EXPECTED contents of ~/test.org is:

* NEXT task1
:LOGBOOK:
- State "NEXT"   from "TODO"   [2015-02-04 Wed 22:11]
:END:
* NEXT task2
:LOGBOOK:
- State "NEXT"   from "TODO"   [2015-02-04 Wed 22:11]
:END:
* NEXT task3
:LOGBOOK:
- State "NEXT"   from "TODO"   [2015-02-04 Wed 22:11]
:END:

Emacs: GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) of
2015-01-09 on lgw01-32
Package: Org-mode version 8.3beta (release_8.3beta-794-g55c070 @
/home/z0rch/.emacs.d/el-get/org-mode/lisp/)


Re: [O] [bug?] Link to be exported only in HTML

2015-02-04 Thread Sebastien Vauban
Hello Ista and Richard,

Ista Zahn wrote:
> On Wed, Feb 4, 2015 at 10:15 AM, Sebastien Vauban wrote:
>>
>> If I want to include a link (GPL logo, here) to the HTML export, I should 
>> put it
>> in a block, right?
>>
>> #+begin_html
>> [[http://opensource.org/licenses/GPL-3.0][http://img.shields.io/:license-gpl-blue.svg]]
>> #+end_html
>>
>> Well, that does not work: the link is not rendered as a link; it's copied
>> "verbatim".
>
> You need to write the link in html, not org:
>
> #+begin_html
>   http://opensource.org/licenses/GPL-3.0";> src="http://img.shields.io/:license-gpl-blue.svg";
> alt=":license-gpl-blue.svg" />
> #+end_html

Blush!

Thank you...

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Exporting columnviews

2015-02-04 Thread Lele Gaifax
Hi all,

I use Org (Emacs 24.4.90, with Org mode 8.2.10) to analyze and plan the
development of new projects/features, with a persistent columnview containing
a summary, something like the following:

#+TITLE: Test
#+PROPERTY: Effort_ALL 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00
#+COLUMNS: %40ITEM(Item) %13Effort(Estimated){:} %CLOCKSUM(Spent)

* Main

#+BEGIN: columnview :hlines 1 :id local
| Item| Estimated | Spent |
|-+---+---|
| * Main  |  3:00 |   |
| ** Subpoint |  1:00 |   |
| *** Subsubpoint |  1:00 |   |
| ** Other|  2:00 |   |
#+END:

** Subpoint

*** Subsubpoint
:PROPERTIES:
:Effort:   1:00
:END:

** Other
   :PROPERTIES:
   :Effort:   2:00
   :END:

When I export the above, while the headings get numbered the columnview table
does contain the items introduced by either one or two asterisks, something
like the following (cut&pasted&manually aligned from the HTML output):


Table of Contents

1. Main
1.1. Subpoint
1.1.1. Subsubpoint
1.2. Other

1 Main

Item Estimated  Spent
* Main3:00   
** Subpoint   1:00   
* Subsubpoint 1:00   
** Other  2:00   

...

Apparently, all items at an odd-level get one asterisk and all the others
two. The same happens with PDF and ODT...

I tried to play with some of the options, but I did not find something that
impacts the export of the columnview.

I wonder if there is something I am missing to obtain either

Item Estimated  Spent
* Main3:00   
** Subpoint   1:00   
*** Subsubpoint   1:00   
** Other  2:00   

or

Item   Estimated  Spent
1. Main 3:00   
1.1 Subpoint1:00   
1.1.1 Subsubpoint   1:00   
1.2 Other   2:00   

Thanks in advance for any hints!

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.




Re: [O] Help: Saving Agenda Views

2015-02-04 Thread Subhan Michael Tindall
Well, to start with your syntax is WAY off. Org custom agendas can be pretty 
arcane.
I'd start with setting up some custom agendas using the customizer, saving 
them, and then looking at how they are structured.
Next,  C-h v org-agenda TAB in an org buffer should get you a list of the 
various settings you can use in a custom block.  Note that not all variables 
are valid in all types of blocks.
And finally, take a look at the documentation for org-agenda-skip-function, as 
I believe this is what you will need to use to accomplish the goals you set 
below

And, as a bonus, here's a snippet out of my emacs showing a couple of different 
custom agendas with mulitiple blocks.
;;This one does a sorted list of all my TODOs, followed by an agenda block for 
1 day
("D" "Todos+Clock" ((alltodo "" ((org-agenda-sticky nil)
  
(org-agenda-sorting-strategy (quote ((agenda category-up todo-state-up 
deadline-up time-up))
 (agenda "" 
((org-agenda-sticky nil)
 
(org-agenda-sorting-strategy (quote ((agenda habit-down time-up priority-down 
category-keep
 
(org-agenda-span 1)
 
(org-agenda-use-time-grid t)
 
(org-agenda-show-log (quote clockcheck))
 
(org-agenda-clockreport nil)

;; this one does all todos of type RECURRING, then a tags search for everything 
with a STYLE property (tags does many things), followed by a list of all my 
todos using alltodo, using a skip function to screen out anything not matching 
the regex , followed by a list of TODOs from a specific file (I use multiple 
project files for most things)
("R" "Recuring+Habits"

  ((todo "RECURRING")

   (tags "STYLE={.+}")

   (alltodo "" (

(org-agenda-skip-function (lambda nil 
(org-agenda-skip-entry-if


   (quote notregexp) "\\:LastWorked\\:")))

(org-agenda-sticky nil)

(org-agenda-max-entries 10)

(org-agenda-clockreport nil)

(org-agenda-sorting-strategy (quote ((todo 
tsia-down todo-state-up priority-down time-down)


 )


   (agenda "my-todos"

   ((org-agenda-files '("/my-todos.org"))

(org-agenda-span 1)

(org-agenda-clockreport nil)


Hope this helps, there are not that many good complex agenda examples out there


> -Original Message-
> From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
> [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
> Behalf Of Tory S. Anderson
> Sent: Wednesday, February 04, 2015 1:28 PM
> To: orgmode list
> Subject: Re: [O] Help: Saving Agenda Views
> 
> Okay, I've attempted to use my newbie elisp skills to hack together a solution
> but it doesn't work, yelling at me about wrong number of arguments (why?).
> Here's what I've put together (clearly inspired by the `org-agenda-filter-by-
> tag` function). Can anyone help me piece together what's wrong here?
> 
> --8<---cut here---start->8---
> ;; saving views
> (setq org-ag