[O] Multicite syntax

2015-03-07 Thread Vaidheeswaran C

> Note that, as a consequence, the new object is incompatible with the
> previous one, since every citation is a multi-cite citation. See
> commit message for details.

Just a quick feedback.

  (:parenthetical nil :begin 807 :post-blank 0 :end 843 :references
  ((:key "wilde" :prefix nil :suffix nil)
   (:key "moore" :prefix nil :suffix nil)
   (:key "westfahl:space" :prefix nil :suffix nil))
  :parent #3#)

Having a plist for `reference' as opposed to a an Element proper gives
me cognitive dissonance.

How about replacing this

(:key "wilde" :prefix nil :suffix nil)

with this instead

(reference :key "wilde" :prefix nil :suffix nil :parent )
 ^^

Each `reference' is transcoded to it's contents in it's own right in
ox-jabref.

(a) Batch export all cites.

In case of citeproc-java it would be batch export each multicite.
http://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00262.html)

(b) Map `reference' to `contents' with transcoding being done by the
citation command line.

Please confirm whether this change request is possible or not.



You may also want to replace `citaiton' with a `citation-cluster'(or a
multicite) and replace `reference' with a `citation'.

In effect, a citation-cluster (or a multicite) is one or more
citaitons.






Re: [O] Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2015-03-07 Thread Leo He
Thank you, Nicolas. I checked out the latest commits on master. It works.

On the other hand, I am writing a shell script to move each entry's
PROPERTIES drawer to its beginning. Though I think elisp can handle this
more easily, I am not familiar with it (still learning :-) ). I wonder if
there is an existing function or script to do this.

Thanks,

On 8 March 2015 at 03:34, Nicolas Goaziou  wrote:

> Leo He  writes:
>
> > Thanks for your help, Nicolas and kungdash.
> > I've tried both 8.2.10 (installing via elpa) and the git repository
> > (8.3-beta and master branches), but still the same.
>
> I misunderstood the initial problem. This should be fixed in master.
> Thank you.
>
> > * TODO Test_++
> > SCHEDULED: <2015-03-02 Mon ++1w>
> > - State "DONE"   from "TODO"  [2015-02-23 Mon 10:56]
> > - State "DONE"   from "TODO"  [2015-02-15 Sun 10:56]
> > - State "DONE"   from "READY" [2015-02-02 Mon 10:56]
> > :PROPERTIES:
> > :STYLE:habit
> > :LAST_REPEAT: [2015-02-23 Mon 10:56]
> > :END:
> >
> > The Test_+ was marked as DONE one day after 02-09 (did not finish on
> time)
> > and Test_++ missed the 02-09 schedule. But the subsequent schedules are
> > DONE on time.
>
> This is not quite true. In the case above, second done stamp bumped
> scheduled to 2015-02-16 so last done came one week late.
>
>
> Regards,
>


Re: [O] Sorting CLOCK entries

2015-03-07 Thread Xavier Maillard

Christoph LANGE  writes:

>> CLOCK: [2014-10-10 Fri 17:52]--[2014-10-10 Fri 18:55] =>  1:03
>> CLOCK: [2014-09-10 Wed 14:29]--[2014-09-10 Wed 16:29] =>  2:00
>> CLOCK: [2014-11-12 Wed 08:34]--[2014-11-12 Wed 08:52] =>  0:18
>> CLOCK: [2014-11-04 Tue 12:58]--[2014-11-04 Tue 13:28] =>  0:30
>
> … but a manual fix for this particular case is as easy as marking the
> affected range of lines and saying C-u M-x sort-lines.

Awesome, I never think of the `sort-lines' function. Thank you !
-- Xavier.


pgpLt3lg2kqz_.pgp
Description: PGP signature


Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Vaidheeswaran C
On Sunday 08 March 2015 09:29 AM, Thomas S. Dye wrote:

> Is your doubt about his eventual success founded in a general
> skepticism about predicting the future (certainly warranted),
> or in some particular knowledge about the difficulty of the task?

I have no such doubt or skepticism.

> If the latter, perhaps you could help Richard avoid potential
> problems?

I would replace "you" with "we".

What I had in my palm is out on the table.  What have you in your
palms concerning "in text" and "parenthetical" styles in CSL.



Re: [O] Bleeding edge in elpa

2015-03-07 Thread Xavier Maillard

Nikolai Weibull  writes:

> On Sat, Mar 7, 2015 at 3:47 PM, Xavier Maillard  wrote:
>
>> Nikolai Weibull  writes:
>
>>> Would it be of interest to anyone else if the bleeding edge version
>>> was available via elpa?
>
>> Isn't it already available via M-x package interface ?
>
> No, only the version based on the maint branch is available via elpa.

Ah yes, I see.

>> I'd rather use
>> git (I really do not like the package stuff).
>
> As Grant pointed out, it’s a lot more convenient working inside Emacs
> for switching between versions and such.

I understand but that's not my use case too so...
-- Xavier.


pgpivoD7BYGj4.pgp
Description: PGP signature


Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Thomas S. Dye
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>>> I'm asking because I haven't fully grasped uses for the shorthand.  What
>>> is the use case?
>>
>> More readable, I guess.
>
> I agree.  In time, "org-reftex" would insert @key if no notes are
> requested at the time of insertion.

I think the OP has a valid point.  After we teach org-reftex to insert
@key if no notes are requested, are we going to convince all key
generating software to prohibit keys that end in punctuation?

As I currently understand the problem, that seems like a tall order to
me.

All the best,
Tom

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



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Thomas S. Dye
Vaidheeswaran C  writes:

> On Sunday 08 March 2015 03:01 AM, Thomas S. Dye wrote:
>> Aloha Vaidheeswaran C,
>> 
>> (Bringing the conversation back on list.)
>> 
>> Vaidheeswaran C  writes:
>> 
>>> Richard understood the point I was making.  When you have time,
>>> compare how you responded with how he responded.  You can learn a
>>> thing or two from Richard.
>> 
>> I've learned many things from Richard!
>> 
>> I've also taken your suggestion to compare our responses to the doubts
>> you raised, which IIUC have now been resolved.  Richard guided us
>> through the inquiry needed to resolve your doubts.  In contrast, I tried
>> to guide you to the inquiry.  Either way, I think the doubts would have
>> been resolved.
>
> Richard in this message admitted that he is yet to familiarize himself
> with CSL styles and that there are some loose ends that he hopes to
> fill.  (See
> http://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00253.html)
>
> My doubts stay and my questions (however pointed they may be) are on
> topic.

Well, I agree that Richard hasn't yet implemented an Org mode interface
for an appropriate csl-based tool (your 2nd point), but I think we
should support him in this effort.

There is a lot of programming know-how on this list if he runs into
difficulties, so I'm hopeful he'll succeed even if one or more problems
prove hard for him.

Is your doubt about his eventual success founded in a general skepticism
about predicting the future (certainly warranted), or in some particular
knowledge about the difficulty of the task?  If the latter, perhaps you
could help Richard avoid potential problems?

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Vaidheeswaran C
On Sunday 08 March 2015 03:01 AM, Thomas S. Dye wrote:
> Aloha Vaidheeswaran C,
> 
> (Bringing the conversation back on list.)
> 
> Vaidheeswaran C  writes:
> 
>> Richard understood the point I was making.  When you have time,
>> compare how you responded with how he responded.  You can learn a
>> thing or two from Richard.
> 
> I've learned many things from Richard!
> 
> I've also taken your suggestion to compare our responses to the doubts
> you raised, which IIUC have now been resolved.  Richard guided us
> through the inquiry needed to resolve your doubts.  In contrast, I tried
> to guide you to the inquiry.  Either way, I think the doubts would have
> been resolved.

Richard in this message admitted that he is yet to familiarize himself
with CSL styles and that there are some loose ends that he hopes to
fill.  (See
http://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00253.html)

My doubts stay and my questions (however pointed they may be) are on
topic.

> All the best,
> Tom
> 




Re: [O] [ox-ascii, bug?] aligning text withing footnotes

2015-03-07 Thread Rasmus
Nicolas Goaziou  writes:

> Rasmus  writes:
>
>> No.  In a normal paragraph when I do
>>
>> para1\\
>>  para2
>>
>> The whitespace indentation is respected.  All I'm saying that when I do
>> something equivalent in a footnote the amount of characters removed from
>> the first list (typically 3: "fn:") should also be removed from subsequent
>> lines.  E.g.
>>
>> [fn:1] http://orgmode.org/\\
>>http://www.gnu.org/software/emacs/
>>
>> Becomes:
>>
>> [1] http://orgmode.org/\\
>>http://www.gnu.org/software/emacs/
>>
>> But 
>>
>> [fn:1] http://orgmode.org/ long text here
>> http://www.gnu.org/software/emacs/
>>
>> Becomes 
>>
>> [1] http://orgmode.org/ long text here
>> http://www.gnu.org/software/emacs/
>
> It is difficult to know the indentation of the first line from the parse
> tree. Both
>
>   [fn:1] http://orgmode.org/
>
> and
>
>   [fn:1]   http://orgmode.org
>
> will appear as "http://orgmode.org"; anyway. We could compute it by
> subtracting footnote's beginning position from paragraph's. However, we
> cannot trust such positions as they might be fake, or even not there
> (elements inserted right into the parse tree).

What I want to do is simpler.  I want to subtract the length between [1]
and [fn:1] from every line between :begin and :end of the
footnote-definition.  Differences other than the three character
difference between [fn:1] and [1] I don't care about.

–Rasmus

-- 
When in doubt, do it!




Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Rasmus
Nicolas Goaziou  writes:

>> I'm asking because I haven't fully grasped uses for the shorthand.  What
>> is the use case?
>
> More readable, I guess.

I agree.  In time, "org-reftex" would insert @key if no notes are
requested at the time of insertion.

—Rasmus

-- 
Dung makes an excellent fertilizer




[O] Beamer Hello World Help Request

2015-03-07 Thread Matthew Gidden
Hi folks,

I've been trying to follow the getting started tutorials
 for making beamer
presentations and have hit a snag. Following the tutorial, I have a minimum
example of a pres.org file and the resulting pres.tex file as a gist
. The resulting pdf is
attached. The resulting tex file was generated from the C-c C-e l p command
after having added the following to my .emacs file:

(setq org-latex-to-pdf-process (list "latexmk -pdf %f"))
> (require 'ox-latex)
> (add-to-list 'org-latex-classes
>  '("beamer"
>"\\documentclass\[presentation\]\{beamer\}"
>("\\section\{%s\}" . "\\section*\{%s\}")
>("\\subsection\{%s\}" . "\\subsection*\{%s\}")
>("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))


I believe I should be getting a presentation with two frames; however, the
generated latex does not wrap subsections in frame tags, and I'm not sure
how to proceed from here based on the available tutorial material.

Some specs:
org-8.2.10
emacs-23.4.1

Any suggestions would be greatly appreciated! Please let me know if I can
provide additional information.

Cheers,
Matt

-- 
Matthew Gidden
Ph.D. Candidate, Nuclear Engineering
The University of Wisconsin -- Madison
Ph. 225.892.3192


pres.pdf
Description: Adobe PDF document


Re: [O] Bleeding edge in elpa

2015-03-07 Thread Nicolas Girard
2015-03-07 15:36 GMT+01:00 Nikolai Weibull :
>
> Would it be of interest to anyone else if the bleeding edge version
> was available via elpa?
>

I'd greatly appreciate it too !

Cheers,

Nicolas



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

2015-03-07 Thread Alexis


On 2015-03-08T07:34:36+1100, Nicolas Goaziou 
 said:


NG> Alexis  writes:

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


NG> I cannot reproduce the problem with `current-window' on NG> 
development branch.


Okay, it turns out that the problem was the 
`display-buffer-function` variable being set elsewhere, which 
prevented `org-src-window-setup` from working correctly. Sorry for 
the hassle.



Alexis.



Re: [O] How to obtain the list of files included in HTML export?

2015-03-07 Thread Marcin Borkowski

On 2015-02-13, at 00:48, John Kitchin  wrote:

> In https://github.com/jkitchin/jmax/blob/master/ox-archive.el
>
> you can see how I have done something like this for emailing and
> creating zip files. It might give you some hints that help your case.

Thanks a lot!  (And sorry for the delay, I had a break with that
project.)

The main problem seems to be that I'm not sure whether what I think is
exhaustive.  Do I get it correctly that if I want to make a standalone
archive from an (exported to html) org file, I need to include:

- css (and related stuff),
- inlined images (your code seems to cover this),
- and most importantly, dvipng/imagemagick-generated bitmaps of
  equations (if not using MathJax).

Did I forget about something?  If not, things seem straightforward:
I just have to deal with two kinds of things (css is "constant").

If yes, what did I miss?

Best,
Marcin


>
> Marcin Borkowski writes:
>
>> Hi there again,
>>
>> the subject pretty much says it all.  Apart from the HTML file itself
>> there might be inlined images and bitmaps of equations.  Since I'd like
>> to make my customized exporter create a self-contained zip file, I need
>> the list of all files comprising the generated web page.
>>
>> Best,


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Custom agenda shows all TODO

2015-03-07 Thread Nicolas Goaziou
Hello,

Ken Mankoff  writes:

> I've traced this issues (bug?) to a change between ba544e4 and d92ef95. I'm 
> not sure what change, but the issue is in the agenda, and the diff for 
> org-agenda.el is:
>
>
> @@ -4789,7 +4789,7 @@ for a keyword.  A numeric prefix directly selects the 
> Nth keyword in
>(or org-agenda-multi (org-agenda-fit-window-to-buffer))
>(add-text-properties (point-min) (point-max)
>`(org-agenda-type todo
> -org-last-args ,arg
> +org-last-args (,arg)
>  org-redo-cmd 
> ,org-agenda-redo-command
>  org-series-cmd ,org-cmd))
>(org-agenda-finalize)

This should be fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Nicolas Goaziou
Hello,

t...@tsdye.com (Thomas S. Dye) writes:

> Am I right that key-ending punctuation is a potential problem for the
> shorthand part of the syntax and not for the full [cite: ...] syntax?

Exactly. If key-ending punctuation is required, we might have to drop
shortcuts (i.e. [@key] and @key).

At this point, I think this is too early to make a decision anyway.

> I'm asking because I haven't fully grasped uses for the shorthand.  What
> is the use case?

More readable, I guess.

Regards,

-- 
Nicolas Goaziou



Re: [O] Citation syntax: a revised proposal

2015-03-07 Thread Nicolas Goaziou
Richard Lawrence  writes:

> I was thinking that this should yield a citation object with a structure like:
>
> ('citation ...
>   :common-prefix pre
>   :common-suffix post
>   :references ((:prefix pre1
> :key "k1"
> :suffix post1 ...)
>(:prefix pre2
> :key "k2"
> :suffix post2 ...))
>   ...)
>
> Would that work?

Done in b0474b09a97ca20290b6f664b2e49a8c7a0d0c17.

Note that, as a consequence, the new object is incompatible with the
previous one, since every citation is a multi-cite citation. See commit
message for details.

Regards,



Re: [O] Custom agenda shows all TODO

2015-03-07 Thread Ken Mankoff
On 2015-03-07 at 06:13, Ken Mankoff  wrote:
> Has something in the Agenda changed recently? I'm using Org from git
> and since upgrading my refresh Agenda behaves differently. I've
> searched the mailing list but found no mention of this. I know there
> were some 8.2 to 8.3 changes. Is this one of them?
>
> I have this in my custom agenda:
>
> (todo "INPROGRESS" ((org-agenda-overriding-header "In Progress")))
>
> And when I load that Agenda, I see only TODO items with status
> "INPROGRESS".
>
> If I press "r" in a different section, I still see what I expect.
>
> But oddly if I press "r" in the "In Progress" section, then it
> refreshes and shows me *all* TODO items, not just INPROGRESS TODO
> items.

I've traced this issues (bug?) to a change between ba544e4 and d92ef95. I'm not 
sure what change, but the issue is in the agenda, and the diff for 
org-agenda.el is:


@@ -4789,7 +4789,7 @@ for a keyword.  A numeric prefix directly selects the Nth 
keyword in
   (or org-agenda-multi (org-agenda-fit-window-to-buffer))
   (add-text-properties (point-min) (point-max)
   `(org-agenda-type todo
-org-last-args ,arg
+org-last-args (,arg)
 org-redo-cmd 
,org-agenda-redo-command
 org-series-cmd ,org-cmd))
   (org-agenda-finalize)



I have tested it with this MWE, used between those two git versions (checkout, 
make autoloads, and C-c C-x ! in a clean Emacs org buffer loaded with only 
this):


(add-to-list 'load-path "~/local/src/org-mode/lisp")
(add-to-list 'load-path "~/local/src/org-mode/contrib" t)
(require 'org)
(setq org-directory "~/Documents/Org")
(setq org-agenda-files (quote ("~/Documents/Org/"))
(define-key global-map "\C-ca" 'org-agenda)
(setq org-agenda-custom-commands
  '(
("c" "My Custom Agenda"
 (
  (todo "INPROGRESS")
  


And then "r" after loading the custom agenda shows *all* TODO items, not just 
INPROGRESS TODO items.

  -k.



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Tory S. Anderson
Alright; because of the need for a fully loaded agenda (which probably needs to 
include periodic appointments), I've been unable to duplicate this from `emacs 
-Q`. However, I can toggle it's happening in my working setup.

With a functional agenda including periodic files, with `(setq 
org-log-note-clock-out t)`, upon completing a note after clock-out I receive 
unidentified messages such as,
Entry repeats: DEADLINE: <2015-03-13 Fri 20:00 +1w> 

This seems to occur regardless of the buffer I am accessing at the time of 
clock-out.
Can anyone else verify this happening in their working setup when clocking 
notes are enabled, as per above? 

Brett Viren  writes:

> torys.ander...@gmail.com (Tory S. Anderson) writes:
>
>> I'd love to. Unfortunately, search engines were unable to give me
>> decisive answer on what an ECM is.
>
> Heh.  I guessed what it meant, but not what it stood for, and found:
>
>   http://orgmode.org/worg/org-faq.html
>
> Some users call this an "ECM", a French acronym that means a
> "minimal complete example".
>
> Cheers,
> -Brett.



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Brett Viren
torys.ander...@gmail.com (Tory S. Anderson) writes:

> I'd love to. Unfortunately, search engines were unable to give me
> decisive answer on what an ECM is.

Heh.  I guessed what it meant, but not what it stood for, and found:

  http://orgmode.org/worg/org-faq.html

Some users call this an "ECM", a French acronym that means a
"minimal complete example".

Cheers,
-Brett.



Re: [O] Babel: RESULTS for no value

2015-03-07 Thread Charles C. Berry

On Sat, 7 Mar 2015, Jarmo Hurri wrote:



Aaron Ecay  writes:


It might be a little distracting to see it there, but it shouldn’t
interfere with the functionality in any way (for example, it should be
invisible on export).  It the line’s presence causing any problems for
your code?


It is a nuisance. To summarize, in my current implementation of
Processing support, whenever I execute a Processing code with C-c C-c to
view the resulting sketch in an external window, the following lines
appear in the org file:

#+RESULTS:
#+BEGIN_HTML
#+END_HTML

Furthermore, the HTML lines are replaced on every new execution of the
code, making the org buffer change on every execution. That is not very
convenient.

Let me try to explain how I have implemented support for
Processing. When Processing code is executed with C-c C-c, it does not
return any value: the sketch (graphics) is shown in an external
window. But when the results of the code are exported, the code is
written as html, embedded in a processing.js script. The html code then
draws the sketch when viewed in a browser. It works really well, and I
am mighty proud of that idea. ;-)

To achieve this behaviour, I have set

(defvar org-babel-default-header-args:processing
 '((:results . "html") (:exports . "results"))
 "Default arguments when evaluating a Processing source block.")



I think you can replace

: (:results . "html")

with

: (:results . (or (and org-export-current-backend "html")  "none"))


in your defvar and get the desired result.

If you want export to succeed under other backends, you can replace "html" 
with (symbol-name org-export-current-backend) and then the result will be 
wrapped if (say) latex or ascii is used.


HTH,

Chuck


Re: [O] org-agenda-insert-diary-make-new-entry adds entry as first child?

2015-03-07 Thread Nikolai Weibull
On Mon, Jul 28, 2014 at 4:20 PM, Bastien  wrote:

> Nikolai Weibull  writes:
>
>> Here’s a suggested solution.  We keep track of whether the parent
>> entry already has any children, then we call org-insert-heading with
>> two universal arguments to add an entry at the end of the current
>> subtree.  Finally, if there weren’t any children already, we demote
>> the entry we added so that it becomes a child of the parent entry.
>
> Finally applied in master, thanks,

Hi!

It seems that this was reverted in
3e01c7ff1b37f1f548cc6c959160ff11302a25c7, but the log doesn’t say why.
Was there a specific reason?  That is, was the original behavior
desired but the patch was fine or was there a problem with the patch?

Should I write a patch that adds another
org-agenda-insert-diary-strategy called 'date-entry-last or something
like that?

Thanks!



Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps

2015-03-07 Thread Nicolas Goaziou
Gustav Wikström  writes:

> I've fixed the issues raised (IMO), and new patches are attached. I've
> added a patch for documentation also.

Thank you.

> I'd say it's an unnecessary limitation if group tags have to be
> exclusive on a headline. The more general case should be allowed and I
> can see use-cases for it.
>
> If you, for example, want to create a taxonomy of your tags and a part
> of your taxonomy is this:
>
> #+TAGS: [ CS : DB OS Software Versioning Programming BI ]
>
> What reason is there for Org mode to limit me to only choosing one of
> the above? Lets say I find an article on the web and want to create a
> node in my org-mode repository about it. Maybe linking the article and
> adding a few thoughts. The fictive article may be called "the
> importance of good database-design in Business intelligence". It seems
> two tags of the above would fit just fine; DB & BI.

Fair enough.

> +  (taggroups (if downcased (mapcar (lambda (tg) (mapcar #'downcase 
> tg))
> +   taggroups) taggroups))

Nitpick: indentation

(taggroups (if downcased
   (mapcar (lambda (tg) (mapcar #'downcase tg)) taggroups) 
 taggroups))

> + (delq nil (mapcar (lambda (x)
> + (if (stringp x)
> + (and (equal "{" (substring x 0 1))
> +  (equal "}" (substring x -1))
> +  x)
> +   x)) tags-in-group))

Same here. TAGS-IN-GROUP should be at the same level as (lambda (x) ...)

> + regexp-in-group
> + (mapcar (lambda (x)
> +   (substring x 1 -1)) regexp-in-group-escaped)

Ditto.

> + tags-in-group
> + (delq nil (mapcar (lambda (x)
> + (if (stringp x)
> + (and (not (equal "{" (substring x 0 
> 1)))
> +  (not (equal "}" (substring x 
> -1)))
> +  x)
> +x)) 
> tags-in-group)))

Ditto.

> +   ; If single-as-list, do no more in the while-loop...
> +   (if (not single-as-list)
> +   (progn
> + (if regexp-in-group
> + (setq regexp-in-group (concat "\\|" (mapconcat 
> 'identity regexp-in-group "\\|"
> + (setq tags-in-group (concat dir "{\\<" (regexp-opt 
> tags-in-group) regexp-in-group  "\\>}"))

You need to keep lines within 80 columns.

> +   (when (member tg g)
> + (mapc (lambda (x)
> + (setq current (delete x current)))
> +   g)))

While you're at it:

  (when (member tg g) (dolist (x g) (setq current (delete x current

> +(defun org-agenda-filter-by-tag (arg &optional char exclude)
>"Keep only those lines in the agenda buffer that have a specific tag.
>  The tag is selected with its fast selection letter, as configured.
> -With prefix argument STRIP, remove all lines that do have the tag.
> -A lisp caller can specify CHAR.  NARROW means that the new tag should be
> -used to narrow the search - the interactive user can also press `-' or `+'
> -to switch to narrowing."
> +With a single `C-u' prefix ARG, exclude the agenda search.  With a
> +double `C-u' prefix ARG, filter the literal tag. I.e. don't filter on
  ^^^
 missing space

Also, instead of hard-coding `C-u', you could use \\[universal-argument]
within the doc string. See, for example, `org-tree-to-indirect-buffer'.

> +  (exclude (if exclude exclude (equal arg '(4

  (exclude (or exclude (equal arg '(4

> +  (while (not (memq char (append '(?\t ?\r ?/ ?. ?\ ?q)
> +  (string-to-list tag-chars

For clarity, use ?\s instead of ?\

Also, I suggest to move the consing before the while loop.

> + ((eq char ?. )

Spurious space.

> + ((or (eq char ?\ )

See above.

> +   (save-match-data
> + (let (tags-expanded)
> +   (dolist (x (cdr tags-in-group))
> + (if (and (member x taggroups-keys)
> +  (not (member x work-already-expanded)))
> + (setq tags-expanded (delete-dups
> +  (append (org-tags-expand x t 
> downcased work-already-expanded)
> +  tags-expanded)))
> +   (setq tags-expanded (append (list x) tags-expanded)))
> + (setq work-already-expanded (delete-dups (append 
> tags-expanded work-already-expanded
>

Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Nicolas Goaziou
torys.ander...@gmail.com (Tory S. Anderson) writes:

> I'd love to. Unfortunately, search engines were unable to give me
> decisive answer on what an ECM is.

It's a recipe involving as little steps as possible to
reproduce the problem. See also

  http://orgmode.org/worg/org-faq.html#ecm


Regards,



Re: [O] Bleeding edge in elpa

2015-03-07 Thread T.F. Torrey
Nikolai Weibull  writes:

> Would it be of interest to anyone else if the bleeding edge version
> was available via elpa?

I would also very much appreciate it.

Terry
--
T.F. Torrey



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Thomas S. Dye
Aloha Vaidheeswaran C,

(Bringing the conversation back on list.)

Vaidheeswaran C  writes:

> Richard understood the point I was making.  When you have time,
> compare how you responded with how he responded.  You can learn a
> thing or two from Richard.

I've learned many things from Richard!

I've also taken your suggestion to compare our responses to the doubts
you raised, which IIUC have now been resolved.  Richard guided us
through the inquiry needed to resolve your doubts.  In contrast, I tried
to guide you to the inquiry.  Either way, I think the doubts would have
been resolved.

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Tory S. Anderson
I'd love to. Unfortunately, search engines were unable to give me decisive 
answer on what an ECM is. 

Nicolas Goaziou  writes:

> Hello,
>
> torys.ander...@gmail.com (Tory S. Anderson) writes:
>
>> After I use `org-clock-in` (using a C-u modifier and keyed globally), I 
>> receive a message like the following: 
>> Entry repeats: DEADLINE: <2015-03-04 Wed 14:00 +1w>
>>
>> This message does not correspond to either the task I clocked out from or 
>> the task I clocked in to. I assume this is a (minor) bug.
>
> Could you provide an ECM for this?
>
> Thank you.
>
>
> Regards,



[O] Bug: org-clock-sum filter infinite loop [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/me/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Stephen
I want to sum clock times for items which are in state TODO in the agenda.

Using org-clocksum-curret-item as a template:

  (defun org-clock-sum-current-item (&optional tstart)
"Return time, clocked on current item in total."
(save-excursion
  (save-restriction
(org-narrow-to-subtree)
(org-clock-sum tstart)
org-clock-file-total-minutes)))

The following works the same as above (nil start and end time):

  (defun my-org-clock-sum-current-item-in-state ()
(save-excursion
  (save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil)
org-clock-file-total-minutes)))

This version with a filter reports zero clocked time, as expected:

  (defun my-org-clock-sum-current-item-in-state ()
(save-excursion
  (save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil (lambda () nil))
org-clock-file-total-minutes)))

And this version with a filter goes into an infinite loop some where
in org-clock-sum after processing several items:

  (defun my-org-clock-sum-current-item-in-state ()
(save-excursion
  (save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil (lambda () t))
org-clock-file-total-minutes)))

I would like to use a filter like:

  (lambda () (string-equal "TODO" (org-get-todo-state)))

But it looks like no filters are working.





Emacs  : GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.5)
 of 2014-11-19 on buildvm-03.phx2.fedoraproject.org
Package: Org-mode version 8.2.10 (8.2.10-34-gc41bbc-elpa @
/home/me/.emacs.d/elpa/org-20150223/)



Re: [O] Bug: message after org-clock-in [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/torys/.emacs.d/elpa/org-20150223/)]

2015-03-07 Thread Nicolas Goaziou
Hello,

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

> After I use `org-clock-in` (using a C-u modifier and keyed globally), I 
> receive a message like the following: 
> Entry repeats: DEADLINE: <2015-03-04 Wed 14:00 +1w>
>
> This message does not correspond to either the task I clocked out from or the 
> task I clocked in to. I assume this is a (minor) bug.

Could you provide an ECM for this?

Thank you.


Regards,

-- 
Nicolas Goaziou



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

2015-03-07 Thread Nicolas Goaziou
ML  writes:

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

Thanks. Some comments follow.

> *First:*reorganization of Tables part
>
> 3. Tables
>
> 3.1 Tables operations

The following doesn't look like "table operations" to me. Maybe 3.1
could be "Table syntax" and merged with both "column width and
alignment" and "column groups".

They are not very long parts anyway.

3.2 could stay "The built-in table editor"

WDYT?

> 3.1.1 Table syntax
>
> 
>
> 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"
>
>   ...>

OK.

>
> 3.3 Other functionalities

Is this new section really useful? It doesn't help much as a category.
I think "The Orgtbl minor mode" and "Org plot" can stay one level above.

> 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  "Remote reference in §3.5.1> or in source code  ) babel 
> Remote references) using #+NAME: option:
>
> 
>
> Furthermore, during export (see ...) a caption can be attached to the 
> table using #+CAPTION: option :
>
> 
>
> 

Sounds good.

Regards,



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

2015-03-07 Thread Nicolas Goaziou
Alexis  writes:

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

I cannot reproduce the problem with `current-window' on development
branch.

Regards,



Re: [O] [ox-ascii, bug?] aligning text withing footnotes

2015-03-07 Thread Nicolas Goaziou
Rasmus  writes:

> No.  In a normal paragraph when I do
>
> para1\\
>  para2
>
> The whitespace indentation is respected.  All I'm saying that when I do
> something equivalent in a footnote the amount of characters removed from
> the first list (typically 3: "fn:") should also be removed from subsequent
> lines.  E.g.
>
> [fn:1] http://orgmode.org/\\
>http://www.gnu.org/software/emacs/
>
> Becomes:
>
> [1] http://orgmode.org/\\
>http://www.gnu.org/software/emacs/
>
> But 
>
> [fn:1] http://orgmode.org/ long text here
> http://www.gnu.org/software/emacs/
>
> Becomes 
>
> [1] http://orgmode.org/ long text here
> http://www.gnu.org/software/emacs/

It is difficult to know the indentation of the first line from the parse
tree. Both

  [fn:1] http://orgmode.org/

and

  [fn:1]   http://orgmode.org

will appear as "http://orgmode.org"; anyway. We could compute it by
subtracting footnote's beginning position from paragraph's. However, we
cannot trust such positions as they might be fake, or even not there
(elements inserted right into the parse tree).

You can use a verse block to align properly links, if you want to.


Regards,



Re: [O] Bug: org-habit treats all repeat tasks as ".+" type [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]

2015-03-07 Thread Nicolas Goaziou
Leo He  writes:

> Thanks for your help, Nicolas and kungdash.
> I've tried both 8.2.10 (installing via elpa) and the git repository
> (8.3-beta and master branches), but still the same.

I misunderstood the initial problem. This should be fixed in master.
Thank you.

> * TODO Test_++
> SCHEDULED: <2015-03-02 Mon ++1w>
> - State "DONE"   from "TODO"  [2015-02-23 Mon 10:56]
> - State "DONE"   from "TODO"  [2015-02-15 Sun 10:56]
> - State "DONE"   from "READY" [2015-02-02 Mon 10:56]
> :PROPERTIES:
> :STYLE:habit
> :LAST_REPEAT: [2015-02-23 Mon 10:56]
> :END:
> 
> The Test_+ was marked as DONE one day after 02-09 (did not finish on time)
> and Test_++ missed the 02-09 schedule. But the subsequent schedules are
> DONE on time.

This is not quite true. In the case above, second done stamp bumped
scheduled to 2015-02-16 so last done came one week late.


Regards,



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Thomas S. Dye
Vaidheeswaran C  writes:

>> I'm asking because the developers who contribute their effort to Org
>> mode are, IMHO, extremely talented and experienced programmers.  IIUC,
>> they are also busy with other projects (some of which hopefully make
>> them some money!), so I think it would help them if you could document
>> the problem you've identified.
>
> I am also busy with other projects that make me some money.

Good news!

There is no time-frame on contributing documentation for this problem,
so feel free to get to it whenever the opportunity arises (unless
someone gets there first).

All the best,
Tom

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



Re: [O] Sorting CLOCK entries

2015-03-07 Thread Christoph LANGE

Chaitanya Krishna Ande on 2015-02-27 16:40:

I was wondering if there is a way to sort clock entries like in the
clock entries below.


AFAIK org-mode doesn't have any dedicated support for this, …


The table is sorted in reverse chronological order except for the last
two. I was wondering if there is some to sort these entries so that the
last two entries sit in the right place.


… and I'm not sure where this situation comes from (other than manual 
editing),



CLOCK: [2015-01-21 Wed 16:37]--[2015-01-21 Wed 16:53] =>  0:16
CLOCK: [2014-12-02 Tue 18:29]--[2014-12-02 Tue 18:57] =>  0:28
…
CLOCK: [2014-10-10 Fri 17:52]--[2014-10-10 Fri 18:55] =>  1:03
CLOCK: [2014-09-10 Wed 14:29]--[2014-09-10 Wed 16:29] =>  2:00
CLOCK: [2014-11-12 Wed 08:34]--[2014-11-12 Wed 08:52] =>  0:18
CLOCK: [2014-11-04 Tue 12:58]--[2014-11-04 Tue 13:28] =>  0:30


… but a manual fix for this particular case is as easy as marking the 
affected range of lines and saying C-u M-x sort-lines.


Cheers,

Christoph

--
Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701

→ Semantic Publishing Challenge: Assessing the Quality of Scientific Output
  ESWC, 31 May–4 June 2014, Portorož, Slovenia. 
https://tinyurl.com/SPChallenge15

  Submission deadline 27 March (abstracts: 20 March)



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Vaidheeswaran C
> I'm asking because the developers who contribute their effort to Org
> mode are, IMHO, extremely talented and experienced programmers.  IIUC,
> they are also busy with other projects (some of which hopefully make
> them some money!), so I think it would help them if you could document
> the problem you've identified.

I am also busy with other projects that make me some money.



[O] Citeproc-java: Batch processing of citations

2015-03-07 Thread Vaidheeswaran C

Michel

I am investigating the possibility of using citeproc-java within
Emacs/Org-mode[1].  citeproc-java is easy to use and is quite
promising.  Will you be open to making some enhancements that would
enable BATCH processing of citations.



With NO citation ids, generate a list of Citations for all the keys
.bib database.

# citeproc-java -s chicago-author-date -b ~/biblatex-examples.bib -f html -c
(n.d.)
(Gerhardt 2000)
(Knuth 1986)
(Knuth 1986a)
(Knuth 1986b)
(Knuth 1984)
(Knuth 1986c)
(Aristotle 1877)
(Nussbaum 1978)



Allow `-c' option to take a bunch of "multicites" as below.

# citeproc-java -s chicago-author-date -b ~/biblatex-examples.bib -f
  html -c westfahl:space,wilde worman,yoon sorace

(Westfahl, n.d.; Wilde 1899)
(Worman 2002; Yoon et al. 2006)
(Sorace, Reinhardt, and Vaughn 1997)



Include a `-f' option where a subset of keys (that ACTUALLY occur in a
Org document) are specified.  Think of `-f' as a filtered list of
keys.



[1] http://Orgmode.org




Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Vaidheeswaran C
On Saturday 07 March 2015 10:18 PM, Richard Lawrence wrote:
>> (b) producing a csl-based tool that ORG CAN INTERFACE WITH that
>> > produces "in-text" AND "parenthetical" styles.
> Actually, I am working on exactly that.  I will post here when I've got
> something to share.

That will be a big first step.  I am only highlighting the gaps in
what has surfaced so far.




Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Vaidheeswaran C
On Saturday 07 March 2015 10:39 PM, Richard Lawrence wrote:
> So what if Zotero
> sometimes produces keys like this?  So what if a LaTeX document will
> compile with such keys?  Is it your position that that means Org keys
> must allow punctuation at the end?

Yes.  Nicolas is implementing the parser.  Go or no-go would be his
call though.




Re: [O] Babel questions for finalising Processing support

2015-03-07 Thread Jarmo Hurri

Aaron Ecay  writes:

>> 3. In ob-processing.el I (require 'ob). However, to avoid a compiler
>>warning about a free variable I still need to declare
>> 
>>(eval-when-compile (defvar org-babel-temporary-directory))
>> 
>>Is this ok?
>
> This looks bogus.  The defvar for org-babel-temporary-directory is not
> evaluated when noninteractive is true.  I think the defvar should be
> unconditional, but I also don’t understand why the code is like that in
> the first place, so let’s see if someone knows why before changing it.

Ok. On hold.

>> 4. Processing support in Babel will depend on processing2-emacs
>>module, which contains the function processing-sketch-run. Again,
>>to avoid compiler warnings, I am declaring this by
>> 
>>(declare-function processing-sketch-run "processing-mode.el" nil)
>> 
>>Is this ok?
>
> Are you not doing (require 'processing-mode)?  If you do that, I don’t
> understand why the declare-function is also needed.

I am trying to be unselfish. :-) I have processing-mode.el in my system,
but an average org mode user, who will byte compile org, will not have
processing-mode.el in their system. A require would result in an error
for this average user during the byte compilation of org. I can program,
but I am no elisp expert, so this is just my understanding.

Should I do something like:

(if (null (require 'processing-mode nil :noerror))
  (declare-function processing-sketch-run "processing-mode.el" nil))

>> 1. When editing Processing code with C-c ' I get an error from
>>processing-mode. Editing with C-c ' works just fine, but the error
>>is annoying. It seems to me the error is caused by the fact that
>>processing-mode refers to buffer-file-name, which is not valid in
>>a temporary buffer. Any ideas on how to fix this inside org?
>>(Wouldn't want to get involved with processing-mode if it can be
>>avoided.)
>
> Why not?  It sounds like their code is causing the problem.

Ahem. After some greps I found out today that I had myself specified a
java hook which the processing hook inherited, and the reference to
buffer-file-name was there. Issue solved.

Jarmo




Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Thomas S. Dye
Aloha all,

Vaidheeswaran C  writes:

>> If key-ending punctuation turns out to be common, I would revise
>> this opinion, but at the moment I don't see the need.
>
> I am not imagining things.  I am pointing out how existing tools
> behave.

Am I right that key-ending punctuation is a potential problem for the
shorthand part of the syntax and not for the full [cite: ...] syntax?

I'm asking because I haven't fully grasped uses for the shorthand.  What
is the use case?

Won't the Org mode user configure a tool like reftex or ebib (or
something else) to insert citations?

All the best,
Tom

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



Re: [O] Babel: RESULTS for no value

2015-03-07 Thread Jarmo Hurri

Aaron Ecay  writes:

> It might be a little distracting to see it there, but it shouldn’t
> interfere with the functionality in any way (for example, it should be
> invisible on export).  It the line’s presence causing any problems for
> your code?

It is a nuisance. To summarize, in my current implementation of
Processing support, whenever I execute a Processing code with C-c C-c to
view the resulting sketch in an external window, the following lines
appear in the org file:

#+RESULTS:
#+BEGIN_HTML
#+END_HTML

Furthermore, the HTML lines are replaced on every new execution of the
code, making the org buffer change on every execution. That is not very
convenient.

Let me try to explain how I have implemented support for
Processing. When Processing code is executed with C-c C-c, it does not
return any value: the sketch (graphics) is shown in an external
window. But when the results of the code are exported, the code is
written as html, embedded in a processing.js script. The html code then
draws the sketch when viewed in a browser. It works really well, and I
am mighty proud of that idea. ;-)

To achieve this behaviour, I have set

(defvar org-babel-default-header-args:processing
  '((:results . "html") (:exports . "results"))
  "Default arguments when evaluating a Processing source block.")

This yields correct behaviour when the results are exported. However,
this also causes for the #+BEGIN_HTML #+END_HTML lines to appear when no
value is returned.

In function org-babel-execute:processing I can identify whether
execution is done for exporting by checking whether
org-babel-exp-reference-buffer is null. If an export is not done, the
function launches the external viewer and returns nil. If an export is
done, the function returns the html code.

There might be other ways around the problem - that would not involve
removal of #+RESULTS: when no value is produced - but I have not been
able to figure out a solution.

Jarmo




Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Thomas S. Dye
Aloha Vaidheeswaran C,

Vaidheeswaran C  writes:

> On Friday 06 March 2015 07:27 PM, Rasmus wrote:
>> My interpretation of the text is "if you want 'A (Y)' I will type '(Y)'
>> but you will have to type 'A' — manually(!)".
>
> The details like these are important from design stand of view.
>
> Do people who are lobbying for integration with CSL tools paying
> attention to these details and ferreting out these in front of this
> forum.

Here I'd urge patience and attention to developments on the wip-cite
branch.  In my experience mostly as an observer, very many details are
worked out at the code level, rather than "in front of this forum".
Indeed, that is one of the beauties of open-source software.  It is
always possible to read the code and learn from it.

All the best,
Tom

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



Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Thomas S. Dye
Aloha Vaidheeswaran C,

Vaidheeswaran C  writes:

>> So there is not really any such thing as an "in-text CSL style".
>> Rather, there are CSL styles that support both in-text and parenthetical
>> citations (which is most of them, I'd guess).
>
> Your guess is just a guess.  You haven't looked at chicago-author-date
> style, have you?
>
> You can prove yourself right by
>
> (a) producing an "off-the-shelf" CSL file that uses BOTH "in-text" AND
> "parenthetical" citations.
>
> (b) producing a csl-based tool that ORG CAN INTERFACE WITH that
> produces "in-text" AND "parenthetical" styles.

Could you explain how CSL returns citation information through the
various interfaces that have been developed?  Several have been
mentioned previously, e.g., citeproc-js, zotxt, etc.

Do you know of something in their design that would make it difficult
(or impossible) for the Org mode developers to produce, e.g., "Foo (2015)"
instead of "(Foo 2015)"?

I'm asking because the developers who contribute their effort to Org
mode are, IMHO, extremely talented and experienced programmers.  IIUC,
they are also busy with other projects (some of which hopefully make
them some money!), so I think it would help them if you could document
the problem you've identified.

All the best,
Tom

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



Re: [O] Citation syntax: Underscore MUST(?) be allowed in cite keys?

2015-03-07 Thread Richard Lawrence
Vaidheeswaran C  writes:

> On Friday 06 March 2015 11:39 PM, Richard Lawrence wrote:
>> Hi Vaidheeswaran,
>> 
>> Vaidheeswaran C  writes:
>> 
>>> The following combination works when passed through the LaTeX/PDF
>>> exporter.  It doesn't work when the cite syntax is switched to the new
>>> one.
>>>
>>> \cite{center_for_history_and_new_media_zotero_}
>> 
>> Is that a realistic example of a key?
>
> Yes.
> It is generated by Zotero.

OK.

> Have you tried it with \cite{} and \bibliography{} combination and
> seen it works or not.  My argument relies on how existing tool works.

I don't understand what your argument is, exactly.  So what if Zotero
sometimes produces keys like this?  So what if a LaTeX document will
compile with such keys?  Is it your position that that means Org keys
must allow punctuation at the end?

> I see that you haven't exporter Zotero libraries to .bib files.  My
> guess is the 4 question marks are for "missing" (or "irrelevant") 
> digits.

If such keys represent references with missing data, the document
produced by even `successful' compilation will be incomplete in some
way.  

Like I said, this seems like an edge case, and I don't see that it is
necessarily Org's responsibility to accommodate the keys produced by
Zotero in such edge cases.  And there is a significant benefit to *not*
accommodating such keys: namely, you can use in-text citations at the
end of a sentence.

Again, if there were reason to think that keys which end with
punctuation are common even in the normal case where the data is
complete and correct, that would be reason to re-think the syntax of Org
citation keys.  But Org's citation syntax can't be expected to handle
every tool's behavior in every edge case.
 
Best,
Richard




Re: [O] Zotero csl file that uses parenthetical style for citations

2015-03-07 Thread Richard Lawrence
Vaidheeswaran C  writes:

> On Friday 06 March 2015 11:51 PM, Richard Lawrence wrote:
>> 
>> Vaidheeswaran C  writes:
>> 
>>> I got the subject and also text wrong. (But I hope my intention was
>>> clear.) I am really looking for EXISTING in-text CSL styles.
>> 
>> Rasmus pointed you to a relevant style: 
>> 
>> https://github.com/citation-style-language/styles/blob/master/chicago-author-date.csl
>> ... 
>> So there is not really any such thing as an "in-text CSL style".
>> Rather, there are CSL styles that support both in-text and parenthetical
>> citations (which is most of them, I'd guess).
>
> Your guess is just a guess.  You haven't looked at chicago-author-date
> style, have you?

Have I read the XML?  No.  But see below.

> You can prove yourself right by
>
> (a) producing an "off-the-shelf" CSL file that uses BOTH "in-text" AND
> "parenthetical" citations.

Here is a Pandoc document that demonstrates that chicago-author-date.csl
can process both types of citations:

#+BEGIN_QUOTE
---
references:
- id: Fenner2012a
  title: One-click science marketing
  author:
  - family: Fenner
given: Martin
  container-title: Nature Materials
  volume: 11
  URL: 'http://dx.doi.org/10.1038/nmat3283'
  DOI: 10.1038/nmat3283
  issue: 4
  publisher: Nature Publishing Group
  page: 261-263
  type: article-journal
  issued:
  - year: 2012

csl: /tmp/chicago-author-date.csl
---
One-click science marketing has recently been discussed. [@Fenner2012a] 

As @Fenner2012a [p. 10] showed, there is indeed such a thing as
one-click science marketing.

# References

#+END_QUOTE

Processing that with 

$ pandoc -F pandoc-citeproc -t plain $FILE 

yields:

#+BEGIN_QUOTE
One-click science marketing has recently been discussed. (Fenner 2012)

As Fenner (2012, 10) showed, there is indeed such a thing as one-click
science marketing.



REFERENCES


Fenner, Martin. 2012. “One-Click Science Marketing.” _Nature Materials_
11 (4). Nature Publishing Group: 261–63. doi:10.1038/nmat3283.

#+END_QUOTE

As you can see, both types of citation render fine.

> (b) producing a csl-based tool that ORG CAN INTERFACE WITH that
> produces "in-text" AND "parenthetical" styles.

Actually, I am working on exactly that.  I will post here when I've got
something to share.

Best,
Richard




Re: [O] Bleeding edge in elpa

2015-03-07 Thread Nikolai Weibull
On Sat, Mar 7, 2015 at 3:47 PM, Xavier Maillard  wrote:

> Nikolai Weibull  writes:

>> Would it be of interest to anyone else if the bleeding edge version
>> was available via elpa?

> Isn't it already available via M-x package interface ?

No, only the version based on the maint branch is available via elpa.

> I'd rather use
> git (I really do not like the package stuff).

As Grant pointed out, it’s a lot more convenient working inside Emacs
for switching between versions and such.



Re: [O] Bleeding edge in elpa

2015-03-07 Thread Grant Rettke
Yes because it would allow us to very easily switch between a stable
and unstable installation using the built-in package infrastructure.

On Sat, Mar 7, 2015 at 8:36 AM, Nikolai Weibull  wrote:
> Hi!
>
> Would it be of interest to anyone else if the bleeding edge version
> was available via elpa?
>



-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] Babel: RESULTS for no value

2015-03-07 Thread Aaron Ecay
Hi Jarmo,

The results line is needed to store the hash value when the :cache
header arg is set.  (See (info "(org) cache"))

It might be a little distracting to see it there, but it shouldn’t
interfere with the functionality in any way (for example, it should be
invisible on export).  It the line’s presence causing any problems for
your code?

-- 
Aaron Ecay



Re: [O] Bleeding edge in elpa

2015-03-07 Thread Xavier Maillard
Hi,

Nikolai Weibull  writes:

> Would it be of interest to anyone else if the bleeding edge version
> was available via elpa?

Isn't it already available via M-x package interface ? I'd rather use
git (I really do not like the package stuff).

Regards
-- Xavier.



Re: [O] Babel questions for finalising Processing support

2015-03-07 Thread Aaron Ecay
Hi Jarmo,

It’s good to hear of your progress!

2015ko martxoak 6an, Jarmo Hurri-ek idatzi zuen:
> 
> Greetings.
> 
> My implementation of Processing support in Babel is proceeding really
> well! I have now both external viewing of sketches and export to html
> (sketches drawn by browser) working.
> 
> There are a number of details to fix, though.
> 
> 1. When editing Processing code with C-c ' I get an error from
>processing-mode. Editing with C-c ' works just fine, but the error is
>annoying. It seems to me the error is caused by the fact that
>processing-mode refers to buffer-file-name, which is not valid in a
>temporary buffer. Any ideas on how to fix this inside org? (Wouldn't
>want to get involved with processing-mode if it can be avoided.)

Why not?  It sounds like their code is causing the problem.

> Is
>there for example a hook I could use to set buffer-file-name to some
>temporary value?

You could look at the first answer here for inspiration:
.
I’d say you should try to have processing-mode made more robust before
pursuing hacky solutions.

> 
> 2. When processing code is executed with C-c C-c, it shows the sketch in
>an external viewer. When exported, the results are html code. To this
>end I have set default header arguments for Processing to be
>":results html" and ":exports results". With C-c C-c execution,
>org-babel-execute:processing returns nil.
> 
>This works fine otherwise, but even C-c C-c execution produces an
>empty results section:
> 
>#+RESULTS:
>#+BEGIN_HTML
>#+END_HTML
> 
>This is a nuisance, since C-c C-c execution always also changes the
>current file (even though nothing changes). Is there a way to avoid
>this?

I think your org-babel-execute:processing should return nil (the elisp
value).  This should be caught by the first branch of the cond below the
comment “;; insert results based on type” in org-babel-insert-result,
leading to the begin/end not being inserted.  (Maybe you already figured
this out, based on your later email.)

>
> 3. In ob-processing.el I (require 'ob). However, to avoid a compiler
>warning about a free variable I still need to declare
> 
>(eval-when-compile (defvar org-babel-temporary-directory))
> 
>Is this ok?

This looks bogus.  The defvar for org-babel-temporary-directory is not
evaluated when noninteractive is true.  I think the defvar should be
unconditional, but I also don’t understand why the code is like that in
the first place, so let’s see if someone knows why before changing it.

> 
> 4. Processing support in Babel will depend on processing2-emacs module,
>which contains the function processing-sketch-run. Again, to avoid
>compiler warnings, I am declaring this by
> 
>(declare-function processing-sketch-run "processing-mode.el" nil)
> 
>Is this ok?

Are you not doing (require 'processing-mode)?  If you do that, I don’t
understand why the declare-function is also needed.

-- 
Aaron Ecay



[O] Bleeding edge in elpa

2015-03-07 Thread Nikolai Weibull
Hi!

Would it be of interest to anyone else if the bleeding edge version
was available via elpa?



[O] Babel: RESULTS for no value

2015-03-07 Thread Jarmo Hurri

Greetings.

Would it be feasible to change Babel so that it would *not* output
#+RESULTS: into the org buffer in case there is absolutely no value for
a block?  Consider the following example, which draws an Asymptote
picture in an external viewer.

# --
#+BEGIN_SRC asymptote 
size (5cm);
filldraw (unitcircle, red);
#+END_SRC

#+RESULTS:
# --

The #+RESULTS: line is produced even though there is no output from the
block.

Making this change would make my life a bit simpler in finalising
Processing support for Babel.

Jarmo




Re: [O] [ox-ascii, bug?] aligning text withing footnotes

2015-03-07 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> When writing plain text I might write something like:
>>
>> See foo[fn:1] 
>>
>> [fn:1] http://orgmode.org/\\
>>http://www.gnu.org/software/emacs/
>>
>> This is exported as:
>>
>> See foo[1]
>>
>> Footnotes
>> ─
>>
>> [1] [http://orgmode.org/]
>>[http://www.gnu.org/software/emacs/]
>
> This should be fixed. Expected indentation is:
>
>
>   [1] [http://orgmode.org/]
>   [http://www.gnu.org/software/emacs/]

No.  In a normal paragraph when I do

para1\\
 para2

The whitespace indentation is respected.  All I'm saying that when I do
something equivalent in a footnote the amount of characters removed from
the first list (typically 3: "fn:") should also be removed from subsequent
lines.  E.g.

[fn:1] http://orgmode.org/\\
   http://www.gnu.org/software/emacs/

Becomes:

[1] http://orgmode.org/\\
   http://www.gnu.org/software/emacs/

But 

[fn:1] http://orgmode.org/ long text here
http://www.gnu.org/software/emacs/

Becomes 

[1] http://orgmode.org/ long text here
http://www.gnu.org/software/emacs/


> You mean this this indentation scheme for footnotes
>
>   [1] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
>   eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad
>   minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
>   ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
>   voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
>   sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>   mollit anim id est laborum.
>
> instead of
>
>   [1] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
>   eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad
>   minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
>   ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
>   voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
>   sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>   mollit anim id est laborum.


I would want the first scheme if I typed in my footnote as 

[fn:1] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
   eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad
   minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip

And the second if I typed:

[fn:1] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enimad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip

Does it make sense?

—Rasmus 

-- 
The Kids call him Billy the Saint



[O] Custom agenda shows all TODO

2015-03-07 Thread Ken Mankoff

Has something in the Agenda changed recently? I'm using Org from git and since 
upgrading my refresh Agenda behaves differently. I've searched the mailing list 
but found no mention of this. I know there were some 8.2 to 8.3 changes. Is 
this one of them?

I have this in my custom agenda:

(todo "INPROGRESS" ((org-agenda-overriding-header "In Progress")))

And when I load that Agenda, I see only TODO items with status "INPROGRESS".

If I press "r" in a different section, I still see what I expect.

But oddly if I press "r" in the "In Progress" section, then it refreshes and 
shows me *all* TODO items, not just INPROGRESS TODO items.

  -k.



Re: [O] Bug: org-preview-latex-fragment fails to render in remote files (TRAMP) [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/24.4/share/emacs/24.4/lisp/org/)]

2015-03-07 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> But I guess we could generate the picture locally?  Or at least allow for
> it.

Done in 9e3c3ec0b357c97a488da1223f96785ec7edfc37.


Regards,

-- 
Nicolas Goaziou



Re: [O] [ANN] org-dp-wrap-in-block

2015-03-07 Thread Xebar Saram
Ok so spend all morning picking up some elisp and i made some progress :)

i can bind a key to auto warp a line. though i had to add a delete command
since it always added 2 empty spaces after the wrap for some reason., it
now looks like this (since its my first ever elisp code its probably very
ugly :) ) :

;; wrap in elisp
  (defun z/wrap-in-elisp-block ()
  (org-dp-wrap-in-block
   nil '(src-block nil nil nil (:language "emacs-lisp"

(global-set-key (kbd "C-c w e")
(lambda ()
  (interactive)
  (beginning-of-line)
  (z/wrap-in-elisp-block)
  (beginning-of-line)
 (delete-char 2)
 ; (delete-indentation)
))

this seems to work on a selection as well (with the whitespace again
appearing)

i have some more ideas and wondered if anyone knew how to extend it by
maybe creating functions that will:
1. ask how many X lines to wrap
2. paste from clip already wrapped in language X
3. auto select a region/paragraph and wrap. im thinking maybe using
expand-region.el for that

thanks alot Thorsten for this great library!

Z



On Sat, Mar 7, 2015 at 8:37 AM, Xebar Saram  wrote:

> H Thorsten
>
> i know this is a *very* late response but life/work has dragged me in last
> few months and only now i have time to take a look at org-dp :)
>
> if you remember i have near to null coding skills but i am trying to make
> sense of stuff looking at the github site and the org-dp.el examples
>
> i understand (or at least i think i do) that org-dp is very complex and
> covers not just wrapping in source code lines/areas but what i basically
> need is to assign hotkeys to specific wrapping. mainly these:
>
> 1. a hotkey to quick wrap in language X a line
> 2. a hotkey to quick wrap in language X y lines
> 3. a hotkey to quick wrap in language X a selection
>
> any tips and how to start/create these keybinds? is there a more
> comprehensive documentation on org-dp somewhere else i may have overlooked?
>
> thx alot!
>
> z
>
>
>
>
> On Tue, Aug 19, 2014 at 10:41 PM, Thorsten Jolitz 
> wrote:
>
>> Xebar Saram  writes:
>>
>> Hi,
>>
>> > will use it over the next few days and report bug (if any) that i find
>>
>> good, thanks.
>>
>> As a hint, here the global keybindings I defined in my init.el (my
>> default use-case is to simply wrap in a plain emacs-lisp src-block).
>>
>> You can define all kinds of functions that don't prompt the user anymore
>> by giving a list like
>>
>>  '(elem-type contents replace affiliated args)
>>
>> as second arg to `org-dp-wrap-in-block', and in that list you can
>> specify any kind of customized block.
>>
>> #+BEGIN_SRC emacs-lisp
>> (when (require 'org-dp-lib nil t)
>>
>>   (defun tj/wrap-in-elisp-block ()
>> (org-dp-wrap-in-block
>>  nil '(src-block nil nil nil (:language "emacs-lisp"
>>
>>   (global-set-key (kbd "C-c w w") 'org-dp-wrap-in-block)
>>
>>   (global-set-key (kbd "C-c w l")
>>   (lambda ()
>> (interactive)
>> (let ((current-prefix-arg '(4)))
>>   (call-interactively
>>'org-dp-wrap-in-block
>>
>>   (global-set-key (kbd "C-c w e")
>>   (lambda ()
>> (interactive)
>> (beginning-of-line)
>> (tj/wrap-in-elisp-block)))
>>
>>   (global-set-key (kbd "C-c w a")
>>   (lambda ()
>> (interactive)
>> (backward-sexp)
>> (beginning-of-line)
>> (tj/wrap-in-elisp-block))) )
>> #+END_SRC
>>
>>
>> > On Tue, Aug 19, 2014 at 5:14 PM, Thorsten Jolitz 
>> > wrote:
>> >
>> > Hi List,
>> >
>> > I've written the "eierlegende Wollmilchsau" of wrap-in-block
>> > functions
>> > (i.e. the 'all-inclusive mother of all wrap-in-block functions').
>> >
>> > To check it out, you need to
>> > 1. Clone or fork the git repo (https://github.com/tj64/org-dp)
>> > 2. (add-to-list 'load-path "/path/to/org-dp/") and
>> > 3. (require 'org-dp-lib') in your init file
>> >
>> > `org-dp-wrap-in-block' works on/with all kinds of Org blocks, and
>> > can be
>> > called interactively or non-interactively.
>> >
>> > It
>> >
>> > - inserts a new block when called on an empty line without
>> > arguments
>> >
>> > - wraps sexp or region or '+/- X lines from point' into a newly
>> > created
>> > block
>> >
>> > - when called with point inside a block, it either
>> >
>> > + unwraps the blocks content, i.e. deletes the surrounding block
>> > or
>> >
>> > + replaces the surrounding block with a different block
>> >
>> > It takes full account of affiliated keywords. In case of
>> > src-blocks,
>> > it puts src-block parameters on the block's headline, but with
>> > `org-dp-to