Re: [O] function to select text of in a cell of a table

2016-12-30 Thread Kaushal Modi
Check out this earlier thread:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-05/msg00240.html

You probably just need the org-table-mark-field definition from that.

On Sat, Dec 31, 2016, 8:28 AM Charles C. Berry  wrote:

> On Fri, 30 Dec 2016, dmg wrote:
>
> > hi everybody,
> >
> > has anybody written a function to select the text in a cell of a table?
>
> If you mean like what ob-ref.el uses to support babel references, yes.
>
> Also see org-table.el.
>
> If you just want support for working with Babel src blocks, see
>
> (info "(org) var")
>
> HTH,
>
> Chuck
>
> --

Kaushal Modi


Re: [O] function to select text of in a cell of a table

2016-12-30 Thread Charles C. Berry

On Fri, 30 Dec 2016, dmg wrote:


hi everybody,

has anybody written a function to select the text in a cell of a table?


If you mean like what ob-ref.el uses to support babel references, yes.

Also see org-table.el.

If you just want support for working with Babel src blocks, see

(info "(org) var")

HTH,

Chuck



[O] function to select text of in a cell of a table

2016-12-30 Thread dmg
hi everybody,

has anybody written a function to select the text in a cell of a table?

I needed to write a macro/command, but could not find one. Ideally it
should trim the whitespace in the ends.

Otherwise, I'll just write one.

thank you,

--daniel

-- 
--dmg

---
Daniel M. German
http://turingmachine.org


Re: [O] org mode latex export excude title

2016-12-30 Thread Charles C. Berry

On Fri, 30 Dec 2016, Ken Mankoff wrote:


(setq-local org-latex-title-command "")

Can be set as a buffer local variable.



True, but not relevant to the OPs query:


Is there any way to excude the empty `\title{}` command?


And if you browse thru org-latex-template, you will see that

 "\\title{%s%s}\n"

is hard coded.  The value of org-latex-title-command has no effect on that 
part of the template.


So, the OP can either use a filter as I suggested or write a derived 
backend supplying a different template transcoder that drops the string 
quoted above.


Chuck



Re: [O] Getting "Chapter" before a heading number

2016-12-30 Thread Peter Davis
Peter Davis  writes:

> I'm preparing a proposed table of contents for a book, and I'd like the HTML 
> output to appear like:
>
> Chapter 1 Blah
>   1.1 blah
>   1.2 blah blah
>   1.3 blah blah blah
>
> Chapter 2 Blah Blah
>   2.1 blah
>   2.2 blah blah
>
> etc.
>
> Is there a way to get HTML output to do this? I'd like the "*" at the start 
> of a line to denote a new chapter, and nested headings
> to go inside. I haven't been able to find anything like this.

It occurred to me that another way to get this effect might be with numbered 
lists:

#+BEGIN_SRC org
 * Chapter 1 Blah
   1. blah
   2. blah blah
   3. blah blah blah
 * Chapter 2 Blah Blah
   1. blah
   2. blah blah
#+END_SRC

and so on. Is there any way to get numbered lists to use a "." notation, where 
the path to each list item is indicated by
.-separated numbers?

 1
 1.1
 1.2
 1.2.1
 ...


Thanks, and Happy New Year!

-pd



Re: [O] org mode latex export excude title

2016-12-30 Thread Ken Mankoff
(setq-local org-latex-title-command "")

Can be set as a buffer local variable.

  -k.

On Fri, Dec 30, 2016 at 12:26 PM, Charles C. Berry  wrote:

> On Fri, 30 Dec 2016, Fanpeng Kong wrote:
>
> I am trying to use org mode to write a paper. The latex template of the
>> journal restricts the location of `\title{}` command to be after the
>> `\begin{document}`. While by leaving `#+TITLE:` empty and specify
>> `#+OPTIONS: title:nil` in my org file, I can remove the `\maketitle`
>> command in the
>> latex export. However, and empty title `\title{}` is still exported
>> prior to the `\begin{document}`. And it causes problem for the template
>> I am using.
>>
>> Following is an minimal example of the org mode latex export. Is there
>> any way to excude the empty `\title{}` command?
>>
>
> [example deleted]
>
> Any suggestion will be appreciated. And of course, Happy New Year!
>>
>
> Use a filter to comment it out:
>
>
>
> #+OPTIONS: title:nil toc:nil
> #+BIND: org-export-filter-final-output-functions (comment-out-title-line)
>
> #+BEGIN_SRC emacs-lisp :exports results :results none
>   (defun comment-out-title-line (doc &optional bk info)
> (replace-regexp-in-string "title" "%% \\title" doc nil t ))
>   (setq-local org-export-allow-bind-keywords t)
> #+END_SRC
>
>
>
> * section 1
>
> ...
>
> HTH,
>
> Chuck
>
>


Re: [O] Ignore pattern when syncing Org-mode files between hosts

2016-12-30 Thread Karl Voit
* Thierry Banel  wrote:
> Le 28/12/2016 16:42, Karl Voit a écrit :
>> Hi!
>>
>> I wonder how others are handling synchronization ignore patterns
>> between different hosts.
>>
>> ...
>>
>> Currently, I am evaluating Syncthing[0] which looks very good so
>> far. It is a game-changer to be because similar to Dropbox[1], it
>> synchronizes in background on any change within 60s (by default).
>> Thus, resulting in symlinks and tempfiles transferred as well.
>
> Syncthing supports ignore patterns.

I know.

This was not the reason for my posting ;-)

I want to know what files YOU are ignoring considering the thoughts
I mentioned in my original posting.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] org mode latex export excude title

2016-12-30 Thread Charles C. Berry

On Fri, 30 Dec 2016, Fanpeng Kong wrote:


I am trying to use org mode to write a paper. The latex template of the
journal restricts the location of `\title{}` command to be after the
`\begin{document}`. While by leaving `#+TITLE:` empty and specify
`#+OPTIONS: title:nil` in my org file, I can remove the `\maketitle` command in 
the
latex export. However, and empty title `\title{}` is still exported
prior to the `\begin{document}`. And it causes problem for the template
I am using.

Following is an minimal example of the org mode latex export. Is there
any way to excude the empty `\title{}` command?


[example deleted]


Any suggestion will be appreciated. And of course, Happy New Year!


Use a filter to comment it out:



#+OPTIONS: title:nil toc:nil
#+BIND: org-export-filter-final-output-functions (comment-out-title-line)

#+BEGIN_SRC emacs-lisp :exports results :results none
  (defun comment-out-title-line (doc &optional bk info)
(replace-regexp-in-string "title" "%% \\title" doc nil t ))
  (setq-local org-export-allow-bind-keywords t)
#+END_SRC



* section 1

...

HTH,

Chuck



Re: [O] mark as done on a previous date?

2016-12-30 Thread Stig Brautaset

Marco Wahl  writes:

> Hi!
>
>> I'm trying to use org-habit to track my habits and sometimes I don't
>> get around to mark stuff as done on the day I do them. I've found two
>> different functions for marking stuff as done in the past, but I can't
>> get either of them to work.
>> [...]

[...]

Interesting. I couldn't get yours to work as I expected either, and
decided to try =org-todo-yesterday=, and couldn't get _that_ to work as
I expected either, which I thought was strange so I dug a bit deeper. I
tested with =emacs -q foo.org= and added the following entry (I did this
on the 30th of December):

,
| * TODO Testing 123
|   SCHEDULED: <2016-12-27 Tue .+1m>
|   :PROPERTIES:
|   :STYLE:habit
|   :END:
`

After using =org-todo-yesterday= I ended up with:

,
| * TODO Testing 123
|   SCHEDULED: <2017-01-29 Sun .+1m>
|   - State "DONE"   from "TODO"   [2016-12-30 Fri 16:29]
|   :PROPERTIES:
|   :STYLE:habit
|   :LAST_REPEAT: [2016-12-30 Fri 16:29]
|   :END:
`

I now see (finally!) that the *re-scheduling* works as I would expect,
but the LAST_REPEAT and state change logging still uses the actual time.
I would have expected both those to use the 29th rather than the 30th as
well. Perhaps this is just my expectation that needs adjusting, but this
breaks org-habit's graphing of my consistency. Perhaps I just have to
get in the habit of ticking stuff off on the day I do them... :-)

Stig



Re: [O] plantuml export (unable to resolve link: nil)

2016-12-30 Thread Prabhakaran Kasinathan
Hi everyone,

@thanks to Thibault Marin.

I fixed the problem, try the following:

* TEST figure

Figure [[fig-plantuml]].

#+BEGIN_SRC plantuml :file test.png :exports results
A -> B : request
B -> A : response
#+END_SRC
#+NAME: fig-plantuml
#+CAPTION: Plantuml Test Figure
#+RESULTS:
[[file:test.png]]

running "M-x org-lint" , shows no error on the above org content.


Thanks for your help.

Best Regards,
Prabhakaran Kasinathan

On Fri, Dec 30, 2016 at 4:31 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Prabhakaran Kasinathan  writes:
>
> > PlantUML src when exported to latex, has problems with link reference.
> >
> > export in latex : C-x C-e l  l
> > Error: Unable to resolve link: nil
> > Fix: #+OPTION: broken-links:mark
> >
> >
> > Everything works very well with org 8.2.3. How to fix this problem in new
> > versions of ORG?
> >
> > *Org src:*
> >
> > #+OPTION: broken-links:mark
> >
> > * TEST Figure Figure [[fig:plantuml]].
> >
> > #+BEGIN_SRC plantuml :file test.png
> > A -> B : request
> > B -> A : response
> > #+END_SRC
> >
> > #+NAME: fig:plantuml
> > #+CAPTION: Plantuml Test Figure
> >
> > #+RESULTS:
>
> You should try "M-x org-lint" on this document. Basically, you are using
> affiliated keywords (name, caption, results) that apply to nothing.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] plantuml export (unable to resolve link: nil)

2016-12-30 Thread Nicolas Goaziou
Hello,

Prabhakaran Kasinathan  writes:

> PlantUML src when exported to latex, has problems with link reference.
>
> export in latex : C-x C-e l  l
> Error: Unable to resolve link: nil
> Fix: #+OPTION: broken-links:mark
>
>
> Everything works very well with org 8.2.3. How to fix this problem in new
> versions of ORG?
>
> *Org src:*
>
> #+OPTION: broken-links:mark
>
> * TEST Figure Figure [[fig:plantuml]].
>
> #+BEGIN_SRC plantuml :file test.png
> A -> B : request
> B -> A : response
> #+END_SRC
>
> #+NAME: fig:plantuml
> #+CAPTION: Plantuml Test Figure
>
> #+RESULTS:

You should try "M-x org-lint" on this document. Basically, you are using
affiliated keywords (name, caption, results) that apply to nothing.

Regards,

-- 
Nicolas Goaziou



Re: [O] plantuml export (unable to resolve link: nil)

2016-12-30 Thread Thibault Marin
Prabhakaran Kasinathan  writes:

> PlantUML src when exported to latex, has problems with link reference. 
>
> export in latex : C-x C-e l l 
> Error: Unable to resolve link: nil
> 
> Fix: #+OPTION: broken-links:mark
>
> Everything works very well with org 8.2.3. How to fix this problem in new
> versions of ORG?
>
> Org src:
>
> #+OPTION: broken-links:mark
>
> * TEST Figure
> Figure [[fig:plantuml]]. 
>
> #+BEGIN_SRC plantuml :file test.png
> A -> B : request
> B -> A : response
> #+END_SRC 
>
> #+NAME: fig:plantuml
> #+CAPTION: Plantuml Test Figure
> #+RESULTS:
>
> Output in ORG v 8.2.3
>
> 
> 
> Latex output:
> 
> 
> 
> 
> #+BEGIN_SRC latex
> 
> 
> \section{TEST figure}
> 
> 
> \label{sec-1}
> 
> 
> 
> 
> 
> 
> Figure \ref{fig:plantuml}. 
> 
> 
> 
> 
> 
> 
> \begin{figure}[htb]
> 
> 
> \centering
> 
> 
> \includegraphics{test.png}
> 
> 
> \caption{\label{fig:plantuml}Plantuml Test Figure}
> 
> 
> \end{figure}
> 
> 
> \end{document}
> 
> 
> #+END_SRC 
>
> Output in ORG 9.0.3
>
> 
> 
> Latex output:
> 
> 
> 
> #+BEGIN_SRC latex
> 
> \section{TEST figure}
> 
> \label{sec:org3dff397}
> 
> 
> 
> 
> Figure [BROKEN LINK: nil]. 
> 
> 
> 
> 
> \begin{center}
> 
> \includegraphics{test.png}
> 
> \end{center}
> 
> #+END_SRC 
> 
> 
> Thanks in advance. 

It works (for me) if I execute the source block before exporting, which
inserts a [[file:]] line (I also find it useful to name the source block
and the #+RESULTS line).  The information in (info "(org) Exporting code
blocks") may be of some help.

thibault



[O] plantuml export (unable to resolve link: nil)

2016-12-30 Thread Prabhakaran Kasinathan
PlantUML src when exported to latex, has problems with link reference.

export in latex : C-x C-e l  l
Error: Unable to resolve link: nil
Fix: #+OPTION: broken-links:mark


Everything works very well with org 8.2.3. How to fix this problem in new
versions of ORG?

*Org src:*

#+OPTION: broken-links:mark

* TEST Figure
Figure [[fig:plantuml]].

#+BEGIN_SRC plantuml :file test.png
A -> B : request
B -> A : response
#+END_SRC

#+NAME: fig:plantuml
#+CAPTION: Plantuml Test Figure
#+RESULTS:

Output in ORG v 8.2.3

*Latex output:*

#+BEGIN_SRC latex
\section{TEST figure}
\label{sec-1}

Figure \ref{fig:plantuml}.

\begin{figure}[htb]
\centering
\includegraphics{test.png}
\caption{\label{fig:plantuml}Plantuml Test Figure}
\end{figure}
\end{document}
#+END_SRC


Output in ORG 9.0.3

*Latex output:*

#+BEGIN_SRC latex
\section{TEST figure}
\label{sec:org3dff397}

Figure [BROKEN LINK: nil].

\begin{center}
\includegraphics{test.png}
\end{center}
#+END_SRC

Thanks in advance.


[O] Export agenda view into CSV with properties

2016-12-30 Thread Mikhail Skorzhinskiy
I have a bunch of scripts, that draws me a couple of nice pictures and
stuff. They take data from agenda CSV export.

I'm wondering, is there any easy way to export some properties from
agenda view too?

--
Skorzhinskiy Mikhail



Re: [O] mark as done on a previous date?

2016-12-30 Thread Marco Wahl
Hi!

> I'm trying to use org-habit to track my habits and sometimes I don't
> get around to mark stuff as done on the day I do them. I've found two
> different functions for marking stuff as done in the past, but I can't
> get either of them to work.
> [...]

I did not check why the other functions fail.

What about the following function?  I'm on Org 9.

#v+
(defun mw-org-todo-with-other-date (date &optional arg)
  "Like `org-todo' but ask for a specific DATE.
Optional argument ARG prefix arg."
  (interactive (list (org-read-date) current-prefix-arg))
  (let* ((org-use-effective-time t)
 (hour
  (truncate
   (- (/ (org-time-stamp-to-now date t)
 60 60
  (org-extend-today-until (1+ hour)))
(org-todo arg)))
#v-

This function has been inspired by Org's `org-todo-yesterday'.  The
latter even does its job when triggered from the agenda.


HTH
   Marco




[O] org mode latex export excude title

2016-12-30 Thread Fanpeng Kong
I am trying to use org mode to write a paper. The latex template of the
journal restricts the location of `\title{}` command to be after the
`\begin{document}`. While by leaving `#+TITLE:` empty and specify
`#+OPTIONS: title:nil` in my org file, I can remove the `\maketitle` command in 
the
latex export. However, and empty title `\title{}` is still exported
prior to the `\begin{document}`. And it causes problem for the template
I am using.

Following is an minimal example of the org mode latex export. Is there
any way to excude the empty `\title{}` command?

\documentclass[10pt]{article}
\usepackage{}
...
\usepackage{}

\date{}
\title{}

\hypersetup{
}

\begin{document}
...
\end{document}

Any suggestion will be appreciated. And of course, Happy New Year!

Cheers
Fanpeng