[O] http address for cloning org-mode git

2015-09-23 Thread Kaushal Modi
Hi all,

I cannot access the git: repo address and so had been using the http:
version till now ( http://repo.or.cz/r/org-mode.git/ ).

Today git pull gives the below error:

Fetching origin
fatal: unable to access 'http://repo.or.cz/r/org-mode.git/': Couldn't
resolve host 'repo.or.cz'
error: Could not fetch origin

​Looks like ​
http://repo.or.cz/r/org-mode.git/
​ is down? Is anyone else seeing the same thing? Is there an alternative
http: address that I can use for cloning?

Thanks.
​

--
Kaushal Modi


Re: [O] http address for cloning org-mode git

2015-09-23 Thread Kaushal Modi
Thanks all.  Strange enough, git pull from repo.or.cz/r/org-mode.git
started working fine once again.

But I cannot yet clone from  http://orgmode.org/org-mode.git. I had tried
the same earlier with the same result.. the clone will get stuck at
"Fetching origin".
My current git version is 2.6.0.rc0.24.gec371ff

In any case, sorry for the noise. Some intermittent issue was failing the
git pull from the repo.or.cz domain and it is working fine once again.


--
Kaushal Modi

On Wed, Sep 23, 2015 at 3:18 PM, Suvayu Ali 
wrote:

> On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> > Hi all,
> >
> > I cannot access the git: repo address and so had been using the http:
> > version till now ( http://repo.or.cz/r/org-mode.git/ ).
>
> That is a mirror, a relic from the old days when that used to be the
> official repo.  Maybe try:  http://orgmode.org/org-mode.git
>
>
> http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
>


Re: [O] http address for cloning org-mode git

2015-09-23 Thread Kaushal Modi
Just to clarify,

git clone http://orgmode.org/org-mode.git org-mode

gets stuck at "Cloning into 'org-mode' ..."

But git cloning the mirror http repo works fine.



--
Kaushal Modi

On Wed, Sep 23, 2015 at 3:29 PM, Achim Gratz  wrote:

> Suvayu Ali writes:
> > On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> >> I cannot access the git: repo address and so had been using the http:
> >> version till now ( http://repo.or.cz/r/org-mode.git/ ).
> >
> > That is a mirror, a relic from the old days when that used to be the
> > official repo.  Maybe try:  http://orgmode.org/org-mode.git
>
> No, that never was the official repo.  I've set up that mirror.
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Samples for the Waldorf Blofeld:
> http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
>
>
>


Re: [O] http address for cloning org-mode git

2015-09-23 Thread Kaushal Modi
You're right!

This time I let it stay stuck for more than few minutes and I can confirm
that the http://orgmode.org/org-mode.git link works too.
Somehow the other link is much faster for me when cloning/pulling.


--
Kaushal Modi

On Wed, Sep 23, 2015 at 4:53 PM, Robert Klein  wrote:

> Hi,
>
> Kaushal Modi  wrote:
>
> > Just to clarify,
> >
> > git clone http://orgmode.org/org-mode.git org-mode
> >
> > gets stuck at "Cloning into 'org-mode' ..."
>
>
> That's the point where it typically take a couple of minutes to
> complete for me.
>
> Best regards
> Robert
>
> >
> > But git cloning the mirror http repo works fine.
> >
> >
> >
> > --
> > Kaushal Modi
> >
> > On Wed, Sep 23, 2015 at 3:29 PM, Achim Gratz 
> > wrote:
> >
> > > Suvayu Ali writes:
> > > > On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> > > >> I cannot access the git: repo address and so had been using the
> > > >> http: version till now ( http://repo.or.cz/r/org-mode.git/ ).
> > > >
> > > > That is a mirror, a relic from the old days when that used to be
> > > > the official repo.  Maybe try:  http://orgmode.org/org-mode.git
> > >
> > > No, that never was the official repo.  I've set up that mirror.
> > >
> > >
> > > Regards,
> > > Achim.
> > > --
> > > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> > >
> > > Samples for the Waldorf Blofeld:
> > > http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
> > >
> > >
> > >
>
>
>


[O] Italicized code/verbatim blocks

2015-09-25 Thread Kaushal Modi
Hi all,

I got intrigued by this question on emacs.SE:
http://emacs.stackexchange.com/q/16915/115

The example that the OP uses reveals a bug (I believe).

If you type the below in an org-mode buffer:

call the /static/ method =something(/$with/, /$param/)=


​you see that the $with and $param are italicized even when they are
surrounded by verbatim markers (doesn't matter what the value of
org-emphasis-hide-markers is).

The export of that to HTML and LaTeX works fine.
​

​That led me to try to find a solution to get italicized code/verbatim
blocks in HTML/LaTeX exports but I couldn't find a way to do it.
​


--
Kaushal Modi


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Kaushal Modi
I realized that the default binding `C-c *` works only on the current line,
not the whole selection (and the same applies to the opposite `C-c -`).

It would be great to have those commands work over a region too.

But in the meanwhile, you can do either of the below:

- Simply select the region and use `query-replace-regexp`.
- Use a combination of keyboard macros and `C-c *`.
- Use `multiple-cursors`.
- Any other multiple editing method you might prefer.

--
Kaushal Modi
On Sep 29, 2015 6:06 AM, "Xebar Saram"  wrote:

> Hi Nick
>
> well yes i guess :) . but would be cool if this small function was org
> aware and thus the asteriks (org header) level would be auto set to the
> current sub level.
>
> thx
>
> z
>
> On Tue, Sep 29, 2015 at 6:30 AM, Nick Dokos  wrote:
>
>> Xebar Saram  writes:
>>
>> > Hi all
>> >
>> > im looking for a simple way to convert a simple list of lines (i can
>> > mark it first if needed) each to a orgmode header anyone has such a
>> > way?
>> >
>>
>> Maybe I'm missing something, but can't you just add asterisks in front
>> of each line? Maybe with a keyboard macro? Or even a sed script?
>>
>> There's a reason that org files are plain text.
>>
>> Nick
>>
>>
>>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Kaushal Modi
Christian is correct.

Selecting a region and doing `C-c *` *does* work. Please ignore my earlier
email. I mixed up some command in org that did not work over region with
`C-c *` :)



--
Kaushal Modi

On Tue, Sep 29, 2015 at 3:17 AM, Manuel Koell  wrote:

> I know how to do in vim. Select all text and hit I (uppercase i), then
> start type.
> There is also a way in emacs, but I never tried before:
>
> https://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/Rectangles.html
>
> 2015-09-29 5:30 GMT+02:00 Nick Dokos :
>
>> Xebar Saram  writes:
>>
>> > Hi all
>> >
>> > im looking for a simple way to convert a simple list of lines (i can
>> > mark it first if needed) each to a orgmode header anyone has such a
>> > way?
>> >
>>
>> Maybe I'm missing something, but can't you just add asterisks in front
>> of each line? Maybe with a keyboard macro? Or even a sed script?
>>
>> There's a reason that org files are plain text.
>>
>> Nick
>>
>>
>>
>


[O] Latex compilation broken on orgmode master?

2015-09-30 Thread Kaushal Modi
Hi,

Doing C-c C-e l o on any org file gives me the error

Symbol's value as variable is void: compile

If I use the latest org-mode-plus-contrib package from org elpa, latex
compilation works fine.

Can anyone using org git master confirm this?

--
Kaushal Modi


Re: [O] bug: latex exporter

2015-09-30 Thread Kaushal Modi
Rasmus has fixed this in
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=679adcaa64613c821b38cd1d34b081640315293a
.


--
Kaushal Modi

On Tue, Sep 29, 2015 at 5:37 AM, Charles Millar  wrote:

> Since Monday morning (New York time) I have not been able to export to
> pdflatex (worked OK the night before). Instead the message buffer reads
>
> symbol's value as variable is void - compile
>
> GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07
> on lamiak, modified by Debian
> Org-mode version 8.3.1 (release_8.3.1-283-gf6187d @
> /usr/share/emacs/site-lisp/org-mode/lisp/)
>
> Charlie Millar
>
>


Re: [O] Latex compilation broken on orgmode master?

2015-09-30 Thread Kaushal Modi
​​
Thanks for fixing this (
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=679adcaa64613c821b38cd1d34b081640315293a
)


--
Kaushal Modi

On Tue, Sep 29, 2015 at 11:18 AM, Kaushal Modi 
wrote:

> Hi,
>
> Doing C-c C-e l o on any org file gives me the error
>
> Symbol's value as variable is void: compile
>
> If I use the latest org-mode-plus-contrib package from org elpa, latex
> compilation works fine.
>
> Can anyone using org git master confirm this?
>
> --
> Kaushal Modi
>


Re: [O] "Symbol’s value as variable is void: compile" when export to latex

2015-09-30 Thread Kaushal Modi
Rasmus has fixed this in
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=679adcaa64613c821b38cd1d34b081640315293a
.



--
Kaushal Modi

On Tue, Sep 29, 2015 at 5:11 AM, Rainer M Krug  wrote:

>
> Exporting to latex of the simple file below results in an error:
>
> ,
> | mapcar: Symbol’s value as variable is void: compile
> `
>
> --8<---cut here---start->8---
> #+LATEX_CLASS: article
> #+LATEX_CLASS_OPTIONS:
> #+LATEX_HEADER:
> #+LATEX_HEADER_EXTRA:
> #+DESCRIPTION:
> #+KEYWORDS:
> #+SUBTITLE:
> #+LATEX_COMPILER: pdflatex
> #+DATE: \today
>
> * Emacs version
> #+begin_src emacs-lisp
>  (emacs-version)
> #+end_src
>
> #+RESULTS:
> : GNU Emacs 25.0.50.1 (x86_64-apple-darwin14.5.0, NS appkit-1348.17
> Version 10.10.5 (Build 14F27))
> :  of 2015-09-29
>
> #+begin_src emacs-lisp
>  (org-version)
> #+end_src
>
> #+RESULTS:
> : 8.3.1
>
> Org-mode version 8.3.1 (release_8.3.1-283-gf6187d @
> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
>
> PS: how do I get this output from a source block above?
> --8<---cut here---end--->8---
>
>
> ,
> | Debugger entered--Lisp error: (void-variable compile)
> |   #[(pkg) " <\205. \303 8\211.\205. \304\n<\203.  \202.
>  C\"?)?\205\". \207" [pkg third compile 3 member-ignore-case] 4](("AUTO"
> "inputenc" t ("pdflatex")))
> |   mapcar(#[(pkg) " <\205. \303 8\211.\205. \304\n <\203.  \202.
>  C\"?)?\205\". \207" [pkg third compile 3 member-ignore-case] 4] (("AUTO"
> "inputenc" t ("pdflatex")) ("T1" "fontenc" t ("pdflatex")) ("" "graphicx"
> t) ("" "grffile" t) ("" "longtable" nil) ("" "wrapfig" nil) ("" "rotating"
> nil) ("normalem" "ulem" t) ("" "amsmath" t) ("" "textcomp" t) ("" "amssymb"
> t) ("" "capt-of" nil) ("" "hyperref" nil)))
> |   org-latex--remove-packages((("AUTO" "inputenc" t ("pdflatex")) ("T1"
> "fontenc" t ("pdflatex")) ("" "graphicx" t) ("" "grffile" t) (""
> "longtable" nil) ("" "wrapfig" nil) ("" "rotating" nil) ("normalem" "ulem"
> t) ("" "amsmath" t) ("" "textcomp" t) ("" "amssymb" t) ("" "capt-of" nil)
> ("" "hyperref" nil)) (:export-options nil :input-buffer "test.org"
> :input-file "/Users/rainerkrug/tmp/test.org" :latex-class "article"
> :latex-class-options "" :latex-header "" :latex-header-extra ""
> :description nil :keywords nil :subtitle nil :latex-active-timestamp-format
> "\\textit{%s}" :latex-caption-above (table) :latex-classes (("article"
> "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
> "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
> ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report"
> "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
> ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
> "\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}"
> ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
> "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
> :latex-default-figure-position "htb" :latex-default-table-environment
> "tabular" :latex-default-table-mode table :latex-diary-timestamp-format
> "\\textit{%s}" :latex-footnote-separator "\\textsuperscript{,}\\,"
> :latex-format-drawer-function (lambda (name contents) contents)
> :latex-format-headline-function org-latex-format-headline-default-function
> :latex-format-inlinetask-function
> org-latex-format-inlinetask-default-function :latex-hyp

Re: [O] convert a simple list of lines each to a orgmode header

2015-10-01 Thread Kaushal Modi
Thanks Nick, I confirmed later that `C-c *` worked over region for me too.


--
Kaushal Modi

On Tue, Sep 29, 2015 at 9:27 PM, Nick Dokos  wrote:

> Kaushal Modi  writes:
>
> > I realized that the default binding `C-c *` works only on the current
> line, not the whole selection (and the same applies to the opposite `C-c
> -`).
> >
> > It would be great to have those commands work over a region too.
> >
>
> I don't think that's right - at least, when I tried it with a region, it
> worked. I just didn't know about it (or, more likely, didn't remember it)
> before Christian mentioned it.
>
> The docstring for the function says:
>
> ,
> | org-toggle-heading is an interactive Lisp function in
> | ‘../org-mode/lisp/org.el’.
> |
> | (org-toggle-heading &optional NSTARS)
> |
> | Convert headings to normal text, or items or text to headings.
> | If there is no active region, only convert the current line.
> `
>
> Is transient mark mode enabled? I think it's enabled by default
> nowadays, but maybe you turned it off?
>
> Nick
>
>
>
>
>


Re: [O] Delays in posting

2015-10-01 Thread Kaushal Modi
Yes, that seems to be the problem. I subscribe to the mailing list directly
and access the emails as threads in Gmail.


--
Kaushal Modi

On Thu, Oct 1, 2015 at 11:57 AM, Nick Dokos  wrote:

> This is just an FYI.
>
> Over the past couple of days, I've noticed delays in posting.
> I posted a couple of things two days ago that didn't show up
> until one day later. I believe a couple of other people have
> noticed the same thing. I figured that since the posts *did*
> show up, the problems were resolved, but another post from this
> morning still hasn't shown up four hours later.
>
> I use Gnus/nntp to get to news.gmane.org, not email, so I
> believe the problem is with gmane, but this is just a guess.
>
> Nick
>
>
>


Re: [O] Website down?

2015-10-05 Thread Kaushal Modi
Yes, it's down for me since morning.


--
Kaushal Modi

On Mon, Oct 5, 2015 at 10:40 PM, Puneeth Chaganti 
wrote:

>
>
>


Re: [O] multiple cursor not working properly with org-mode

2015-10-14 Thread Kaushal Modi
It works fine for me.

Have you tried starting an emacs -Q session and loading just
multiple-cursors (and org-mode, if you are not using the org-mode version
shipped with emacs)?

Can you replicate the problem then?

If not, then comment out your whole emacs config and uncomment it 50% at a
time between emacs restarts till you narrow down to the part in the config
causing this issue.


--
Kaushal Modi

On Wed, Oct 14, 2015 at 4:56 PM, Jérémie Juste 
wrote:

> Hello,
>
> Multiple cursor <https://github.com/magnars/multiple-cursors.el>is a very
> handy tool. but I don't understand why it does not work properly in
> org-mode.  I can delete characters but I cannot  write anything in
> org-mode. For the time being when it's not too costly I've resorted
> switching to text-mode make the modification and then back to org-mode.
>
> anyone tried something better?
>
> --
> Jérémie Juste
>


Re: [O] multiple cursor not working properly with org-mode

2015-10-16 Thread Kaushal Modi
I am using the same multiple-cursors version.

What is you OS, emacs version (M-x emacs-version) and org-mode version
(M-x org-version)?

I don't know if that information will help as I have never seen the
problem you described. But it will still be good to have that info.

What happens when you try to write anything.. can you post what you
get when you hit something like "C-h c a" once you are in that mode
when you cannot type?
Does this happen after all of multiple-cursors commands
(mc/mark-next-like-this, mc/mark-prev-like-this, ...)?

It will be very useful if you can provide a step-by-step explanation
of what commands you are running to recreate that problem starting
from an emacs -Q session.. provide us a recipe of the problem.

It should also open this issue on the multiple-cursors github with all
the above info if you are sure that this happens only with
multiple-cursors loaded.

--
Kaushal Modi


On Fri, Oct 16, 2015 at 11:10 AM, Jérémie Juste  wrote:
> Hello,
>
> I started an emacs - Q session and loaded only multiple-cursors. I still
> have the same issue.
> my verson of multiple-cursors is multiple-cursors-20150710.456 - the latest
> one from melpa.
>
>
>
> On Wed, Oct 14, 2015 at 11:17 PM, Kaushal Modi 
> wrote:
>>
>> It works fine for me.
>>
>> Have you tried starting an emacs -Q session and loading just
>> multiple-cursors (and org-mode, if you are not using the org-mode version
>> shipped with emacs)?
>>
>> Can you replicate the problem then?
>>
>> If not, then comment out your whole emacs config and uncomment it 50% at a
>> time between emacs restarts till you narrow down to the part in the config
>> causing this issue.
>>
>>
>> --
>> Kaushal Modi
>>
>> On Wed, Oct 14, 2015 at 4:56 PM, Jérémie Juste 
>> wrote:
>>>
>>> Hello,
>>>
>>> Multiple cursor is a very handy tool. but I don't understand why it does
>>> not work properly in org-mode.  I can delete characters but I cannot  write
>>> anything in org-mode. For the time being when it's not too costly I've
>>> resorted switching to text-mode make the modification and then back to
>>> org-mode.
>>>
>>> anyone tried something better?
>>>
>>> --
>>> Jérémie Juste
>>
>>
>
>
>
> --
> Jérémie Juste



Re: [O] multiple cursor not working properly with org-mode

2015-10-16 Thread Kaushal Modi
Ivan made a very good point. It this actually is the problem it would
also explain why you see it in emacs -Q too.

--
Kaushal Modi


On Fri, Oct 16, 2015 at 2:06 PM, Ivan Andrus  wrote:
> I haven’t been following the thread so this may have already been asked, but
> have you checked ~/.emacs.d/.mc-lists.el ?
>
> Perhaps org-self-insert-command found it’s way into the wrong list.  It’s
> safe to just delete the file and restart Emacs.
>
> -Ivan
>
>
> On Oct 16, 2015, at 9:53 AM, Jérémie Juste  wrote:
>
> *
>emacs version
>
>GNU EMACS 24.5.1 (X86_64-REDHAT-LINUX-GNU, GTK+ VERSION 3.16.6) OF
> 2015-09-14 ON BUILDVM-10.PHX2.FEDORAPROJECT.ORG
>
>Org version
>
>Org-mode version 8.3.1 (8.3.1-103-g366dc4-elpa @
> /home/DJJ/.emacs.d/elpa/org-20150907/)
>
>
>* About the problem
>
>When I have a key binding which is s-d for mc/mark-next-like-this. This
> works pretty well. I can mark easily what I want to mark. I can delete
> characters with all the cursors but when I type a character only the first
> cursor enters them. I have the same issue with  mc/mark-previous-like-this.
>
>I tried the same procedure with different mode but didn't have any
> problem. (eg ess-mode, python-mode, text-mode, lisp-mode)
>
> I hope I have provided enough info. I'll be glad to provide more info if it
> can help.
>
> On Fri, Oct 16, 2015 at 5:20 PM, Kaushal Modi 
> wrote:
>>
>> I am using the same multiple-cursors version.
>>
>> What is you OS, emacs version (M-x emacs-version) and org-mode version
>> (M-x org-version)?
>>
>> I don't know if that information will help as I have never seen the
>> problem you described. But it will still be good to have that info.
>>
>> What happens when you try to write anything.. can you post what you
>> get when you hit something like "C-h c a" once you are in that mode
>> when you cannot type?
>> Does this happen after all of multiple-cursors commands
>> (mc/mark-next-like-this, mc/mark-prev-like-this, ...)?
>>
>> It will be very useful if you can provide a step-by-step explanation
>> of what commands you are running to recreate that problem starting
>> from an emacs -Q session.. provide us a recipe of the problem.
>>
>> It should also open this issue on the multiple-cursors github with all
>> the above info if you are sure that this happens only with
>> multiple-cursors loaded.
>>
>> --
>> Kaushal Modi
>>
>>
>> On Fri, Oct 16, 2015 at 11:10 AM, Jérémie Juste 
>> wrote:
>> > Hello,
>> >
>> > I started an emacs - Q session and loaded only multiple-cursors. I still
>> > have the same issue.
>> > my verson of multiple-cursors is multiple-cursors-20150710.456 - the
>> > latest
>> > one from melpa.
>> >
>> >
>> >
>> > On Wed, Oct 14, 2015 at 11:17 PM, Kaushal Modi 
>> > wrote:
>> >>
>> >> It works fine for me.
>> >>
>> >> Have you tried starting an emacs -Q session and loading just
>> >> multiple-cursors (and org-mode, if you are not using the org-mode
>> >> version
>> >> shipped with emacs)?
>> >>
>> >> Can you replicate the problem then?
>> >>
>> >> If not, then comment out your whole emacs config and uncomment it 50%
>> >> at a
>> >> time between emacs restarts till you narrow down to the part in the
>> >> config
>> >> causing this issue.
>> >>
>> >>
>> >> --
>> >> Kaushal Modi
>> >>
>> >> On Wed, Oct 14, 2015 at 4:56 PM, Jérémie Juste 
>> >> wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> Multiple cursor is a very handy tool. but I don't understand why it
>> >>> does
>> >>> not work properly in org-mode.  I can delete characters but I cannot
>> >>> write
>> >>> anything in org-mode. For the time being when it's not too costly I've
>> >>> resorted switching to text-mode make the modification and then back to
>> >>> org-mode.
>> >>>
>> >>> anyone tried something better?
>> >>>
>> >>> --
>> >>> Jérémie Juste
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Jérémie Juste
>
>
>
>
> --
> Jérémie Juste
>
>



Re: [O] function to cycle through specific org files?

2015-10-19 Thread Kaushal Modi
In the event those org files are part of your org agenda, there is an
inbuilt command to do that: org-cycle-agenda-files

C-' (org-cycle-agenda-files)
C-,Cycle through agenda file list, visiting one file after the other.

http://orgmode.org/manual/Agenda-files.html
On Oct 19, 2015 7:06 AM, "John Kitchin"  wrote:

> this feels kind of hacky, but it seems to do what you want:
>
> (setq my-files '("a.org" "b.org" "c.org"))
>
> (defun my-next-file ()
>  (interactive)
>  (let ((f (pop my-files)))
>(add-to-list 'my-files f t)
>(find-file f)))
>
> (defun my-previous-file ()
>   (interactive)
>   (let* ((r-my-files (reverse my-files))
>  (f (pop r-my-files)))
> (add-to-list 'r-my-files f t)
> (setq my-files (reverse r-my-files))
> (find-file f)))
>
> (global-set-key (kbd "s-") 'my-next-file)
> (global-set-key (kbd "s-") 'my-previous-file)
>
> the my-files var is not saved, so the order will not persist when you
> close emacs.
>
>
> Xebar Saram writes:
>
> > Hi all
> >
> > I know this should be easy (for anyone that knows elisp that is :)). how
> > does one create a function that cycles up/down through a list of pre
> > defined buffers/files?
> > for example i want to cycle (ie open and show in the emacs window)
> through:
> > A.org B.org C.org
> > i want to use ie A-left and A-right to open (if not already) and cycle
> > through these files. any one has such a system?
> >
> > best
> >
> > Z
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>


[O] Links in comments

2015-10-19 Thread Kaushal Modi
Hi,

This question has come up a few times on emacs.stackexchange so I was
curious if the more experienced org-mode users had a solution to this.. or
if a fix is needed to resolve this issue.

Referenced emacs.stackexchange questions:

- http://emacs.stackexchange.com/q/17505/115
- http://emacs.stackexchange.com/q/9413/115


The issue if that if there is a link in an org-mode commented line like
below:

* Links in comments
#+BEGIN_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.
#+END_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.

the link gets completely camouflaged as seen below.

[image: Inline image 3]

The only way I know that that's a link is if I toggle the visible-mode or
hover over that link with mouse (as below).

[image: Inline image 1]

Solutions??
- Different face for such links within comments? Or let the link face
supersede comment face?
- Option to not collapse links within comments?

What do you guys think?


--
Kaushal Modi


Re: [O] Links in comments

2015-10-26 Thread Kaushal Modi
Hi all,

I am sending this out again in the event someone knowing a solution to it
can comment.


--
Kaushal Modi

On Mon, Oct 19, 2015 at 6:54 PM, Kaushal Modi 
wrote:

> Hi,
>
> This question has come up a few times on emacs.stackexchange so I was
> curious if the more experienced org-mode users had a solution to this.. or
> if a fix is needed to resolve this issue.
>
> Referenced emacs.stackexchange questions:
>
> - http://emacs.stackexchange.com/q/17505/115
> - http://emacs.stackexchange.com/q/9413/115
>
>
> The issue if that if there is a link in an org-mode commented line like
> below:
>
> * Links in comments
> #+BEGIN_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
> #+END_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
>
> the link gets completely camouflaged as seen below.
>
> [image: Inline image 3]
>
> The only way I know that that's a link is if I toggle the visible-mode or
> hover over that link with mouse (as below).
>
> [image: Inline image 1]
>
> Solutions??
> - Different face for such links within comments? Or let the link face
> supersede comment face?
> - Option to not collapse links within comments?
>
> What do you guys think?
>
>
> --
> Kaushal Modi
>


Re: [O] Some projects

2015-10-26 Thread Kaushal Modi
Hi Nicolas,

Thanks for putting up this list.

> ** Backslash escaping

> Allowing to escape some symbols in plain text (e.g., emphasis markers,
> square brackets...) would remove a limitation in verbatim/code objects.
> As a small benefit, it would also permit to implement mid-word markup:
> b*o*ld.

> There are some gotchas, however.

I am definitely interested in a solution to this (based on a related
discussion we had here earlier):
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg100527.html
I'd happy to contribute to it as I can, but I don't know where to
start. But as soon as I see some activity related to backslash
escaping, I'd happily be involved in the code development.

--
Kaushal Modi



Re: [O] Links in comments

2015-10-28 Thread Kaushal Modi
Hi John, Eric,

Thanks for the replies.

I will try out the highlight-regexp trick today.

The point I was trying to make was not that we should highlight links even
in comments (though that was my suggested alternative). The main point I
wanted to make was that links should not get hidden in comments.

If highlighting links in comments is not suggested, then at least we should
make them visible as,

# some [[link][desc]]

Instead of

# some desc

The use case is where I would have some org-mode text with links
temporarily commented out. But in the commented state, I would not know if
that text hid any links because the links don't show expanded in the
commented text. And also they don't have a different face.

I will update later on what I see on using highlight-regexp. I think that
will work for me too.


[O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
t-options nil :input-buffer "
ox-latex-table-export-error.org" :input-file "/home/kmodi/sandbox/org/
ox-latex-table-export-error.org" :latex-class "article"
:latex-class-options nil :latex-header nil :latex-header-extra nil
:description nil :keywords nil :subtitle nil :latex-active-timestamp-format
"\\textit{%s}" :latex-caption-above (table) :latex-classes (("article"
"\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report"
"\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
:latex-default-figure-position "H" :latex-default-table-environment
"tabular" :latex-default-table-mode table :latex-diary-timestamp-format
"\\textit{%s}" :latex-footnote-separator "\\textsuperscript{,}\\,"
:latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
:latex-format-headline-function org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) (((footnote-reference
(:label "fn:1" :type standard :begin 610 :end 616 :contents-begin nil
:contents-end nil :post-blank 0 :parent ... nil
org-export-footnote-first-reference-p :type get-text-property 0 plist-get
standard org-export-get-footnote-definition] 7 "\n\n(fn REF)"]
(:export-options nil :input-buffer "ox-latex-table-export-error.org"
:input-file "/home/kmodi/sandbox/org/ox-latex-table-export-error.org"
:latex-class "article" :latex-class-options nil :latex-header nil
:latex-header-extra nil :description nil :keywords nil :subtitle nil
:latex-active-timestamp-format "\\textit{%s}" :latex-caption-above (table)
:latex-classes (("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" .
"\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}"))) :latex-default-figure-position "H"
:latex-default-table-environment "tabular" :latex-default-table-mode table
:latex-diary-timestamp-format "\\textit{%s}" :latex-footnote-separator
"\\textsuperscript{,}\\," :latex-format-drawer-function #[514 "\207" [] 3
"\n\n(fn _ CONTENTS)"] :latex-format-headline-function
org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) nil nil
(footnote-reference) nil objects (nil) (#0) plain-text plist-get
:ignore-list mapc org-data nil throw :--map-first-match objects
get-text-property 0 reverse greater-elements elements
org-element-secondary-value-alist org-element-all-elements
org-element--parsed-properties-alist org-element-dual-keywords
org-element-multiple-keywords org-element-greater-elements
org-element-all-objects] 11 "\n\n(fn --DATA)"] ((verbatim (:value
"`uvm_fatal(\"ID\", \"Message\")" :begin 580 :end 610 :post-blank 1 :parent
(table-cell (:begin 579 :end 622 :contents-begin 580 :contents-end 616
:post-blank 0 :parent (table-row (:type standard :begin 567 :end 643
:contents-begin 568 :contents-end 642 :post-blank 0 :post-affiliated 567
:parent (table ... ... ... ... ... ... ... #5 ...)) (table-cell (:begin 568
:end 579 :contents-begin 569 :contents-end 574 :post-blank 0 :parent #5)
#("Fatal" 0 5 ...)) #3 (table-cell (:begin 622 :end 642 :contents-begin 623
:contents-end 633 :post-blank 0 :parent #5) (verbatim ... #1
(footnote-reference (:label "fn:1" :type standard :begin 610 :end 616
:contents-begin nil :contents-end nil :post-blank 0 :parent #3)
(footnote-reference (:label "fn:1" :type standard :begin 610 :end 616
:contents-begin nil :contents-end nil :post-blank 0 :parent (table-cell
(:begin 579 :end 622 :contents-begin 580 :contents-end 616 :post-blank 0
:parent (table-row (:type standard :begin 567 :end 643 :contents-begin 568
:contents-end 642 :post-blank 0 :post-affiliated 567 :parent (table ... ...
... ... ... ... ... #5 ...)) (table-cell (:begin 568 :end 579
:contents-begin 569 :contents-end 574 :post-blank 0 :parent #5) #("Fatal" 0
5 ...)) #3 (table-cell (:begin 622 :end 642 :contents-begin 623
:contents-end 633 :post-blank 0 :parent #5) (verbatim ... (verbatim
(:value "`uvm_fatal(\"ID\", \"Message\")" :begin 580 :end 610 :post-blank 1
:parent #3)) #1)

--
Kaushal Modi


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
> Although some people can make sense of a backtrace produced with
compiled code, it is far more useful to provide a backtrace produced
with *uncompiled* code.

Apologies, I was unaware of that. I should have read that Info node first.
Below is a gist link to the full backtrace with uncompiled code.

https://gist.github.com/kaushalmodi/b76de1274b7a7bfe6020

Here's more info about this issue I am facing:
- I cannot reproduce this error in emacs -Q with the same git version of
org-mode in load-path.
- But I can reproduce this error consistently even if I "delete/move" my
~/.emacs.d/init.el and ~/.emacs.d/elpa. I do not have a ~/.emacs file.
While this step should be equivalent to emacs -Q, it doesn't seem to work
that way for me. Even the load-path var is exact same as with emacs -Q (I
install org-mode in the share/emacs dir).

While I resolve the mystery of why removing the init.el is not the same as
emacs -Q for me, I hope that the backtrace from uncompiled code can help
point the problem in my emacs setup.

Many thanks!


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
Also, I am on the latest org-mode and emacs builds:

org-mode version: Org-mode version 8.3.2 (release_8.3.2-251-g4ca117 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)
emacs-version:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5401bb8645f955b6fde8c0a5e5c8cf5ec1cab626


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
Some more info:

I cannot recreate this error when using
- my emacs config
- the same emacs build from git
- BUT the latest org-plus-contrib from org elpa: Org-mode version 8.3.2
(8.3.2-10-g00dacd-elpaplus @
/home/kmodi/.emacs.d/elpa_25_0/org-plus-contrib-20151005/)

So it is some change between:
- 8.3.2-10-g00dacd-elpaplus, and
- release_8.3.2-251-g4ca117

Now I just need to decode what "g4ca117" means in that version that does
not work for me. It doesn't seem to be any part of the git hash for the
commit I am on (
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8bccb2131374bba8c82c2774abb34af488826ce4
)


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
@Nick Dokos Are you are on a commit before or after this lexical binding
change?
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8bccb2131374bba8c82c2774abb34af488826ce4

The failure symtoms in my backtrace look like they could be related to this
change.


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
> The "g" stands for "git" and it's not part of the SHA1: 4ca117 are the
first six digits of the SHA1 at the HEAD of the branch

Ah, now that you spell it out, it's obvious. I swear I kept staring at the
git hash to find the "117" in "g4ca117" in
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=4ca1179c9e9c707267ac3738cc7c8442001b204b
but I never saw it! Now it stands out clear.

And of course, I should have realized that "g" can never be part of the hex
hash.

Thanks, and also thanks for confirming that you see this error too.


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
Thanks Nick. That patch resolves the issue for now. At least, all my pdf
exports are working fine as before.


Re: [O] org-mode git master. ox-latex export errors out due to a table

2015-11-02 Thread Kaushal Modi
Thanks to you both for the quick solution and the upstream fix.


[O] org-capture templates broken?

2015-11-03 Thread Kaushal Modi
Hi all,

I am on the following build of emacs:

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.24.23)
 of 2015-11-02, built using commit 5401bb8645f955b6fde8c0a5e5c8cf5ec1cab626.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/master
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS GTK2 X11


Org version: Org-mode version 8.3.2 (release_8.3.2-254-g061112 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)

This is how I set my org capture template:

(setq org-capture-templates
  '(("j" "Journal" entry ; `org-capture' binding + j
 (file+datetree (expand-file-name "journal.org" org-directory))
 "\n* %?\n  Entered on %U")
("n" "Note" entry ; `org-capture' binding + n
 (file (expand-file-name "notes.org" org-directory))
 "\n* %?\n  Context:\n%i\n  Entered on %U")
("u" "UVM/System Verilog Notes" ; `org-capture' binding + u
 entry (file (expand-file-name "uvm.org" org-directory))
 "\n* %?\n  Context:\n%i\n  Entered on %U")))

I use org-capture almost every other day. So I can confirm that all
those file paths are valid. I udpated to the latest git version of
org-mode yesterday (and I updated to the latest today too). But today
is the first time I tried to use org-capture this week.

When I do M-x org-capture, I see the capture template selection buffer
fine. But when I hit any key to one of the templates (for example: 'j'
or 'n'), I get this error:

Debugger entered--Lisp error: (error "Capture abort: (file-error
Cannot open load file No such file or directory org-eldoc)")
  signal(error ("Capture abort: (file-error Cannot open load file No
such file or directory org-eldoc)"))
  error("Capture abort: %s" (file-error "Cannot open load file" "No
such file or directory" "org-eldoc"))
  org-capture(nil)
  funcall-interactively(org-capture nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)


The backtrace is surprisingly short and I couldn't understand why it
fails. Also org-eldoc is in contrib and I don't include it in my
compilation. So I don't know what org-capture has to do with
org-eldoc.

Is org-capture template selection working fine for anyone on the
latest build as of today?


--
Kaushal Modi



Re: [O] org-capture templates broken?

2015-11-03 Thread Kaushal Modi
I have bound org-capture to "C-c c" and "C-c c j" is working fine when
using the latest version of org-plus-contrib from org elpa.



Re: [O] org-capture templates broken?

2015-11-03 Thread Kaushal Modi
The issue got fixed when I changed the below in my local.mk file and
rebuilt org:

From

ORG_ADD_CONTRIB = org-mime org-eww

To

ORG_ADD_CONTRIB = org-eldoc org-mime org-eww

I figured out why I was seeing the problem:

I have org-plus-contrib installed too. So when `package-initialize`
was called, the below bare form in org-eldoc.el (installed via
org-plus-contrib) got evaluated too:

(add-hook 'org-mode-hook #'org-eldoc-load)


I like to have both stable and dev version installed so that I can
switch to the stable version in case of emergency. So I have this
snippet in my org setup:

;; If `org-load-version-dev' is non-nil, remove the stable version of org
;; from the `load-path'.
(when (bound-and-true-p org-load-version-dev)
  (when (version<= "25.0" emacs-version) ;
`directory-files-recursively' is not available in older emacsen
  (let ((org-stable-install-path (car (directory-files-recursively
   package-user-dir
   "org-plus-contrib-[0-9]+"
   :include-directories
(setq load-path (delete org-stable-install-path load-path)


That basically removes the org-plus-contrib dir from the load-path if
I choose to use the dev version of org-mode. But that still keeps
`org-eldoc-load' in the org-mode-hook.

@Lucas: I would propose to not update the org-mode-hook automatically;
that add-hook should not be bare in the org-eldoc.el. It should be
updated only via a function call.

--
Kaushal Modi



[O] Favorite contrib/ packages?

2015-11-03 Thread Kaushal Modi
HI all,

What are your favorite org contrib/ packages that you simply can't
live without, and consider them to be a part of your org-mode core?

For now, I compile just 3 contrib/ packages by putting the below in my local.mk:

ORG_ADD_CONTRIB = org-eldoc org-mime org-eww


--
Kaushal Modi



Re: [O] export to beamer

2015-11-06 Thread Kaushal Modi
There were a lot of changes in this area in org-mode version 8.0. I believe
you updated from an older version 8.x version.

Here's info on the 8.0 upgrade: http://orgmode.org/worg/org-8.0.html

There are many backward incompatible changes in that version. So you should
read the above in full, especially if you are also using ox-latex and
ox-html.

The answer to your ox-beamer question is in the "Upgrading your setup"
section; you now need to explicitly require ox-beamer using one of the two
methods described there.
On Nov 6, 2015 12:51 AM, "童俊翔"  wrote:

I want to export org to beamer. It worked well previously when I press C-c
C-e l O. But in recent days, when I press C-c C-e l, the options for beamer
are missing. I can only export to pdf, not beamer.

What’s the problem, and what can I do?

Thanks a lot!


[O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
lace-match
cbtrans t t first (if nobr (progn (setq first
(org-list-item-trim-br first (if (eq type (quote descriptive))
(progn (let* (... ... ...) (setq first ... (setcar item first)
(format fmt (mapconcat (function (lambda ... ...)) item (or (eval
csep) "") (export-sublist) (nobr) (cbtrans . "TODO") (cboff .
"TODO") (cbon . "DONE") (csep if org--blankp "\n\n" "\n") (lsep) (isep
if org--blankp "\n\n" "\n") (iend) (icount funcall get-stars depth)
(istart funcall get-stars depth) (ddend) (ddstart) (dtend . " ")
(dtstart . " ") (dend) (dstart) (uend) (ustart) (oend) (ostart)
(splicep . t) (p :splice t :dtstart " " :dtend " " :istart (funcall
get-stars depth) :icount (funcall get-stars depth) :isep (if
org--blankp "\n\n" "\n") :csep (if org--blankp "\n\n" "\n") :cbon
"DONE" :cboff "TODO" :cbtrans "TODO") (params :splice t :dtstart " "
:dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
(list unordered (nil "")) org-tab-ind-state t) (sub depth) (let*
((type (car sub)) (items (cdr sub)) (fmt (concat (cond (splicep "%s")
((eq type ...) (concat ... "%s" ...)) ((eq type ...) (concat ... "%s"
...)) (t (concat ... "%s" ...))) (eval lsep (format fmt (mapconcat
(function (lambda (e) (funcall export-item e type depth))) items (or
(eval isep) "")((unordered (nil "")) 0)
  funcall((closure ((export-item closure ((export-sublist) (nobr)
(cbtrans . "TODO") (cboff . "TODO") (cbon . "DONE") (csep if
org--blankp "\n\n" "\n") (lsep) (isep if org--blankp "\n\n" "\n")
(iend) (icount funcall get-stars depth) (istart funcall get-stars
depth) (ddend) (ddstart) (dtend . " ") (dtstart . " ") (dend) (dstart)
(uend) (ustart) (oend) (ostart) (splicep . t) (p :splice t :dtstart "
" :dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
(params :splice t :dtstart " " :dtend " " :istart (funcall get-stars
depth) :icount (funcall get-stars depth) :isep (if org--blankp "\n\n"
"\n") :csep (if org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO"
:cbtrans "TODO") (list unordered (nil "")) org-tab-ind-state t) (item
type depth) (let* ((counter (car-safe (prog1 item ...))) (fmt (concat
(cond ... ... ...) (eval iend))) (first (car item))) (cond
((string-match "\\[CBON\\]" first) (setq first (replace-match cbon t t
first))) ((string-match "\\[CBOFF\\]" first) (setq first
(replace-match cboff t t first))) ((string-match "\\[CBTRANS\\]"
first) (setq first (replace-match cbtrans t t first (if nobr
(progn (setq first (org-list-item-trim-br first (if (eq type
(quote descriptive)) (progn (let* (... ... ...) (setq first ...
(setcar item first) (format fmt (mapconcat (function (lambda ... ...))
item (or (eval csep) "") (export-sublist) (nobr) (cbtrans .
"TODO") (cboff . "TODO") (cbon . "DONE") (csep if org--blankp "\n\n"
"\n") (lsep) (isep if org--blankp "\n\n" "\n") (iend) (icount funcall
get-stars depth) (istart funcall get-stars depth) (ddend) (ddstart)
(dtend . " ") (dtstart . " ") (dend) (dstart) (uend) (ustart) (oend)
(ostart) (splicep . t) (p :splice t :dtstart " " :dtend " " :istart
(funcall get-stars depth) :icount (funcall get-stars depth) :isep (if
org--blankp "\n\n" "\n") :csep (if org--blankp "\n\n" "\n") :cbon
"DONE" :cboff "TODO" :cbtrans "TODO") (params :splice t :dtstart " "
:dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
(list unordered (nil "")) org-tab-ind-state t) (sub depth) (let*
((type (car sub)) (items (cdr sub)) (fmt (concat (cond (splicep "%s")
((eq type ...) (concat ... "%s" ...)) ((eq type ...) (concat ... "%s"
...)) (t (concat ... "%s" ...))) (eval lsep (format fmt (mapconcat
(function (lambda (e) (funcall export-item e type depth))) items (or
(eval isep) "") (unordered (nil "")) 0)
  (concat (funcall export-sublist list 0) "\n")
  (let* ((p params) (splicep (plist-get p :splice)) (ostart (plist-get
p :ostart)) (oend (plist-get p :oend)) (ustart (plist-get p :ustart))
(uend (plist-get p :uend)) (dstart (plist-get p :dstart)) (dend
(plist-get p :dend)) (dtstart (plist-get p :dtstart)) (dtend
(plist-get p :dtend)) (ddstart (plist-get p :ddstart)) (ddend
(plist-get p :ddend)) (istart (plist-get p :istart)) (icount
(plist-get p :icount)) (iend (plist-get p :iend)) (isep (plist-get p
:isep)) (lsep (plist-get p :lsep)) (csep (plist-get p :csep)) (cbon
(plist-get p :cbon)) (cboff (plist-get p :cboff)) (cbtrans (plist-get
p :cbtrans)) (nobr (plist-get p :nobr)) export-sublist (export-item
(function (lambda (item type depth) (let* ((counter ...) (fmt ...)
(first ...)) (cond (... ...) (... ...) (... ...)) (if nobr (progn
...)) (if (eq type ...) (progn ...)) (setcar item first) (format fmt
(mapconcat ... item ...)) (export-sublist (function (lambda (sub
depth) (let* ((type ...) (items ...) (fmt ...)) (format fmt (mapconcat
... items ...))) (concat (funcall export-sublist list 0) "\n"))
  org-list-to-generic((unordered (nil "")) (:splice t :dtstart " "
:dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO"))
  (let* ((rule (cdr (assq (quote heading)
org-blank-before-new-entry))) (level (org-reduced-level (or
(org-current-level) 0))) (org--blankp (or (eq rule t) (and (eq rule
(quote auto)) (save-excursion (outline-previous-heading)
(org-previous-line-empty-p) (get-stars (function (lambda (d) (let
((oddeven-level ...)) (concat (make-string ... 42) " "))
(org-list-to-generic list (org-combine-plists (quote (:splice t
:dtstart " " :dtend " " :istart (funcall get-stars depth) :icount
(funcall get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO"))
params)))
  org-list-to-subtree((unordered (nil "")))
  org-toggle-heading(nil)
  funcall-interactively(org-toggle-heading nil)
  call-interactively(org-toggle-heading)
  org-ctrl-c-star()
  funcall-interactively(org-ctrl-c-star)
  call-interactively(org-ctrl-c-star nil nil)
  command-execute(org-ctrl-c-star)


--
Kaushal Modi



Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
Lesser steps to recreate this bug:

(1) In any buffer, do M-x org-mode

(2) Type: - item 1

(3) Do M-RET
Now you have
- item 1
-

(4) Now do C-c *
Boom!



Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
Thanks for working on this Aaron but M-x ediff-patch-file failed for me.

I am on the cce317 commit of org-mode
(http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=265e5b9984818f76dea8f5147af0c4a939cf457b)

patching file /home/kmodi/e/elisp/org-mode/lisp_25_0/org-list.el
Hunk #1 succeeded at 2923 (offset 1 line).
Hunk #2 succeeded at 3017 (offset 1 line).
Hunk #3 succeeded at 3103 (offset 1 line).
Hunk #4 FAILED at 3215.
Hunk #5 FAILED at 3325.
2 out of 5 hunks FAILED -- saving rejects to file
/home/kmodi/e/elisp/org-mode/lisp_25_0/org-list.el.rej



Re: [O] Lexical binding bug in org-list.el?

2015-11-09 Thread Kaushal Modi
Thanks for fixing this.



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Kaushal Modi
Have you had a look at https://github.com/rudolfochrist/interleave

The interleave package works great for me: taking notes in an org-mode
buffer in one side (buffer) corresponding to the pdf page open in
pdf-tools on the other side (buffer).



Re: [O] Org Mode and PDF Notes!

2015-11-11 Thread Kaushal Modi
>  Doesn't seem to work with pdfview yet, and I'm sort of addicted now.

I use pdf-view too (the major mode for viewing PDF files that comes
with pdf-tools, right?) and interleave works great!

> I can think of some changes, e.g., would be nice to keep all my notes for all 
> books/articles/etc. in a single file

Yeah, right now it is one org file per pdf.

> if the interleave options could be set on a per-heading basis that would be 
> really cool.

What sort of options are you thinking about? Right now it creates one
org heading for each set of notes corresponding to a page.

May be you can work with the interleave.el dev to add in your ideas
and code. I had worked with him to make interleave support pdf-tools
and it was a pleasure to work with him.



[O] Wrong number of arguments: setq, 1

2015-12-11 Thread Kaushal Modi
Hi,

I needed to make these changes locally to make any kind of org export
(text, html, latex) work.

diff --git a/lisp/ox.el b/lisp/ox.el
index 2908fed..40c51cb 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1779,7 +1779,7 @@ INFO is a plist holding export options."
  ;; If FILETAGS contains a select tag, every headline or
  ;; inlinetask is returned.
  (org-element-map data '(headline inlinetask) #'identity)
-  (letrec ((selected-trees)
+  (letrec ((selected-trees nil)
(walk-data
  (lambda (data genealogy)
   (let ((type (org-element-type data)))
@@ -2715,7 +2715,7 @@ DATA is the parse tree to traverse.  INFO is the
plist holding
 export info.  Also set `:ignore-list' in INFO to a list of
 objects which should be ignored during export, but not removed
 from tree."
-  (letrec ((ignore)
+  (letrec ((ignore nil)
;; First find trees containing a select tag, if any.
(selected (org-export--selected-trees data info))
(walk-data
@@ -3760,8 +3760,8 @@ INFO is a plist containing export state.  By
default, as soon as
 a new footnote reference is encountered, FUNCTION is called onto
 its definition.  However, if BODY-FIRST is non-nil, this step is
 delayed until the end of the process."
-  (letrec ((definitions)
-   (seen-refs)
+  (letrec ((definitions nil)
+   (seen-refs nil)
(search-ref
 (lambda (data delayp)
   ;; Search footnote references through DATA, filling


Without these fixes, I get an error like: Wrong number of arguments: setq, 1

I am not familiar with letrec but for let statements, if I want to set
a let-bound variable X's value to nil, I would do,

(let (X) ..)

or

(let ((X nil)) ..)

But NOT (let ((X)) ..) (Note the parentheses count).


Do the same rules not apply to letrec?

Here is my org-version:

Org-mode version 8.3.2 (release_8.3.2-380-g64aee4 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Here is my emacs build info (emacs-25 branch):

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.24.23)
 of 2015-12-10, built using commit d75849e937af0ecbcdc7bf621aa9bcd43aa75df4.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS GTK2 X11




--
Kaushal Modi



Re: [O] Wrong number of arguments: setq, 1

2015-12-11 Thread Kaushal Modi
I just found a recent conversation on this mailing list with the
title: Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el

That explains why I suddenly started seeing these errors.
My above patch fixes org exports for me while being on the latest
snapshot of emacs-25 branch.



Re: [O] [ANN] Export block syntax change

2016-01-06 Thread Kaushal Modi
Hi all,

I believe this change is breaking the ox-twbs package.

The error shown is:

Debugger entered--Lisp error: (error "Unknown keyword: :export-block")
  signal(error ("Unknown keyword: :export-block"))
  error("Unknown keyword: %s" :export-block)
  org-export-define-backend(twbs ((bold . org-twbs-bold) (center-block .
org-twbs-center-block) (clock . org-twbs-clock) (code . org-twbs-code)
(drawer . org-twbs-drawer) (dynamic-block . org-twbs-dynamic-block) (entity
. org-twbs-entity) (example-block . org-twbs-example-block) (export-block .
org-twbs-export-block) (export-snippet . org-twbs-export-snippet)
(fixed-width . org-twbs-fixed-width) (footnote-definition .
org-twbs-footnote-definition) (footnote-reference .
org-twbs-footnote-reference) (headline . org-twbs-headline)
(horizontal-rule . org-twbs-horizontal-rule) (inline-src-block .
org-twbs-inline-src-block) (inlinetask . org-twbs-inlinetask)
(inner-template . org-twbs-inner-template) (italic . org-twbs-italic) (item
. org-twbs-item) (keyword . org-twbs-keyword) (latex-environment .
org-twbs-latex-environment) (latex-fragment . org-twbs-latex-fragment)
(line-break . org-twbs-line-break) (link . org-twbs-link) (paragraph .
org-twbs-paragraph) (plain-list . org-twbs-plain-list) (plain-text .
org-twbs-plain-text) (planning . org-twbs-planning) (property-drawer .
org-twbs-property-drawer) (quote-block . org-twbs-quote-block)
(quote-section . org-twbs-quote-section) (radio-target .
org-twbs-radio-target) (section . org-twbs-section) (special-block .
org-twbs-special-block) (src-block . org-twbs-src-block) (statistics-cookie
. org-twbs-statistics-cookie) (strike-through . org-twbs-strike-through)
(subscript . org-twbs-subscript) (superscript . org-twbs-superscript)
(table . org-twbs-table) (table-cell . org-twbs-table-cell) (table-row .
org-twbs-table-row) (target . org-twbs-target) (template .
org-twbs-template) (timestamp . org-twbs-timestamp) (underline .
org-twbs-underline) (verbatim . org-twbs-verbatim) (verse-block .
org-twbs-verse-block)) :export-block "HTML" :filters-alist
((:filter-final-output . org-twbs-final-function)) :menu-entry (119 "Export
to TWBS HTML" ((72 "As HTML buffer" org-twbs-export-as-html) (104 "As HTML
file" org-twbs-export-to-html) (111 "As HTML file and open" (lambda (a s v
b) (if a (org-twbs-export-to-html t s v b) (org-open-file
(org-twbs-export-to-html nil s v b))) :options-alist ((:html-extension
nil nil org-twbs-extension) (:html-link-org-as-html nil nil
org-twbs-link-org-files-as-html) (:html-container "HTML_CONTAINER" nil
org-twbs-container-element) (:html-link-use-abs-url nil
"html-link-use-abs-url" org-twbs-link-use-abs-url) (:html-link-home
"HTML_LINK_HOME" nil org-twbs-link-home) (:html-link-up "HTML_LINK_UP" nil
org-twbs-link-up) (:html-mathjax "HTML_MATHJAX" nil "" space)
(:html-postamble nil "html-postamble" org-twbs-postamble) (:html-preamble
nil "html-preamble" org-twbs-preamble) (:html-head "HTML_HEAD" nil
org-twbs-head newline) (:html-head-extra "HTML_HEAD_EXTRA" nil
org-twbs-head-extra newline) (:html-head-include-default-style nil
"html-style" org-twbs-head-include-default-style)
(:html-head-include-scripts nil "html-scripts"
org-twbs-head-include-scripts) (:html-table-attributes nil nil
org-twbs-table-default-attributes) (:html-table-row-tags nil nil
org-twbs-table-row-tags) (:html-inline-images nil nil
org-twbs-inline-images) (:creator "CREATOR" nil org-twbs-creator-string)
(:with-latex nil "tex" org-twbs-with-latex) (:with-toc nil nil 2)
(:with-creator nil nil t) (:with-headline-numbers nil "whn" t)
(:section-numbers nil nil t) (:latex-header "LATEX_HEADER" nil nil
newline)))
  eval-buffer()  ; Reading at buffer position 5862


The error goes away after I comment out the line with :export-block keyword
in the org-export-define-backend function call.

Example:
https://github.com/marsmining/ox-twbs/blob/cfe67353d148e65a7676f1609d8cc22a4c8fbc78/ox-twbs.el#L108

What would be the proposed/correct fix for this?

Thanks.


--
Kaushal Modi

On Sat, Jan 2, 2016 at 9:40 AM, Suvayu Ali 
wrote:

> On Sat, Jan 02, 2016 at 11:54:42AM +0100, Nicolas Goaziou wrote:
> > Hello,
> >
> > Suvayu Ali  writes:
> >
> >
> > > On Sun, Dec 20, 2015 at 10:06:44PM +0100, Nicolas Goaziou wrote:
> > >>
> > >> I just finalized the syntax change for export blocks. As a reminder,
> the
> > >> new syntax is:
> > >>
> > >>   #+BEGIN_EXPORT backend
> > >>   ...
> > >>   #+END_EXPORT
> > >>
> > >> instead of
> > >>
> > >>   #+BEGIN_backend
> > >>   ...
> > >>   #+END_backend
> > >
> > > This seems to not work for me.  The following block is completely
> > > missing from the exported tex source.
> > >
> > >   #+begin_export latex
> > >   \begin{equation}
> > > ct = (S.V. - P.V.) \times m/p.
> > >   \end{equation}
> > >   #+end_export
> > >
> >
> > Fixed. Thank you.
>
> Thanks!  It works now.
>
> Cheers,
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
>


Re: [O] [ANN] Export block syntax change

2016-01-06 Thread Kaushal Modi
Thanks Nicolas.

I agged the org-mode git repo for ":export-block" and found these
references:

contrib/lisp/ox-gfm.el
54:  :export-block '("GFM" "GITHUB FLAVORED MARKDOWN")

(Copied Lars for above)

contrib/lisp/ox-freemind.el
46:  :export-block "FREEMIND"

(Copied Jambunathan for above)

(And copying you for groff and org.texi)

contrib/lisp/ox-groff.el
95:  :export-block "GROFF"

doc/org.texi
17971:@code{:export-block} (to specify what blocks should not be exported
by this

doc/org
16222:dispatcher), ‘:export-block’ (to specify what blocks should not be

etc/ORG-NEWS
78:Moreover, ~:export-block~ keyword used in ~org-export-define-backend~

These references need to be removed, right?

Thanks.




--
Kaushal Modi

On Wed, Jan 6, 2016 at 1:06 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Kaushal Modi  writes:
>
> > I believe this change is breaking the ox-twbs package.
> >
> > The error shown is:
> >
> > Debugger entered--Lisp error: (error "Unknown keyword: :export-block")
>
> [...]
>
> > The error goes away after I comment out the line with :export-block
> keyword
> > in the org-export-define-backend function call.
> >
> > Example:
> >
> https://github.com/marsmining/ox-twbs/blob/cfe67353d148e65a7676f1609d8cc22a4c8fbc78/ox-twbs.el#L108
> >
> > What would be the proposed/correct fix for this?
>
> Remove the :export-block keyword, which is no longer necessary. I'm
> going to update ORG-NEWS. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] [ANN] Export block syntax change

2016-01-06 Thread Kaushal Modi
> I removed all of them but the last one.

Of course :)

Thanks.


[O] Use of deprecated org-log-note-marker variable in outshine

2016-01-06 Thread Kaushal Modi
Hi Thorsten,

Recently the global variable org-log-note-marker was removed from org.el.

But it is used in outshine.el as follows:

(defadvice org-store-log-note (around org-store-log-note-around activate)
  "Outcomment inserted log-note in Outshine buffers."
  (let ((outshine-log-note-beg-marker
;; stay before inserted text
(copy-marker org-log-note-marker nil))
(outshine-log-note-end-marker
;; stay after inserted text
(copy-marker org-log-note-marker t)))
ad-do-it
(unless (derived-mode-p 'org-mode 'org-agenda-mode)
  (comment-region outshine-log-note-beg-marker
 outshine-log-note-end-marker))
(move-marker outshine-log-note-beg-marker nil)
(move-marker outshine-log-note-end-marker nil)))

So right now, I am getting this warning at emacs startup:

~/.emacs.d/elpa_25_0/outshine-20151203.802/outshine.elc:Warning: reference
to
free variable ‘org-log-note-marker’


@ Thorsten, Nicolas: What would be the best way to fix that?

My org version:
Org-mode version 8.3.2 (release_8.3.2-469-ga902c8 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


--
Kaushal Modi


Re: [O] Use of deprecated org-log-note-marker variable in outshine

2016-01-07 Thread Kaushal Modi
> Was it just removed, or rather renamed or replaced by something else?
> Maybe the fix would be trivial if somebody with insights about the
> change could give some hints?

I have never needed to use this function, so I cannot comment on it. So
asking Nicolas for help regarding this.

> Recently I managed to use Emacs/Org-mode more frequently again and even
> follow the mailing list somehow, so I hope I can the change maintainance
> state of the outshine libraries from 'unmaintained' to 'kind of
> maintained' again.

Thanks! That's great news! :)

--
Kaushal Modi


Re: [O] Use of deprecated org-log-note-marker variable in outshine

2016-01-08 Thread Kaushal Modi
> Actually, it was a mistake to remove the variable in the first place. As
> a consequence, I re-introduced it in master.

Thanks. That has fixed the free variable warning.

@Thorsten But now you might need to have different versions of defadvice
for org-store-log-note based on the value of org-version.


Re: [O] [ANN] Export block syntax change

2016-01-10 Thread Kaushal Modi
Out of curiosity, which org-mode version will see this change in
export-block syntax?


Re: [O] Keep buffer visible w/ capture template

2016-01-13 Thread Kaushal Modi
> I'd like to keep the active buffer visible while capturing.

That's how it works for me. I do not see a calendar buffer unless I do
something like C-c C-d (org-deadline) or C-c C-s (org-schedule) in an org
buffer.

If I am in a frame with one buffer ABC, calling org-capture splits the
frame into 2 windows: one with ABC and another with Capture.
If I am in a frame already with 2 windows and if my point is in buffer ABC,
calling org-capture will retain the ABC buffer (where my point was) and
open Capture buffer in the other window.

I do not have display-buffer-alist customized for Capture buffers.

Can you reproduce the problem you see in an emacs -Q session? If so, can
you provide a recipe to recreate that over here?
Can you also post your emacs and org-mode versions?

Here are mine:

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.24.23)
 of 2016-01-12, built using commit 0ed0a9b7f09495394dc9b60a9f7c937679c49afe.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
’CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include’ ’CFLAGS=-ggdb3 -O0’
’CXXFLAGS=-ggdb3 -O0’ ’LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3’

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11


Org-mode version 8.3.3 (release_8.3.3-430-g9db786 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


Re: [O] Keep buffer visible w/ capture template

2016-01-13 Thread Kaushal Modi
I would prefer the second option (modifying the display-buffer-alist). I
don't customize this variable for any of the org-mode buffer but I do for
other buffers. That too, I do it indirectly using the shackle package.
Here's my setup that can give your examples and a brief documentation on
how to control the windows/frames using shackle:
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-shackle.el


Re: [O] Commenting out #+

2016-01-18 Thread Kaushal Modi
# followed by space is a comment.

So below would be a comment too.
# #+STARTUP

On Monday, January 18, 2016, Eric Brown  wrote:

> Dear List,
>
> I would like to comment out directives like:
>
> #+STARTUP
>
> but I would like to keep them around for future use, e.g.
>
> ##+STARTUP
>
> Is this sort of thing possible with org 8.3.3+ ?
>
> Thanks,
> Eric
>
>
>

-- 

--
Kaushal Modi


[O] Conditionally formatting org-html-postamble-format

2016-01-26 Thread Kaushal Modi
Hi,

I have the org-html-postamble-format set to the below:

(setq org-html-postamble-format
  `(("en"
 ,(concat "Exported using "
  ;; "%c" is replaced with
`org-html-creator-string'
  ;; Emacs  (Org mode )
  ""
  "%c "
  "by %a. — "
  ""
  "%d"


It works great except for the cases where I have set a document author to
nothing using

#+AUTHOR:

What would be the best way to set the postamble so that the "by %a" portion
does not get printed if the %a value is "".

Right now, if the author is nil, the postamble gets exported as:

Exported using
Emacs  25.0.50.1 (Org
 mode 8.3.3)
 by . —
Jan 26 2016, Tue


Re: [O] Conditionally formatting org-html-postamble-format

2016-01-27 Thread Kaushal Modi
Hi Robert,

Thanks for the reply.

> how about using a postamble function instead of html-postamble-format

Does it mean that I need to look into modifying the
org-html--build-pre/postamble function?

If so, I will start looking into it but it will take a while as it full of
elisp that I have never used (until today maybe): format-spec, plist-get
and a lot of assoc's and assq's :)

Kaushal


Re: [O] Conditionally formatting org-html-postamble-format

2016-01-27 Thread Kaushal Modi
Thank you guys.

With your help, I came up with this solution and it works great! I tested
it with all 4 combinations (author=nil/non-nil and date=nil/non-nil).

# #+AUTHOR:
#+AUTHOR: Kaushal Modi
# #+DATE:
#+DATE: {{{time(%b %e %Y\, %a)}}}

;; Customize the HTML postamble
(defun modi/org-html-postamble-fn (info)
  "My custom postamble for org to HTML exports.
INFO is the property list of export options."
  (let ((author (car (plist-get info :author)))
(creator (plist-get info :creator))
(date (car (org-export-get-date info)))
(d1 ""))
(concat "Exported using "
d1 "class=\"creator\">" creator d2 ; emacs and org versions
(when author
  (concat " by " author))
(when date
  (concat " on " d1 "class=\"date\">" date d2))
".")))
(setq org-html-postamble #'modi/org-html-postamble-fn) ; default: 'auto


[O] Inconsistent {{{time}}} org macro expansion

2016-01-28 Thread Kaushal Modi
Hi,

I am getting different outputs from org-export-get-date depending on
whether I export the full org file or just a selected heading. For #+DATE,
I am using a {{{time}}} macro.

Here's a test org file:

=

#+DATE: {{{time(%b %e %Y\, %a)}}}
* Heading 1
Content 1
* Heading 2
Content 2

=

And here is a test org-html-postamble function to help debug this:

=

(defun my/org-html-postamble-fn (info)
  (let ((date (car (org-export-get-date info
(message "Date: %S" date)))
(setq org-html-postamble #'my/org-html-postamble-fn)

=

SCENARIO 1: Normal export [GOOD]
In this scenario, I export the full org file to html (C-c C-e h h) without
selecting anything.
This is the output I get in *Messages*

Date: #("Jan 28 2016, Thu" 0 16 (:parent (#0)))

I get a date I case use in the postamble output.

SCENARIO 2: Export only one of the headings. [BAD]
Now select just the "Heading 1" sub-tree and then do C-c C-e h h.
This time, the output is:

Date: (macro (:key "time" :value "{{{time(%b %e %Y\\, %a)}}}" :args ("%b %e
%Y, %a") :begin 1 :end 26 :post-blank 0 :parent (#0)))

So it looks like the time macro did not expand.

Why is that? Is it a bug?

This is my org version: Org-mode version 8.3.3 (release_8.3.3-509-gc17fcc @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


Thanks.

Kaushal Modi


Re: [O] Inconsistent {{{time}}} org macro expansion

2016-01-29 Thread Kaushal Modi
Thank you! I verified that the bug is now fixed.


Re: [O] display org-link url

2016-01-29 Thread Kaushal Modi
Or with the point on the link, you can hit C-c C-l. That will bring up the
link for editing in the minibuffer. Hitting C-g will take you out of there
without modifying the link.


Re: [O] What happened to org-set-local

2016-02-03 Thread Kaushal Modi
>
> Has it been replaced - with what?
>
> Looks like setq-local can be used directly instead of org-set-local.

-
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=bc0588fee4994eda9474e62313eb9925ad65dab1
-
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=07e16c2fc5687de5e1761bbf4ba3cf1777de15eb


Re: [O] references to arbitrary labels in org and export to latex

2016-02-05 Thread Kaushal Modi
Check out this emacs.SE QnA: http://emacs.stackexchange.com/q/594/115

With that solution I can neatly collect all the links at the bottom of the
org document, using markdown style link references.

That still would not give the bibliography style link references at the end
of the exported document that you are looking for.

--
Kaushal Modi


Re: [O] inline code and minted

2016-02-05 Thread Kaushal Modi
On Fri, Feb 5, 2016 at 10:01 AM Alan Schmitt 
wrote:

>
> Yes. Here it is for review, please let me know if I can apply it.
>

TIL that we can have inline source code highlighting in org exports!

For anyone else that just got enlightened about this, check out "C-h i g
(org) Structure of code blocks".

@Alan: I tried out your patch and it works great! Thanks!


Re: [O] references to arbitrary labels in org and export to latex

2016-02-05 Thread Kaushal Modi
On Fri, Feb 5, 2016 at 8:40 AM John Kitchin  wrote:

> Could you use footnotes for this?
>
>
I had to go with that custom solution on emacs.SE because I wanted the
links to be rendered just like [[link][description]], without plain-text
links in the footnotes. But I also needed a Footnotes-like convenience
where it is easy to edit all links in a central place.


Re: [O] Bug: Regression in ox-texinfo export

2016-02-08 Thread Kaushal Modi
The syntax change was announced in Dec last year:
https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html

It is now

#+BEGIN_EXPORT backend
#+END_EXPORT

On Monday, February 8, 2016, Oleh Krehel  wrote:

>
> At the current git master, the org source:
>
> #+BEGIN_TEXINFO
> @quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @end quotation
> #+END_TEXINFO
>
> results in the following .texi output:
>
> @TEXINFO
> @@quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @@end quotation
> @end TEXINFO
>
> This was done with `emacs -Q', no extra code except (require 'ox-texinfo).
>
> Note that the above org source works fine with the built-in Org-mode:
>
> @quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @end quotation
>
> @c Emacs 25.0.50.4 (Org mode 8.2.10)
>
> regards,
> Oleh
>
>

-- 

--
Kaushal Modi


Re: [O] #+BEGIN_LaTeX deprecated

2016-02-09 Thread Kaushal Modi
Check out this announcement email about the syntax change:
https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html

It has a snippet to convert the old syntax files to new syntax.

--
Kaushal Modi
On Feb 9, 2016 6:45 PM, "Myles English"  wrote:

> Hello Julien,
>
> Julien Cubizolles writes:
>
> > The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of
> > #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org
> > files that I will need to export again. I can manually change the
> > blocks but I was wondering if some automatic conversion function has
> > been implemented.
>
> I don't know if there is such a function but, for the problem you
> describe, I would try something like this:
>
> sed -i 's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' myfile.org
>
> If there are lots of files maybe (UNTESTED):
>
> grep -rl "BEGIN_LaTeX\|END_LaTeX" | \
>  xargs -IXX \
>sed -i's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' XX
>
> Myles
>
>


[O] [BUG] org-return after an empty description list item gives error

2016-02-10 Thread Kaushal Modi
Hi,

I get an error from org-element-context if I have set
org-return-follows-link to t and hit RET after an empty desc list item.
Here is what I mean by that:

= org buffer =
- desc123 ::

=

To better recreate this issue, save the below elisp code to a temp file,
say t.el, and run,

emacs -q -l t.el
(Verify that emacs -q loads the master branch (dev) org-mode version. It
does for me as I install the dev org-mode to "share/emacs/site-lisp/org".)

= t.el =
(setq inhibit-startup-screen t)
(setq org-return-follows-link t) ; Commenting this line with mask this bug
(toggle-debug-on-error)
(pop-to-buffer-same-window (get-buffer-create "*org-temp*"))
(org-mode)
(insert "- desc123 ::\n")
(org-return)
=

On doing so, you should get an error backtrace like below:

=
Debugger entered--Lisp error: (search-failed "desc123")
  search-forward("desc123" 14)
  org-element-context()
  org-return()
=

*I do not get this error if I set org-return-follows-link back to its
default value of nil.*

I am using the following org-mode and emacs versions:

=
Org-mode version 8.3.3 (release_8.3.3-573-ga1d9da @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Emacs version: GNU Emacs 25.0.90.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.24.23)
 of 2016-02-10, built using commit 3ad05a0dc46093dd6b8958747a0475b8baba954f.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11
=

Kaushal Modi


Re: [O] [BUG] org-return after an empty description list item gives error

2016-02-11 Thread Kaushal Modi
Thanks for fixing this quickly.

On Thu, Feb 11, 2016 at 3:58 AM Nicolas Goaziou 
wrote:

> Hello,
>
> Kaushal Modi  writes:
>
> > I get an error from org-element-context if I have set
> > org-return-follows-link to t and hit RET after an empty desc list item.
> > Here is what I mean by that:
> >
> > = org buffer =
> > - desc123 ::
> > 
> > =
> >
> > To better recreate this issue, save the below elisp code to a temp file,
> > say t.el, and run,
> >
> > emacs -q -l t.el
> > (Verify that emacs -q loads the master branch (dev) org-mode version. It
> > does for me as I install the dev org-mode to
> "share/emacs/site-lisp/org".)
> >
> > = t.el =
> > (setq inhibit-startup-screen t)
> > (setq org-return-follows-link t) ; Commenting this line with mask this
> bug
> > (toggle-debug-on-error)
> > (pop-to-buffer-same-window (get-buffer-create "*org-temp*"))
> > (org-mode)
> > (insert "- desc123 ::\n")
> > (org-return)
> > =
> >
> > On doing so, you should get an error backtrace like below:
> >
> > =
> > Debugger entered--Lisp error: (search-failed "desc123")
> >   search-forward("desc123" 14)
> >   org-element-context()
> >   org-return()
> > =
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] Help understanding what's imported from a #+SETUPFILE file

2016-02-12 Thread Kaushal Modi
Hi,

I have a common setup file for all my org files which configure the way the
latex and HTML files are exported.

#+SETUPFILE: ~/org/common/config.org

One of the snippets in my config.org is

# Allow multi-page code listings by wrapping the `minted' environment with
`mdframed' environment
# http://tex.stackexchange.com/a/30524/52678
#+LaTeX_HEADER: \usepackage{mdframed}
#+LaTeX_HEADER: \mdfsetup{%
#+LaTeX_HEADER: topline=true, bottomline=true,leftline=true,
rightline=true, %
#+LaTeX_HEADER: innerleftmargin=15pt, %
#+LaTeX_HEADER: leftmargin=-5pt, %
#+LaTeX_HEADER: rightmargin=-5pt, %
#+LaTeX_HEADER: linewidth=1pt, backgroundcolor=yellow!20!white %
#+LaTeX_HEADER: }

#+LaTeX: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX: \AfterEndEnvironment{minted}{\end{mdframed}}

The #+LaTeX_HEADER lines get imported into the exported .tex file but the
#+LaTeX lines do not.

>From "C-h i g (org) In-buffer settings", I see that

‘#+SETUPFILE: file’
 This line defines a file that holds more in-buffer setup.  Normally
 this is entirely ignored.  Only when the buffer is parsed for
 option-setting lines (i.e., when starting Org mode for a file, when
 pressing ‘C-c C-c’ in a settings line, or when exporting), then the
 contents of this file are parsed as if they had been included in
 the buffer.  In particular, the file can be any other Org mode file
 with internal setup.  You can visit the file the cursor is in the
 line with ‘C-c '’.

But I did not find anything that explains which "#+" lines from SETUPFILE
are ignored.

I thought of using #+SETUPFILE as a clean way to import a common org setup
for exports. But should #+INCLUDE be used in this case instead?

Or what method would you guys suggest (may be using some elisp) so that I
do not need to manually enter the below in all my org files.

#+LaTeX: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX: \AfterEndEnvironment{minted}{\end{mdframed}}


--
Kaushal Modi


Re: [O] Help understanding what's imported from a #+SETUPFILE file

2016-02-12 Thread Kaushal Modi
Actually, I just realized that changing those 2 lines to:

#+LaTeX_HEADER: \BeforeBeginEnvironment{minted}{\begin{mdframed}}
#+LaTeX_HEADER: \AfterEndEnvironment{minted}{\end{mdframed}}

in the SETUPFILE works too. I don't recall the reason why I did not have
them as LaTeX_HEADER earlier.

But the question still remains.. is SETUPFILE designed to not export lines
beginning with #+LaTeX? Or a general question would be.. what stuff doesn't
SETUPFILE export?


Re: [O] Help understanding what's imported from a #+SETUPFILE file

2016-02-12 Thread Kaushal Modi
> SETUPFILE exports keywords defined in `org-export-options-alist' and in 
> back-end
specific options (i.e. :options-alist).

I tried "C-h v org-export-options-alist" but the result seemed cryptic to
me:

((:title "TITLE" nil nil parse) (:date "DATE" nil nil parse) (:author
 "AUTHOR" nil user-full-name parse) (:email "EMAIL" nil
 user-mail-address t) (:language "LANGUAGE" nil
 org-export-default-language t) (:select-tags "SELECT_TAGS" nil
 org-export-select-tags split) (:exclude-tags "EXCLUDE_TAGS" nil
 org-export-exclude-tags split) (:creator "CREATOR" nil
 org-export-creator-string) (:headline-levels nil "H"
 org-export-headline-levels) (:preserve-breaks nil "\\n"
 org-export-preserve-breaks) (:section-numbers nil "num"
 org-export-with-section-numbers) (:time-stamp-file nil "timestamp"
 org-export-time-stamp-file) (:with-archived-trees nil "arch"
 org-export-with-archived-trees) (:with-author nil "author"
 org-export-with-author) (:with-broken-links nil "broken-links"
 org-export-with-broken-links) (:with-clocks nil "c"
...

> For example, in latex back-end the latter category is
>   LATEX_CLASS, LATEX_CLASS_OPTIONS, LATEX_HEADER, LATEX_HEADER_EXTRA,
>   DESCRIPTION, KEYWORDS, SUBTITLE, LATEX_COMPILER, DATE

That helps. Thanks!


[O] org table with auto-incrementing numbers in a column

2016-02-15 Thread Kaushal Modi
Hi,

I am trying to get auto-incrementing numbers in the first column in an org
table. The goal is to recalculate the numbers after adding/removing rows.

I checked out the org FAQ:
http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers

But I am still not getting it to work as I need to.

Below is the minimum working example. Paste the below in an org buffer.


| N |   |
|---+---|
|   |   |
|   |   |
|   |   |
|   |   |
#+TBLFM: $1=@-1+1::@2$1=1


Now with the point anywhere in the table, when I hit "C-c *" or M-x
org-table-recalculate, I expect the first column to be auto-populated with
numbers 1,2,3,4 (or that's how I understood from the tutorial in the FAQ
link above).

But it does not work that way. Instead I need to go to each row and hit C-c
*.

So I am definitely missing out on something that's preventing the whole
table to be recalculated in one go. Any help?

Thanks!

Org-mode version 8.3.3 (release_8.3.3-597-gcaf66e @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)


--
Kaushal Modi


Re: [O] org table with auto-incrementing numbers in a column

2016-02-16 Thread Kaushal Modi
Thanks everyone for replying!

I made one mistake before posting that question: I should have looked up
C-h f org-table-recalculate. And now I did :)
I should have done "C-u C-c * " when the point was in the table (I was
doing just C-c *, which evaluates only the current row).

>> Derek
> | N |   |
> |---+---|
> |   |   |
> |   |   |
> |   |   |
> |   |   |
> #+TBLFM: @3$1..@>$1=@-1 + 1::@2$1=1

Thanks Derek! That worked! btw I was a bit perplexed looking at your
solution because it showed "" instead of "@" :)

> One problem is that $1 also includes the first row with the "N" heading.
> that is why in your example the second and third lines both will at first
> contain 1 (at least with my org version 8.3.3), and in the second
iteration
> only show the correct series.

I just learned that doing "C-u C-u C-c C-c" or "C-u C-u C-c *" with the
point anywhere on the table, keeps re-evaluating the whole table till the
values are stable. (NOTE that these do not work when point is on the
#+TBLFM line; the point HAS to be inside the table).

So the original example also works just fine if I use C-u C-u C-c C-c

| N |   |
|---+---|
|   |   |
|   |   |
|   |   |
|   |   |
#+TBLFM: $1=@-1+1::@2$1=1

>> Dieter

Thanks! Your solution works too, with C-u C-c C-c anywhere in the table.

| N |
|---|
|   |
|   |
|   |
|   |
#+TBLFM: $1=@#-1

That said, can someone please update that FAQ at
http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers
It would be great to mention C-u C-c C-c and C-u C-u C-c C-c in that
solution too.


[O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
Hi all,

I'd like to have an EXAMPLE block in my org file whose value is set using
something like an org macro at the time of export.

So, something like:

#+MACRO TAR_FILE some_file.tar.gz

#+BEGIN_EXAMPLE
> tar xvzf {{{TAR_FILE}}}
#+END_EXAMPLE

As the above is not possible, what would be a good way to generate the
EXAMPLE block on the fly during export with the value of {{{TAR_FILE}}}
replaced based on the macro definition?

--
Kaushal Modi


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
Thanks Tom.

Your solution almost gets me there but I still need to manually update the
tar-file argument value in the #+CALL lines.

What I am looking for is for something like below to work (but it isn't). I
have multiple such #+CALL lines and I would like to not manually update the
tar-file arg in all those.
Below does not work because the {{{TAR_FILE}}} macro does not get expanded
in the #+CALL line.

#+MACRO: TAR_FILE some_file.tar.gz

#+NAME: tar-eg
#+HEADER: :var tar-file="" :exports none
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

#+CALL: tar-eg(tar-file="{{{TAR_FILE}}}") :wrap example :exports results


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
That works perfectly! Thank you!

Just to add that I had to have "#+HEADER: :exports none" as I did not want
the elisp code to be visible in the exported documents.

#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz"

#+NAME: tar-eg
#+HEADER: :exports none
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

#+CALL: tar-eg() :wrap example :exports results


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
OK, now I have just one follow up question. I would like to tangle the
result to a separate file.

So I am looking for a way to save the result "> tar xvzf bar.tar.gz" to a
separate file. I tried adding ":tangle filename" to #+CALL/#+BEGIN_SRC but
that did not help. Adding to #+CALL does not do anything. And adding
":tangle file" to #+BEGIN_SRC block exports the code (not results) to the
file as expected.


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
I finally have this working!

#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports none
:file "results.txt"

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

#+CALL: tar-eg() :wrap example :exports none

#+CAPTION: =results.txt=
#+NAME: code__results
#+INCLUDE: "results.txt" :src text

I need to export to a separate file and also embed the results in the
exported document. So above is what I came up with.


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
This is turning out to be more complicated than I anticipated ..

I need to
(1) Export the evaluated emacs-lisp block to a separate file, and
(2) also include the result in the same document

I can do that but it is a multi-step process:

(1) First I need to export the result to the file only. I cannot include it
as that file hasn't yet been created.

= org buffer =
#+AUTHOR:
#+OPTIONS: toc:nil
#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports
results :file "results.txt"

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

# #+CAPTION: =results.txt=
# #+NAME: code__results
# #+INCLUDE: "results.txt" :src text
=

So "C-c C-e t A" gives me:

= org ascii export =
[file:results.txt]
=

(2) But I do not need that file link in the export.. I need the whole
exported result embedded verbatim in the exported document too.

So I need to export the document the second time with the :exports in
#+PROPERTY set to none and the CAPTION/NAME/INCLUDE lines uncommented.

= org buffer =
#+AUTHOR:
#+OPTIONS: toc:nil
#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports none
:file "results.txt"

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

#+CAPTION: =results.txt=
#+NAME: code__results
#+INCLUDE: "results.txt" :src text
=

Then I get the desired output on doing "C-c C-e t A".

= org ascii export =
,
| > tar xzvf bar.tar.gz
`
Listing 1: `results.txt'
=

Is there a way to export results of a code block evaluation to a file and
also embed them in the exported document?


Re: [O] Generate BEGIN_EXAMPLE block dynamically during export

2016-02-16 Thread Kaushal Modi
This seems to work from my brief testing:

#+AUTHOR:
#+OPTIONS: toc:nil
#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz" :exports none

#+NAME: tar-eg
#+BEGIN_SRC emacs-lisp
  (let ((contents (format "> tar xzvf %s" tar-file)))
(with-temp-buffer
  (insert contents)
  (write-file "results.txt"))
contents)
#+END_SRC

#+CALL: tar-eg() :wrap example :exports results


Re: [O] How to load org-beautify-theme

2016-02-21 Thread Kaushal Modi
On Sun, Feb 21, 2016 at 4:25 AM, claude fuhrer  wrote:

> org-beautify-theme


I haven't tried the solution on this emacs.stackexchange QnA:
http://emacs.stackexchange.com/q/17256/115

But see if that solution works for you. It's probably as the solution says
that the author hasn't packaged org-beautify-theme to be loaded using
load-theme.

PS: Also copying the package author at the email I got from the github page.

--
Kaushal Modi


Re: [O] bug#18617: 24.3; loading simple-wiki-mode breaks org-mode

2016-02-21 Thread Kaushal Modi
I can recreate that bug.

The "first" alias is defined in the cl library. So you would need to
(require 'cl) before requiring simple-wiki.

I eval'd simple-wiki from here:
http://cvs.savannah.gnu.org/viewvc/*checkout*/http-emacs/http-emacs/simple-wiki.el

I haven't yet looked into the internals of simple-wiki.el to investigate
what's breaking the visibility cycling.
Basically TAB or S-TAB stop cycling the visibility; they seem to do nothing.


Re: [O] bug#18617: 24.3; loading simple-wiki-mode breaks org-mode

2016-02-21 Thread Kaushal Modi
A quick look at the code shows that it pollutes the namespace with
undeclared and un-let-bound variables like "tag" (and there could be more
like that).

If we investigate further, we might find a culprit like that that's causing
this problem.

(defun simple-wiki-get-tag ()
  (let (prompt)
(if (and simple-wiki-tag-history (car simple-wiki-tag-history))
(setq prompt (concat "Tag (" (car simple-wiki-tag-history) "): "))
  (setq prompt "Tag: "))
(setq tag (completing-read prompt simple-wiki-tag-list nil nil ""
   'simple-wiki-tag-history
   (car simple-wiki-tag-history
  (unless (assoc tag simple-wiki-tag-list)
(add-to-list 'simple-wiki-tag-list (cons tag nil)))
  tag)


[O] make test is failing? [ob-fortran stuff]

2016-02-22 Thread Kaushal Modi
Hi all,

I cloned a fresh copy of org-mode and ran "make test" for the first time.

The following are failing:

3 unexpected results:
   FAILED  ob-fortran/list-matrix-from-table1
   FAILED  ob-fortran/list-matrix-from-table2
   FAILED  ob-fortran/list-var-from-table

Is it known? Or it's failing just for me?

I am running Emacs version: GNU Emacs 25.0.91.1 (x86_64-unknown-linux-gnu,
GTK+ Version 2.24.23) of 2016-02-21, built using commit
e19c1c301700430ae428f40c2a364671f5d50dcf.


--
Kaushal Modi


[O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-09 Thread Kaushal Modi
Hi all,

Can someone please review and commit this patch.

It basically prints the "C-c '" binding correctly in the echo area, using
straight quote instead of curly quote (matters in emacs 25.x). The details
are in the commit log below.


>From f4411b59d8dc4e5b3df79ccbcd87f6bfe5160776 Mon Sep 17 00:00:00 2001
From: Kaushal Modi 
Date: Wed, 9 Mar 2016 01:18:58 -0500
Subject: [PATCH] Fix the single quote printed in the message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix the quote style when in the "C-c '" key-binding that is printed in the
echo via the substitute-command-keys function. In emacs 25.x, a straight
quote is rendered as a right-curly quote by default.

So below will render that single quote as curly.

(message "C-c '")

The fix is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Below is how this commit changes the message echoed in the
org-table-edit-formulas function.

Earlier:
  Edit formulas, finish with ‘C-c C-c’ or ‘C-c ’’.  See menu for more
commands.

After fix:
  Edit formulas, finish with ‘C-c C-c’ or ‘C-c '’.  See menu for more
commands.

Note the difference in the single quote style in "C-c '".
---
 lisp/org-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 488c912..0a25772 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3591,7 +3591,7 @@ Parameters get priority."
   (when (eq org-table-use-standard-references t)
  (org-table-fedit-toggle-ref-type))
   (org-goto-line startline)
-  (message
+  (message "%s"
 (substitute-command-keys "\\\
 Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
`\\[org-edit-special]'.  \
 See menu for more commands.")



--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
>
> Shouldn't this be handled by `substitute-command-keys' already? The fix
> looks like a hack.


I don't think this has anything to do with substitute-command-keys. That
function simply returns a string.

So the below 2 forms display the exact same thing: "C-c ’" (note the curved
right quote) by default in emacs 25.0.92:

(with-temp-buffer
  (org-mode)
  (message (substitute-command-keys "\\[org-edit-special]")))

(message "C-c '")

So the way to get the straight quotes printed as they are without getting
converted to curved quotes is by using

(message "%s" STRING)

Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html
@Paul: Please correct me if that's wrong.

Now both of the below forms echo "C-c '" (with straight quote):

(with-temp-buffer
  (org-mode)
  (message "%s" (substitute-command-keys "\\[org-edit-special]")))

(message "%s" "C-c '")


Shouldn't ` and ' also be dropped around \\[command]?


It looks like this convention is used at many other places in org (and many
mores places in emacs elisp source):

org-gnus.el:287:  "Like `\\[gnus]' but doesn't check for new news."
org-id.el:105:  a link to it, using `\\[org-insert-link]' first.
org-footnote.el:536: "Edit definition and go back with
`\\[org-mark-ring-goto]' or, if \
org-footnote.el:537:unique, with `\\[org-ctrl-c-ctrl-c]'.")))
org-footnote.el:903: "\\`\\[fn:\\(.*?\\)\\]" new stored nil nil 1)))
org-lint.el:450:  (and h (org-string-match-p "\\`\\[.*\\]\\'" h)))
org-colview.el:524:  (if (string-match "\\`\\[[ xX-]\\]\\'"
org-src.el:737:   (progn (string-match (if inline "\\`\\[fn:.*?:"
"\\`.*?\\]") c)
ox-beamer.el:210:  ((string-match "\\`\\[<.*>\\]\\'" argument) argument)
ox-beamer.el:213:  ((string-match "\\`\\[\\(.*\\)\\]\\'" argument)
ox-beamer.el:216:  (option (if (string-match "\\`\\[.*\\]\\'" argument)
argument
ox-beamer.el:426:   ((string-match "\\`\\[.*\\]\\'" action )
ox-beamer.el:567: ((string-match "\\`\\[.*\\]\\'" action)
ox-beamer.el:613: (if (string-match "\\`\\[.*\\]\\'" overlay) 'defaction
org-clock.el:104:`\\[org-clock-out]', or until the clock is started in a
different item.
ox-latex.el:2274:(if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
org-table.el:3596:Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
`\\[org-edit-special]'.  \
org-agenda.el:1302:`\\[universal-argument] \\[org-agenda-log-mode]' in
org-agenda.el:1989:\\`\\[org-agenda-filter-by-tag]
RET'.
org-agenda.el:4697:Press `\\[org-agenda-manipulate-query-add]', \
org-agenda.el:4698:`\\[org-agenda-manipulate-query-subtract]' to add/sub
word, \
org-agenda.el:4699:`\\[org-agenda-manipulate-query-add-re]', \
org-agenda.el:4700:`\\[org-agenda-manipulate-query-subtract-re]' to add/sub
regexp, \
org-agenda.el:4701:`\\[universal-argument] \\[org-agenda-redo]' to edit\n"))
org-agenda.el:4897:   "Press `\\[universal-argument] \\[org-agenda-redo]' \
org-agenda.el:7320:So this is just a shortcut for
\\`\\[org-agenda]', available
org.el:868:`\\[org-todo]' and `\\[org-priority]' \
org.el:870:`\\[universal-argument] \\[universal-argument] \\[org-todo]' \
org.el:872:`\\[org-ctrl-c-minus]' to cycle item bullet types,
org.el:1670:When nil, `\\[org-ctrl-c-ctrl-c]' needs to be used \
org.el:1673:`\\[org-toggle-latex-fragment]' to be removed."
org.el:2431:`\\[universal-argument] \\[universal-argument]
\\[universal-argument] \
org.el:2614:with a prefix argument,  i.e. `\\[universal-argument]
\\[org-todo]' \
org.el:2616:`\\[universal-argument] t' in an agenda buffer.
org.el:3093:`\\[org-time-stamp]' or `\\[org-time-stamp-inactive],
org.el:3823:commands `org-search-view' (`\\[org-agenda] s') \

As this was a cosmetic thing, I decided to keep that unchanged. Personally
I also prefer to not have any quotes around the key-bindings. The patch I
submitted merely makes the displayed key-binding less confusing; we have a
straight-quote key on the keyboard, not a curved quote key :)


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
Good point.

I will submit a new patch later today.

On Thursday, March 10, 2016, Kyle Meyer  wrote:

> Kaushal Modi > writes:
>
> [...]
>
> > -  (message
> > +  (message "%s"
> >  (substitute-command-keys "\\\
> >  Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
> > `\\[org-edit-special]'.  \
> >  See menu for more commands.")
>
> There are a few other places in Org that call
> "(message (substitute-command-keys ...))".  I'd prefer this patch to
> take of them all in one go.
>
> --
> Kyle
>


-- 

--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
I am unable to figure out how to escape the ` and ' in the help-echo text
property.

I tried the below:

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 0a25772..749baca 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -794,10 +794,10 @@ When nil, simply write \"#ERROR\" in corrupted
fields.")
  (when (> (org-string-width x) fmax)
(org-add-props x nil
  'help-echo
- (concat
+ (format "%s\n%s"
   (substitute-command-keys
"Clipped table field, use \\[org-table-edit-field]
to \
-edit.  Full value is:\n")
+edit.  Full value is:")
   (substring-no-properties x)))
(let ((l (length x))
  (f1 (min fmax


But that did not help.

Here is a test snippet to show the problem:

(let* ((str1 "\nHi1")
   (str2 "\nHi2")
   (echo-str1 "`without format'")
   (echo-str2 (format "%s" "`with format'"))
   ov)
  (let* ((b (+ 1 (point)))
 (e (+ b (string-width str1
(insert str1)
(setq ov (make-overlay b e)))
  (overlay-put ov 'help-echo echo-str1)
  (let* ((b (+ 1 (point)))
 (e (+ b (string-width str2
(insert str2)
(setq ov (make-overlay b e)))
  (overlay-put ov 'help-echo echo-str2))

How can I make the help-echo property display the ` and ' verbatim, without
curving them?


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
Here's the updated patch (MINUS the help-echo fix):

>From 238ccdfc8bbdeb53196392a4dff96478a19cb5a5 Mon Sep 17 00:00:00 2001
From: Kaushal Modi 
Date: Wed, 9 Mar 2016 01:18:58 -0500
Subject: [PATCH] Fix the single quote printed in the message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Display quotes in key-bindings as straight quotes

* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Straight quote fix

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

Starting from emacs 25.1, a straight quote is rendered as a right-curly
quote by default.

So below will render that single quote as curly.

(message "C-c '")

The fix is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Below is how this commit changes the message echoed in the
org-table-edit-formulas function.

Earlier:

  Edit formulas, finish with ‘C-c C-c’ or ‘C-c ’’.  See menu for more
commands.

After fix:

  Edit formulas, finish with ‘C-c C-c’ or ‘C-c '’.  See menu for more
commands.

Note the difference in the single quote style in "C-c '".
---
 lisp/org-agenda.el   |  5 +++--
 lisp/org-footnote.el |  7 +++
 lisp/org-protocol.el |  2 +-
 lisp/org-table.el| 11 +--
 4 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 876ea44..cd69c74 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -10107,8 +10107,9 @@ tag and (if present) the flagging note."
  (replace-match "\n" t t))
   (goto-char (point-min))
   (select-window win)
-  (message (substitute-command-keys "Flagging note pushed to kill
ring.  \
-Press \\[org-agenda-show-the-flagging-note] again to remove tag and
note")
+  (message "%s" (substitute-command-keys "Flagging note pushed to \
+kill ring.  Press \\[org-agenda-show-the-flagging-note] again to remove \
+tag and note")

 (defun org-agenda-remove-flag (marker)
   "Remove the FLAGGED tag and any flagging note in the entry."
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index e80685a..a847326 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -531,10 +531,9 @@ value if point was successfully moved."
 (goto-char (match-end 0))
 (org-show-context 'link-search)
 (when (derived-mode-p 'org-mode)
-  (message
-   (substitute-command-keys
- "Edit definition and go back with `\\[org-mark-ring-goto]' or, if \
-unique, with `\\[org-ctrl-c-ctrl-c]'.")))
+  (message "%s" (substitute-command-keys
+ "Edit definition and go back with \
+`\\[org-mark-ring-goto]' or, if unique, with `\\[org-ctrl-c-ctrl-c]'.")))
 t))

 (defun org-footnote-goto-previous-reference (label)
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index a249c9e..6510733 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -669,7 +669,7 @@ delegates most of the work to `org-protocol-create'."
   (require 'org-publish)
   (let ((all (or (org-publish-get-project-from-filename
buffer-file-name
 (if all (org-protocol-create (cdr all))
-  (message "Not in an org-project.  Did mean %s?"
+  (message "Not in an org-project.  Did you mean `%s'?"
(substitute-command-keys"\\[org-protocol-create]")

 (defun org-protocol-create (&optional project-plist)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 488c912..0b7d413 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2136,11 +2136,10 @@ If NLAST is a number, only the NLAST fields will
actually be summed."
s diff)
  (format "%.0f:%02.0f:%02.0f" h m s
  (kill-new sres)
- (if (org-called-interactively-p 'interactive)
-(message "%s"
- (substitute-command-keys
-  (format "Sum of %d items: %-20s (\\[yank] will insert result
into buffer)"
-  (length numbers) sres
+ (when (org-called-interactively-p 'interactive)
+(message "%s" (substitute-command-keys
+   (format "Sum of %d items: %-20s \
+(\\[yank] will insert result into buffer)" (length numbers) sres
  sres

 (defun org-table-get-number-for-summing (s)
@@ -3591,7 +3590,7 @@ Parameters get priority."
   (when (eq org-table-use-standard-references t)
  (org-table-fedit-toggle-ref-type))
   (org-goto-line startline)
-  (message
+  (message "%s"
(substitute-command-keys "\\\
 Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
`\\[org-edit-special]'.  \
 See menu for more commands.")
-- 
2.6.0.rc0.24.gec371ff


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
On Thu, Mar 10, 2016 at 8:39 PM, Paul Eggert  wrote:

> Help strings are considered documentation, so you need to escape special
> characters in help-echo property strings the same way you'd escape them in
> doc strings. Something like this:
>
> (let* ((str1 "\nhello")
>(echo-str1 "left single quote (`) right single quote (') grave
> accent (\\=`) apostrophe (\\=') kill-region (\\[kill-region])")
>ov)
>   (let* ((b (+ 1 (point)))
>  (e (+ b (string-width str1
> (insert str1)
> (setq ov (make-overlay b e)))
>   (overlay-put ov 'help-echo echo-str1))
>

Thanks Paul. That was very educational. So it turns out that we do not need
substitute-command-keys at all for help-echo text.

Below is now the latest patch = previous patch + help-echo straight quote
fix.

>From a897b6e37708cd836ea9576b43006075af80e062 Mon Sep 17 00:00:00 2001
From: Kaushal Modi 
Date: Thu, 10 Mar 2016 22:12:44 -0500
Subject: [PATCH] Display quotes in key-bindings as straight quotes

* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas):
(org-table-align): Straight quote fix

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting

http://thread.gmane.org/gmane.emacs.orgmode/105594

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

Starting from emacs 25.1, a straight quote is rendered as a right-curly
quote by default.

So below will render that single quote as curly.

(message "C-c '")

The fix is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Also an help-echo text property value was fixed in org-table-align.
substitute-command-keys should not be used in that. Instead \\[COMMAND]
should be used directly in the string.
---
 lisp/org-agenda.el   |  5 +++--
 lisp/org-footnote.el |  7 +++
 lisp/org-protocol.el |  2 +-
 lisp/org-table.el| 17 +++--
 4 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 876ea44..cd69c74 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -10107,8 +10107,9 @@ tag and (if present) the flagging note."
  (replace-match "\n" t t))
   (goto-char (point-min))
   (select-window win)
-  (message (substitute-command-keys "Flagging note pushed to kill
ring.  \
-Press \\[org-agenda-show-the-flagging-note] again to remove tag and
note")
+  (message "%s" (substitute-command-keys "Flagging note pushed to \
+kill ring.  Press \\[org-agenda-show-the-flagging-note] again to remove \
+tag and note")

 (defun org-agenda-remove-flag (marker)
   "Remove the FLAGGED tag and any flagging note in the entry."
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index e80685a..a847326 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -531,10 +531,9 @@ value if point was successfully moved."
 (goto-char (match-end 0))
 (org-show-context 'link-search)
 (when (derived-mode-p 'org-mode)
-  (message
-   (substitute-command-keys
- "Edit definition and go back with `\\[org-mark-ring-goto]' or, if \
-unique, with `\\[org-ctrl-c-ctrl-c]'.")))
+  (message "%s" (substitute-command-keys
+ "Edit definition and go back with \
+`\\[org-mark-ring-goto]' or, if unique, with `\\[org-ctrl-c-ctrl-c]'.")))
 t))

 (defun org-footnote-goto-previous-reference (label)
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index a249c9e..6510733 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -669,7 +669,7 @@ delegates most of the work to `org-protocol-create'."
   (require 'org-publish)
   (let ((all (or (org-publish-get-project-from-filename
buffer-file-name
 (if all (org-protocol-create (cdr all))
-  (message "Not in an org-project.  Did mean %s?"
+  (message "Not in an org-project.  Did you mean `%s'?"
(substitute-command-keys"\\[org-protocol-create]")

 (defun org-protocol-create (&optional project-plist)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 488c912..df81944 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -795,9 +795,8 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
(org-add-props x nil
  'help-echo
  (concat
-  (substitute-command-keys
-   "Clipped table field, use \\[org-table-edit-field]
to \
-edit.  Full value is:\n")
+ "Clipped table field, use \\[org-table-edit-field] 

Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
I'll try to provide a working patch tomorrow. Yes, my FSF copyright
assignment is on file.

About the periods after commit descriptions, I will ensure that all
sentences other than the summary line end with a period.

About the patch not merging, I am surprised why that happened because I
first rebased to
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e69e18dd71bdf0c9bae9546bf026a1123b9a8c53
and then created the patch. I redo the steps using git send-email tomorrow
and understand the difference.

About the org-contribute page, it is pointing to a different version of
emacs CONTRIBUTE, different from the one on emacs-25 branch (
http://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE ). Can you
please review that?

Thanks.

--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kaushal Modi
Patch (after rebasing to 5a735b0) attached. I hope it works.

Git newbie question:

Making the changes in the maint version of these 4 files manually was a bit
of a pain. What's the right way of porting changes from one branch to
another? I am curious how the changes will be ported from the maint branch
to the master branch. What git command should I be looking at to do this in
future? (because I always use the master branch and if I need to submit a
patch in future, I would need to switch to maint branch and port changes
from my master.

Thanks.

--
Kaushal Modi

On Fri, Mar 11, 2016 at 12:12 AM, Kyle Meyer  wrote:

> Kaushal Modi  writes:
>
> > About the patch not merging, I am surprised why that happened because I
> > first rebased to
> >
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e69e18dd71bdf0c9bae9546bf026a1123b9a8c53
> > and then created the patch. I redo the steps using git send-email
> tomorrow
> > and understand the difference.
>
> Please make the patch against the maint branch (currently 5a735b0b8)
> rather than master.  Also, you don't need to bother configuring git
> send-email; an attachment with the output of git format-patch is OK too.
>
> > About the org-contribute page, it is pointing to a different version of
> > emacs CONTRIBUTE, different from the one on emacs-25 branch (
> > http://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE ). Can you
> > please review that?
>
> Thanks for pointing that out.  I'll update the link.
>
> --
> Kyle
>


0001-Display-quotes-in-key-bindings-as-straight-quotes.patch
Description: Binary data


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kaushal Modi
Thanks.

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


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
>


Re: [O] Problems with M- on Emacs 25.

2016-04-17 Thread Kaushal Modi
Hi Ian,

> On my computer running 24.5.1 M works as expected. However, on emacs
25.1.50.1 I get ...

First of all, it is important to know in which major mode you are trying to
use the M-/ bindings. They are undefined by defined and are
defined in org-mode-map.

It is also important to know in which minor/major mode maps you are binding
those in your config. I would guess that the problem you see does not occur
in an emacs -Q session?

It's also important to know that a key can be bound to different command in
different minor/major mode maps and in global maps.

Here's the priority:

1. Minor mode map (last enabled minor mode)
2. Major mode map (e.g. org-mode-map)
3. Global map

So even if M- is bound to org-metaup in org-mode-map, if foo-mode-map
(some minor mode map) as that key bound to a function 'bar' and if foo-mode
is enabled in an org-mode buffer, M- will now call 'bar' instead of
'org-metaup'. So it is important to understand the consequences when making
new bindings to minor mode maps (or understand the maps of the minor modes
you enable).

> but emacs thinks that M- is bound to scroll other window.

Emacs does not bind M- by default to anything. So my guess is that
somewhere in your config, you are binding that key to scroll other window.
(I myself have been guilty of stepping over org-mode-map bindings in the
past. Now I have learnt when to bind keys in global-map vs my own minor
mode map which I use when I want my bindings to override everything else).

-- 

-- 
Kaushal Modi


[O] How to hide a table column from exporting

2016-04-22 Thread Kaushal Modi
Hi,

I was trying to prevent an org table column from exporting to html. So I
started looking for a solution and found this:
http://stackoverflow.com/q/6641379/1219634

I have never used Radio Tables, and that too in org-mode itself (because it
looks like Radio Tables are designed to insert org-mode processed tables in
other major modes).

So I tried doing the below, and I cannot figure out how to insert the Radio
Table in that "Final Table" heading.

What I need to achieve:
- Not export the source table
- Generate the radio table at export time (even better if the radio table
updates each time I do C-u C-c C-c on the source table).

* Final Table
# BEGIN RECEIVE ORGTBL output-table
# END RECEIVE ORGTBL output-table

* Source Table
:noexport:
#+ORGTBL: SEND output-table orgtbl-to-html :skipcols (3)
|---+-+--|
| 2 | 1/2 | junk |
| 4 | 1/4 | junk |
| 8 | 1/2 | junk |
|---+-+--|

Org-mode version 8.3.4 (release_8.3.4-748-g7e320e @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Thanks.

Kaushal
-- 

-- 
Kaushal Modi


[O] Bug in vsum in org-mode table?

2016-04-22 Thread Kaushal Modi
Hi,

The vsum is putting a sum as "2." instead of "2.0". Here is a simple
example:

|---|
| Title |
|---|
| 0.5 |
| 1.5 |
|---|
| 2. |
|---|
#+TBLFM: @>$1=vsum(@2..@>>)

Org-mode version 8.3.4 (release_8.3.4-748-g7e320e @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Is anyone else able to recreate this?

Thanks.

Kaushal
-- 

-- 
Kaushal Modi


Re: [O] Bug in vsum in org-mode table?

2016-04-22 Thread Kaushal Modi
Thank you guys. Both of the below worked.

#+TBLFM: @>$1=vsum(@2..@>>);f1

#+TBLFM: @>$1=vsum(@2..@>>);%0.1f

On Fri, Apr 22, 2016 at 4:11 PM Charles Millar  wrote:

>
> On 04/22/2016 03:34 PM, Thierry Banel wrote:
>
> You can format the result as *2.0* with the *f1* modifier
> (or *f5* to get *2.0* and so on)
>
> #+TBLFM: @>$1=vsum(@2..@>>)*;f1*
>
> In the manual the decimal format %.2f, etc. is shown as an example but
> apparently the f2 format is not mentioned.
>
> Is the %.Xf format preferred or is either one OK?
>
> Regards,
>
> Charlie Millar
>
-- 

-- 
Kaushal Modi


[O] bug#23365: 25.0.93; org-mode fails on export with include

2016-04-26 Thread Kaushal Modi
This has been fixed in the org-mode git:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=44c8cd7136e3fcd1e6bfa08895cac437b7a691fa

@Stefan: I am copying you on this as the above commit that fixes this in
org-mode git was related to a backport commit from emacs git:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=ef9637030456b153fd834f4c9202a9264d5ef18d

So probably the same 44c8cd fix has to be applied to the org.el in
emacs-25/master branches too?
-- 

-- 
Kaushal Modi


Re: [O] Bug: Inconsistency with C-S-a and C-S-e [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15/share/emacs/24.5/lisp/org/)]

2016-04-28 Thread Kaushal Modi
Here's the thread and comment for context (the reddit markdown formatting
of crossed-out text is lost in the above plain text):
https://www.reddit.com/r/emacs/comments/4gcjep/cant_movebeginningofline_while_marking_region_in/d2hyxt6

On Thu, Apr 28, 2016 at 3:50 PM Mathieu Marques 
wrote:

> 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-mode mailing list.
> 
>
> In other modes, C-S-a and C-S-e behave as expected that is, move cursor
> to the beginning/end of line while marking region. In other words, it
> does what C-SPC C-a and C-SPC C-e would do.
>
> However in org-mode, C-a and C-e are bound to org-beginning-of-line and
> org-end-of-line respectively.
> In org-mode, C-S-e works as expected. But C-S-a does not.
>
> I have had these details over a discussion about my issue on /r/emacs:
>
> The interactive arg for both org-beginning-of-line and
> org-end-of-line is "P". So it carries over the raw arguments
> received by the command. So ^ is not needed. The reason C-S-e still
> works as expected is because of (call-interactively 'end-of-line) in
> org-end-of-line, and so the raw args are passed to end-of-line
> without any modification.
>
> ~~Whereas we do not have (call-interactively 'beginning-of-line) in
> org-beginning-of-line~~.
> *Well, we do have (call-interactively 'move-beginning-of-line)*.
> Instead we have goto-char calls to place the point before/after the
> stars.
>
> Let me know if I can be of further help.
>
>
> Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin15.2.0, Carbon Version 157
> AppKit 1404.34)
>  of 2015-12-28 on sandman.local
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.15/share/emacs/24.5/lisp/org/)
>
> current state:
> ==
> (setq
>  org-tab-first-hook '(org-hide-block-toggle-maybe
> org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
>   org-babel-header-arg-expand)
>  org-speed-command-hook '(org-speed-command-default-hook
> org-babel-speed-command-hook)
>  org-occur-hook '(org-first-headline-recenter)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-src-window-setup 'current-window
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-startup-folded nil
>  org-support-shift-select 'always
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  org-from-is-user-regexp "\\"
>  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 '(er/add-org-mode-expansions whitespace-turn-on
> turn-on-auto-fill yas-minor-mode
>  #[nil "\300\301\302\303\304$\207" [org-add-hook
> change-major-mode-hook org-show-block-all append local] 5]
>  #[nil "\300\301\302\303\304$\207" [org-add-hook
> change-major-mode-hook org-babel-show-result-all append local] 5]
>  org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
> org-babel-execute-safely-maybe)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
> org-cycle-hide-inline-tasks org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-edit-src-content-indentation 0
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-startup-truncated nil
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-src-fontify-natively t
>  )
>
> --

-- 
Kaushal Modi


  1   2   3   4   5   6   7   8   9   >