Re: [O] Release Org 9.1 soon ?

2017-08-26 Thread Kaushal Modi
On Sat, Aug 26, 2017, 9:26 PM Nicolas Goaziou 
wrote:

> Hello,
>
> Kaushal Modi  writes:
>
> > I still have the org-set-tags refactoring[1] pending on my plate.
>
> Is there anything left to do? Do you need more time or can we merge it?
>

I need to create a new patch. Will do so in the coming week.

> I'd also like to add a new Org exporter, ox-hugo. As adding it wouldn't
> > break other Org functionality, would it be safe to add it before this
> > master cut? About this, would it be OK to start by creating a scratch
> > branch?
>
> I think this can wait for Org 9.2. Inclusion in core may need to be
> discussed and, in any case, code needs to be reviewed.
>

Of course. Should I add that to a scratch branch for review?

> --

Kaushal Modi


Re: [O] Release Org 9.1 soon ?

2017-08-26 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> I still have the org-set-tags refactoring[1] pending on my plate.

Is there anything left to do? Do you need more time or can we merge it?

> I'd also like to add a new Org exporter, ox-hugo. As adding it wouldn't
> break other Org functionality, would it be safe to add it before this
> master cut? About this, would it be OK to start by creating a scratch
> branch?

I think this can wait for Org 9.2. Inclusion in core may need to be
discussed and, in any case, code needs to be reviewed.

Regards,

-- 
Nicolas Goaziou



Re: [O] counter macro doesn't increment when additional macro is on same line

2017-08-26 Thread Matt Price
Argh, wish I could delete this post.  I was using a defective macro
definition (I pasted the wrong code in my original post!):

(defun get-ts+7 ()
  (interactive)
  (let ((base-date (save-excursion
   (re-search-backward
(org-re-timestamp 'all))
   (match-string 0)))
(result nil))
(with-temp-buffer
  (org-mode)
  (insert base-date )
  (backward-char)
  (org-timestamp-change 7 'day)
  (end-of-buffer)
  (insert "  ")
  (end-of-buffer)
  (setq result (save-excursion
 (re-search-backward
  (org-re-timestamp 'all))
 (match-string 0
result))

--
something about that buffer switching gets org confused -- maybe the value
of hte {{{n}}} gets reset when the temp buffer is initialized? -- anyway,
this much simpler defun solves the problem:

(defun get-ts+7 ()
(interactive)
(let ((base-date (save-excursion
 (re-search-backward
  (org-re-timestamp 'all))
 (match-string 0)))
  (result nil))

  (format-time-string "<%Y-%m-%d %a>"
  (time-add
   (date-to-time base-date) (days-to-time (1+ 7
))


On Sat, Aug 26, 2017 at 5:09 PM, Matt Price  wrote:

>
> the {{{n}}} macro seems to reset to "1" if it is located on the same line
> as another macro that I've defined.  I'm not sure if it's error with my
> macro or some kind or race condition-ish problem in macro expansion.
> Here's a minimal example:
>
> 
> #+MACRO: ts (eval (get-ts+7))
>
> #+BEGIN_SRC emacs-lisp
>   (defun mwp-add-week-to-next-ts ()
> (interactive )
> (save-excursion
>   (re-search-forward org-ts-regexp)
>
>   (let ((base (match-string 0)))
> (message base)
> (message (format-time-string "<%Y-%m-%d %a>"
>  (time-add (date-to-time base)
> (days-to-time (1+ 7)
>
> (replace-match (format-time-string "<%Y-%m-%d %a>"
>(time-add (date-to-time base)
> (seconds-to-time (1+(* 7 60 60 24) nil nil nil nil
> #+END_SRC
>
> (week {{{n(w)}}})
>
> (week {{{n(w)}}})
>
> (week {{{n(w)}}})
>
>
> ** <2017-09-12 Tue> (Week {{{n(w)}}}) Hacking History in the Himalaya
>
> ** {{{ts}}} (Week {{{n(w)}}}) Language of the Web
>
> -
>
> And here's the ASCII export:
>
> --
> Matt Price
>
>
> ,
> | (defun mwp-add-week-to-next-ts ()
> |   (interactive )
> |   (save-excursion
> | (re-search-forward org-ts-regexp)
> |
> | (let ((base (match-string 0)))
> |   (message base)
> |   (message (format-time-string "<%Y-%m-%d %a>"
> |(time-add (date-to-time base)
> (days-to-time (1+ 7)
> |
> |   (replace-match (format-time-string "<%Y-%m-%d %a>"
> |  (time-add (date-to-time base)
> (seconds-to-time (1+(* 7 60 60 24) nil nil nil nil
> `
>
> 1
>
> 2
>
> 3
>
>
> <2017-09-12 Tue>  (Week 4) Hacking History in the Himalaya
> ==
>
>
> <2017-09-19 Tue>  (Week 1) Language of the Web
> ==
> -
>
> Any thoughts? thank you!
>
>
>


Re: [O] Questions about using macro replacement

2017-08-26 Thread Joon Ro
Answering without full knowledge!

Thank you so much for the reply - your reply gave me several ideas. I think Q1 
and Q3 are solved, but I still have no idea how to do Q2 or if it is possible.


Q1, I figured it out and started using it - the {{{n}}} macros are awesome!

2. I was wondering if it is possible use macro expansion for :EXPORT_FILE_NAME: 
property of a subtree?
Since macros can be set to expand to arbitrary elisp, I would think this 
*should* be possible.  I forget the syntax but something like:

#+MACRO: efn (eval (get-export-file-name))

#+BEGIN_SRC emacs-lisp
(defun get-export-file-name ()
 (org-element-property :export-file-name (org-element--current-element) ))
#+END_SRC

* some heading
:PROPERTIES
:EXPORT_FILE_NAME: test-me
:END:

will get you somewhat close.  I don't understand the org-element api very well 
though and it generally takes me a few tries to get this sort of thing right.


With this one, I was actually looking for using macros inside 
:EXPORT_FILE_NAME: property. Ultimately what I want to do is:

* some heading
:PROPERTIES:
:EXPORT_FILE_NAME: {{{n('class',1)}}} test-me
:END:

However, it did not work, as the file name became literal {{{n('class',1)}}} 
test-me.pdf.



3. Is it possible to create a file link which uses macro? I would like to 
create a link to the exported pdf file dynamically. For example, if the value 
of :EXPORT_FILE_NAME: is exported, how would I create a link which 
automatically link to exported.pdf?

I don't think a macro will do this for you since, if I understand correctly, 
macros are not aware of the export target.  So probably you would need some 
other mechanism to od this.

I figured it out using elisp link:

elisp:(org-open-link-from-string (concat "file:./" (org-entry-get nil 
"EXPORT_FILE_NAME") ".pdf"))

Best Regards,
Joon


Re: [O] how to get version information on title slide with org beamer

2017-08-26 Thread Berry, Charles

> On Aug 26, 2017, at 10:57 AM, Eric S Fraga  wrote:
> 
> Hello all,
> 
> I know I can use {{{modification-time(...,t)}}} say to get the revision
> control system information about when the repository was last
> modified.  However, I would like to have other information (e.g. the
> mercurial id).  More importantly, I would like this information to
> appear on my beamer export title slide.
> 
> I have tried
> 
> #+date: \copyright {{{time(%Y)}}}, version src_shell{hg id --num}
> 
> for instance but babel blocks are not executed for these
> lines.  Putting this text in a macro doesn't help either.
> 
> Any suggestions?
> 

Use a :post header to format a date keyword line.

Something like:


--8<---cut here---start->8---

#+NAME: mydateline
#+BEGIN_SRC emacs-lisp
(format "#+DATE: %s\n" *this*) 
#+END_SRC

src_shell[:post mydateline() :results raw]{date} 

* intro

et cetera
--8<---cut here---end--->8---

Chuck



[O] Consolidated capture tagets on master not in ORG-NEWS

2017-08-26 Thread Adrian Bradd
On master, capture targets were changed in commit 0f1b5ec496, but this
change isn't reflected in ORG-NEWS. Not sure if this change was intended to
go in the impending 9.1 release as I'm still unfamiliar with the release
workflow.

Happy to update ORG-NEWS if needed.

Cheers,

Adrian


Re: [O] Questions about using macro replacement

2017-08-26 Thread Matt Price
Answering without full knowledge!

On Wed, Aug 23, 2017 at 11:13 PM, Joon Ro  wrote:

> Hi,
>
> I have several questions about macro replacement usage.
>
> 1. I saw people using {{{n}}} macros, which looks very useful, but I could
> not find it in current documentation about macro replacement (
> http://orgmode.org/manual/Macro-replacement.html). Is this only available
> in developmental version?
>
> Yes, I'm pretty sure this has not been merged yet

2. I was wondering if it is possible use macro expansion
> for :EXPORT_FILE_NAME: property of a subtree?
>
Since macros can be set to expand to arbitrary elisp, I would think this
*should* be possible.  I forget the syntax but something like:

#+MACRO: efn (eval (get-export-file-name))

#+BEGIN_SRC emacs-lisp
(defun get-export-file-name ()
 (org-element-property :export-file-name (org-element--current-element) ))
#+END_SRC

* some heading
:PROPERTIES
:EXPORT_FILE_NAME: test-me
:END:

will get you somewhat close.  I don't understand the org-element api very
well though and it generally takes me a few tries to get this sort of thing
right.

3. Is it possible to create a file link which uses macro? I would like to
> create a link to the exported pdf file dynamically. For example, if the
> value of :EXPORT_FILE_NAME: is exported, how would I create a link which
> automatically link to exported.pdf?
>

I don't think a macro will do this for you since, if I understand
correctly, macros are not aware of the export target.  So probably you
would need some other mechanism to od this.

>
> Any help would be greatly appreciated. Thank you!
> Joon
>
>


[O] counter macro doesn't increment when additional macro is on same line

2017-08-26 Thread Matt Price
the {{{n}}} macro seems to reset to "1" if it is located on the same line
as another macro that I've defined.  I'm not sure if it's error with my
macro or some kind or race condition-ish problem in macro expansion.
Here's a minimal example:


#+MACRO: ts (eval (get-ts+7))

#+BEGIN_SRC emacs-lisp
  (defun mwp-add-week-to-next-ts ()
(interactive )
(save-excursion
  (re-search-forward org-ts-regexp)

  (let ((base (match-string 0)))
(message base)
(message (format-time-string "<%Y-%m-%d %a>"
 (time-add (date-to-time base)
(days-to-time (1+ 7)

(replace-match (format-time-string "<%Y-%m-%d %a>"
   (time-add (date-to-time base)
(seconds-to-time (1+(* 7 60 60 24) nil nil nil nil
#+END_SRC

(week {{{n(w)}}})

(week {{{n(w)}}})

(week {{{n(w)}}})


** <2017-09-12 Tue> (Week {{{n(w)}}}) Hacking History in the Himalaya

** {{{ts}}} (Week {{{n(w)}}}) Language of the Web

-

And here's the ASCII export:

--
Matt Price


,
| (defun mwp-add-week-to-next-ts ()
|   (interactive )
|   (save-excursion
| (re-search-forward org-ts-regexp)
|
| (let ((base (match-string 0)))
|   (message base)
|   (message (format-time-string "<%Y-%m-%d %a>"
|(time-add (date-to-time base)
(days-to-time (1+ 7)
|
|   (replace-match (format-time-string "<%Y-%m-%d %a>"
|  (time-add (date-to-time base)
(seconds-to-time (1+(* 7 60 60 24) nil nil nil nil
`

1

2

3


<2017-09-12 Tue>  (Week 4) Hacking History in the Himalaya
==


<2017-09-19 Tue>  (Week 1) Language of the Web
==
-

Any thoughts? thank you!


Re: [O] Org protocol, Windows 10

2017-08-26 Thread Fabrice Popineau
2017-08-26 10:31 GMT+02:00 Nikolay Kudryavtsev <
nikolay.kudryavt...@gmail.com>:

> Hello Fabrice.
>
> If you set your protocol bookmarklet with a single slash like
> "org-protocol:/capture" everything would work.
>

You are right: using this syntax, emacslientw gets the right url without
the superflous / after capture.
This seems strange to me, because I always thought that urls would always
start with protocol:// .

Maybe this should be advertised more loudly.

Thanks a lot.

Fabrice


> I asked before for someone from the dev team to weight in on it, because
> org test seem to use both.
>
> --
> Best Regards,
> Nikolay Kudryavtsev
>
>


Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-26 Thread Thomas S. Dye
Aloha Eduardo,

In my experience, having both org and org-plus-contrib installed is a
problem.  You might want to settle on the one or the other, then see if
your problem persists.

hth,
Tom

Eduardo Mercovich writes:

> Hola Nicolas.
>
>>> The file > img/ProcesoDeDiseñoDeInteraccion.pdf
>>> was translated/inserted on the org buffer as >
>>> img/ProcesoDeDise%C3%B1oDeInteraccion.pdf
>
>> What command did you use to "translate/insert" the filename?
>
> C-c C-l with keyboard and tab completion.
>
>>> + Org-mode: Org-mode version 8.3.4 (8.3.4-88-g792bb9-elpaplus)
>
>> This release is old. Could you update to a more recent one?
>
> Sure. Upgraded from the package manager and now I have
> org-20170821 and org-plus-contrib-20170821. Both from elpa. Would
> it be better from the org repository?
>
> org-version gives: Org mode version 9.0.9
> (9.0.9-88-g251f88-elpaplus [...])
>
>
> Repeating the same experiment now results in:
>
> 1. Org inserts the same string
> (file:img/ProcesoDeDise%C3%B1oDeInteraccion.pdf)
>
> 2. But export is not blocked! :)
>
> 3. The linked file is not present on the exported pdf (may not be
> an org issue, but about other latex to pdf component)...
>
> I hope this is useful.
> How do I proceed from here? Any other test or info to report?
>
> Thanks a lot for your hard work on Org. :)


--
Thomas S. Dye
http://www.tsdye.com



Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-26 Thread Eduardo Mercovich

Hola Nicolas.


The file > img/ProcesoDeDiseñoDeInteraccion.pdf
was translated/inserted on the org buffer as > 
img/ProcesoDeDise%C3%B1oDeInteraccion.pdf



What command did you use to "translate/insert" the filename?


C-c C-l with keyboard and tab completion.


+ Org-mode: Org-mode version 8.3.4 (8.3.4-88-g792bb9-elpaplus)



This release is old. Could you update to a more recent one?


Sure. Upgraded from the package manager and now I have 
org-20170821 and org-plus-contrib-20170821. Both from elpa. Would 
it be better from the org repository?


org-version gives: Org mode version 9.0.9 
(9.0.9-88-g251f88-elpaplus [...])



Repeating the same experiment now results in: 

1. Org inserts the same string 
(file:img/ProcesoDeDise%C3%B1oDeInteraccion.pdf)


2. But export is not blocked! :)

3. The linked file is not present on the exported pdf (may not be 
an org issue, but about other latex to pdf component)... 


I hope this is useful.
How do I proceed from here? Any other test or info to report? 


Thanks a lot for your hard work on Org. :)


--
eduardo mercovich

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




[O] how to get version information on title slide with org beamer

2017-08-26 Thread Eric S Fraga
Hello all,

I know I can use {{{modification-time(...,t)}}} say to get the revision
control system information about when the repository was last
modified.  However, I would like to have other information (e.g. the
mercurial id).  More importantly, I would like this information to
appear on my beamer export title slide.

I have tried

#+date: \copyright {{{time(%Y)}}}, version src_shell{hg id --num}

for instance but babel blocks are not executed for these
lines.  Putting this text in a macro doesn't help either.

Any suggestions?

Thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a


signature.asc
Description: PGP signature


Re: [O] Release Org 9.1 soon ?

2017-08-26 Thread Kaushal Modi
On Sat, Aug 26, 2017, 4:19 AM Nicolas Goaziou 
wrote:

> Hello,
>
> I think it would be good to release Org 9.1 before the end of the month,
> if possible.
>
> Is there any major issue left, or any important pending patch to apply
> before doing the merge?
>
> Once this is done, I will merge the "hide-column" branch in master.
> I will also take care of removing Org Struct mode from the code base.


Hello,

I still have the org-set-tags refactoring[1] pending on my plate.

I'd also like to add a new Org exporter, ox-hugo. As adding it wouldn't
break other Org functionality, would it be safe to add it before this
master cut? About this, would it be OK to start by creating a scratch
branch?

[1]: http://lists.gnu.org/archive/html/emacs-orgmode/2017-07/msg00292.html

-- 

Kaushal Modi


Re: [O] Org-lint complains about valid footnote?

2017-08-26 Thread Eric S Fraga
On Friday, 25 Aug 2017 at 15:25, Nicolas Goaziou wrote:
> Hello,
>
> Eric S Fraga  writes:
>
>> In tracking down another problem with the latest version of org (more to
>> follow probably), I thought using org-lint might help.  With the
>> attached simple example, I get:
>>
>>  5 high  Missing definition for footnote [1]
>>
>> from org-lint.
>>
>> The footnote definition is there as it's inline...
>
> Fixed. Thank you.

Thank you!

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a


signature.asc
Description: PGP signature


Re: [O] problem evaluating src block on file opening

2017-08-26 Thread Eric S Fraga
On Friday, 25 Aug 2017 at 22:01, Nicolas Goaziou wrote:
> "Berry, Charles"  writes:
>>> On Aug 25, 2017, at 6:01 AM, Eric S Fraga  wrote:
>>> 
>>> Hello,
>>> 
>>> Long story short: org-babel-goto-named-src-block does not seem to work,
>>> at least since b862c24b9f or thereabouts?  
>>
>> Confirmed on my setup. 

Charles, thanks for preparing the ECM and confirming.

[...]

> Fixed. Thank you.

Excellent Nicolas!  Many thanks.  Works perfectly now.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a


signature.asc
Description: PGP signature


Re: [O] "header-args :eval inline-only" not working

2017-08-26 Thread Nicolas Goaziou
Hello,

"Berry, Charles"  writes:

> Maybe remove the `inline-only' option as a first step.
>
> I have no use for org-export-use-babel, but one thing it does do is
> prevent processing of headers which could be helpful if tricky header
> constructions cause export to fail.

Fair enough. I removed `inline-only' option in master.

Regards,

-- 
Nicolas Goaziou



Re: [O] Org protocol, Windows 10

2017-08-26 Thread Nikolay Kudryavtsev

Hello Fabrice.

If you set your protocol bookmarklet with a single slash like 
"org-protocol:/capture" everything would work.


I asked before for someone from the dev team to weight in on it, because 
org test seem to use both.


--
Best Regards,
Nikolay Kudryavtsev




[O] Release Org 9.1 soon ?

2017-08-26 Thread Nicolas Goaziou
Hello,

I think it would be good to release Org 9.1 before the end of the month,
if possible.

Is there any major issue left, or any important pending patch to apply
before doing the merge?

Once this is done, I will merge the "hide-column" branch in master.
I will also take care of removing Org Struct mode from the code base.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] [PATCH] Add TITLE export to ox-md

2017-08-26 Thread Nicolas Goaziou
Hello,

Jay Kamat  writes:

> I agree that vanilla markdown does not support title, but if ox-md does not
> support any form of title, then there is disparity between the output of other
> org exports and the markdown exporter. I would like to solve that disparity if
> possible.

The point of "md" export back-end is not to provide the same features as
full-fledged ones like "latex" or "html". I wrote it to take care of the
boring stuff of markdown syntax. Anyone willing to write a back-end with
a different Markdown flavour just needs to concentrate of the
differences between the original syntax.

IOW, discrepancy here is not a concern.

> From the markdown that I've worked with, this isn't the case. The
> original markdown tool (https://daringfireball.net/projects/markdown/)
> dosen't seem to output filename titles in it's export, so I wouldn't
> think it's part of the vanilla standard.

I don't think either.

>> Maybe we eventually end up with 3 options (something like below):
>>
>> - org-md-title-as-h1
>> - org-md-subtitle-as-h2
>> - org-md-heading-offset
>
> that's probably the best idea I've heard so far, since I would imagine most
> people would either not want to have two H1 headings right after each other, 
> or
> not want to have their headings shifted. Having such options would allow 
> people
> to pick the scenario they want (shifting headings under the title, including 
> the
> title but no offset, or not including the title at all).

I don't think this is a good idea, because it makes "ox-md.el" less
neutral. That could get in the way of other back-ends.

AFAIC, I think ... or even ...
..., as you suggested, are better choices.

Regards,

-- 
Nicolas Goaziou