[O] Tab-completion no longer works?

2018-01-09 Thread Martin Steffen


Hi, Since recently ---I can't remember exactly since when--- some
completion-feature I liked does not work any more.

By completion, I mean the expansion of 

   

[O] Orgmode repeater intervals with end date

2018-01-09 Thread Tory S. Anderson

Hi all,

When repeater intervals are set on on org dates (eg =<2018-01-10 
Wed 16:00 +2w>=) the output is exported nicely to ical and appears 
nicely in agenda. Is there anyway to put an end-date on org dates 
so that the +2w will not just continue forever?


I could use org-class, but then it wouldn't be exported to ical 
nicely. I was hopefully with <2018-01-10 Wed 16:00 
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put the range as 
counting every day in the interim. Is there an existing way to 
have an end-date on a repeating cycle?


- Tory



Re: [O] [IT] Broken support for links to text files (both internal & external)

2018-01-09 Thread Samuel Wales
actually i don't know if i'd create fuzzy links ever.  but if they
defaulted to exact match first, maybe i would create them by default.



Re: [O] [IT] Broken support for links to text files (both internal & external)

2018-01-09 Thread Samuel Wales
it's a good idea.  i never got that stuff to work right, including the
create thing.

but fyi there remains a use case, which is when you in a non-exported
org file create a regular link but do not want to create an org-id,
then change the header.  this is the result of error.  you don't think
you will change the header.  you still want the link to offer to make
a guess if possible.  but the fuzziness would need to be a fuzzy match
as in hamming distance or so.  i don't know if i'd want to create a
fuzzy link for every link.



Re: [O] Equation references in HTML export

2018-01-09 Thread Nicolas Goaziou
Hello,

Thibault Marin  writes:

> To make sure I understand the desired HTML output, do you mean that
> instead of producing this HTML:
> ,
> | \begin{align}
> | \label{eq:orgbfedefe}
> | 1 + 1 = 0
> | \end{align}
> `
> and relying on MathJax to manage references, we should produce something
> like the following?
> ,
> | 
> | \begin{align}
> | 1 + 1 = 0
> | \end{align}
> | 
> | 
> `
>
> Am I understanding correctly?

That's the idea, yes.

> The advantage of this approach is that it is consistent with how the
> other types of references (figures, source blocks, etc.) are managed and
> it should work with the verbatim mode.
>
> I have a few questions about the "caption" (i.e. the equation number):
>
> 1. Where should it be placed?  In a `' tag like it is done for
>figures?  Ideally, I would like to have the caption (i.e. the
>equation number) on the right side of the equation, as it is done in
>LaTeX, should this be done with CSS?  Should there be a user option
>for the position of the caption?

I'm not sure. Have you checked how captions in other parts of
"ox-html.el"?

> 2. Should we disable MathJax's equation numbering and replace it with
>ours?  I am afraid this may break the setup of users already relying
>on MathJax to label and reference equations.

You may be right. In this case, we may use \eqref if MathJax is going to
be used (like your initial patch did), and do the above otherwise.

> 3. Should there be an option to customize the formatting of the equation
>number, both on the right of the equation itself and in links
>(e.g. wrap the number between parentheses, as `\eqref' dose)?

I don't think other captions allow this in "ox-html.el".

WDYT?

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Using org-ref to automatically download articles from Pubmed that satisfies a given search term

2018-01-09 Thread myglc2
On 01/08/2018 at 20:32 Doyley, Marvin M. writes:
> I am in the process of writing a broad literature review and was
> wondering if there is a way to get org-ref to search Pubmed and
> automatically pull (pdf, abstracts, etc) all the papers that satisfy a
> given search terms (year range, keyword, authors) ?

Dunno/haven't used org-ref. FWIW a couple years ago I used
https://github.com/wash/pubmode to search pubmed. It works well.

HTH - George



Re: [O] [IT] Broken support for links to text files (both internal & external)

2018-01-09 Thread Nicolas Goaziou
Hello,

"Nicolas Bercher (Aʟᴏɴɢ-Tʀᴀᴄᴋ)"  writes:

> HOWEVER, in the case of links pointing to headlines, the matching to has
> to be EXACT (but it was not necessary in earlier version since 2011 at
> least) otherwise I get the message below:
>
>   "No match for fuzzy expression: "
>
> Do you know if I can revert some option to make the sample below to work
> again?

You cannot. This option somehow disappeared years ago.

Note that you can complete "[[*" with M-, which can help a bit. If
the feature is considered useful anyway,
`org-link-search-must-match-exact-headline' is not the right way to
solve this. With this variable, that the same document can mean two
different things, which cripples portability.

For example, the following document

* XX
Contents 1
* X
Contents 2
* Headline
See [[*X]].

means two different things if you set
`org-link-search-must-match-exact-headline' to nil and I don't. 

Granted, you can use file local variables to fix a given value in the
document, but that doesn't sound right. Org format ought to be more
self-contained.

So, here's an idea. We could drop
`org-link-search-must-match-exact-headline' (the `query-to-create' value
could be handled in a dedicated variable) and introduce a new syntax for
regexp searches:

  [[?random words]] and [[*?random words]]

This way, where the link should point to is explicit.

The question about export is still open. [[*?random words]] targets
a headline it can be handled the usual way. However [[?random words]]
may target anything, including parts of the document that cannot be
referenced easily (e.g., comments, the contents of an example block...).

Another option is to keep only [[*?random words]] since we cannot handle
the other properly. Note that, even without this feature, you can still
use targets for specific locations in the buffer:

  Some <>long text

  [[here]]

I have the feeling that a feature like [[?random words]] (and
`org-link-search-must-match-exact-headline') is going to bite us
someday.

WDYT?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: clocktable question [9.1.6 (9.1.6-dist @ /Users/savoie/tmp/org-bug/org-9.1.6/lisp/)]

2018-01-09 Thread Nicolas Goaziou
Hello,

sav...@nsidc.org writes:

> - GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
> 10.9.5 (Build 13F1911)) of 2017-04-21
> - Org mode version 9.1.6 (9.1.6-10-g0c9329-elpa @ 
> /Users/savoie/.emacs.d/elpa/org-20180108/)
>
> Having a hard time understanding clocktables.  I either have a bug or a
> misunderstanding. Why don't my hours off for Wednesday show up when I create a
> clocktable starting on Monday at 00 and ending on Wednesday at 23:59 if I use 
> :step?
>
> I expect that when I have clock stamp:
>   CLOCK: [2017-12-27 Wed 08:00]--[2017-12-27 Wed 16:00] =>  8:00
>
> and I'm generating a clocktable with a start time before the beginning and an
> end time after the end, I would see that reflected in the table.
>
> Below are 4 stanzas. The first are some clocked hours.  The second is a clock
> table that works as expected.  The second and third stanzas seem to exclude 
> the
> hours from Wednesday (which I don't expect).  I don't know why the 4th stanza
> appears as it does.

Fixed. Thank you.

 `org-clocktable-steps' was rounding :tstart and :tend to 00:00.


Regards,

-- 
Nicolas Goaziou



Re: [O] Using org-ref to automatically download articles from Pubmed that satisfies a given search term

2018-01-09 Thread John Kitchin
I think you can do that with C-spc.

John

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


On Tue, Jan 9, 2018 at 9:40 AM, Doyley, Marvin M. 
wrote:

> Crossref-add-bibtex-entry is awesome. One quick question, how do you
> select multiple references ?
>
> Cheers,
> M
>
> > On Jan 8, 2018, at 10:11 PM, John Kitchin 
> wrote:
> >
> > You might also consider the crossref search.
> >
> > M-x crossref-add-bibtex-entry
> >
> > It will download a bibtex and pdf (if it knows how to). I doubt you can
> > do year range query, but certainly authors and keywords. It really
> > excels at freeform citations as the query.
> >
> > Doyley, Marvin M. writes:
> >
> >> Hi there,
> >>
> >> I am in the process of writing a broad literature review and was
> wondering if there is a way to get org-ref to search Pubmed and
> automatically pull (pdf, abstracts, etc) all the papers that satisfy a
> given  search terms (year range, keyword, authors) ?
> >>
> >> Thanks,
> >>
> >> M
> >
> >
> > --
> > Professor John Kitchin
> > Doherty Hall A207F
> > Department of Chemical Engineering
> > Carnegie Mellon University
> > Pittsburgh, PA 15213
> > 412-268-7803
> > @johnkitchin
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__
> kitchingroup.cheme.cmu.edu=DwIBAg=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9
> EI2eaqQZhHbOU=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BN
> Cy_RylYdxU=SvHYbzQWmnb9yyFa_ZsCzhc0a0UZZ2QycfE978DTDG8=_
> 8S7VQ_YkQIojPf7ecqFGLP_cOZ0Fja9CqdHzFp9AQM=
>
>


Re: [O] Using org-ref to automatically download articles from Pubmed that satisfies a given search term

2018-01-09 Thread Doyley, Marvin M.
Crossref-add-bibtex-entry is awesome. One quick question, how do you select 
multiple references ?

Cheers,
M

> On Jan 8, 2018, at 10:11 PM, John Kitchin  wrote:
> 
> You might also consider the crossref search.
> 
> M-x crossref-add-bibtex-entry
> 
> It will download a bibtex and pdf (if it knows how to). I doubt you can
> do year range query, but certainly authors and keywords. It really
> excels at freeform citations as the query.
> 
> Doyley, Marvin M. writes:
> 
>> Hi there,
>> 
>> I am in the process of writing a broad literature review and was wondering 
>> if there is a way to get org-ref to search Pubmed and automatically pull 
>> (pdf, abstracts, etc) all the papers that satisfy a given  search terms 
>> (year range, keyword, authors) ?
>> 
>> Thanks,
>> 
>> M
> 
> 
> -- 
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu=DwIBAg=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU=SvHYbzQWmnb9yyFa_ZsCzhc0a0UZZ2QycfE978DTDG8=_8S7VQ_YkQIojPf7ecqFGLP_cOZ0Fja9CqdHzFp9AQM=
>  




[O] Bug: clocktable question [9.1.6 (9.1.6-dist @ /Users/savoie/tmp/org-bug/org-9.1.6/lisp/)]

2018-01-09 Thread savoie

- GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 
(Build 13F1911)) of 2017-04-21
- Org mode version 9.1.6 (9.1.6-10-g0c9329-elpa @ 
/Users/savoie/.emacs.d/elpa/org-20180108/)

Having a hard time understanding clocktables.  I either have a bug or a
misunderstanding. Why don't my hours off for Wednesday show up when I create a
clocktable starting on Monday at 00 and ending on Wednesday at 23:59 if I use 
:step?

I expect that when I have clock stamp:
  CLOCK: [2017-12-27 Wed 08:00]--[2017-12-27 Wed 16:00] =>  8:00

and I'm generating a clocktable with a start time before the beginning and an
end time after the end, I would see that reflected in the table.

Below are 4 stanzas. The first are some clocked hours.  The second is a clock
table that works as expected.  The second and third stanzas seem to exclude the
hours from Wednesday (which I don't expect).  I don't know why the 4th stanza
appears as it does.


```

* Here's some vacation hours.
  :LOGBOOK:
  CLOCK: [2017-12-25 Mon 08:00]--[2017-12-25 Mon 16:00] =>  8:00
  CLOCK: [2017-12-26 Tue 08:00]--[2017-12-26 Tue 16:00] =>  8:00
  CLOCK: [2017-12-27 Wed 08:00]--[2017-12-27 Wed 16:00] =>  8:00
  :END:

* Clocktable with no steps  Seems ok.
 #+BEGIN: clocktable :tstart "<2017-12-25 Mon 00:00>" :tend "<2017-12-27 Wed 
23:59>" :scope file
 #+CAPTION: Clock summary at [2018-01-08 Mon 14:52]
 | Headline| Time  |
 |-+---|
 | *Total time*| *1d 0:00* |
 |-+---|
 | Here's some vacation hours. | 1d 0:00   |
 #+END:

* Time it weekly  (I think it's missing Wednesday)
#+BEGIN: clocktable :tstart "<2017-12-25 Mon 00:00>" :tend "<2017-12-27 Wed 
23:59>"  :scope file :step week

Weekly report starting on: [2017-12-25 Mon]
| Headline| Time|
|-+-|
| *Total time*| *16:00* |
|-+-|
| Here's some vacation hours. | 16:00   |
#+END:

* Time it daily (Sure looks like Wed is missing)
#+BEGIN: clocktable :tstart "<2017-12-25 Mon 00:00>" :tend "<2017-12-27 Wed 
23:59>" :scope file :step day

Daily report: [2017-12-25 Mon]
| Headline| Time   |
|-+|
| *Total time*| *8:00* |
|-+|
| Here's some vacation hours. | 8:00   |

Daily report: [2017-12-26 Tue]
| Headline| Time   |
|-+|
| *Total time*| *8:00* |
|-+|
| Here's some vacation hours. | 8:00   |

Daily report: [2017-12-27 Wed]
| Headline | Time   |
|--+|
| *Total time* | *0:00* |
#+END:


* Time it daily, but use illegal time for Wed end
#+BEGIN: clocktable :tstart "<2017-12-25 Mon 00:00>" :tend "<2017-12-27 Wed 
24:00>" :scope file :step day

Daily report: [2017-12-25 Mon]
| Headline| Time   |
|-+|
| *Total time*| *8:00* |
|-+|
| Here's some vacation hours. | 8:00   |

Daily report: [2017-12-26 Tue]
| Headline| Time   |
|-+|
| *Total time*| *8:00* |
|-+|
| Here's some vacation hours. | 8:00   |

Daily report: [2017-12-27 Wed]
| Headline| Time   |
|-+|
| *Total time*| *8:00* |
|-+|
| Here's some vacation hours. | 8:00   |
#+END:
```




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

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

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




Emacs  : GNU Emacs 25.2.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
10.9.5 (Build 13F1911))
 of 2017-04-21
Package: Org mode version 9.1.6 (9.1.6-dist @ 
/Users/savoie/tmp/org-bug/org-9.1.6/lisp/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((closure
  (org-inlinetask-min-level buffer-face-mode-face 

Re: [O] Incorrect references to LaTeX Listings

2018-01-09 Thread Nicolas Goaziou
Hello,

James Harkins  writes:

> I have several org documents containing source code listings, with references 
> such as the following:
>
> ```
> * Section
>
> #+name: codeblock
> #+caption: Hello, world.
>
> #+BEGIN_SRC C
> // Hello, world
> #+END_SRC
>
> Reference to [[codeblock]].
> ```
>
> I've been doing this for years, never had any problem.
>
> Today, I get the following sort of LaTeX export (assuming the Listings 
> package):
>
> ```
> \section{Section}
> \label{sec:orgheadline1}
> \lstset{language=C,label=codeblock,caption={Hello, 
> world.},captionpos=b,numbers=none}
> \begin{lstlisting}
> // Hello, world
> \end{lstlisting}
>
> Reference to \ref{orgsrcblock1}.
> ```
> Well, there is no label orgsrcblock1, so the exported document shows
> "??" instead of a listing number.

FWIW, I cannot reproduce it on a recent Org.

> So, how do I make source block references work the way they used to?
> Rather critical for me -- this is one of /the/ main reasons why
> I prefer to write in org and export LaTeX.

You could update Org.

> org 8.3.3 -- I'm using the packages provided by Ubuntu 16.04. (I
> realize distro packages are usually behind, but I wouldn't have
> expected a seriously broken org version to make it into package
> repositories, especially for a feature whose malfunction would not be
> tolerated by the technical writers in org's user base. So I suspect
> there must be some configuration issue, rather than a bug.)

I'm also surprised this doesn't work in Org 8.3.3, but my time machine
is being repaired at the moment, so there is nothing I can do about it.
Meanwhile, let me quote the usual licensing stuff, included in every Org
library (caps are not mine):

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

Again, I suggest to update Org. Release 8.3.3 is very old.

Regards,

-- 
Nicolas Goaziou



Re: [O] Incorrect references to LaTeX Listings

2018-01-09 Thread Eric S Fraga
On Tuesday,  9 Jan 2018 at 18:58, James Harkins wrote:
> I have several org documents containing source code listings, with
> references such as the following:

[...]

> Well, there is no label orgsrcblock1, so the exported document shows
> "??" instead of a listing number.

Check org-latex-prefer-user-labels.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-317-gc82c21


signature.asc
Description: PGP signature


Re: [O] top headline's visibility property blocked by subheadline's property

2018-01-09 Thread Nicolas Goaziou
Hello,

Michael Maurer  writes:

> Nope. And I think I figured it out. When I remove
>
>  CLOSED: [2017-12-31 So 00:17]
> - CLOSING NOTE [2017-12-31 So 00:17]
>
> and the :PROPERTIES: specification is the only thing underneath the
> headline, it works.

Per Org syntax, the properties drawer should be the first thing below
the headline, barring any planning info line (scheduled, deadline,
closed).

In ORG-NEWS, there's a function to fix your documents.

Regards,

-- 
Nicolas Goaziou



Re: [O] top headline's visibility property blocked by subheadline's property

2018-01-09 Thread Michael Maurer
On Mon, Jan 8, 2018 at 6:22 PM, Nicolas Goaziou  wrote:
> Michael Maurer  writes:
>
>> On Mon, Jan 8, 2018 at 5:56 PM, Nicolas Goaziou  
>> wrote:
>>> Hello,
>>>
>>> Michael Maurer  writes:
>>>
 I installed the latest version of org, but now all my
 visibility/folded properties get ignored
>>>
>>> What version?
>>
>> org-plus-contrib-20180108
>
> It should be fine.
>
> And you don't obtain the same view with the given example?

Nope. And I think I figured it out. When I remove

 CLOSED: [2017-12-31 So 00:17]
- CLOSING NOTE [2017-12-31 So 00:17]

and the :PROPERTIES: specification is the only thing underneath the
headline, it works.



[O] Incorrect references to LaTeX Listings

2018-01-09 Thread James Harkins
I have several org documents containing source code listings, with references 
such as the following:

```
* Section
#+name: codeblock
#+caption: Hello, world.
#+BEGIN_SRC C
// Hello, world
#+END_SRC

Reference to [[codeblock]].
```

I've been doing this for years, never had any problem.

Today, I get the following sort of LaTeX export (assuming the Listings package):

```
\section{Section}
\label{sec:orgheadline1}
\lstset{language=C,label=codeblock,caption={Hello, 
world.},captionpos=b,numbers=none}
\begin{lstlisting}
// Hello, world
\end{lstlisting}

Reference to \ref{orgsrcblock1}.
```

Well, there is no label orgsrcblock1, so the exported document shows "??" 
instead of a listing number.

I checked the manual to see if any of the syntax had changed, but I don't see 
any. I also tried doing

#+CAPTION:
#+NAME:
#+BEGIN_SRC
...

... but no difference -- I still get the wrong reference in the text.

So, how do I make source block references work the way they used to? Rather 
critical for me -- this is one of /the/ main reasons why I prefer to write in 
org and export LaTeX.

org 8.3.3 -- I'm using the packages provided by Ubuntu 16.04. (I realize distro 
packages are usually behind, but I wouldn't have expected a seriously broken 
org version to make it into package repositories, especially for a feature 
whose malfunction would not be tolerated by the technical writers in org's user 
base. So I suspect there must be some configuration issue, rather than a bug.)

hjh




Re: [O] org table with datestamp convert to csv and then xlsx or ods: problem

2018-01-09 Thread Uwe Brauer


  > Uwe Brauer  writes: 

  > Ah well, this was a basis to get you started... This one 
  > should work 

  >   (defun my-format-timestamps (cell) 
  > (org-quote-csv-field 
  >  (replace-regexp-in-string 
  >   org-ts-regexp-both (lambda (m) 
  > (format-time-string 
  >  (let ((hours? (string-match-p "[0-9]+:[0-9]+" m))) 
  >(funcall (if hours? #'cdr #'car) 
  >org-time-stamp-custom-formats)) 
  >  (apply #'encod-time (save-match-data 
  >  (org-parse-time-string m) 
  >   cell))) 


There is a small misspelling. Should be encode-time not encod-time.





Re: [O] org table with datestamp convert to csv and then xlsx or ods: problem

2018-01-09 Thread Uwe Brauer

> Uwe Brauer  writes:

> Ah well, this was a basis to get you started... This one should work

>   (defun my-format-timestamps (cell)
> (org-quote-csv-field
>  (replace-regexp-in-string
>   org-ts-regexp-both
>   (lambda (m)
> (format-time-string
>  (let ((hours? (string-match-p "[0-9]+:[0-9]+" m)))
>(funcall (if hours? #'cdr #'car) 
org-time-stamp-custom-formats))
>  (apply #'encod-time (save-match-data (org-parse-time-string 
m)
>   cell)))

It does, works like charm, thank you so much. I suggest to include that
or a similar function into the org-table-export function!!