[O] [BUG] Re: header argument :noweb-ref seems can't be resolved

2017-12-18 Thread stardiviner
Confirmed. I don't know how to fix this problem, so maybe report to 
Org-mode ML is the better way. (I changed the message title by prepend 
[BUG])



On 12/19/2017 12:59 PM, Berry, Charles wrote:



On Dec 18, 2017, at 9:28 AM, numbch...@gmail.com wrote:

Hope someone can help here.


OK. I think I have it. `org-babel-params-from-properties' uses 
`org-babel-current-src-block' to figure out where to look for properties. And o-b-c-s-b-l 
is let bound in `org-babel-noweb-expand-references' to the src block location with the 
noweb reference, e.g. `<>'.


The problem can be illustrated like so. Put this in a buffer:

#+begin_src org

   ,* abc
 :PROPERTIES:
 :header-args: :noweb-ref abcblocks
 :END:

   ,#+name: got-abc
   ,#+begin_src R
   1+2
   ,#+end_src


   ,* def

#+end_src

execute this:

#+begin_src emacs-lisp
   (defun show-prob (obcsbl)
 (let
((org-babel-current-src-block-location obcsbl))
  (assq :noweb-ref (nth 2 (org-babel-get-src-block-info)
#+end_src

Then put point in the got-abc src block and type

 M-: (show-prob (point)) RET

and you will see `(:noweb-ref . "abcblocks")' in the minibuffer.

Now try

M-:  (show-prob 1000) RET

and the result is `nil'.

The problem can be fixed by let-binding `org-babel-current-src-block-location' 
to `beg-body' in `org-babel-noweb-expand-references' like this

  (org-babel-map-src-blocks nil
(let*
((org-babel-current-src-block-location beg-body)
 (i (org-babel-get-src-block-info 'light)))

but maybe it is better to change  `org-babel-params-from-properties'.

WDYT?

Chuck







Re: [O] Git repository error

2017-12-18 Thread Colin Baxter
> Nick Dokos  writes:

> Colin Baxter  writes:
>>> Nick Dokos  writes:
>> 
>> > I get the same results as Detlef: git pull git remote update
>> git > clone git://orgmode.org/org-mode.git
>> 
>> > all fail, but
>> 
>> > git clone http://orgmode.org/org-mode.git
>> 
>> > succeeded and `git remote update' when the remote is the http >
>> version, succeeds as well.
>> 
>> Not here, "git clone http://orgmode.org/org-mode.git; just hangs
>> with
>> 
>> Cloning into 'org-mode'...
>> 
>> never completing.

> You might not have given it enough time. Here, it takes a long
> time, but it completes:

> $ time git clone http://orgmode.org/org-mode.git Cloning into
> 'org-mode'...

> real 2m13.687s user 0m29.052s sys 0m0.668s

Indeed, you are correct; git clone http://orgmode.org/org-mode.git
eventually completed in 3m42.699s. Must have come via the N. Pole.

Thanks.

-- 
Colin Baxter
m43...@yandex.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-
The sole cause of all human misery is the inability of people to sit
quietly in their rooms.  Blaise Pascal, 1670



Re: [O] Error with git-fetch from org repo

2017-12-18 Thread Eric S Fraga
On Friday, 15 Dec 2017 at 17:34, Nick Dokos wrote:
> Alex Branham  writes:
>
>> Hello -
>>
>> I've been trying to git fetch from the org repo
>> (git://orgmode.org/org-mode.git) today and keep getting this error:
>>
>> Fetching origin
>> fatal: read error: Connection reset by peer
>> error: Could not fetch origin
>>
>> Has anyone else had problems connecting?
>>
>
> Yes, it's still giving that error.

Just now, I am getting:

$ git pull
fatal: read error: Connection reset by peer
$

(was keen on looking at the new org manual in org...)

thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b


signature.asc
Description: PGP signature


Re: [O] ob-python newline & indentation behavior

2017-12-18 Thread Kyle Meyer
Kyle Meyer  writes:

> Jack Kamm  writes:
>
>> FSF sent me the signed papers :) I've attached them.
>
> great :)

I've added your name here:
http://orgmode.org/worg/org-contribute.html#contributors_with_fsf_papers

>> Could Kyle or someone else merge in the patch, which I am reattaching?
>
> I'll take a final look tonight (est).

Applied.  Thanks for your work!

-- 
Kyle



Re: [O] header argument :noweb-ref seems can't be resolved

2017-12-18 Thread Berry, Charles


> On Dec 18, 2017, at 9:28 AM, numbch...@gmail.com wrote:
> 
> Hope someone can help here.
> 

OK. I think I have it. `org-babel-params-from-properties' uses 
`org-babel-current-src-block' to figure out where to look for properties. And 
o-b-c-s-b-l is let bound in `org-babel-noweb-expand-references' to the src 
block location with the noweb reference, e.g. `<>'. 


The problem can be illustrated like so. Put this in a buffer:

#+begin_src org

  ,* abc
:PROPERTIES:
:header-args: :noweb-ref abcblocks
:END:

  ,#+name: got-abc
  ,#+begin_src R
  1+2
  ,#+end_src


  ,* def

#+end_src

execute this:

#+begin_src emacs-lisp
  (defun show-prob (obcsbl)
(let
((org-babel-current-src-block-location obcsbl))
 (assq :noweb-ref (nth 2 (org-babel-get-src-block-info)
#+end_src

Then put point in the got-abc src block and type 

M-: (show-prob (point)) RET

and you will see `(:noweb-ref . "abcblocks")' in the minibuffer.

Now try 

   M-:  (show-prob 1000) RET

and the result is `nil'.

The problem can be fixed by let-binding `org-babel-current-src-block-location' 
to `beg-body' in `org-babel-noweb-expand-references' like this

  (org-babel-map-src-blocks nil
(let*
((org-babel-current-src-block-location beg-body)
 (i (org-babel-get-src-block-info 'light)))

but maybe it is better to change  `org-babel-params-from-properties'.

WDYT?

Chuck





Re: [O] Restore old easy template feature (Re: function for inserting a block)

2017-12-18 Thread Eric Abrahamsen
Matt Price  writes:

> On Wed, Nov 8, 2017 at 9:08 AM, Bastien Guerry  wrote:
>
>  Hi Kaushal,
>
>  Kaushal Modi  writes:
>
>  > I am suggesting to have a minor mode that simply binds "<" to do the
>  > template insertion (only when that is typed at BOL with optional
>  > leading whitespace, or if a region is selected).
>
>  I think this is a great suggestion and brings the best of both the new
>  and the old system.
>
>  I cannot test this myself until this week-end, but I'd happy too then.
>
> I guess I missed this ocnversation while I was busy wiht other stuff  -- the 
> old easy templating has been removed? I am certainly very sorry to see it go, 
> esp. as I have
> found yasnippet to work only intermittently in org-mode buffers (at least for 
> me).   I see Kaushal has added it back in his config files, but if someone 
> has a slightly less
> specialized solution for restoring it I would love to see it. 

It's on its way back! Just slowly. Rasmus has added org-tempo.el, which
you can require to pretty much restore the old functionality. Just don't
customize anything yet, as some of the options are likely to change.

Eric




[O] possible to store a link to a specific entry in the *texinfo* file?

2017-12-18 Thread Shiyao MA
Hi,

For example, I use =i= to navigate to the elisp texinfo file entry
=define-minor-mode=.

And I want to store a link to that entry.

However, org-store-link stores to the node : Stored:
info:elisp#Defining Minor Modes
Instead of the exact entry.

-- 
Best,
Shiyao



Re: [O] Definition list not highlight for japanese character.

2017-12-18 Thread Shiyao MA
Thanks for you guys!

Today I tested with the japanese chars and they are rendered
bold/highlighted.  The problem has automatically gone.

Best,



Re: [O] [RFC] Dog food, anyone?

2017-12-18 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou writes:

>> One change that might be made globally is the use of em-dash (---) to
>> set off text, versus en-dash (--) between numerals, e.g. "the range of
>> run times is 1--5 seconds".  I've spotted several places where the
>> en-dash is used to set off text.  See this web site for the convention
>> on dashes:
>>
>> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Conventions.html
>
> I think it is a matter of "American English" vs "British English"
> convention. See, e.g., .
>
> I consistently used the latter because I find it more aesthetically
> pleasing. As a GNU manual, we can switch to the American English
> convention everywhere. In this case, however, em-dash are not
> spaced-out.

I find the en-dash with spaces more aesthetically pleasing, too.

>
> In the same vein, we also need to use title case. This needs some
> special care as fuzzy links need to be updated accordingly.
>
> WDYT?

Agreed. This is one of the first things we might do if manual.org
becomes the official source of the Org manual.

FYI, Phil Rooke's Documentation_Standards.org suggests title case for
chapter heads and sentence case for section and subsection headings.


> I changed it to
>
>   ... by tweaking the header arguments (see [[* Using header
>   arguments]]) for compiling...
>
> For more information, see (info "(texinfo) @ref"), last paragraphs.
> N.B.: I suggest to read it in regular info viewer, i.e., "info texinfo"
> from the command line, instead of Emacs to make sense out of this.

Yes, much better.

All the best,
Tom

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



Re: [O] Definition list not highlight for japanese character.

2017-12-18 Thread Nonono

Hello Shiyao,

I think your CJK font doesn't support a bold type.  Do you can see as a
bold font when you type *いろはにほへどちりぬるを* in the org-mode?

If you have the Japanese font which supports a bold type like "Hiragino
Maru Gothic ProN", you try below with your own risk:

  (let ((lst '((#x3000 . #x303f) ; Japanese-style punctuation
   (#x3040 . #x309f) ; hiragana 
   (#x30a0 . #x30ff) ; katakana
   (#xff00 . #xffef) ; full-width roman and half-width katakana
   (#x4e00 . #x9faf) ; cjk unified-ideographs
   )))
(while lst
  (set-fontset-font
   nil (car lst)
   (font-spec :family "Hiragino Maru Gothic ProN" :size 16))
  (setq lst (cdr lst

Change "Hiragino Maru Gothic ProN" to the font what you have, and find
a good-looking font by trial-and-error.

Best.

Nonono.

Shiyao MA  writes:

> Hi,
>
> Definition list not highlight for japanese character.
>
> for example, check this picture:
> https://imgur.com/a/dBKt6
>
> どういたしまして is not highlighted, where asdf is highlighted.
>
> -- 
> Best,
> Shiyao
>
-- 
Nonono



Re: [O] advice please: best way to export to DOC(X) with maths

2017-12-18 Thread Scott Randby


On 12/17/2017 10:14 PM, Grant Rettke wrote:
> On Sun, Dec 17, 2017 at 10:55 AM, Scott Randby  wrote:
>>
>> On 12/15/2017 01:43 PM, Grant Rettke wrote:
>>> Write it in Org. Export to Pandoc file pandoc-A.
>>>
>>> Export Pandoc file pandoc-A to Word file word-A. Send that to your
>>> peers for review.
>>>
>>> Export Word file word-A to Pandoc file pandoc-B.
>>>
>>> Get the Word from your peers, the file with changes from their review,
>>> word-C. Export it to pandoc-C
>>>
>>> Do a diff between pandoc-B and pandoc-C. Integrate the results into
>>> your original Org file.
>>
>> I'm confused. My understanding is that Pandoc converts between file formats, 
>> so I don't understand what you mean by a Pandoc file. What is the file 
>> format of pandoc-A?
>>
>> Is this what you mean?
>>
>> Pandoc: Org -> word-A
>> Pandoc: word-A -> pandoc-B.org
>> Pandoc: word-C -> pandoc-C.org
> 
> Pandoc has their own markup language "Pandoc Markdown". That is what I
> meant by "Pandoc". And that was totally wrong in regards to your
> question. Sorry my mistake.
> 
> You said it right, yes. It makes it easy to diff the "reverse
> engineered" Org fils to see what changed from the reviewers.

I appreciate the clarification. Your method is very useful to me since I 
frequently have to work with people who know nothing but Word and since 
LibreOffice doesn't deal well with some of the poorly formatted DOCX files I 
receive. I've been experimenting with some sample files, and your method works 
great.

I know this is a lost cause, but I dream of the future in which document 
collaboration is done using only text files.

Scott
> 



Re: [O] run shell command after publishing project

2017-12-18 Thread Matt Price
On Fri, Dec 8, 2017 at 5:19 PM, Kaushal Modi  wrote:

> On Fri, Dec 8, 2017 at 4:38 PM Matt Price  wrote:
>
>> This sounds fantastic, Kaushal. I'm struggling to follow, so wl lask some
>> questions inline.
>>
>
> Sure, my answers are below.
>
> thank you!
>>
>
> You are welcome.
>
> And finally, let's move all non-Org discussion off the Org mailing list.
>
> I know this is a little off-topic, but if anyone is interested in a
slightly different, less elegant, solution, I just blogged about it here:
https://matt.hackinghistory.ca/2017/12/18/deploying-course-websites-with-git-hooks/
(mostly for my own records).

Ironically, my personal blog is I think my last remaining wordpress site --
I need to move it over to hugo soon as I can!


Re: [O] Git repository error

2017-12-18 Thread Jonas Bernoulli
> Bastien, can you please look at this?

And once you do, please also consider making the repository (and the
webpage) available over https.  Only very few packages remain that use
Git without making a man-in-the-middle attack impossible.  The Org team
follows best practices in most cases where other packages maintainers
tend to take a more relaxed approach, this shouldn't be an exception. :-)

  Cheers,
  Jonas



Re: [O] Restore old easy template feature (Re: function for inserting a block)

2017-12-18 Thread Matt Price
On Wed, Nov 8, 2017 at 9:08 AM, Bastien Guerry  wrote:

> Hi Kaushal,
>
> Kaushal Modi  writes:
>
> > I am suggesting to have a minor mode that simply binds "<" to do the
> > template insertion (only when that is typed at BOL with optional
> > leading whitespace, or if a region is selected).
>
> I think this is a great suggestion and brings the best of both the new
> and the old system.
>
> I cannot test this myself until this week-end, but I'd happy too then.
>

I guess I missed this ocnversation while I was busy wiht other stuff  --
the old easy templating has been removed? I am certainly very sorry to see
it go, esp. as I have found yasnippet to work only intermittently in
org-mode buffers (at least for me).   I see Kaushal has added it back in
his config files, but if someone has a slightly less specialized solution
for restoring it I would love to see it.

I see Nicolas's point that this functionality exists elsewhere, but maybe
someone can point to a ready-made replacement for those of us who rely on


Re: [O] [RFC] Dog food, anyone?

2017-12-18 Thread Nicolas Goaziou
Hello,

"Thomas S. Dye"  writes:

> I've spent a few hours with manual.org now and I like it very much.  The
> info file it produces looks clean to me and it compiled without a hitch
> using Org mode from the master branch.

Great!

> One change that might be made globally is the use of em-dash (---) to
> set off text, versus en-dash (--) between numerals, e.g. "the range of
> run times is 1--5 seconds".  I've spotted several places where the
> en-dash is used to set off text.  See this web site for the convention
> on dashes:
>
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Conventions.html

I think it is a matter of "American English" vs "British English"
convention. See, e.g., .

I consistently used the latter because I find it more aesthetically
pleasing. As a GNU manual, we can switch to the American English
convention everywhere. In this case, however, em-dash are not
spaced-out.

In the same vein, we also need to use title case. This needs some
special care as fuzzy links need to be updated accordingly.

WDYT?

> Attached, please find a patch with some copy editing to the introductory
> section of the "Working with source code" chapter.  The patch also
> includes a correction for a typo elsewhere in the manual.

Thank you. I applied it with the changes mentioned below.

> +Users can control how live they want each
> +source code block by tweaking the [[*Using header arguments][header 
> arguments]] for compiling,
> +execution, extraction, and exporting.

I changed it to

  ... by tweaking the header arguments (see [[* Using header
  arguments]]) for compiling...

For more information, see (info "(texinfo) @ref"), last paragraphs.
N.B.: I suggest to read it in regular info viewer, i.e., "info texinfo"
from the command line, instead of Emacs to make sense out of this.

> +Source code blocks are one of many Org block types, which also include
> +=quote=, =export=, =verse=, =latex=, =example=, and =verbatim=.  This
> +section pertains to blocks between =#+BEGIN_SRC= and =#+END_SRC=.
> +
> +For editing and formatting a source code block, Org uses an
> +appropriate Emacs major-mode that includes features specifically
> +designed for source code in that language.
> +
> +Org can extract one or more source code blocks and write them to one
> +or more source files --- a process known as /tangling/ in literate
> +programming terminology.

I changed it to

... or more sources files---a process known as...

per above.


Regards,

-- 
Nicolas Goaziou0x80A93738



[O] How to renumber footnotes please?

2017-12-18 Thread Sharon Kimble

I have a problem with my footnotes, specifically I have in a book of
cooking recipes, written in org-mode which is then exported to latex and
built into a PDF file, the following line -

/short crust pastry \uuline{1} [fn:90] OR \uuline{2} [fn:91] OR \uuline{3} 
[fn:92] OR \uuline{4} [fn:93]/\\

And a bit later I'm using the exact same line of - /short crust pastry
\uuline{1} [fn:90] OR \uuline{2} [fn:91] OR \uuline{3} [fn:92] OR
\uuline{4} [fn:93]/\\

But there are other footnotes in between which should change the
footnotes number. So how do I renumber them please? I've tried using
'C-u C-c C-x f S' but its made no difference, so how can I do it please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.3, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.4-2


signature.asc
Description: PGP signature


Re: [O] double underlines and external references

2017-12-18 Thread Sharon Kimble
John Kitchin  writes:

Thanks for replying John.

> I see, if it is just export you can still use a link with custom exporters 
> for internal and external recipes. eg: [[irec: some recipe label]] might 
> export to \uline{some recipe label} and [[erec:some other recipe]] might 
> export to \
> uuline{some other recipe}, and you would use the ulem latex package to get 
> those commands. 

\uuline is working very nicely, and I've set it up through a yasnippet

--8<---cut here---start->8---
# -*- mode: snippet -*-
# name: double-underline
# key: ulx
# --
\uuline{
--8<---cut here---end--->8---

Thanks
Sharon.

> The colors I was referring to were for your benefit in org-mode to make it 
> easy to see which kind of link it is.
>
> Another alternative is a macro:
>
> #+MACRO: irec  \uline{$1}
> #+MACRO: erec  \uuline{$1}
> #+LATEX_HEADER: \usepackage{ulem}
> {{{irec(some label)}}} and {{{erec(some other label)}}}
>
> This exports to: \uline{some label} and \uuline{some other label} 
>
> John
>
> ---
> 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
>
> On Wed, Dec 13, 2017 at 10:05 AM, Sharon Kimble  
> wrote:
>
> John Kitchin  writes:
>
> > You could just use regular links for this. You could setup a face 
> function that changes the color depending on it being internal or external, 
> or you could make separate links for them. See 
> > 
> http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/ 
> for many examples of what kinds of things can be done.
> >
> > John
>
> Thanks for replying John.
>
> I don't think I was quite as explicit as I should've been. I'm exporting
> my org-mode documents into latex ones, which are then building a PDF,
> which can then be printed in black and white (with no other colours
> being allowed), with the ultimate aim of it being professionally printed
> as books.
>
> Hence my need for both, double and single line, underlines.
>
> But I'm also open to any other way of finding some other way of showing
> the different links, but I can only use either black or white colours.
>
> Thanks
> Sharon.
>
> > ---
> > 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
> >
> > On Wed, Dec 13, 2017 at 6:56 AM, Sharon Kimble 
>  wrote:
> >
> >     For my current series of books that I'm writing in org-mode which is
> >     being exported to latex, I need to differentiate between recipes in 
> the
> >     current working file, and to recipes in an external file. This is 
> in a
> >     series of books all containing recipes. So what I'm looking for is 
> the
> >     ability to use a single underline for internal, and a double 
> underline
> >     for external. I can do a single underline easily in org-mode, but 
> I'm
> >     having problems with a double underline.
> >
> >     But is it the best method, using single and double underlines? Can
> >     anyone suggest some other ways of doing it, please? Like, for 
> instance,
> >     can I have a reference to a particular section in another file?
> >
> >     Thanks
> >     Sharon
> >     --
> >     A taste of linux = http://www.sharons.org.uk
> >     TGmeds = http://www.tgmeds.org.uk
> >     DrugFacts = https://www.drugfacts.org.uk
> >     Debian 9.3, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.4-2
> >
>
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> DrugFacts = https://www.drugfacts.org.uk
> Debian 9.3, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.4-2
>

-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.3, fluxbox 1.3.5-2, emacs 25.3.2, org-mode 9.1.4-2


signature.asc
Description: PGP signature


Re: [O] Git repository error

2017-12-18 Thread Nick Dokos
Colin Baxter  writes:

>> Nick Dokos  writes:
>
> > I get the same results as Detlef: git pull git remote update git
> > clone git://orgmode.org/org-mode.git
>
> > all fail, but
>
> >git clone http://orgmode.org/org-mode.git
>
> > succeeded and `git remote update' when the remote is the http
> > version, succeeds as well.
>
> Not here, "git clone http://orgmode.org/org-mode.git; just hangs with
>
> Cloning into 'org-mode'...
>
> never completing.

You might not have given it enough time. Here, it takes a long time,
but it completes:

$ time git clone http://orgmode.org/org-mode.git
Cloning into 'org-mode'...

real2m13.687s
user0m29.052s
sys 0m0.668s

-- 
Nick




Re: [O] [RFC] Dog food, anyone?

2017-12-18 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou writes:
>
> Ultimately, this file is going to serve as the source for a new
> "org.texi". IOW, it could go into "doc/" and "make info" should export
> "manual.org" to "org.texi". First, however, it would be nice to review
> it, either as an Org file, or within the Info viewer, with
>
>(require 'ox-texinfo)
>
> and
>
>`C-c C-e i o' from "manual.org".

I've spent a few hours with manual.org now and I like it very much.  The
info file it produces looks clean to me and it compiled without a hitch
using Org mode from the master branch.

One change that might be made globally is the use of em-dash (---) to
set off text, versus en-dash (--) between numerals, e.g. "the range of
run times is 1--5 seconds".  I've spotted several places where the
en-dash is used to set off text.  See this web site for the convention
on dashes:

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Conventions.html

I appreciate your work on the chapter "Working with source code". I
think it is a big improvement over the original. The reorganization
seems effective to me, especially the integration of "Specific header
arguments" with the structural overview you provide in the first several
sections of the chapter.  Thanks!

Attached, please find a patch with some copy editing to the introductory
section of the "Working with source code" chapter.  The patch also
includes a correction for a typo elsewhere in the manual.

Like others on the list, I'm pleased by the prospect of being able to
contribute to the Org manual by editing an Org document.  It is so much
easier for me than trying to work on org.texi!

Let me know if you have questions.

All the best,
Tom

>From dc10dff3adf49783ef82ad43338f04ceb888ebc3 Mon Sep 17 00:00:00 2001
From: tsdye 
Date: Mon, 18 Dec 2017 10:21:11 -1000
Subject: [PATCH] Edit the introduction

---
 contrib/manual.org | 123 +++--
 1 file changed, 62 insertions(+), 61 deletions(-)

diff --git a/contrib/manual.org b/contrib/manual.org
index c497129e9..3781a57ec 100644
--- a/contrib/manual.org
+++ b/contrib/manual.org
@@ -15939,13 +15939,17 @@ keywords.
 :END:
 #+cindex: source code, working with
 
-Source code here refers to any code typed in Org documents.  Org can
-manage source code in any Org file once such code is tagged with begin
-and end markers.  Working with source code begins with tagging source
-code blocks.  Tagged blocks are not restricted to the preamble or the
-end of an Org document; they can go anywhere -- with a few exceptions,
-such as not inside comments and fixed width areas.  Here's a sample
-source code block in Emacs Lisp:
+Source code here refers to any plain text collection of computer
+instructions, possibly with comments, written using a human-readable
+programming language.  Org can manage source code in an Org document
+when the source code is identified with begin and end markers.
+Working with source code begins with identifying source code blocks.
+A source code block can be placed almost anywhere in an Org document;
+it is not restricted to the preamble or the end of the
+document. However, Org cannot manage a source code block if it is
+placed inside an Org comment or within a fixed width section.
+
+Here is an example source code block in the Emacs Lisp language:
 
 #+begin_example
   ,#+BEGIN_SRC emacs-lisp
@@ -15955,62 +15959,59 @@ source code block in Emacs Lisp:
   ,#+END_SRC
 #+end_example
 
-Org can take the code in the block delimited by the =#+BEGIN_SRC=
-... =#+END_SRC= markup, and format, compile, execute, and show the
-results.  Org can simplify many housekeeping tasks essential to modern
-code maintenance.  That's why these blocks in Org mode literature are
-sometimes referred to as /live code/ blocks -- as compared to the
-static text and documentation around it.  Users can control how live
-they want each block by tweaking the headers for compiling, execution,
-extraction.
-
-Org's source code block type is one of many block types, such as
-quote, export, verse, latex, example, and verbatim.  This section
-pertains to blocks between =#+BEGIN_SRC= and =#+END_SRC=.
-
-For editing source code blocks, Org provides native Emacs major-modes.
-That leverages the latest Emacs features for that source code language
-mode.
-
-For exporting, Org can then extract source code blocks into compilable
-source files -- in a conversion process known as /tangling/ in
-literate programming terminology.
-
-For publishing, Org's back-ends can handle the code blocks and the
-text for output to a variety of formats with native syntax
-highlighting.
-
-For executing the source code in the code blocks, Org provides
-facilities that glue the tasks of compiling, collecting the results of
-the execution, and inserting them back to the Org file.  Besides text
-output, results may include links to other data types that Emacs can
-handle: audio, video, and graphics.
-
-An important 

Re: [O] Git repository error

2017-12-18 Thread Kaushal Modi
On Mon, Dec 18, 2017 at 1:55 PM Nick Dokos  wrote:

> I get the same results as Detlef:
>
> git pull
> git remote update
> git clone  git://orgmode.org/org-mode.git
>
> all fail, but
>
>git clone http://orgmode.org/org-mode.git
>
> succeeded and `git remote update' when the remote is the
> http version, succeeds as well.


I am seeing the same. The git: protocol fetch fails, but the http: protocol
fetch works.

Bastien, can you please look at this?
-- 

Kaushal Modi


Re: [O] Git repository error

2017-12-18 Thread Thomas S. Dye

Nick Dokos writes:

> git clone  git://orgmode.org/org-mode.git
>
> all fail, but
>
>git clone http://orgmode.org/org-mode.git
>
> succeeded and `git remote update' when the remote is the
> http version, succeeds as well.

This describes my experience yesterday, as well.

All the best,
Tom

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



Re: [O] Git repository error

2017-12-18 Thread Colin Baxter
> Nick Dokos  writes:

> I get the same results as Detlef: git pull git remote update git
> clone git://orgmode.org/org-mode.git

> all fail, but

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

> succeeded and `git remote update' when the remote is the http
> version, succeeds as well.

Not here, "git clone http://orgmode.org/org-mode.git; just hangs with

Cloning into 'org-mode'...

never completing.

-- 
Colin Baxter
m43...@yandex.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-
Since mathematicians have invaded the theory of relativity, I do not
understand it myself. A. Einstein



Re: [O] Git repository error

2017-12-18 Thread Nick Dokos
I get the same results as Detlef:

git pull
git remote update
git clone  git://orgmode.org/org-mode.git

all fail, but

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

succeeded and `git remote update' when the remote is the
http version, succeeds as well.

-- 
Nick





Re: [O] Poll: new keybinding for org-insert-structure-template?

2017-12-18 Thread Eric Abrahamsen
Eric Abrahamsen  writes:

> Rasmus  writes:
>
>> Kaushal Modi  writes:
>>
>>> On Fri, Dec 15, 2017 at 6:23 AM Rasmus  wrote:
>>>
 The only way it’s "bad" is in the sense it limits the flexibility of
 snippets, like "
> I don't see any way around that. Any system that allows string keys of
> arbitrary length is going to run into that problem.

One possible fix, a bit arbitrary: in the default value, provide 
as an artificial "stop key" in the sub-menus. So "s" starts the "source
code" sub-menu, and a  after that simply inserts "#+begin_src", and
leaves point after that.




Re: [O] Git repository error

2017-12-18 Thread Colin Baxter
> Marco Wahl  writes:

> Jack Kamm  writes:
>> I'm having the same issue as Josiah, are others able to pull from
>> the git repo?

> git pull works for me.

> Maybe the following questions lead to a better understanding.

> What about performing a plain

> git pull

> instead of make update?

> What about a fresh git clone?


I've just entered "git pull" and I get the same "Connection reset by peer"
error as before.


-- 
Colin Baxter
m43...@yandex.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-
The sole cause of all human misery is the inability of people to sit
quietly in their rooms.  Blaise Pascal, 1670



Re: [O] Git repository error

2017-12-18 Thread Detlef Steuer
Am Mon, 18 Dec 2017 17:28:03 +0100
schrieb Marco Wahl :

> Jack Kamm  writes:
> 
> > I'm having the same issue as Josiah, are others able to pull from
> > the git repo?  
> 
> git pull works for me.

not for me, since nearly a week now

different machines, home and work

> 
> Maybe the following questions lead to a better understanding.
> 
> What about performing a plain
> 
> git pull
> 
> instead of make update?
> 
> What about a fresh git clone?
> 

doesn't work neither, sorry

Detlef


> 
> HTH
> 
> 
> 






Re: [O] header argument :noweb-ref seems can't be resolved

2017-12-18 Thread numbch...@gmail.com
You're right, I searched this function through source code and dived into
them. Did not found any obvious places which might cause this issue neither.

Hope someone can help here.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Tue, Dec 19, 2017 at 12:46 AM, Berry, Charles  wrote:

>
>
> > On Dec 17, 2017, at 8:28 PM, stardiviner  wrote:
> >
> > I can't find `org-babel-noweb-ref-resolve` in any of org-mode `master`
> branch source code.
>
>
> Sorry. I was off my medication when I wrote that. I suffer from CDD
> (Caffeine Deficit Disorder). Now I am back on my meds and can say that I
> should have typed:
>
> (org-babel-expand-noweb-references info)
>
> Is there an emoji for chagrin?
>
> Chuck
>


Re: [O] Broken org-mode "Column width and alignment" in latest version

2017-12-18 Thread Kaushal Modi
On Mon, Dec 18, 2017 at 7:57 AM Ruy Exel  wrote:

> Dear Kaushal,
>
> It took me a while to digest everything in your message, but I have
> finally managed to do my home-work and everything is now working
> perfectly!  Thanks very much!
>

Great! You are welcome.
-- 

Kaushal Modi


Re: [O] header argument :noweb-ref seems can't be resolved

2017-12-18 Thread Berry, Charles


> On Dec 17, 2017, at 8:28 PM, stardiviner  wrote:
> 
> I can't find `org-babel-noweb-ref-resolve` in any of org-mode `master` branch 
> source code.


Sorry. I was off my medication when I wrote that. I suffer from CDD (Caffeine 
Deficit Disorder). Now I am back on my meds and can say that I should have 
typed:

(org-babel-expand-noweb-references info)

Is there an emoji for chagrin?

Chuck



Re: [O] Git repository error

2017-12-18 Thread Marco Wahl
Jack Kamm  writes:

> I'm having the same issue as Josiah, are others able to pull from the
> git repo?

git pull works for me.

Maybe the following questions lead to a better understanding.

What about performing a plain

git pull

instead of make update?

What about a fresh git clone?


HTH




Re: [O] LaTeX (not Beamer) export options

2017-12-18 Thread Ken Mankoff
Hi Eric,

On 2017-12-15 at 12:12, Eric S Fraga  wrote:
> On Thursday, 14 Dec 2017 at 18:05, Ken Mankoff wrote:
>> Is there an easy way to specify #+LATEX_HEADER options that will not
>> be used when exporting to Beamer?
>
> #+latex_header: \ifx\frametitle\undefined\usepackage{somepackage}\fi
>
> which seems to work.  \usepackage{somepackage} is what you actually want
> when not using beamer.  Replace with your own stuff.  You can make it
> more readable by doing:
>
> # only for LaTeX and not beamer
> #+latex_header: \ifx\frametitle\undefined
> #+latex_header: \usepackage{somepackage}
> #+latex_header: \usepackage{another}
> #+latex_header: \fi

Thanks for this solution. Unless there is a more formal solution, or until 
someone implements #+LATEX_ONLY_HEADER, this works well. Thank you!

  -k.



[O] [0] ob-rust, support for rust code blocks

2017-12-18 Thread Andrés Saraos Luna
Hi all,

As a toy project I've written a simple ob-rust, mainly in order to prepare some 
simple demos using rust.

It works well for all the simple examples provided in the ob-rust-test.org 
file. Its shortcomings are
documented in the ob-rust.el file itself.

Since I'm not completely sure of the submission protocol for new features, the 
new file lives in
contrib for now, although it doesn't depend on anything outside of `ob' really 
so maybe it could be
added to core?

As far as testing is concerned, since I don't know how to use the database used 
by `org-test-at-id' I
hardcoded the name of the testing file, I'd be happy to change that if 
necessary.

Here's hoping this is useful for others, and since this is my first time 
writing anything functional
in elisp I'm gladly open for any hints to improve the code.

---
Andrés Saraos Luna>From 0a91c2b0d43e6e8f19d023208e78b07722a5dc33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9s=20Saraos=20Luna?= 
Date: Mon, 18 Dec 2017 10:28:07 +0100
Subject: [PATCH] ob-rust.el, adds working version of rust evaluation in org
 source blocks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Andrés Saraos Luna 

* contrib/lisp/ob-rust.el: Support for limited rust source code in org
  babel.

* testing/examples/ob-rust-test.org: Test all implemented features of
  ob-rust in the form of named Org source blocks.

* testing/lisp/test-ob-rust.el: Defines the tests.

TINYCHANGE
---
 contrib/lisp/ob-rust.el   | 207 ++
 testing/examples/ob-rust-test.org |  82 +++
 testing/lisp/test-ob-rust.el  | 110 
 3 files changed, 399 insertions(+)
 create mode 100644 contrib/lisp/ob-rust.el
 create mode 100644 testing/examples/ob-rust-test.org
 create mode 100644 testing/lisp/test-ob-rust.el

diff --git a/contrib/lisp/ob-rust.el b/contrib/lisp/ob-rust.el
new file mode 100644
index 0..daa206228
--- /dev/null
+++ b/contrib/lisp/ob-rust.el
@@ -0,0 +1,207 @@
+;;; ob-rust.el --- Babel Functions for rust -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2017 Free Software Foundation, Inc.
+
+;; Author: Andrés Saraos Luna
+;; Keywords: literate programming, reproducible research
+;; Homepage: http://orgmode.org
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;; Org-Babel support for evaluating rust code.
+;;
+;; A currently very limited implementation:
+;;  - arrays, vecs, lists or tables are not yet supported as header
+;;  arguments
+;;  - no error handling
+;;  - only :results output is supported
+;;  - cargo is completely ignored
+
+(require 'ob)
+
+(defvar org-babel-tangle-lang-exts)
+(add-to-list 'org-babel-tangle-lang-exts '("rust" . "rs"))
+
+(defcustom org-babel-rust-command "rustc"
+  "Name of the rust command."
+  :group 'org-babel
+  :type 'string)
+
+(defun org-babel-execute:rust (body params)
+  (let* ((full-body (org-babel-expand-body:rust body params))
+ (cmpflag (or (cdr (assq :cmpflag params)) ""))
+ (cmdline (or (cdr (assq :cmdline params)) ""))
+ (default-directory org-babel-temporary-directory)
+ (src-file (org-babel-temp-file "rust-src-" ".rs"))
+ (exe-file (org-babel-rust-exe-file src-file cmpflag))
+ (results))
+(with-temp-file src-file
+  (insert full-body)
+  (when (require 'rust-mode nil t)
+(rust-format-buffer)))
+(org-babel-eval
+ (format "%s %s %s" org-babel-rust-command cmpflag src-file) "")
+(setq results (org-babel-eval (format "%s %s" exe-file cmdline) ""))
+(org-babel-reassemble-table
+ (org-babel-result-cond (cdr (assq :result-params params))
+   (org-babel-read results)
+   (let ((tmp-file (org-babel-temp-file "rs-")))
+ (with-temp-file tmp-file (insert results))
+ (org-babel-import-elisp-from-file tmp-file)))
+ (org-babel-pick-name
+  (cdr (assq :colname-names params)) (cdr (assq :colnames params)))
+ (org-babel-pick-name
+  (cdr (assq :rowname-names params)) (cdr (assq :rownames params))
+
+(defun org-babel-expand-body:rust (body params)
+  "Expand a block of rust code with org-babel according to its
+header arguments."
+  (let* ((main-p (not (string= (cdr (assq :main params)) 

Re: [O] Bug: Editing src blocks: user-error: Cannot modify an area being edited in a dedicated buffer [9.1.4 (9.1.4-2-g118753-elpaplus @ /home/paul/.emacs.d/elpa/org-plus-contrib-20171211/)]

2017-12-18 Thread Nicolas Goaziou
Hello,

Paul Davis  writes:

> Using ~C-c '~ to edit a src block works as expected, but if I make
> changes and use ~C-c '~ again, I get the error ~Cannot modify an area
> being edited in a dedicated buffer~

I need more information. Where do you make changes? In the newly created
buffer? Where do you call ~C-c '~?

For example, I created the following buffer

#+begin_src emacs-lisp
  (+ 1 2)
#+end_src

moved on the source block, used C-c '. Then, in the new buffer,
I replaced 2 with 3 and pressed C-c ' again, without any error?

IOW, could you provide a precise recipe demonstrating the issue?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Definition list not highlight for japanese character.

2017-12-18 Thread Nicolas Goaziou
Hello,

Shiyao MA  writes:

> Definition list not highlight for japanese character.
>
> for example, check this picture:
> https://imgur.com/a/dBKt6
>
> どういたしまして is not highlighted, where asdf is highlighted.

I cannot reproduce it in a recent Org. You may want to update it.

Regards,

-- 
Nicolas Goaziou



[O] http://orgmode.org/org.html "Short Contents" links seem to be broken

2017-12-18 Thread Rainer Stengele

Hi,

opening http://orgmode.org/org.html and clicking on one of the "Short Contents"
links does not jump to the target. I use Chrome under Windows.
Can anybody confirm please this as bug in the html manual or tell me it's my 
local problem.
BTW, the dynamic right sided pop up toc does include working links.

Thank you.
Regards, Rainer




Re: [O] Add zero width nbsp to pre component of org-emphasis-regexp-components

2017-12-18 Thread Nicolas Goaziou
Hello,

k...@rdw.se (Christoffer Stjernlöf) writes:

> I'm sure there's a reason this hasn't been done, so I'll suggest it and
> hope for a lecture. :) Sometimes I want to emphasise just part of a word
> (I'll use the company name socialgrow as a running example), so I insert
> a zero width non-breaking space around the emphasis marks, like so:
> social[zewinbsp]*grow*. My thinking is that this will let Org think
> they are two separate words, but in any real sense they stick together
> (no linebreak across them, zero spacing between them.)
>
> However, this requires one to add the zero width non breaking space
> to the pre component of org-emphasis-regexp-components, which is
> not the default. Any reason that is so?

It is the default in Org development branch, using [:space:] character
class. The change will be available in Org 9.2.  Meanwhile, you can use
the default value:

  '("-[:space:]('\"{" "-[:space:].,:!?;'\")}\\[" "[:space:]" "." 1)


Regards,

-- 
Nicolas Goaziou



Re: [O] Broken org-mode "Column width and alignment" in latest version

2017-12-18 Thread Ruy Exel
Dear Kaushal,

It took me a while to digest everything in your message, but I have
finally managed to do my home-work and everything is now working
perfectly!  Thanks very much!

Yours,
Ruy

On Tue, Dec 12, 2017 at 6:53 PM, Kaushal Modi  wrote:
> On Sat, Dec 9, 2017 at 1:11 PM Ruy Exel  wrote:
>>
>> Dear Kaushal,
>>
>> The real treat is to read your nice message and to be a member of such a
>> fantastic group of people!
>>
>> Following your advice to stick to a stable release I searched for info on
>> how to install it and I found instructions in
>> http://orgmode.org/org.html#Installation telling me to run "M-x
>> package-install RET org RET" from within emacs.  I did it and it all looked
>> like everything was running smoothly untill I was issued the messages:
>>
>> WARNING: No org-loaddefs.el file could be found from where org.el is
>> loaded.  You need to run "make" or "make autoloads" from Org lisp directory
>
>
> Did you add Org Elpa to package archives as described here:
> http://orgmode.org/elpa.html ?
>
>> I am used to this since I first tried the cloned git version, but I
>> noticed that there is no Makefile in the directory containing the newly
>> dowloaded files (~/.emacs.d/elpa/org-20171113/), so I got stuck.
>
>
> I haven't installed Org from within Emacs for quite some time now as I build
> it using make from its git clone. Also I haven't seen the warning that you
> see. Hopefully someone else can comment on that part.
>
> I noticed though that the Org version you quoted:
> ~/.emacs.d/elpa/org-20171113/ is a bit old (not too old, but not the latest
> served on Elpa either). If you add the Org Elpa to package-archive as I
> suggested above, and install using the M-x package-list-packages interface,
> the archives will first get auto-refreshed, and then you can be rest assured
> that the installed packages are the latest versions.
>
>>
>> I noticed that in the above installation instructions it is mentioned
>> that:
>>
>> Important: you need to do this in a session where no .org file has been
>> visited, i.e., where no Org built-in function have been loaded. Otherwise
>> autoload Org functions will mess up the installation.
>>
>> so I repeated the process right after starting emacs with the
>> --no-init-files option, then I added the line "(package-initialize)" to my
>> initialization file but it still does not work,
>
>
> What doesn't work? You shouldn't need to do --no-init-files. Simply make
> sure that your config is not doing (require 'org) directly or indirectly
> somewhere and you are not opening an Org file at emacs startup. That's all.
>
>>
>> namely the old org-mode is loaded upon starting emacs.
>
>
> How are you telling that? If you do M-: (featurep 'org) and it returns nil,
> it means that org is not yet loaded.
>
>>
>>   It is curious that I now have two org-mode entries in the top Emacs-Info
>> node, one for the old version (7.9.3f) and another one for the new one
>> (9.1.2 (release_9.1.2-37-g3f8d67)).
>
>
> That's a different thing, has to do with the Info-directory-list variable,
> and is fine. You can have paths to Info manuals from multiple Org versions
> added to that var, and so you will see multiple Org manuals. I personally
> don't like that and so I surgically remove[1] all the Org versions that I am
> not using in the current emacs session from load-path and
> Info-directory-list.
>
>> Could I have premanently messed up my emacs installation by not following
>> the above Important advice?
>
>
> Not trying to sound philosophical, but nothing is permanent. All the package
> installations happen in the elpa dir.. so to start the Org installation from
> scratch, you can rm -rf all the org installations from the elpa/ dir and
> restart emacs following that "Important" instruction and retry installing
> Org.
>
> [1]: https://scripter.co/building-org-development-version/
> --
>
> Kaushal Modi



Re: [O] ob-python newline & indentation behavior

2017-12-18 Thread Kyle Meyer
Jack Kamm  writes:

> FSF sent me the signed papers :) I've attached them.

great :)

> Could Kyle or someone else merge in the patch, which I am reattaching?

I'll take a final look tonight (est).



[O] duration feature especially useful

2017-12-18 Thread Jude DaShiell
I have some devices like an iphone which is all of 4 years old and going 
on 5.  I can use org-mode to log battery recharge and battery discharge 
durations with a basic org-mode table and in the event the discharge 
duration starts dropping off sharply maybe get to a store and replace the 
phone.  I put two inactive time stamps in a field for recharge and 
discharge and beside both of those fields I have a duration field where I 
do the math and record the hours and minutes.


I have an ~/org/logs/iphone.org file and have other directories under that 
~/org/ directory too.




--




[O] Add zero width nbsp to pre component of org-emphasis-regexp-components

2017-12-18 Thread Christoffer Stjernlöf
Hey!

I'm sure there's a reason this hasn't been done, so I'll suggest it and
hope for a lecture. :) Sometimes I want to emphasise just part of a word
(I'll use the company name socialgrow as a running example), so I insert
a zero width non-breaking space around the emphasis marks, like so:
social[zewinbsp]*grow*. My thinking is that this will let Org think
they are two separate words, but in any real sense they stick together
(no linebreak across them, zero spacing between them.)

However, this requires one to add the zero width non breaking space
to the pre component of org-emphasis-regexp-components, which is
not the default. Any reason that is so?

Regards,
Chris



Re: [O] Git repository error

2017-12-18 Thread Jack Kamm
Josiah Schwab  writes:

I'm having the same issue as Josiah, are others able to pull from the
git repo?

Jack

> Hello,
>
> For about the past day, I've been getting this error upon running 'make
> update' from my local Org repository:
>
>   fatal: read error: Connection reset by peer
>   error: Could not fetch origin
>
> If I recall correctly, this has happened before and the resolution was
> that some admin needed to do something server-side.
>
> Thanks,
> Josiah



[O] Bug: Editing src blocks: user-error: Cannot modify an area being edited in a dedicated buffer [9.1.4 (9.1.4-2-g118753-elpaplus @ /home/paul/.emacs.d/elpa/org-plus-contrib-20171211/)]

2017-12-18 Thread Paul Davis
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 mailing list.


Using ~C-c '~ to edit a src block works as expected, but if I make
changes and use ~C-c '~ again, I get the error ~Cannot modify an area
being edited in a dedicated buffer~

It happens with the default setting for ~org-src-window-setup~ as well.

I was not experiencing this issue with version 20171127, which was the
last I had befire upgrading to this version. Tested on 20171205 and it
also presented this bug.


Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2017-12-04
Package: Org mode version 9.1.4 (9.1.4-2-g118753-elpaplus @
/home/paul/.emacs.d/elpa/org-plus-contrib-20171211/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 outline-minor-mode-hook '((lambda nil (make-local-variable (quote
smart-outline-cut)) (setq smart-outline-cut nil)))
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(closure
   (htmlize-buffer-places
org-html-format-table-no-css htmlize-css-name-prefix htmlize-output-type
htmlize-output-type htmlize-css-name-prefix t)
   (_name contents) contents)
 org-clock-into-drawer "LOGBOOK"
 org-log-done 'time
 org-src-window-setup 'other-frame
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-clock-mode-line-total 'today
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-clock-idle-time 15
 org-pretty-entities t
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-default-notes-file "~/org/todo.org"
 org-clock-in-resume t
 org-capture-templates '(("t" "Todo" entry (file+headline (concat
org-directory "/todo.org") "Todo") "* TODO %?\n  SCHEDULED:
%^{Schedule}t\n  %A")
 ("n" "Note" entry (file+headline (concat
org-directory "/notes.org") "Notes") "* %? %U\n  %i"))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(closure (t) (_ contents) contents)
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-from-is-user-regexp nil
 org-src-mode-hook '(#[nil "\301 \302\"\207" [flycheck-disabled-checkers
add-to-list emacs-lisp-checkdoc] 3] 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 '(#[0 "\300\301\302\303\304$\207" [add-hook
change-major-mode-hook org-show-block-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook
change-major-mode-hook org-babel-show-result-all append local] 5]
 (closure
  (org-inlinetask-min-level org-struct-menu org-last-state
org-id-track-globally texmathp-why remember-data-file
org-agenda-tags-todo-honor-ignore-options
   iswitchb-temp-buflist calc-embedded-open-mode
calc-embedded-open-formula calc-embedded-close-formula
align-mode-rules-list org-export-registered-backends t)
  nil (add-hook (quote change-major-mode-hook) (quote
org-show-block-all) (quote append) (quote local)))
 (closure (*this* org-babel-confirm-evaluate-answer-no t)
nil
  (add-hook (quote change-major-mode-hook) (quote
org-babel-show-result-all) (quote append) (quote local)))
 #[nil "\300\301!\207" [org-bullets-mode 1] 2] #[nil
"\300\301\302\303\304$\207" [add-hook after-save-hook org-babel-tangle nil
local-please] 5] org-clock-load
 (closure
  (org-inlinetask-min-level org-mode-map org-tbl-menu
org-org-menu org-struct-menu org-entities org-last-state
org-id-track-globally org-clock-start-time
   texmathp-why remember-data-file
org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist
calc-embedded-open-mode calc-embedded-open-formula
   calc-embedded-close-formula align-mode-rules-list
org-emphasis-alist org-emphasis-regexp-components
org-export-registered-backends org-modules
   org-babel-load-languages org-element-paragraph-separate
ffap-url-regexp t)
  nil (add-hook (quote change-major-mode-hook) (quote
org-show-block-all) (quote append) (quote local)))
 (closure
  (org-bracket-link-regexp org-src-window-setup *this*
org-babel-confirm-evaluate-answer-no org-src-preserve-indentation

Re: [O] Key binding popup interface

2017-12-18 Thread John Wiegley
> "SM" == Stefan Monnier  writes:

SM> I have no opinion on that part, but if a part of Hydra would be useful for
SM> other packages, then it'd be good to split it out: for me "Hydra" means
SM> "define a Hydra via defhydra or something like that", so if you tell me to
SM> use Hydra to "show the available valid key bindings", I wouldn't know
SM> where to start.

Plus, there are other, less intrusive way to achieve "show the available valid
key bindings", such as the which-key package.

I think one area where Hydras come into their own is that once you have the
Hydra active, it stays active, allowing you to chain together many single-
letter commands.

For example, you could have a hydra for "large-scale syntactic structures",
where repeated uses of n/p are mapped to what C-c C-n and C-c C-p usually do
in modes like cc-mode.

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2



[O] bug#24791: bug#24791: org-todo-yesterday behaves like plain org-todo (incorrect timestamp)

2017-12-18 Thread Jan Böhm
Hi,

interestingly, it hasn't happend to me for a long time now – I assumed
that it had already been fixed. I tried again just now and I can no
longer reproduce it with Org 9.0.9. / Emacs 27.0.50.

Cheers,
Jan


Am 04.12.2017 um 20:59 schrieb Nicolas Goaziou:
> Hello,
> 
> Allen Li  writes:
> 
>> On Fri, Dec 1, 2017 at 1:53 PM, Nicolas Goaziou  
>> wrote:
>>> Hello,
>>>
>>> Jan Böhm  writes:
>>>
 Symptoms: both org-todo-yesterday and org-agenda-todo-yesterday behave
 just like normally setting todo state to "DONE" with org-todo.
 Specifically, the timestamp
 added in the log takes the current time instead of 23:59 of the previous
 day, as would be expected.

 Replicate behaviour:
 start emacs -Q
 set org-log-done to "time"
 visit new file and switch to org mode
 create TODO headline and set TODO state to "DONE" by calling
 "org-todo-yesterday"
 ⇒ todo state is set to DONE correctly, but the timestamp inserted in
 the log drawer is the current time.
>>>
>>> I cannot reproduce it in a recent Org release. Could you double-check
>>> with a newer Org?
>>
>> I am going to blindly wager that this is yet another bug caused by Org
>> mode's subtle timezone issues.
>>
>> I can reproduce it (and crucially, I am not in the GMT time zone),
>> although the repro recipe produces a CLOSED timestamp and not a log
>> drawer timestamp.
> 
> I removed timezone references from maint. Can you still reproduce the
> issue?
> 
> Regards,
> 





Re: [O] ob-python newline & indentation behavior

2017-12-18 Thread John Kamm

Kyle Meyer writes:

> Hmm, according to the site below, a response should come within 5
> business days.  That fits with my personal experience, but I'm not sure
> what's typical.  Also, the delay might be Thanksgiving-related.

FSF sent me the papers which I signed and returned about a week ago, am
just waiting for the final confirmation now.

>> Given how broken ":session :results value" is, and the difficulty in
>> implementing it correctly, I agree with Kyle's suggestion to remove it.
>> Should we start another thread to discuss this?
>
> I think that'd be good since 1) someone with an opinion on that topic
> might not notice it within this thread and 2) it's now orthogonal to
> this patch.

Great, I'll start another thread in a few days, summarizing the various
options you laid out before. Another idea I had was to have some special
"result" variable that could be assigned to. Anyways, we can discuss
more in the new thread.

> ... (suggestions to improve patch)

I've incorporated all your suggestions/improvements into the patch,
please see below. Thanks again for spending time to review it.


>From 40e961e349fdb347fbf9d59b3aca58163749f804 Mon Sep 17 00:00:00 2001
From: Jack Kamm 
Date: Sat, 2 Dec 2017 09:03:00 +
Subject: [PATCH] ob-python: Fix :session :results output multiline behavior

* lisp/ob-python.el (orb-babel-python-evaluate-session): When :session
:results output, send multiline code blocks to tmpfile and execute in
Python with exec().
(org-babel-python--exec-tmpfile): New function.
* testing/lisp/test-ob-python.el (test-ob-python/session-multiline):
Test for :session with multiple lines and indentation.
---
 lisp/ob-python.el  | 36 ++--
 testing/lisp/test-ob-python.el | 17 +
 2 files changed, 43 insertions(+), 10 deletions(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 60ec5fa47..b3f50cfe5 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -239,6 +239,15 @@ def main():
 
 open('%s', 'w').write( pprint.pformat(main()) )")
 
+(defconst org-babel-python--exec-tmpfile
+  (concat
+   "__org_babel_python_fname = '%s'; "
+   "__org_babel_python_fh = open(__org_babel_python_fname); "
+   "exec(compile("
+   "__org_babel_python_fh.read(), __org_babel_python_fname, 'exec'"
+   ")); "
+   "__org_babel_python_fh.close()"))
+
 (defun org-babel-python-evaluate
   (session body  result-type result-params preamble)
   "Evaluate BODY as Python code."
@@ -306,16 +315,23 @@ last statement in BODY, as elisp."
  (results
   (pcase result-type
 (`output
- (mapconcat
-  #'org-trim
-  (butlast
-   (org-babel-comint-with-output
-   (session org-babel-python-eoe-indicator t body)
- (funcall input-body body)
- (funcall send-wait) (funcall send-wait)
- (insert org-babel-python-eoe-indicator)
- (funcall send-wait))
-   2) "\n"))
+(let ((body (if (string-match-p ".\n+." body) ; Multiline
+(let ((tmp-src-file (org-babel-temp-file
+ "python-")))
+  (with-temp-file tmp-src-file (insert body))
+  (format org-babel-python--exec-tmpfile
+  tmp-src-file))
+  body)))
+  (mapconcat
+   #'org-trim
+   (butlast
+(org-babel-comint-with-output
+(session org-babel-python-eoe-indicator t body)
+  (funcall input-body body)
+  (funcall send-wait) (funcall send-wait)
+  (insert org-babel-python-eoe-indicator)
+  (funcall send-wait))
+2) "\n")))
 (`value
  (let ((tmp-file (org-babel-temp-file "python-")))
(org-babel-comint-with-output
diff --git a/testing/lisp/test-ob-python.el b/testing/lisp/test-ob-python.el
index d9fca220f..915b1bc77 100644
--- a/testing/lisp/test-ob-python.el
+++ b/testing/lisp/test-ob-python.el
@@ -101,6 +101,23 @@ return x
 (should (equal '(("col") ("a") ("b"))
   (org-babel-execute-src-block)
 
+(ert-deftest test-ob-python/session-multiline ()
+  ;; FIXME workaround to prevent starting prompt leaking into output
+  (run-python)
+  (sleep-for 0 10)
+  (org-test-with-temp-text "
+#+begin_src python :session :results output
+  foo = 0
+  for _ in range(10):
+  foo += 1
+
+  foo += 1
+
+  print(foo)
+#+end_src"
+   (org-babel-next-src-block)
+   (should (equal "20" (org-babel-execute-src-block)
+
 (provide 'test-ob-python)
 
 ;;; test-ob-python.el ends here
-- 
2.15.1




[O] bug#28072: Org Mode Drawer Folds Unexpectedly

2017-12-18 Thread Mitch Norcross
Hello Nicolas,
Thanks you so much for trying to reproduce my observation.
I see the discrepancy that you have uncovered...
It seems that to reproduce the problem, the drawer must be
inside the body of a headlined section.

So, simply adding a headline above the drawer should allow
you to reproduce the problem.  For example:

* Testing drawer that closes unexpectedly

:mydrawer:
  - Plain list item with children
  + some notes here
  + and here
  + some more here
:end:

Looking forward to hearing again from you.

Kind Regards,
/Mitch




On Mon, Dec 4, 2017 at 3:32 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Mitch Norcross  writes:
>
> > * ISSUE: Org Mode Drawer Folds Unexpectedly
> >
> > ** Issue Description
> >
> >   - Org Mode Drawers fold (unexpected) when user attempts to unfold a
> plain
> > list item within the drawer after having folded it.
> >
> > ** Steps To Reproduce the Bug
> >
> >   - Steps
> >   1) Create a plain list with some hierarchy in it
> >   2) Put the list in a drawer
> >   3) Unfold the drawer
> >   4) Fold a list item that has children
> >   5) Try to unfold the list item that that you folded
> >   - Notice that the drawer then folds, unexpectedly
> >
> > :mydrawer:
> >   - Plain list item with children
> >   + some notes here
> >   + and here
> >   + some more here
> > :end:
>
> I cannot reproduce it.
>
> More explicitly, I copied the drawer above in a new file. I folded the
> top item, then immediately unfolded it. The drawer didn't move.
>
> Am I missing something?
>
> Regards,
>
> --
> Nicolas Goaziou0x80A93738
>