Re: [O] Help with writing plain list followed by description list [ox-latex]

2016-03-15 Thread Kaushal Modi
Ah, found the solution after I RTFM :)

*C-h i g (org) Plain lists*

"A list ends whenever every item has ended, which means before any
line less or equally indented than items at top level.  It also ends
before two blank lines(5)."


Here's the solution:

==
* Good (with 2 blank lines)
- Plain list item


- Description :: Description list became part of plain list here!
==



--
Kaushal Modi

On Tue, Mar 15, 2016 at 11:15 PM, Kaushal Modi 
wrote:

> Hi,
>
> I need help on generating a latex export correctly for the case where a
> description list has to immediately follow a plain list.
>
> Below is a MWE that demonstrates the problem and here is a screenshot of
> the generated PDF ( http://i.imgur.com/FEjN099.png ). Note how the
> Description list item looks under "Bad" section (generated using org) vs
> "Good" section (generated using latex code directly).
>
> ==
>
> * Bad
> - Plain list item
> - Description :: Description list became part of plain list here!
> -
> Above does not work because org exports it to \LaTeX as below.
> #+BEGIN_EXAMPLE
> \section{Bad}
> \label{sec:orgheadline1}
> \begin{itemize}
> \item Plain list item
> \item[{Description}] Description list became part of plain list here!
> \end{itemize}
> #+END_EXAMPLE
> -
> Note that the description list item comes *before* =\end{itemize}=.
>
> *How do I tell org to end the =itemize= block at the last plain list item
> and begin =description= block before the first description list item?*
>
> -- OR --
>
> *What should I write in org to generate the below?*
>
> -
> #+BEGIN_EXPORT latex
> \section{Good}
> \label{sec:orgheadline2}
> \begin{itemize}
> \item Plain list item
> \end{itemize}
> \begin{description}
> \item[{Description}] This looks fine because I have moved the description
> list out of the plain list.
> \end{description}
> #+END_EXPORT
> -
>
> ==
>
>
>
>
>
> --
> Kaushal Modi
>


[O] Help with writing plain list followed by description list [ox-latex]

2016-03-15 Thread Kaushal Modi
Hi,

I need help on generating a latex export correctly for the case where a
description list has to immediately follow a plain list.

Below is a MWE that demonstrates the problem and here is a screenshot of
the generated PDF ( http://i.imgur.com/FEjN099.png ). Note how the
Description list item looks under "Bad" section (generated using org) vs
"Good" section (generated using latex code directly).

==

* Bad
- Plain list item
- Description :: Description list became part of plain list here!
-
Above does not work because org exports it to \LaTeX as below.
#+BEGIN_EXAMPLE
\section{Bad}
\label{sec:orgheadline1}
\begin{itemize}
\item Plain list item
\item[{Description}] Description list became part of plain list here!
\end{itemize}
#+END_EXAMPLE
-
Note that the description list item comes *before* =\end{itemize}=.

*How do I tell org to end the =itemize= block at the last plain list item
and begin =description= block before the first description list item?*

-- OR --

*What should I write in org to generate the below?*

-
#+BEGIN_EXPORT latex
\section{Good}
\label{sec:orgheadline2}
\begin{itemize}
\item Plain list item
\end{itemize}
\begin{description}
\item[{Description}] This looks fine because I have moved the description
list out of the plain list.
\end{description}
#+END_EXPORT
-

==





--
Kaushal Modi


[O] Problem in customizing org-agenda-custom-commands

2016-03-15 Thread Zhongwei Yao
Hi, list,
I'm trying to customize org-agenda-custom-commands like following:

(setq org-agenda-custom-commands
  `(("rm" "Week in review"
 agenda ""
 ((org-agenda-span 'week)
  (org-agenda-start-on-weekday 0)
  (org-agenda-overriding-header "Week in Review"))
 )
,(concat "~/wiki/review/" (format-time-string "%Y-week-%W"
(current-time)) ".html")
))

I want to save my store agenda file to file with dynamic filename in
format: ~/wiki/review/year#-week-week#.html. (e.g. when on week 10, the
filename should be ~/wiki/review/2016-week-10.html. when on week 11, it
is ~/wiki/review/2016-week-11.html)

But above command will only set the file name to a fix date, which is the
date when above command evaluated. How can I solve it?

Thanks,
Zhongwei


Re: [O] org-agenda error

2016-03-15 Thread Peter Salazar
Update: I fixed the org-agenda problem. Turns out the problem was that I'd
created my own custom defun called org-today, and it was interfering with
org-agenda.

The helm-org-in-buffer-headings error is still occurring. Thanks for any
thoughts.

On Tue, Mar 15, 2016 at 7:58 PM, Peter Salazar 
wrote:

> Unfortunately, that's not the case (that helm-org-in-buffer-headings) is
> called in a non-org buffer. It happens whenever I call it from within any
> org-file. I also tried calling it from within a short, minimal org-file
> with just a few headings of various levels, and I get the same error.
>
> The error, once again, is this:
> http://i.imgur.com/FoTiwoq.png
>
> And again, the error I get when I call org-agenda is this:
> http://pastebin.com/wCBgAQLp
>
>
> On Thu, Mar 10, 2016 at 3:21 AM, Nicolas Goaziou 
> wrote:
>
>> Hello,
>>
>> Peter Salazar  writes:
>>
>> > Any thoughts on that? I'm not sure if it's related, but I also get
>> errors
>> > when I try to call helm-org-in-buffer-headings. Somehow the backtrace
>> gets
>> > immediately erased, so here's a screenshot:
>> > http://i.imgur.com/FoTiwoq.png
>>
>> From the above, it looks like `helm-org--get-candidate-in-file' is
>> erroneously called from a non-Org buffer (here, "*Backtrace*").  Outside
>> Org, `org-complex-heading-regexp' is nil, hence the result.
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] org-agenda error

2016-03-15 Thread Peter Salazar
Unfortunately, that's not the case (that helm-org-in-buffer-headings) is
called in a non-org buffer. It happens whenever I call it from within any
org-file. I also tried calling it from within a short, minimal org-file
with just a few headings of various levels, and I get the same error.

The error, once again, is this:
http://i.imgur.com/FoTiwoq.png

And again, the error I get when I call org-agenda is this:
http://pastebin.com/wCBgAQLp

On Thu, Mar 10, 2016 at 3:21 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Peter Salazar  writes:
>
> > Any thoughts on that? I'm not sure if it's related, but I also get errors
> > when I try to call helm-org-in-buffer-headings. Somehow the backtrace
> gets
> > immediately erased, so here's a screenshot:
> > http://i.imgur.com/FoTiwoq.png
>
> From the above, it looks like `helm-org--get-candidate-in-file' is
> erroneously called from a non-Org buffer (here, "*Backtrace*").  Outside
> Org, `org-complex-heading-regexp' is nil, hence the result.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Problem with src_ruby inline code and []

2016-03-15 Thread Charles C. Berry

On Tue, 15 Mar 2016, William Denton wrote:

I was updating and exporting a file where I use Ruby to do some basic 
arithmetic on tables, and noticed that inline code blocks where I reference 
an array aren't working.




ECM:

src_ruby[:var t=sampletable]{t[2][2]}

#+BEGIN_SRC emacs-lisp
  (save-excursion
(search-backward (concat "src" "_"))
(org-element-property :value (org-element-inline-src-block-parser)))
#+END_SRC

#+RESULTS:
: t[2

HTH,

Chuck



Re: [O] Displaying property values in agenda search result

2016-03-15 Thread Christophe Schockaert

Markus Heller writes:

> Hello,
>
> how can I display property values in the agenda, more specifically, in 
> the results of an agenda search?
>
> [...]
>
> I search using the following in my .emacs as part of a custom agenda 
> command:
>
> ("i" "Text here" tags "CATEGORY=\"foo\""
>  ((org-agenda-overriding-header "Header here")))
Hi,


Well, I am a newcomer to this list, and I wish to say that I really
enjoy Org-Moding stuffs :)

I have many things to tweak, and surely questions to come...

But it seems I can give some input there.
I think I am doing something close to what you are trying to achieve.

In my custom agenda, I have edited the displayed content to show a
property "Loc" when I have actions that occur at a certain location,
like a meeting or rendez-vous.

I defined the entry that way, using the "%(expression)" specifier in 
"org-agenda-prefix-format" :


(agenda ""
   ((org-agenda-prefix-format " %i %-12:c%?-12t%(if (setq loc (org-entry-get 
(point) \"Loc\")) (concat \"[Loc:\" loc \"] \") \"\")% s")))



The output looks like:


Wednesday  16 March 2016
  FunnyStuff:  12:30-13:30 [Loc:Somewhere] NEXT Something to do



I think you should be able to do the same for a "search" entry, the
default "org-agenda-prefix-format" value for "search" is " %i %-12:c"
(see the help for the variable), you could adjust it to include you
property value.

So, with the column view answer from Herbert, you get two options.

I hope one will suit your needs,
Regards,

Christophe


> This search displays Some Task and Some subtask as expected, but how can 
> I also display 1234 as value of the property Project for both Some Task 
> as well as Some subtask?
>
> Not sure if this is relevant, but my .emacs includes
>
> (setq org-use-property-inheritance (quote ("Project")))
>
> Thanks
> Markus

-- 
--->  mailto:r3vli...@citadels.eu
Once it's perfectly aimed, the flying arrow goes straight to its target.
Thus, don't worry when things go right.
There will be enough time to worry about if they go wrong.
Then, it's time to fire a new arrow towards another direction.
Don't sink.  Adapt yourself !  The archer has to shoot accurately and quickly.
[Words of Erenthar, the bowman ranger] <---



Re: [O] Displaying property values in agenda search result

2016-03-15 Thread Markus Heller
Herbert Sitz  gmail.com> writes:

> 
> Markus Heller  gmail.com> writes:
> 
> > 
> > Hello,
> > 
> > how can I display property values in the agenda, more specifically, 
in 
> > the results of an agenda search?
> > 
> 
> I think the straigtforward way would be to use column view, and set up 
your
> column view to show, in your case, the PROJECT property.
> 
> See, sect. 10.8 of the manual, "Using column view in the agenda":
> http://orgmode.org/manual/Agenda-column-view.html#Agenda-column-view
> 
> as well as reviewing the basic column view info and directions for 
setup in
> sect 7.5, "Column view":
> http://orgmode.org/manual/Column-view.html#Column-view
> 

Thanks for the suggestion, but column view is *not* what I'm after.  I 
was able to tweak my approach a bit to make it workable.






Re: [O] [PATCH] call_*() is not working inside #+DATE

2016-03-15 Thread Rafael Laboissiere

* Nicolas Goaziou  [2016-03-15 19:50]:

The problem is that the documentation patch is (partly) wrong. From 
maint, you can try calling `org-babel-execute-buffer' in the following 
document


 #+DATE: src_emacs-lisp{(+ 1 1)}

It is possible to evaluate code snippets in keywords.


It is strange, the inline source code block above is not evaluated for me 
from maint [commit 3e79c60] when calling `org-babel-execute-buffer'.


Rafael



Re: [O] [PATCH] call_*() is not working inside #+DATE

2016-03-15 Thread Nicolas Goaziou
Hello,

Rafael Laboissiere  writes:

> Hopefully, a solution will be found soon and the documentation will be
> adjusted accordingly.  Notice that, in section "Evaluating code
> blocks", it is written "It is also possible to evaluate named code
> blocks from anywhere […]".

The problem is that the documentation patch is (partly) wrong. From
maint, you can try calling `org-babel-execute-buffer' in the following
document

  #+DATE: src_emacs-lisp{(+ 1 1)}

It is possible to evaluate code snippets in keywords. It is not
possible, AFAIR, to evaluate them during export.

> The problem affects both master and maint, currently.

See above. I don't see the point of documenting a bug. It doesn't help
fixing it. Anyway, it's a minor issue. Let's not waste too much time on
this.


Regards,

-- 
Nicolas Goaziou



[O] Problem with src_ruby inline code and []

2016-03-15 Thread William Denton
I was updating and exporting a file where I use Ruby to do some basic 
arithmetic on tables, and noticed that inline code blocks where I reference an 
array aren't working.


If you C-c C-c on this simple src_ruby example you get the results.

src_ruby{1 + 2} {{{results(=3=)}}}

But this doesn't work:

#+NAME: sampletable
| name | one | two |
| Me   |   5 |   3 |
| You  |   4 |   6 |

src_ruby[:var t=sampletable]{t[2][2]}

It changes the line to

src_ruby[:var t=sampletable]{t[2] {{{results(==)}}}[2]}

and says:

-:5: syntax error, unexpected keyword_end, expecting ']'
-:7: syntax error, unexpected end-of-input, expecting keyword_end

However, this does work:

#+BEGIN_SRC ruby :var t=sampletable
t[2][2]
#+END_SRC

#+RESULTS:
: 6


Bill
--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/

Re: [O] convert a mailbox or a vm folder to a org-mode file

2016-03-15 Thread Eric S Fraga
On Tuesday, 15 Mar 2016 at 14:27, Uwe Brauer wrote:
> Hello
>
>
> Does somebody know a tool which would allow to convert a (unix) mailbox
> or a vm folder to the org-mode format?

The power of org is that "it's all text"...  A regex based replace would
do the job if you simply want to make all "^From" lines
headlines.  Depends on what you mean by org-mode format.

In ed/ex/vi format: %s/^From/* From/
(as an evil in emacs user ;-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55



Re: [O] Org is exporting to tex an asterisk between "section" and "{"

2016-03-15 Thread Eric S Fraga
On Tuesday, 15 Mar 2016 at 13:07, Eduardo Mercovich wrote:

[...]

> It is exactly as you said, valid. However, and I may be getting
> something else incorrectly, pdflatex has problems with those as it works
> out of the box (C-c C-e l o in org), since internal links are broken and
> the ToC is not generated. 

A table of contents cannot be generated if the sections are not
numbered.  This is a LaTeX "feature".  Maybe org should check for
consistency between num: and toc: but every export target is potentially
different.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55



Re: [O] Displaying property values in agenda search result

2016-03-15 Thread Herbert Sitz
Markus Heller  gmail.com> writes:

> 
> Hello,
> 
> how can I display property values in the agenda, more specifically, in 
> the results of an agenda search?
> 

I think the straigtforward way would be to use column view, and set up your
column view to show, in your case, the PROJECT property.

See, sect. 10.8 of the manual, "Using column view in the agenda":
http://orgmode.org/manual/Agenda-column-view.html#Agenda-column-view

as well as reviewing the basic column view info and directions for setup in
sect 7.5, "Column view":
http://orgmode.org/manual/Column-view.html#Column-view







Re: [O] Org is exporting to tex an asterisk between "section" and "{"

2016-03-15 Thread Eduardo Mercovich
Dear Eric.

> [...]
>> Being a total newbie I can't say that the resulting syntax is incorrect
>> (is it?), but at least in the case of latex, *not expressing this
>> specific option creates a non-functional latex file*. [...]

> The * between section and the brace indicates an unnumbered section
> heading and is perfectly valid LaTeX syntax for the article class.  I am
> not sure why you think the syntax is incorrect.

Sorry, I found the references after the mail.

It is exactly as you said, valid. However, and I may be getting
something else incorrectly, pdflatex has problems with those as it works
out of the box (C-c C-e l o in org), since internal links are broken and
the ToC is not generated. 

It seems a special export case and it's documented, just not obvious for
the begginer. 

> num:t tells org to export numbered headlines so the * won't be there in
> that case.

With that option, it works wonderfully. :)))

Thanks a lot...


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.



Re: [O] Org is exporting to tex an asterisk between "section" and "{"

2016-03-15 Thread Eduardo Mercovich
Dear Nicolas.

>> Being a total newbie I can't say that the resulting syntax is incorrect
>> (is it?), but at least in the case of latex, *not expressing this
>> specific option creates a non-functional latex file*. 

>> Shouldn't the exporter take care of this? Or at least, never export the
>> asterisk between the "section" and the brace (just in case, "{" since
>> I'm not an English native speaker).

> By default, no asterisk is inserted (see
> `org-export-with-section-numbers'). Something in your config is doing
> it.

I still didn't found it, but will keep searching.
I'm sure it's only my newbieness... :)

Thanks a lot.

Best...


-- 
eduardo mercovich 

 Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación.



[O] org-show-context-detail with ispell

2016-03-15 Thread gongzhitaao
org-show-context-detail works pretty good with isearch, i.e., revealing 
context when searching in the folded section.  But for ispell, it does not 
reveal the context when checking spelling in the folded section.  Are there 
any ways around that, i.e., revealing temporarily the text that ispell 
highlights?




[O] OS X quick-access to Emacs

2016-03-15 Thread Ken Mankoff
Hi Lists,

Cross-post to Org and mu4e because Org and mu4e are my primary uses of Emacs.

I've created a BitBar plugin for quick-access to Emacs, such as a new *scratch* 
buffer or a new "Compose Email" buffer. I thought these might be useful to 
others, hence this post.

1) Download and install BitBar: https://getbitbar.com/
2) Add my Emacs plugin: 
https://github.com/mankoff/bitbar-plugins/blob/master/System/emacs.24h.sh
3) Customize to add new Emacs behaviors.

Example use case: I'm not in Emacs, and am on a Desktop w/ no Emacs frame, and 
want to compose a new email.

Prior to this setup, I needed to CMD+TAB to Emacs (or click on the icon in the 
Dock), then C-x 5 2 to bring up a new frame, and then some key combo to compose 
new email.

Now: Mouse to taskbar, click 1x on Emacs unicorn emoji, and 1x on Email icon.

Hope this is helpful to someone,

  -k.

P.S. If you come up with other interesting uses, please post back here.

P.P.S. Some obvious additions:
1) Alert if Emacs is front app and you are not clocked in.
2) Show clock status if you are clocked in
3) Show subset of Org Agenda in menu



Re: [O] PATCH: programming language indicators in HTML export

2016-03-15 Thread Robert Klein
Hi Rasmus,


On Tue, 15 Mar 2016 15:24:00 +0100
Rasmus  wrote:

[rest deleted]

> Robert, do you have a copyright assignment of changes to Emacs?  I
> think the change is too long (in line count) for a TINYCHANGE.

I signed the FSF papers in April 2015. On top of the sheet there is the
number "RT: 1006989".

Do you need a copy of the PDF?

Thanks and best regards,
Robert



[O] convert a mailbox or a vm folder to a org-mode file

2016-03-15 Thread Uwe Brauer
Hello


Does somebody know a tool which would allow to convert a (unix) mailbox
or a vm folder to the org-mode format?
Thanks

Uwe Brauer 




Re: [O] PATCH: programming language indicators in HTML export

2016-03-15 Thread Rasmus
Hi Robert,

Robert Klein  writes:

>> The patch would make the default html header a bit longer, which may
>> or may not be an issue.  Perhaps more importantly, it also does not
>> deal with new languages.  Maybe it would be possible to add a bit of
>> JS that would look up the language based on the class of the block in
>> question?
>> 
>> E.g. the block
>> 
>>  #+BEGIN_SRC rsgrs
>> 
>>  #+END_SRC
>> 
>> would have class "src-rsgrs".
>
> This happens already, but the JS would also have to create the
> corresponding CSS code (that's what I hardcoded in the patch).
>
> However you'd still need a mapping from src block identifier to
> pleasantly readable text, e.g. js -> "Javascript", sql -> "SQL",
> emacs-lisp -> "Emacs Lisp", ps -> "PostScript" etc.  When you have all
> those it's not that much different from static CSS anymore...

Fair point.

> Anyway, my patch is basically for those who don't roll their own CSS to
> have things mostly working out of the box. 

Seems good to me.

Robert, do you have a copyright assignment of changes to Emacs?  I think
the change is too long (in line count) for a TINYCHANGE.

Thanks,
Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




Re: [O] [PATCH] call_*() is not working inside #+DATE

2016-03-15 Thread Rafael Laboissiere

* Nicolas Goaziou  [2016-03-14 20:41]:


Rafael Laboissiere  writes:


* Rafael Laboissiere  [2016-03-12 08:57]:


[snip]


I went ahead and committed the patch.


I think this is a bit premature, as we're still discussing how to fix 
this issue, so this documentation patch is likely to be removed soon.


Hopefully, a solution will be found soon and the documentation will be 
adjusted accordingly.  Notice that, in section "Evaluating code blocks", 
it is written "It is also possible to evaluate named code blocks from 
anywhere […]".


Moreover, I don't think the problem doesn't appear on maint branch, 
where you applied your patch. So, at the very least, it should be 
removed from there.


The problem affects both master and maint, currently.

Rafael Laboissière



Re: [O] org-collector - propview display problems

2016-03-15 Thread dche
Many thanks, I am going to use org-collector again.

It would be great if org-collector could implement kind of regular 
expression in the research of string.
For example with the example provides for org-collector something like 
:conds ((string= SPENDTYPE "health|food")) 
to look for health or food
I don't even know if it possible and I don't have the skill in programming 
to implement such function. Just an expression of a wish. 

Thank you again.