[O] [PATCH] org-agenda: Store stuck project redo command

2017-04-19 Thread Allen Li

* lisp/org-agenda.el (org-agenda-list-stuck-projects): Store the redo
command in a text property so it is found correctly.

`org-agenda-redo' checks the `org-redo-cmd' text property, not
`org-agenda-redo-command'.

TINYCHANGE
---
 lisp/org-agenda.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index cf9351a9b..78c1a37f4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4971,7 +4971,11 @@ of what a project is and how to check if it stuck, 
customize the variable
 (setq org-agenda-buffer-name (buffer-name))
 (with-current-buffer org-agenda-buffer-name
   (setq org-agenda-redo-command
-   `(org-agenda-list-stuck-projects ,current-prefix-arg)
+   `(org-agenda-list-stuck-projects ,current-prefix-arg))
+  (let ((inhibit-read-only t))
+(add-text-properties
+ (point-min) (point-max)
+ `(org-redo-cmd ,org-agenda-redo-command))
 
 ;;; Diary integration
 
-- 
2.12.2




Re: [O] LaTeX export of org file uses listings instead of minted, why?

2017-04-19 Thread Nick Dokos
"vendo.li...@libero.it"  writes:

> Hello there!
> I'm having a bit of a problem telling emacs to use MINTED instead of LISTINGS 
> to handle code blocks
> enclosed within #+BEGIN_SRC and #+END_SRC when exporting from an org file. 
>
> I've had to Customize Org Groups using the GUI menu `Org' but as soon as I 
> close and restart emacs, it
> goes back to LISTINGS. I know this because when I export a minimum working 
> example org file, the
> resulting pdf does not recognize code. If I manually change the .tex file and 
> run it, it works
> perfectly.
>
> I've added a few lines into my .emac file (please find it attached to this 
> mail) but because it's
> uneven, often repetitive and scrappy, I suspect there's some conflict going 
> on which I, as a simple user
> of orgmode, am not able to detect.
>
> Can someone please check the file and tell me why emacs/orgmode keeps 
> reverting to LISTINGS every time I
> shut down and restart emacs?
>
> I'm running org mode 8.2, emacs 24 on a Windows 7 machine. I also have a 
> working TeX Live 2015 distro
> with MINTED pkg properly working in AUCTeX and I have python's pygmentize.exe 
> in my C:\Python27\Scrips\
>  directory. What am I missing? Can you help me fix this?
>
>

Is your .emacs read at all? From the SE exchange, I have my doubts, but a 
Windows user
might be able to steer you in the right direction.

I would use a minimal init file and invoke emacs with (the Windows equivalent 
of)

emacs -q -l /path/to/minimal/init/file

and then evaluate the variable

   C-h v org-latex-listings RET

and try to export your org file. The minimal init file should do the minimum 
possible.
Mine looks like this:

--8<---cut here---start->8---
(add-to-list 'load-path "~/src/emacs/org/org-mode/lisp")

(require 'org-loaddefs)
(require 'org)

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)

;;; 
https://emacs.stackexchange.com/questions/32225/latex-export-uses-lstlisting-instead-of-minted-why#comment49631_32225

(setq org-latex-listings 'minted
  org-latex-packages-alist '(("" "minted"))
  org-latex-pdf-process
  '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
--8<---cut here---end--->8---

and as I said on SE it works fine on Fedora 24 with emacs 26.0.50 and org-mode 
9.0.5.
That's more recent than yours but I tried it with org-mode 8.2.10 as well and 
it works
there too.

Can you post the org file and the resulting TeX file after this
experiment?

-- 
Nick




[O] LaTeX export of org file uses listings instead of minted, why?

2017-04-19 Thread vendo.li...@libero.it
Hello there!I'm having a bit of a problem telling emacs to use MINTED instead 
of LISTINGS to handle code blocks enclosed within #+BEGIN_SRC and #+END_SRC 
when exporting from an org file. 
I've had to Customize Org Groups using the GUI menu `Org' but as soon as I 
close and restart emacs, it goes back to LISTINGS. I know this because when I 
export a minimum working example org file, the resulting pdf does not recognize 
code. If I manually change the .tex file and run it, it works perfectly.
I've added a few lines into my .emac file (please find it attached to this 
mail) but because it's uneven, often repetitive and scrappy, I suspect there's 
some conflict going on which I, as a simple user of orgmode, am not able to 
detect.
Can someone please check the file and tell me why emacs/orgmode keeps reverting 
to LISTINGS every time I shut down and restart emacs?
I'm running org mode 8.2, emacs 24 on a Windows 7 machine. I also have a 
working TeX Live 2015 distro with MINTED pkg properly working in AUCTeX and I 
have python's pygmentize.exe in my C:\Python27\Scrips\  directory. What am I 
missing? Can you help me fix this?

.emacs
Description: Binary data


Re: [O] ANN: org-sticky-header

2017-04-19 Thread Adam Porter
Inline tasks are now skipped.  Thanks!




Re: [O] ANN: org-sticky-header

2017-04-19 Thread Adam Porter
This should now be fixed.  Thanks!




Re: [O] ANN: org-sticky-header

2017-04-19 Thread Adam Porter
Carsten Dominik  writes:

> here is a new patch with does do this correctly.

Thanks, Carsten, I will work on this soon.




Re: [O] ANN: org-sticky-header

2017-04-19 Thread Adam Porter
Thanks, Eric and Carsten.  I'll look into this soon.




Re: [O] ANN: org-sticky-header

2017-04-19 Thread Carsten Dominik
On Wed, Apr 19, 2017 at 8:07 AM, Eric S Fraga  wrote:

> On Tuesday, 18 Apr 2017 at 23:53, Adam Porter wrote:
> > I was using three spaces, which looked okay on my system, but I'm sure
> > it didn't look right on everyone's.  I added an option to configure it
> > now.  It would be nice to calculate it automatically somehow, but this
> > should be an improvement.
>
> Excellent.  Thank you.
>
> One other minor issue: if there are any inline tasks, the sticky header
> shows "END" if there is such an inline task not in the window but
> between point and the previous headline.  I think that if point is not
> within an inline task, you should be skipping inline tasks (my own
> preference) or displaying the headline for the task and not the END
> line.
>

That would be hard to implement.  Skipping inline tasks entirely would
be easy enough, just truncate the list of path entries to below
org-inlinetask-min-level.

Carsten


>
> Thanks again,
> eric
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576
>


Re: [O] inline markup within quote

2017-04-19 Thread Rasmus
Saša Janiška  writes:

> Nicolas Goaziou  writes:
>
>> I cannot reproduce the above, e.g., exporting to LaTeX I get
>
> After some testing, I see that it works with the simple example, but if
> one uses multi-paragraph text, then it fails…
>
> Can you test with this one?
>
> #+BEGIN_QUOTE
> Lorem ipsum dolor sit amet, novum similique nec ea, qui mucius
> singulis ea. Eum alterum adolescens te, iusto postulant vim ea. No
> dicit bonorum disputationi pro, quo id ridens signiferumque. Maiorum
> luptatum persequeris sea id, sed erant docendi civibus eu. Putant
> molestie ne nam. Ad ius affert quaestio accommodare.
>
> *Vis possit putant propriae in, ne nam wisi vidit propriae. Cu mea
> epicuri interesset dissentiet. Cu pri suas saperet. Vidit pericula pro
> et, nulla veniam offendit an mea. Ei habeo dignissim abhorreant per,
> mea an odio detraxit dissentias, ut nisl percipit erroribus pri.*
>
> No vocent ponderum recteque sed. Mel utinam persequeris ut. In nam
> elitr assentior, vim ad timeam phaedrum, ad mazim vituperata quo. Pri
> an quas nemore voluptatibus. Sea id enim delenit accumsan. Ne pri
> illud saepe audire, quodsi regione in duo, modo quodsi id per.
>
> #+END_QUOTE

AFAIK the quote block is irrelevant here.  Perhaps you could customize
org-emphasis-regexp-components (this will only work if Hugo uses Emacs to
generate html).

See the docstring of org-emphasis-regexp-components.  In particular, the
newline component.

There’s also a thorough  explanation here:

https://emacs.stackexchange.com/a/13828

Hope it helps,
Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it




Re: [O] ANN: org-sticky-header

2017-04-19 Thread Eric S Fraga
On Tuesday, 18 Apr 2017 at 23:53, Adam Porter wrote:
> I was using three spaces, which looked okay on my system, but I'm sure
> it didn't look right on everyone's.  I added an option to configure it
> now.  It would be nice to calculate it automatically somehow, but this
> should be an improvement.

Excellent.  Thank you.

One other minor issue: if there are any inline tasks, the sticky header
shows "END" if there is such an inline task not in the window but
between point and the previous headline.  I think that if point is not
within an inline task, you should be skipping inline tasks (my own
preference) or displaying the headline for the task and not the END
line.

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576


signature.asc
Description: PGP signature


Re: [O] inline markup within quote

2017-04-19 Thread Saša Janiška
Nicolas Goaziou  writes:

> I cannot reproduce the above, e.g., exporting to LaTeX I get

After some testing, I see that it works with the simple example, but if
one uses multi-paragraph text, then it fails…

Can you test with this one?

#+BEGIN_QUOTE
Lorem ipsum dolor sit amet, novum similique nec ea, qui mucius
singulis ea. Eum alterum adolescens te, iusto postulant vim ea. No
dicit bonorum disputationi pro, quo id ridens signiferumque. Maiorum
luptatum persequeris sea id, sed erant docendi civibus eu. Putant
molestie ne nam. Ad ius affert quaestio accommodare.

*Vis possit putant propriae in, ne nam wisi vidit propriae. Cu mea
epicuri interesset dissentiet. Cu pri suas saperet. Vidit pericula pro
et, nulla veniam offendit an mea. Ei habeo dignissim abhorreant per,
mea an odio detraxit dissentias, ut nisl percipit erroribus pri.*

No vocent ponderum recteque sed. Mel utinam persequeris ut. In nam
elitr assentior, vim ad timeam phaedrum, ad mazim vituperata quo. Pri
an quas nemore voluptatibus. Sea id enim delenit accumsan. Ne pri
illud saepe audire, quodsi regione in duo, modo quodsi id per.

#+END_QUOTE


Sincerely,
Gour

-- 
A person is said to be established in self-realization and is called a yogī
[or mystic] when he is fully satisfied by virtue of acquired knowledge and
realization. Such a person is situated in transcendence and is self-controlled.
He sees everything — whether it be pebbles, stones or gold — as the same.




Re: [O] inline markup within quote

2017-04-19 Thread Saša Janiška
Nicolas Goaziou  writes:

> I cannot reproduce the above,

Have you tried to export to HTML?

> e.g., exporting to LaTeX I get

Exporting to LaTeX and/or e.g. rst, produces correct markup…hmm, now I
see that org --> HTML does work as well…

> It may be a limitation on the Hugo side.

You might be right…will explore further.


Sincerely,
Gour

-- 
Whenever and wherever there is a decline in religious practice,
O descendant of Bharata, and a predominant rise of irreligion —
at that time I descend Myself.




Re: [O] inline markup within quote

2017-04-19 Thread Nicolas Goaziou
Hello,

Saša Janiška  writes:

> I’m moving from Python-powered static site generator to the Hugo which
> does support using org-mode markup for writing content.
>
> Currently, my content is written using rst, but although Hugo does
> support rst as well, I thought that org-mode could be better match, but
> today I did figure out that e.g. it’s not possible to use inline markup
> within quote, e.g.:
>
> #+BEGIN_QUOTE
>   This is first sentence. *This one Id like to be bold.* Another small
>   sentence.
> #+END_QUOTE
>
> In the above example, I do not get bold, but ’*’ are rendered verbatim,
> so I wonder if I do miss something in org-mode markup or it simply
> built-in limitation similar to some corner cased present in rst markup
> as well?

I cannot reproduce the above, e.g., exporting to LaTeX I get

  
  
  This is first sentence. This one Id like to be bold. Another small
  sentence.
  
  

It may be a limitation on the Hugo side.

Regards,

-- 
Nicolas Goaziou



[O] “#+ATTR_LATEX: :environment minipage :option [b]{0.6\textwidth} ” no working when translate the following latex fragments

2017-04-19 Thread XP Chen
How to generate the following latex fragment through org-mode "#+ATTR_LATEX:" 
or others:

\begin{figure}[!htbp]
  \centering
  \begin{minipage}[b]{0.6\textwidth}
\captionstyle{\centering}
\centering
\includegraphics[width=4cm]{fig/test1.png}
\bicaption[fig1]{Where}{Fig}{there is a way.}
  \end{minipage} 
\end{figure}

I have done partially of it by using:

#+ATTR_LATEX::caption \bicaption[fig1]{Where}{Fig}{there is a way.}:width 10cm
[[file:fig/test1.png]]

However the following no work:

#+ATTR_LATEX::environment minipage :option [b]{0.6\textwidth}:caption 
\bicaption[fig1]{Where}{Fig}{there is a way.}:width 10cm
[[file:fig/test1.png]]

I donnot know how to after? The ":environment" and ":option" seems not to work 
after the try, no "\begin{minipage}[b]{0.6\textwidth}" showed in the out .tex 
file

I want to generate ODT file meanwhile, so I left the picture as the link format.

Thanks very much.










[O] “#+ATTR_LATEX: :environment minipage :option [b]{0.6\textwidth} ” no working when translate the following latex fragments

2017-04-19 Thread XP Chen
How to generate the following latex fragment through org-mode "#+ATTR_LATEX:" 
or others:

\begin{figure}[!htbp]
  \centering
  \begin{minipage}[b]{0.6\textwidth}
\captionstyle{\centering}
\centering
\includegraphics[width=4cm]{fig/test1.png}
\bicaption[fig1]{Where}{Fig}{there is a way.}
  \end{minipage} \end{figure}

I have done partially of it by using:

#+ATTR_LATEX::caption \bicaption[fig1]{Where}{Fig}{there is a way.}:width 
10cm[[file:fig/test1.png]]

However the following no work:

#+ATTR_LATEX::environment minipage :option [b]{0.6\textwidth}:caption 
\bicaption[fig1]{Where}{Fig}{there is a way.}:width 10cm[[file:fig/test1.png]]

I donnot know how to after? The ":environment" and ":option" seems not to work 
after the try, no "\begin{minipage}[b]{0.6\textwidth}" showed in the out .tex 
file

I want to generate ODT file meanwhile, so I left the picture as the link format.

Thanks very much.










[O] inline markup within quote

2017-04-19 Thread Saša Janiška
Hello!

I’m moving from Python-powered static site generator to the Hugo which
does support using org-mode markup for writing content.

Currently, my content is written using rst, but although Hugo does
support rst as well, I thought that org-mode could be better match, but
today I did figure out that e.g. it’s not possible to use inline markup
within quote, e.g.:

#+BEGIN_QUOTE
  This is first sentence. *This one I’d like to be bold.* Another small
  sentence.
#+END_QUOTE

In the above example, I do not get bold, but ’*’ are rendered verbatim,
so I wonder if I do miss something in org-mode markup or it simply
built-in limitation similar to some corner cased present in rst markup
as well?


Sincerely,
Gour

-- 
For him who has conquered the mind, the mind is the best of
friends; but for one who has failed to do so, his mind will
remain the greatest enemy.




Re: [O] Handling custom link types for html export in v 9.0 - Replacement for deprecated `org-add-link-type`?

2017-04-19 Thread John Kitchin
No problem. I usually use lambda functions there, but if you use
functions like you have the quoted form is right. Glad it was helpful!

Milan Zimmermann writes:

> Great, thanks very much John.
>
> As a minor note I had to make a slight change
>
> (org-link-set-parameters
>   "img"
>   :follow 'org-custom-link-img-follow ; my old code
>   :export 'org-custom-link-img-export)  ; my old code
>
> And then it works equivalent with the previous version in 8.
>
> Thanks
> Milan
>
> PS
>
> (There is another note which is for a new thread: both in 8 and 9,
> while they export what I need, actually do not display the image in
> org buffer. The reason seem to be the  org-display-inline-images is
> only looking for the "file" link but I need to debug that first)
>
>
> On Tue, Apr 18, 2017 at 9:00 AM, John Kitchin  wrote:
>> You can find a many examples of the new link syntax here:
>> http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/
>>
>> You will probably be able to reuse much of your old code  and this:
>>
>> (org-link-set-parameters
>>"img"
>>:follow (your-old-follow-code)
>>:export (your-old-export-code))
>>
>> Milan Zimmermann writes:
>>
>>> Hi:
>>>
>>> I have a question about how to define custom link type, which before
>>> 9.0 used the (9.0) deprecated  `org-add-link-type`.
>>>
>>> 1. Let me first provide the context:
>>>
>>> There is often a need to generate, for org links export/publish to
>>> Html, elements where img src URL starts with a slash, like this
>>>
>>> 
>>>
>>> The only way that was possible before v9, for this to be exported from
>>> a link such as
>>>
>>> [[/images/a.jgp]]
>>>
>>> was to use a method described in
>>>
>>> http://stackoverflow.com/questions/14684263/how-to-org-mode-image-absolute-path-of-export-html
>>>
>>> - Basically, the solution described there is
>>>
>>> a) define a custom link type such as "img"
>>> b) in org,  use [[img:images/a.jpg]]
>>> c) define two functions handling the img link in org and on
>>> export/publish, and call (org-add-link-type "img"
>>> 'org-custom-link-img-follow 'org-custom-link-img-export)
>>>
>>> 2. The problem and question
>>>
>>> In org 9.0, we get `org-add-link-type ... This function is obsolete
>>> since Org 9.0 use `org-link-set-parameters' instead.
>>>
>>> My problem is I have no idea how to, in a practical sense, use
>>> `org-link-set-parameters` to define a custom link type "img" and
>>> handle it's image handling in both org buffer and Html publish.
>>>
>>> My question is, are there any links and examples how one would do the
>>> above in 9.0?
>>>
>>> Thanks
>>> Milan
>>
>>
>> --
>> 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


--
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] Bug: Stuck projects view reverts to tag match on refresh [9.0.5]

2017-04-19 Thread Allen Li
On Tue, Apr 18, 2017 at 1:33 AM, Nicolas Goaziou  wrote:
> I cannot reproduce it. Could you provide an ECM?

Create a file tmp.org with the contents:

* Stuck :project:
* Unstuck :project:
** TODO thing

1. emacs -q
2. Eval:

(setq org-agenda-files '("~/tmp.org")
  org-stuck-projects '("project" ("TODO") nil ""))

3. M-x org-agenda RET #

Buffer contents:

List of stuck projects:
  tmp:Stuck:project:

4. r

Buffer contents:

Headlines with TAGS match: project
Press ‘C-u r’ to search again with new search string
  tmp:Stuck:project:
  tmp:Unstuck  :project:
  tmp:TODO thing  :project::

I realize that this is using the stock Org mode that ships with Emacs,
but it's the same behavior as org-20170210, which I believe is the
latest and this repro is easier.



Re: [O] [Solved] Gnuplot and Windows

2017-04-19 Thread Bala Ramadurai
Thanks Jon for your help.
  I finally managed to solve this by explicitly mentioning the path in the
gnuplot-program as C:\Program Files (x86)\gnuplot\bin\gnuplot.exe

However, gnuplot hangs and does nothing after that though.

Thanks again
Bala

--

Message: 30
Date: Tue, 18 Apr 2017 10:17:28 -0400
From: Jonathan Leech-Pepin 
To: Org Mode Mailing List 
Subject: Re: [O] Gnuplot and Windows
Message-ID:

Re: [O] ANN: org-sticky-header

2017-04-19 Thread Carsten Dominik
Hi Adam,

here is a new patch with does do this correctly.

Cheers

Carsten

On Wed, Apr 19, 2017 at 7:52 AM, Carsten Dominik  wrote:

> Hi Adam,
>
> and just after I send this, I now see that the faces of the headings
> in the path are now wrong - so you probably already had gone down
> this path.  Sorry for the noise, need to come up with something better.
>
> Carsten
>
> On Wed, Apr 19, 2017 at 7:46 AM, Carsten Dominik  wrote:
>
>> Hi Adam,
>>
>> thanks for adding the option to reverse the outline path.  Great thinking
>> about using a different separator for the reversed path!
>>
>> It mostly works - however, if the window is too narrow, the abbreviation
>> ellipses are now applied to the most recent heading instead of to the last
>> one shown.  It would be better to reverse the outline path before sending
>> it into org-format-outline-path, which also saves you the pain to split and
>> rejoin the path string.
>>
>> Please find attached a patch that makes this change.  It also removes the
>> dependence on the string library which is, I think, not by default
>> available in Emacs.
>>
>> Thanks
>>
>> On Wed, Apr 19, 2017 at 1:06 AM, Adam Porter  wrote:
>>
>>> Carsten Dominik  writes:
>>>
>>> Hi Carsten,
>>>
>>> > I am wondering if you would consider the possibility to show on only
>>> > the most recent heading, but, space permitting, the outline path -
>>> > maybe in reverse order as to keep the sticky heading itself in the
>>> > left-most column.
>>>
>>> That's a great idea, I will add that.  Thanks.
>>>
>>>
>>>
>>
>


patch
Description: Binary data