Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Michael Dauer
The main advantage is that all org-mode actions on subtrees would work
without any specific handling of inline tasks. e.g. visibility cycling,
hiding of none context, cut/copy, moving. With many of these actions I
experience some issues with inline tasks. And even from my personal user
perception I would like to have just the task headings on the same level,
not also the END marks.

Bastien  schrieb am Sa., 15. Mai 2021, 11:02:

> Hi Michael,
>
> Michael Dauer  writes:
>
> > Wouldn't it be the much better approach to change inline tasks so
> > that the END line is one level below the "begin" line?
>
> I'm not sure how this would be better, and I would rather find this
> more confusing.  What is the expected benefit?
>
> --
>  Bastien
>


Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Bastien
Ihor Radchenko  writes:

> Bastien  writes:
>> Can you make a patch for this?
>
> It was easier than I anticipated. See the attached.

Indeed!  Thanks, applied.

-- 
 Bastien



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Ihor Radchenko
Bastien  writes:
> Can you make a patch for this?

It was easier than I anticipated. See the attached.

>From f681dcb12df823cafe388973bb93c83ce2e0f6bb Mon Sep 17 00:00:00 2001
Message-Id: 
From: Ihor Radchenko 
Date: Sat, 15 May 2021 20:57:00 +0800
Subject: [PATCH] Allow moving inlinetasks using org-metaup/down

* lisp/org.el (org-metaup, org-metadown): Use
`org-drag-elementbackward'/`org-drag-element-forward' to move
inlinetasks.
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index ccf438f70..d031e6916 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16213,7 +16213,7 @@ (defun org-metaup (&optional _arg)
((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up))
((and (featurep 'org-inlinetask)
  (org-inlinetask-in-task-p))
-(user-error "Dragging inline tasks is not supported"))
+(org-drag-element-backward))
((org-at-heading-p) (call-interactively 'org-move-subtree-up))
((org-at-item-p) (call-interactively 'org-move-item-up))
(t (org-drag-element-backward
@@ -16246,7 +16246,7 @@ (defun org-metadown (&optional _arg)
((org-at-table-p) (call-interactively 'org-table-move-row))
((and (featurep 'org-inlinetask)
  (org-inlinetask-in-task-p))
-(user-error "Dragging inline tasks is not supported"))
+(org-drag-element-forward))
((org-at-heading-p) (call-interactively 'org-move-subtree-down))
((org-at-item-p) (call-interactively 'org-move-item-down))
(t (org-drag-element-forward
-- 
2.26.3



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Bastien
Ihor Radchenko  writes:

> Bastien  writes:
>> Carsten proposed a patch that I adapted a little bit and pushed to the
>> maint branch.  We now throw an error saying that dragging inline tasks
>> is not supported.  
>
> Isn't it easy to implement using org-element-swap-A-B?

Well, probably, I didn't try this.

> Something like
>
> (defun org-element-swap-at-point (&optional down)
>   (when-let* ((el-cur (org-element-at-point))
> (el-other (org-with-point-at
>   (if down
>   (org-element-property :end el-cur)
> (1- (org-element-property :begin el-cur)))
> (org-element-at-point
> (unless (equal el-cur el-other)
>   (org-element-swap-A-B el-cur el-other

Can you make a patch for this?

-- 
 Bastien



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Ihor Radchenko
Bastien  writes:
> Carsten proposed a patch that I adapted a little bit and pushed to the
> maint branch.  We now throw an error saying that dragging inline tasks
> is not supported.  

Isn't it easy to implement using org-element-swap-A-B?
Something like

(defun org-element-swap-at-point (&optional down)
  (when-let* ((el-cur (org-element-at-point))
  (el-other (org-with-point-at
(if down
(org-element-property :end el-cur)
  (1- (org-element-property :begin el-cur)))
  (org-element-at-point
(unless (equal el-cur el-other)
  (org-element-swap-A-B el-cur el-other

Best,
Ihor



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-15 Thread Bastien
Hi Michael,

Michael Dauer  writes:

> Wouldn't it be the much better approach to change inline tasks so
> that the END line is one level below the "begin" line?

I'm not sure how this would be better, and I would rather find this
more confusing.  What is the expected benefit?

-- 
 Bastien



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-14 Thread Michael Dauer
Hi,

Wouldn't it be the much better approach to change inline tasks so that the
END line is one level below the "begin" line?

I did not think it through. But IMO it would make IT more compatible with
normal org behavior, and also more visually appealing.

With the END notation it would still be unambiguous.

I'm aware that this change would have an impact on existing documents. But
worth a simple migration command the improvement would be worth the little
pain.

Regards,
m


Am Do., 13. Mai 2021 um 15:08 Uhr schrieb Bastien :

> Hi Christian,
>
> Bastien  writes:
>
> > Christian Hemminghaus  writes:
> >
> >> I ran into an error message while composing structured text with
> >> org-mode using org-inline-tasks. The error appears when moving around
> >> inline tasks in my document.
> >
> > yes, I confirm this bug.
>
> Carsten proposed a patch that I adapted a little bit and pushed to the
> maint branch.  We now throw an error saying that dragging inline tasks
> is not supported.
>
> Thanks,
>
> --
>  Bastien
>
>
> --
> Confidentiality Notice:This email and any attachments it may contain are
> intended for the individual or entity above and may be confidential and
> protected by legal privilege. SmartPM Technologies, Inc. makes no
> warranties, express or implied, concerning the accuracy of the information
> contained herein, which is subject to change without notice. Unintended
> recipients should be aware that use of this e-mail or any of its
> attachments in any way is forbidden.
>


Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2021-05-13 Thread Bastien
Hi Christian,

Bastien  writes:

> Christian Hemminghaus  writes:
>
>> I ran into an error message while composing structured text with
>> org-mode using org-inline-tasks. The error appears when moving around
>> inline tasks in my document.
>
> yes, I confirm this bug.

Carsten proposed a patch that I adapted a little bit and pushed to the
maint branch.  We now throw an error saying that dragging inline tasks
is not supported.  

Thanks,

-- 
 Bastien



Bug: Parentheses matching in org-babel code blocks [9.3.6 (9.3.6-elpa @ /home/pholi/.emacs.d/elpa/org-9.3.6/)]

2020-11-18 Thread Philippe Olivier


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

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Some parentheses matching doesn't work properly in the elisp code blocks in 
org-babel. How to reproduce this bug:

1. Start emacs in quiet mode to disable all custom settings (emacs -q).
2. Enable parentheses matching (M-x show-paren-mode).
3. In the *scratch* buffer, enter the following (parentheses match correctly):
   (if (< x 2))
4. Create an org file test.org and enter the following org-babel code block 
(parentheses do not match correctly):
   #+BEGIN_SRC emacs-lisp
 (if (< x 2))
   #+END_SRC

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, 
cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version 9.3.6 (9.3.6-elpa @ 
/home/pholi/.emacs.d/elpa/org-9.3.6/)



Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-10-10 Thread Jack Kamm
Checking back in on this since Org 9.4 has been released. This issue
should be fixed now, and my tests corroborate this. If you're still
experiencing this problem after updating, please let me know.

Best,
Jack

Jack Kamm  writes:

>> I redid the test but loaded the lastest org-mode and there was no
>> error. This means you probably don't need to debug this. It has been
>> fixed in the latest version, but the fix hasn't been updated in the
>> elpa package yet.  you can either wait for the next release or pull
>> the latest code from the repo.
>
> Thanks for checking this Ian, I believe that this issue would have been
> fixed by this patch:
>
> https://orgmode.org/list/87pnfdo88v@gmail.com/
>
> But I've been too swamped to check.



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2020-09-06 Thread Christian Hemminghaus
Hi Bastien,

> I guess this is due to `org-element-at-point' considering inline tasks
> as headlines, thus trying to move only one line.
>
> Nicolas, would you know how to solve this (if it does not get us into
> hard syntactic decisions)?

This would probably be the clean solution. As a (temporary)
workaround, I hooked org-metaup/-down and ask for org-inlintask at
point explicitly.

```
(defun ch/org-metaup-inlinetask ()
"If at inline task and not active region, drag inline task backward."
(if (and (not (org-region-active-p)) (org-inlinetask-at-task-p))
(org-drag-element-backward)
  nil))

  (defun ch/org-metadown-inlinetask ()
"If at inline task and not active region, drag inline task forward."
(if (and (not (org-region-active-p)) (org-inlinetask-at-task-p))
(org-drag-element-forward)
  nil))

  (add-hook 'org-metaup-hook 'ch/org-metaup-inlinetask t)
  (add-hook 'org-metadown-hook 'ch/org-metadown-inlinetask t)
```

Regards,
Christian



Re: Bug: error in org-table-justify-field-maybe - in conjunction with org-sbe [9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)]

2020-09-05 Thread Bastien
Hi Lester,

Lester Longley  writes:

> I am encountering an error when using this .org code:

Thanks a lot for the detailed report.

I prevented the error from occurring in maint (114d50982).

Best,

-- 
 Bastien



Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2020-09-05 Thread Bastien
Hi Christian,

Christian Hemminghaus  writes:

> I ran into an error message while composing structured text with
> org-mode using org-inline-tasks. The error appears when moving around
> inline tasks in my document.

yes, I confirm this bug.

The wrong behavior is here, whether you loaded org-inlinetask or not,
but the error ("Invalid...") is only triggered when org-inlinetask is
loaded.

I guess this is due to `org-element-at-point' considering inline tasks
as headlines, thus trying to move only one line.

Nicolas, would you know how to solve this (if it does not get us into
hard syntactic decisions)?

-- 
 Bastien



Re: Bug: org-capture entry sometimes ends without newline, garbles next headline [9.3.6 (9.3.6-elpa @ /home/arne/Disy/.emacs.d/elpa/org-9.3.6/)]

2020-09-04 Thread Bastien
Hi Arne,

"Dr. Arne Babenhauserheide"  writes:

> Sometimes when I use org-capture to create a new headline, that headline
> ends with a non-empty partial line that isn’t terminated by a newline.

>From memory, this has been fixed in the master branch, which will be
released as 9.4 soon.

If you can test master and confirm the fix, that'd be great.

Thanks,

-- 
 Bastien



Re: Bug: org-capture entry sometimes ends without newline, garbles next headline [9.3.6 (9.3.6-elpa @ /home/arne/Disy/.emacs.d/elpa/org-9.3.6/)]

2020-08-29 Thread Kyle Meyer
Dr. Arne Babenhauserheide writes:

> (how can I close the bug?)

This list isn't hooked up to a tracker, so there's nothing to close.



Re: Bug: org-capture entry sometimes ends without newline, garbles next headline [9.3.6 (9.3.6-elpa @ /home/arne/Disy/.emacs.d/elpa/org-9.3.6/)]

2020-08-29 Thread Dr. Arne Babenhauserheide

Kyle Meyer  writes:

> Dr. Arne Babenhauserheide writes:
>
>> Sometimes when I use org-capture to create a new headline, that headline
>> ends with a non-empty partial line that isn’t terminated by a newline.
>>
>> This causes the next headline to be corrupted, because the * is appended
>> to the last line of the new entry.
>
> I believe this issue has already been resolved on the master branch.
> There have been a few bug reports and commits in this area; I think
> 6882478ca (capture: Fix org-capture-place-entry narrow bounds,
> 2020-05-29) is the most recent fix.

Thank you for the info!

(how can I close the bug?)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken


signature.asc
Description: PGP signature


Re: Bug: org-capture entry sometimes ends without newline, garbles next headline [9.3.6 (9.3.6-elpa @ /home/arne/Disy/.emacs.d/elpa/org-9.3.6/)]

2020-08-28 Thread Kyle Meyer
Dr. Arne Babenhauserheide writes:

> Sometimes when I use org-capture to create a new headline, that headline
> ends with a non-empty partial line that isn’t terminated by a newline.
>
> This causes the next headline to be corrupted, because the * is appended
> to the last line of the new entry.

I believe this issue has already been resolved on the master branch.
There have been a few bug reports and commits in this area; I think
6882478ca (capture: Fix org-capture-place-entry narrow bounds,
2020-05-29) is the most recent fix.



Bug: org-capture entry sometimes ends without newline, garbles next headline [9.3.6 (9.3.6-elpa @ /home/arne/Disy/.emacs.d/elpa/org-9.3.6/)]

2020-08-28 Thread Dr. Arne Babenhauserheide
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

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Sometimes when I use org-capture to create a new headline, that headline
ends with a non-empty partial line that isn’t terminated by a newline.

This causes the next headline to be corrupted, because the * is appended
to the last line of the new entry.

Example:

* new entry
some text * old entry

I tried adding the empty-lines options and empty-lines-before and
empty-lines-after, but this did not fix the problem.

This sometimes causes entries to no longer be recognized as headlines,
so my task planning does not show them (for example in org-agenda view,
clocktable, and kanban.el).

It would be great if it could be ensured that capturing a new entry can
never modify the first line of another entry.

Best wishes,
Arne

-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken


signature.asc
Description: PGP signature


Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-19 Thread Jack Kamm
> I redid the test but loaded the lastest org-mode and there was no
> error. This means you probably don't need to debug this. It has been
> fixed in the latest version, but the fix hasn't been updated in the
> elpa package yet.  you can either wait for the next release or pull
> the latest code from the repo.

Thanks for checking this Ian, I believe that this issue would have been
fixed by this patch:

https://orgmode.org/list/87pnfdo88v@gmail.com/

But I've been too swamped to check.



Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]

2020-07-18 Thread Christian Hemminghaus
Hello everyone,

I ran into an error message while composing structured text with
org-mode using org-inline-tasks. The error appears when moving around
inline tasks in my document.

Here is the example:

# # BEGIN EXAMPLE

This is a paragraph in my document.
It may contain multiple lines.

*** TODO Inline Task
*** END

This is another paragraph.
May be multiline aswell.

And a third paragraph.
May be multiline aswell.

# # END EXAMPLE

Putting the cursor on "Inline Task" and hitting org-metadown should (at
least in my opinion) swap the inline task with the second paragraph and
hence produce the following:

# # BEGIN EXAMPLE

This is a paragraph in my document.
It may contain multiple lines.

This is another paragraph.
May be multiline aswell.

*** TODO Inline Task
*** END

And a third paragraph.
May be multiline aswell.

# # END EXAMPLE

But instead it produces:

# # BEGIN EXAMPLE

This is a paragraph in my document.
It may contain multiple lines.

*** END

This is another paragraph.
May be multiline aswell.

And a third paragraph.
May be multiline aswell.

*** TODO Inline Task

# # END EXAMPLE

Together with an error message:

org-show-children: Invalid regexp: "Invalid content of \\{\\}"

As swapping paragraphs with inline tasks works the other way around, I
think that this is a bug. Since I am not much familiar with elisp, I
would appreciate a hint how to fix this bug.

Best regards,
Christian

Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-09-16
Package: Org mode version 9.3.6 (9.3.6-elpa @
/home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)



Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-07 Thread ian martins
I was able to reproduce the error. I started emacs without my init file
(emacs -q) and then

,
| (add-to-list 'load-path "~/code/elisp/org-mode/lisp")
| (require 'ob-python)
| (org-babel-do-load-languages 'org-babel-load-languages `((python . t)))
`

in scratch, and then ran your test. I got the same errors you described. I
redid the test but loaded the lastest org-mode and there was no error. This
means you probably don't need to debug this. It has been fixed in the
latest version, but the fix hasn't been updated in the elpa package yet.
you can either wait for the next release or pull the latest code from the
repo.

On Mon, Jul 6, 2020 at 3:18 PM Philip Blagoveschensky 
wrote:

> Hi Ian,
>
>  >Do you have the same issue if you aren't using a session?
>
> If I run the following code block (this time I am using python 3, so
> there are parens in the print line)
>
> #+begin_src python
> def foobar():
>  for i in range(5):
>  pass
>  print("hello world")
>  return 3
>
> return foobar()
> #+end_src
>
> I get
>
> #+RESULTS:
> : 3
>
> so I know it worked fine.
>
> But if I add session like this:
>
> #+begin_src python :session bug_report
> def foobar():
>  for i in range(5):
>  pass
>  print("hello world")
>  return 3
>
> return foobar()
> #+end_src
>
> then in *bug_report* I get
>
>  >>> def foobar():
> ... for i in range(5):
> ... pass
> ...
>  >>> print("hello world")
>File "", line 1
>  print("hello world")
>  ^
> IndentationError: unexpected indent
>  return 3
>  >>>
>File "", line 1
>  return 3
>  ^
> IndentationError: unexpected indent
>  >>> return foobar()
>  >>>
>File "", line 1
> SyntaxError: 'return' outside function
>  >>> open('/tmp/babel-D0mRnD/python-CJ6UtT', 'w').write(str(_))
>  >>>
> 20
>  >>>
>  >>> 'org_babel_python_eoe'
>  >>> 'org_babel_python_eoe'
>  >>>
>
>  >Are you using tabs or spaces?
>
> I used spaces. 4 spaces per indentation level, to be exact.
>
> Also, FYI, as it might be relevant information, the shell buffer
> contents I posted above happen if the session has been created
> previously. If, instead, this is the first time I run some code in this
> session, then I also get another error - NameError (see below). Below
> you can see the contents of *bug_report* buffer if I run this code cell
> in a not-yet-existing session.
>
> def foobar():
> Python 3.8.2 | packaged by conda-forge | (default, Mar  5 2020, 17:11:00)
> [GCC 7.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> ... for i in range(5):
> ... pass
> ...
>  >>> print("hello world")
>File "", line 1
>  print("hello world")
>  ^
> IndentationError: unexpected indentreturn 3
>
>  >>>
>File "", line 1
>  return 3
>  ^
> IndentationError: unexpected indent
>  >>> return foobar()
>  >>>
>File "", line 1
> SyntaxError: 'return' outside function
>  >>> open('/tmp/babel-D0mRnD/python-MsDjEk', 'w').write(str(_))
>  >>>
> Traceback (most recent call last):
>File "", line 1, in 
> NameError: name '_' is not defined
>  >>>
>  >>> 'org_babel_python_eoe'
>  >>> 'org_babel_python_eoe'
>  >>>
>
> If you have a suggestion on how to debug this, feel free to tell.
>


Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-06 Thread Philip Blagoveschensky

Hi Ian,

>Do you have the same issue if you aren't using a session?

If I run the following code block (this time I am using python 3, so 
there are parens in the print line)


#+begin_src python
def foobar():
for i in range(5):
pass
print("hello world")
return 3

return foobar()
#+end_src

I get

#+RESULTS:
: 3

so I know it worked fine.

But if I add session like this:

#+begin_src python :session bug_report
def foobar():
for i in range(5):
pass
print("hello world")
return 3

return foobar()
#+end_src

then in *bug_report* I get

>>> def foobar():
... for i in range(5):
... pass
...
>>> print("hello world")
  File "", line 1
print("hello world")
^
IndentationError: unexpected indent
return 3
>>>
  File "", line 1
return 3
^
IndentationError: unexpected indent
>>> return foobar()
>>>
  File "", line 1
SyntaxError: 'return' outside function
>>> open('/tmp/babel-D0mRnD/python-CJ6UtT', 'w').write(str(_))
>>>
20
>>>
>>> 'org_babel_python_eoe'
>>> 'org_babel_python_eoe'
>>>

>Are you using tabs or spaces?

I used spaces. 4 spaces per indentation level, to be exact.

Also, FYI, as it might be relevant information, the shell buffer 
contents I posted above happen if the session has been created 
previously. If, instead, this is the first time I run some code in this 
session, then I also get another error - NameError (see below). Below 
you can see the contents of *bug_report* buffer if I run this code cell 
in a not-yet-existing session.


def foobar():
Python 3.8.2 | packaged by conda-forge | (default, Mar  5 2020, 17:11:00)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ... for i in range(5):
... pass
...
>>> print("hello world")
  File "", line 1
print("hello world")
^
IndentationError: unexpected indentreturn 3

>>>
  File "", line 1
return 3
^
IndentationError: unexpected indent
>>> return foobar()
>>>
  File "", line 1
SyntaxError: 'return' outside function
>>> open('/tmp/babel-D0mRnD/python-MsDjEk', 'w').write(str(_))
>>>
Traceback (most recent call last):
  File "", line 1, in 
NameError: name '_' is not defined
>>>
>>> 'org_babel_python_eoe'
>>> 'org_babel_python_eoe'
>>>

If you have a suggestion on how to debug this, feel free to tell.



Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-06 Thread ian martins
Hello Philip,

I tested again and still can't reproduce the issue.  ob-python doesn't
change the indentation between individual lines of a code block, so this is
strange. Do you have the same issue if you aren't using a session? Are you
using tabs or spaces? (I tested with spaces)

On Sun, Jul 5, 2020 at 7:37 AM Philip Blagoveschensky 
wrote:

> Consider the following org-babel block:
>
>
>
> #+begin_src python :session bug_report
> def foobar():
>  for i in range(5):
>  pass
>  print "hello world"
>
> foobar()
> #+end_src
>
>
>
> When I run it, this is what I see in the *bug_report* buffer:
>
>
>
> def foobar():
> ... for i in range(5):
> ... pass
> ...
>  >>> print "hello world"
>File "", line 1
>  print "hello world"
>  ^
> IndentationError: unexpected indent
>
>  >>> foobar()
>  >>>
>  >>> open('/tmp/babel-MOOCF9/python-UW5PEF', 'w').write(str(_))
>  >>>
>  >>>
>  >>> 'org_babel_python_eoe'
>  >>> 'org_babel_python_eoe'
>  >>>
>
>
>
> So, org-babel incorrectly decided that the line with the print is not a
> part of the function's definition and sent it to Python shell as a
> separate statement. Instead, it should've sent it as a part of foobar's
> definition.
>
> This problem persists
> - If I use python3 instead of python2
> - If I replace
>  print "hello world"
>with
>  return 42
>
> This problem disappears if I add :results output to the source block.
>
>
> Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
>   of 2019-09-23, modified by Debian
> Package: Org mode version 9.3.6 (9.3.6-elpa @
> /home/username/.emacs.d/elpa/org-9.3.6/)
>
>
> current state:
> ==
> (setq
>   org-src-mode-hook '(org-src-babel-configure-edit-buffer
>  org-src-mode-configure-edit-buffer)
>   org-link-shell-confirm-function 'yes-or-no-p
>   org-metadown-hook '(org-babel-pop-to-session-maybe)
>   org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>   org-mode-hook '(#[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-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]
>  org-babel-result-hide-spec org-babel-hide-all-hashes)
>   org-archive-hook '(org-attach-archive-delete-maybe)
>   org-confirm-elisp-link-function 'yes-or-no-p
>   org-agenda-before-write-hook '(org-agenda-add-entry-text)
>   org-metaup-hook '(org-babel-load-in-session-maybe)
>   org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
> "\n\n(fn ENTRY)"]
>   org-babel-pre-tangle-hook '(save-buffer)
>   org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>   org-babel-header-arg-expand)
>   org-babel-load-languages '((emacs-lisp . t) (python . t))
>   org-occur-hook '(org-first-headline-recenter)
>   org-cycle-hook '(org-cycle-hide-archived-subtrees
>   org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
>   org-speed-command-hook '(org-speed-command-activate
>   org-babel-speed-command-activate)
>   org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
>   ("elisp" . "el"))
>   org-confirm-shell-link-function 'yes-or-no-p
>   org-link-parameters '(("attachment" :follow org-attach-open-link :export
> org-attach-export-link :complete
> org-attach-complete-link)
>("id" :follow org-id-open)
>("eww" :follow eww :store org-eww-store-link)
>("rmail" :follow org-rmail-open :store
> org-rmail-store-link)
>("mhe" :follow org-mhe-open :store
> org-mhe-store-link)
>("irc" :follow org-irc-visit :store
> org-irc-store-link :export org-irc-export)
>("info" :follow org-info-open :export
> 

Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-05 Thread Philip Blagoveschensky

Consider the following org-babel block:



#+begin_src python :session bug_report
def foobar():
for i in range(5):
pass
print "hello world"

foobar()
#+end_src



When I run it, this is what I see in the *bug_report* buffer:



def foobar():
... for i in range(5):
... pass
...
>>> print "hello world"
  File "", line 1
print "hello world"
^
IndentationError: unexpected indent

>>> foobar()
>>>
>>> open('/tmp/babel-MOOCF9/python-UW5PEF', 'w').write(str(_))
>>>
>>>
>>> 'org_babel_python_eoe'
>>> 'org_babel_python_eoe'
>>>



So, org-babel incorrectly decided that the line with the print is not a 
part of the function's definition and sent it to Python shell as a 
separate statement. Instead, it should've sent it as a part of foobar's 
definition.


This problem persists
- If I use python3 instead of python2
- If I replace
print "hello world"
  with
return 42

This problem disappears if I add :results output to the source block.


Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-09-23, modified by Debian
Package: Org mode version 9.3.6 (9.3.6-elpa @ 
/home/username/.emacs.d/elpa/org-9.3.6/)



current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (python . t))
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete
org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store
org-mhe-store-link)
   ("irc" :follow org-irc-visit :store
org-irc-store-link :export org-irc-export)
   ("info" :follow org-info-open :export
org-info-export :store org-info-store-link)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete org-bbdb-complete-link
:store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow

Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-01 Thread ian martins
your example works for me without any changes. "return 42" works as well.
it returns None and there are no errors in the *bug_report* buffer.

I'm using:
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22,
modified by Debian
Org mode version 9.3.6 (release_9.3.6-739-g0c1740.dirty @
/home/ian/code/elisp/org-mode/lisp/)

On Wed, Jul 1, 2020 at 12:57 PM Philip Blagoveschensky 
wrote:

> Consider the following org-babel block:
>
>
>
> #+begin_src python :session bug_report
> def foobar():
>  for i in range(5):
>  pass
>  print "hello world"
>
> foobar()
> #+end_src
>
>
>
> When I run it, this is what I see in the *bug_report* buffer:
>
>
>
> def foobar():
> ... for i in range(5):
> ... pass
> ...
> >>> print "hello world"
>File "", line 1
>  print "hello world"
>  ^
> IndentationError: unexpected indent
>
> >>> foobar()
> >>>
> >>> open('/tmp/babel-MOOCF9/python-UW5PEF', 'w').write(str(_))
> >>>
> >>>
> >>> 'org_babel_python_eoe'
> >>> 'org_babel_python_eoe'
> >>>
>
>
>
> So, org-babel incorrectly decided that the line with the print is not a
> part of the function's definition and sent it to Python shell as a
> separate statement. Instead, it should've sent it as a part of foobar's
> definition.
>
> This problem persists
> - If I use python3 instead of python2
> - If I replace
>  print "hello world"
>with
>  return 42
>
> This problem disappears if I add :results output to the source block.
>
>
> Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
>   of 2019-09-23, modified by Debian
> Package: Org mode version 9.3.6 (9.3.6-elpa @
> /home/username/.emacs.d/elpa/org-9.3.6/)
>
>
> current state:
> ==
> (setq
>   org-src-mode-hook '(org-src-babel-configure-edit-buffer
>  org-src-mode-configure-edit-buffer)
>   org-link-shell-confirm-function 'yes-or-no-p
>   org-metadown-hook '(org-babel-pop-to-session-maybe)
>   org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>   org-mode-hook '(#[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-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]
>  org-babel-result-hide-spec org-babel-hide-all-hashes)
>   org-archive-hook '(org-attach-archive-delete-maybe)
>   org-confirm-elisp-link-function 'yes-or-no-p
>   org-agenda-before-write-hook '(org-agenda-add-entry-text)
>   org-metaup-hook '(org-babel-load-in-session-maybe)
>   org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
> "\n\n(fn ENTRY)"]
>   org-babel-pre-tangle-hook '(save-buffer)
>   org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>   org-babel-header-arg-expand)
>   org-babel-load-languages '((emacs-lisp . t) (python . t))
>   org-occur-hook '(org-first-headline-recenter)
>   org-cycle-hook '(org-cycle-hide-archived-subtrees
>   org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
>   org-speed-command-hook '(org-speed-command-activate
>   org-babel-speed-command-activate)
>   org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
>   ("elisp" . "el"))
>   org-confirm-shell-link-function 'yes-or-no-p
>   org-link-parameters '(("attachment" :follow org-attach-open-link :export
> org-attach-export-link :complete
> org-attach-complete-link)
>("id" :follow org-id-open)
>("eww" :follow eww :store org-eww-store-link)
>("rmail" :follow org-rmail-open :store
> org-rmail-store-link)
>("mhe" :follow org-mhe-open :store
> org-mhe-store-link)
>("irc" :follow org-irc-visit :store
> org-irc-store-link :export org-irc-export)
>

Re: Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-01 Thread Andreas Röhler



On 01.07.20 18:55, Philip Blagoveschensky wrote:

#+begin_src python :session bug_report
def foobar():
    for i in range(5):
    pass
    print "hello world"

foobar()
#+end_src 



Works here like this:

#+begin_src python :results output
def foobar():
    for i in range(5):
    pass
    print("hello world")

foobar()
#+end_src

#+RESULTS:
: hello world

GNU Emacs 28.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.14.5, 
cairo version 1.14.0) of 2020-06-10






Bug: org-babel python with :results value sends function definition with a statement after a for loop to the shell incorrectly [9.3.6 (9.3.6-elpa @ /home/username/.emacs.d/elpa/org-9.3.6/)]

2020-07-01 Thread Philip Blagoveschensky

Consider the following org-babel block:



#+begin_src python :session bug_report
def foobar():
for i in range(5):
pass
print "hello world"

foobar()
#+end_src



When I run it, this is what I see in the *bug_report* buffer:



def foobar():
... for i in range(5):
... pass
...

print "hello world"

  File "", line 1
print "hello world"
^
IndentationError: unexpected indent


foobar()

open('/tmp/babel-MOOCF9/python-UW5PEF', 'w').write(str(_))


'org_babel_python_eoe'
'org_babel_python_eoe'





So, org-babel incorrectly decided that the line with the print is not a 
part of the function's definition and sent it to Python shell as a 
separate statement. Instead, it should've sent it as a part of foobar's 
definition.


This problem persists
- If I use python3 instead of python2
- If I replace
print "hello world"
  with
return 42

This problem disappears if I add :results output to the source block.


Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-09-23, modified by Debian
Package: Org mode version 9.3.6 (9.3.6-elpa @ 
/home/username/.emacs.d/elpa/org-9.3.6/)



current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (python . t))
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete
org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store
org-mhe-store-link)
   ("irc" :follow org-irc-visit :store
org-irc-store-link :export org-irc-export)
   ("info" :follow org-info-open :export
org-info-export :store org-info-store-link)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete org-bbdb-complete-link
:store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302Q!\207"
  ["news" browse-url ":"] 5 &

Re: PDF export of babel code block with link using the '_' character does not work [9.3.6 (9.3.6-elpa @ /home/picaud/.emacs.d/elpa/org-9.3.6/)]

2020-06-01 Thread Bastien
Vincent Picaud  writes:

> Wow, that's fast!

PS: That's why Org does not need a traditional bug tracking tool ;)

-- 
 Bastien



Re: PDF export of babel code block with link using the '_' character does not work [9.3.6 (9.3.6-elpa @ /home/picaud/.emacs.d/elpa/org-9.3.6/)]

2020-06-01 Thread Vincent Picaud
Wow, that's fast!
Thanks

Le lun. 1 juin 2020 à 15:17, Nicolas Goaziou  a
écrit :

> Hello,
>
> Vincent Picaud  writes:
>
> > I just run into this small problem which is maybe a bug: I cannot PDF
> > export this small demo.org file.
>
> [...]
>
> > #+OPTIONS: ^:nil
> > #+TITLE: Maybe a bug
>
> [...]
>
> >
> > 2. [[(parameter_size)][parameter_size()]] blabla...
> >
> >  #+begin_src cpp
> > std::size_t parameter_size() const;  // (ref:parameter_size)
> >  #+end_src
>
> Fixed. Thank you!
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: PDF export of babel code block with link using the '_' character does not work [9.3.6 (9.3.6-elpa @ /home/picaud/.emacs.d/elpa/org-9.3.6/)]

2020-06-01 Thread Nicolas Goaziou
Hello,

Vincent Picaud  writes:

> I just run into this small problem which is maybe a bug: I cannot PDF
> export this small demo.org file.

[...]

> #+OPTIONS: ^:nil
> #+TITLE: Maybe a bug

[...]

>
> 2. [[(parameter_size)][parameter_size()]] blabla...
>
>  #+begin_src cpp
> std::size_t parameter_size() const;  // (ref:parameter_size)
>  #+end_src

Fixed. Thank you!

Regards,

-- 
Nicolas Goaziou



PDF export of babel code block with link using the '_' character does not work [9.3.6 (9.3.6-elpa @ /home/picaud/.emacs.d/elpa/org-9.3.6/)]

2020-06-01 Thread Vincent Picaud
Dear OrgMode Developers & Maintainers,

First of all, thank you s much for such a wonderful software! I am
using OrgMode every second and this is always a wonderful experience.

I just run into this small problem which is maybe a bug: I cannot PDF
export this small demo.org file.

Best,
Vincent

 TO REPRODUCE: demo.org >>> BEGIN

#+OPTIONS: ^:nil
#+TITLE: Maybe a bug

* How to reproduce:

- html export, C-c C-e h o, works in both cases
- pdf export, C-c C-e h p, only works with Camel case names.

  In the second case, '_' is escaped, leading to this error:
#+begin_example
user-error: Unable to resolve link: "parameter\\_size"
#+end_example


1. [[(parameterSize)][parameter_size()]] blabla...

 #+begin_src cpp
std::size_t parameter_size() const;  // (ref:parameterSize)
 #+end_src

2. [[(parameter_size)][parameter_size()]] blabla...

 #+begin_src cpp
std::size_t parameter_size() const;  // (ref:parameter_size)
 #+end_src

 TO REPRODUCE: demo.org >>> END


Re: Bug: org-shiftright etc. do not respect org-support-shift-select [9.3.6 (9.3.6-elpa @ /home/vladimir/.emacs.d/elpa/org-9.3.6/)]

2020-04-06 Thread Kyle Meyer
Vladimir Panteleev  writes:

> I have org-support-shift-select set to 'always. As such, when editing
> tables, I expect that Shift + arrow keys to enable Emacs shift
> selection. Instead, it moves table cells around.
>
> This behavior did not exist in Org 9.1.9.

The change in behavior happened with 09f950723 (Added keybindings for
`org-table-move-cell-*' functions), which was a part of the v9.3
release.  Looking at that commit and scanning the associated thread [^],
I'm guessing the interaction with org-support-shift-select was simply
overlooked and those org-table-move-cell-* calls should be updated to
inspect org-support-shift-select, like (some of) the other neighboring
branches in the code.

I'll take a look at doing that tomorrow.

> The documentation of org-support-shift-select should also be updated
> to include tables in the list of contexts where shifted cursor keys
> execute Org commands.

True.

Thanks for the report.


[^]: 
https://yhetil.org/orgmode/cakj7shgdxaor6lwe+pg481z7dyhxxr6ddwrbwga2vcyx+rk...@mail.gmail.com/T/#u



Bug: org-shiftright etc. do not respect org-support-shift-select [9.3.6 (9.3.6-elpa @ /home/vladimir/.emacs.d/elpa/org-9.3.6/)]

2020-04-05 Thread vladimir


I have org-support-shift-select set to 'always. As such, when editing
tables, I expect that Shift + arrow keys to enable Emacs shift
selection. Instead, it moves table cells around.

This behavior did not exist in Org 9.1.9.

The documentation of org-support-shift-select should also be updated to
include tables in the list of contexts where shifted cursor keys execute
Org commands.

Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll 
bars)
 of 2019-09-07
Package: Org mode version 9.3.6 (9.3.6-elpa @ 
/home/vladimir/.emacs.d/elpa/org-9.3.6/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-blank-before-new-entry '((heading . auto) (plain-list-item))
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-reveal-start-hook '(org-decrypt-entry)
 org-calc-default-modes '(calc-language c calc-internal-prec 12 
calc-float-format
  (float 8) calc-angle-mode deg calc-prefer-frac nil
  calc-symbolic-mode nil calc-date-format
  ( "-" MM "-" DD " " Www (" " hh ":" mm))
  calc-display-working-message t)
 org-mode-hook '(cs/org-mode-hook
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 #[0 "\301\211\207"
   [imenu-create-index-function org-imenu-get-tree] 2]
 )
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-support-shift-select 'always
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-return-follows-link t
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete 
org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export 
:store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store 
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") 
("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302Q!\207" ["news" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("mailto" :follow
#[257 "\301\300\302Q!\207" ["mailto" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("https" :follow
 

Bug: org-shiftright etc. do not respect org-support-shift-select [9.3.6 (9.3.6-elpa @ /home/vladimir/.emacs.d/elpa/org-9.3.6/)]

2020-04-05 Thread Vladimir Panteleev
Hello,

I have org-support-shift-select set to 'always. As such, when editing
tables, I expect that Shift + arrow keys to enable Emacs shift
selection. Instead, it moves table cells around.

This behavior did not exist in Org 9.1.9.

The documentation of org-support-shift-select should also be updated
to include tables in the list of contexts where shifted cursor keys
execute Org commands.

Thanks!

Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw
scroll bars) of 2019-09-07
Package: Org mode version 9.3.6 (9.3.6-elpa @
/home/vladimir/.emacs.d/elpa/org-9.3.6/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-link-shell-confirm-function 'yes-or-no-p
 org-blank-before-new-entry '((heading . auto) (plain-list-item))
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-reveal-start-hook '(org-decrypt-entry)
 org-calc-default-modes '(calc-language c calc-internal-prec 12
calc-float-format
  (float 8) calc-angle-mode deg calc-prefer-frac nil
  calc-symbolic-mode nil calc-date-format
  ( "-" MM "-" DD " " Www (" " hh ":" mm))
  calc-display-working-message t)
 org-mode-hook '(cs/org-mode-hook
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 #[0 "\301\211\207"
   [imenu-create-index-function org-imenu-get-tree] 2]
 )
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-support-shift-select 'always
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-return-follows-link t
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete org-attach-complete-link)
   ("id" :follow org-id-open)
   ("eww" :follow eww :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[257 "\301\300\302Q!\207" ["news" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("mailto" :follow
#[257 "\301\300\302Q!\207" ["mailto" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("https" :follow
#[257 "\301\300\302Q!\207" ["https" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("http" :follow
#[257 "\301\300\302Q!\207" ["http" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("ftp" :follow
#[257 "\301\300\302Q!\207" ["ftp" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-link-elisp-confirm-function 'yes-or-no-p
 )



Re: Bug: Running C-c C-c doesn't tangle [9.3.6 (9.3.6-elpa @ /home/aadcg/.emacs.d/elpa/org-9.3.6/)]

2020-03-02 Thread Tom Gillespie
Hi André,
C-c C-v C-t is the default tangle binding, C-c C-c will execute
the block (and resolve any noweb references if the :noweb header is
set) but will not tangle it.
Two references are
https://orgmode.org/manual/Extracting-Source-Code.html and
https://orgmode.org/manual/Evaluating-Code-Blocks.html. Best,
Tom

On Mon, Mar 2, 2020 at 1:34 PM André Alexandre Gomes
 wrote:
>
>
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
>
>  https://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org mailing list.
> 
> Hi,
>
> I have a source code block with a tangle header argument.
> It looks like this:
>
> #+begin_src scheme :tangle ~/.config/guix/channels.scm :results silent
>   (channel
> (name 'doujinhub)
> (url "https://git.sr.ht/~w96k/doujinhub";))
> #+end_src
>
> The expected behaviour is that running C-c C-c tangles it, but that's
> not the case. It does work if I run org-babel-tangle.
>
> I also couldn't figure out the difference between org-babel-tangle and
> org-babel-file.
>
>
> --
> André Alexandre Gomes
>
>
> Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
> Package: Org mode version 9.3.6 (9.3.6-elpa @ 
> /home/aadcg/.emacs.d/elpa/org-9.3.6/)
>
> current state:
> ==
> (setq
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
>  org-src-mode-configure-edit-buffer)
>  org-latex-listings 'minted
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-cycle-global-at-bob t
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  org-refile-targets '((org-agenda-files :maxlevel . 5))
>  org-html-format-inlinetask-function 
> 'org-html-format-inlinetask-default-function
>  org-special-ctrl-k t
>  org-src-tab-acts-natively t
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-special-ctrl-a/e t
>  org-agenda-files '("~/NextCloud/org")
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-modules '(ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc 
> ol-mhe
>ol-rmail ol-eww drill tempo)
>  org-mode-hook '(er/add-org-mode-expansions
>  #[0 "\301\211\207"
>[imenu-create-index-function org-imenu-get-tree] 2]
>  org-bullets-mode org-cdlatex-mode 
> ob-ipython-auto-configure-kernels
>  #[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-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]
>  org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
>  org-archive-hook '(org-attach-archive-delete-maybe)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-startup-indented t
>  org-startup-with-inline-images t
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
> "\n\n(fn ENTRY)"]
>  org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
> org-babel-header-arg-expand)
>  org-hide-leading-stars t
>  org-babel-load-languages '((emacs-lisp . t) (scheme . t) (python . t) 
> (ipython . t)
> (haskell . t) (go . t) (latex . t) (shell . t)
> (ditaa . t))
>  org-agenda-skip-deadline-prewarning-if-scheduled t
>  org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
> WIDTH)"]
>  org-list-demote-modify-bullet '(("-" . "+") ("+" . "-"))
>  org-agenda-span 10
>  org-src-lang-modes '(("ipython" . python) ("C" . c) ("C++" . c++)
>   ("asymptote" . asy) ("bash" . sh) ("beamer" . latex)
>   ("calc" . fundamental) ("cpp

Bug: Running C-c C-c doesn't tangle [9.3.6 (9.3.6-elpa @ /home/aadcg/.emacs.d/elpa/org-9.3.6/)]

2020-03-02 Thread André Alexandre Gomes


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

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.

Hi,

I have a source code block with a tangle header argument.
It looks like this:

#+begin_src scheme :tangle ~/.config/guix/channels.scm :results silent
  (channel
(name 'doujinhub)
(url "https://git.sr.ht/~w96k/doujinhub";))
#+end_src

The expected behaviour is that running C-c C-c tangles it, but that's
not the case. It does work if I run org-babel-tangle.

I also couldn't figure out the difference between org-babel-tangle and
org-babel-file.


--
André Alexandre Gomes


Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
Package: Org mode version 9.3.6 (9.3.6-elpa @ 
/home/aadcg/.emacs.d/elpa/org-9.3.6/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-latex-listings 'minted
 org-link-shell-confirm-function 'yes-or-no-p
 org-cycle-global-at-bob t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((org-agenda-files :maxlevel . 5))
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-special-ctrl-k t
 org-src-tab-acts-natively t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-special-ctrl-a/e t
 org-agenda-files '("~/NextCloud/org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-modules '(ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe
   ol-rmail ol-eww drill tempo)
 org-mode-hook '(er/add-org-mode-expansions
 #[0 "\301\211\207"
   [imenu-create-index-function org-imenu-get-tree] 2]
 org-bullets-mode org-cdlatex-mode 
ob-ipython-auto-configure-kernels
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-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]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-indented t
 org-startup-with-inline-images t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-hide-leading-stars t
 org-babel-load-languages '((emacs-lisp . t) (scheme . t) (python . t) (ipython 
. t)
(haskell . t) (go . t) (latex . t) (shell . t)
(ditaa . t))
 org-agenda-skip-deadline-prewarning-if-scheduled t
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-list-demote-modify-bullet '(("-" . "+") ("+" . "-"))
 org-agenda-span 10
 org-src-lang-modes '(("ipython" . python) ("C" . c) ("C++" . c++)
  ("asymptote" . asy) ("bash" . sh) ("beamer" . latex)
  ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist)
  ("dot" . fundamental) ("elisp" . emacs-lisp)
  ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . 
sh)
  ("sqlite" . sql))
 org-occur-hook '(org-first-headline-recenter)
 org-agenda-include-diary t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t!)" "WIP(s!)" "WAITING(w@)" "|" "DONE(d!)"
  "NOT TODO(n@)" "CANCELED(c@)")
 )
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-comman

Re: Bug: assignment to named column - not working as expected [9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)]

2020-02-29 Thread Lester Longley
Hello,

The functionality which I was trying is documented as not supported:

http://www.gnu.org/software/emacs/manual/html_node/org/Column-formulas.html

The left-hand side of a column formula cannot be the name of column, it
must be the numeric column reference or $>.


Regards,
Lester

On Sat, Feb 29, 2020 at 9:39 AM Lester Longley  wrote:

> Hello,
>
> I'm trying to use named fields.
>
> This works:
>
> | ! | col2 | col3 |
> | # | abc  | abc  |
> #+TBLFM: $3 = $col2
>
> However, assignment to named field "$col3":
>
> | ! | col2 | col3 |
> | # | abc  |  |
> #+TBLFM: $col3 = $col2
>
> ... results in error "Unknown field: col3".
>
> I was expecting assignment to the named column to work, as per
> https://orgmode.org/manual/Advanced-features.html
>
>
> ‘!’
>
> The fields in this line define names for the columns, so that you may
> refer to a column as ‘$Tot’ instead of ‘$6’.
> ‘^’
>
> This row defines names for the fields *above* the row. With such a
> definition, any formula in the table may use ‘$m1’ to refer to the value ‘
> 10’. Also, if you assign a formula to a names field, it is stored as ‘$name
> = ...’.
>
> However, the documentation doesn't specifically indicate that assignment
> to "$name" should work w/ "!"--it's mentioned only w/ "^" (and works fine
> for this case)--so possibly what I'm trying simply isn't supported (i.e.,
> not a bug).  Please pardon if that's not right expectation.
>
> Thank you for your help.
>
> Regards,
> Lester
>
> Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
>  of 2017-09-15, modified by Debian
> Package: Org mode version 9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)
>
> current state:
> ==
> (setq
>  org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>  org-babel-header-arg-expand)
>  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-confirm-shell-link-function 'yes-or-no-p
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-mode-hook '((closure
>  (org--rds reftex-docstruct-symbol
>   org-element-greater-elements org-clock-history
>   org-agenda-current-date org-with-time org-defdecode org-def
>   org-read-date-inactive org-ans2 org-ans1
>   org-columns-current-fmt-compiled org-clock-current-task
>   org-clock-effort org-agenda-skip-function
>   org-agenda-skip-comment-trees org-agenda-archives-mode
>   org-end-time-was-given org-time-was-given
>   org-log-note-extra org-log-note-purpose
>   org-log-post-message org-last-inserted-timestamp
>   org-last-changed-timestamp
>   org-entry-property-inherited-from org-blocked-by-checkboxes
>   org-state org-agenda-headline-snapshot-before-repeat
>   org-capture-last-stored-marker org-agenda-start-on-weekday
>   org-agenda-buffer-tmp-name org-priority-regexp
>   buffer-face-mode-face 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-indent-indentation-per-level
>   org-element-paragraph-separate ffap-url-regexp
>   org-inlinetask-min-level t)
>  nil
>  (add-hook (quote change-major-mode-hook)
>   (quote org-show-all) (quote append) (quote local))
>  )
> (closure
>  (org-src-window-setup *this*
>   org-babel-confirm-evaluate-answer-no
>   org-src-preserve-indentation org-src-lang-modes
>   org-edit-src-content-indentation org-babel-library-of-babel
>   t)
>  nil
>  (add-hook (quote change-major-mode-hook)
>   (quote org-babel-show-result-all) (quote append)
>   (quote local))
>  )
> org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-bibtex-headline-format-function '(closure
>   (org-id-locations
> org-agenda-search-view-always-boolean
> org-agenda-overriding-header t)
>   (entry) (cdr (assq :title entry)))
>  org-archive-hook '(org-attach-archive-delete-maybe)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees
> org-cycle-show-empty-lines
>  org-optimize-windo

Bug: assignment to named column - not working as expected [9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)]

2020-02-29 Thread Lester Longley
Hello,

I'm trying to use named fields.

This works:

| ! | col2 | col3 |
| # | abc  | abc  |
#+TBLFM: $3 = $col2

However, assignment to named field "$col3":

| ! | col2 | col3 |
| # | abc  |  |
#+TBLFM: $col3 = $col2

... results in error "Unknown field: col3".

I was expecting assignment to the named column to work, as per
https://orgmode.org/manual/Advanced-features.html


‘!’

The fields in this line define names for the columns, so that you may refer
to a column as ‘$Tot’ instead of ‘$6’.
‘^’

This row defines names for the fields *above* the row. With such a
definition, any formula in the table may use ‘$m1’ to refer to the value ‘10’.
Also, if you assign a formula to a names field, it is stored as ‘$name = ...
’.

However, the documentation doesn't specifically indicate that assignment to
"$name" should work w/ "!"--it's mentioned only w/ "^" (and works fine for
this case)--so possibly what I'm trying simply isn't supported (i.e., not a
bug).  Please pardon if that's not right expectation.

Thank you for your help.

Regards,
Lester

Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian
Package: Org mode version 9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
 org-babel-header-arg-expand)
 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-confirm-shell-link-function 'yes-or-no-p
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((closure
 (org--rds reftex-docstruct-symbol
  org-element-greater-elements org-clock-history
  org-agenda-current-date org-with-time org-defdecode org-def
  org-read-date-inactive org-ans2 org-ans1
  org-columns-current-fmt-compiled org-clock-current-task
  org-clock-effort org-agenda-skip-function
  org-agenda-skip-comment-trees org-agenda-archives-mode
  org-end-time-was-given org-time-was-given
  org-log-note-extra org-log-note-purpose
  org-log-post-message org-last-inserted-timestamp
  org-last-changed-timestamp
  org-entry-property-inherited-from org-blocked-by-checkboxes
  org-state org-agenda-headline-snapshot-before-repeat
  org-capture-last-stored-marker org-agenda-start-on-weekday
  org-agenda-buffer-tmp-name org-priority-regexp
  buffer-face-mode-face 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-indent-indentation-per-level
  org-element-paragraph-separate ffap-url-regexp
  org-inlinetask-min-level t)
 nil
 (add-hook (quote change-major-mode-hook)
  (quote org-show-all) (quote append) (quote local))
 )
(closure
 (org-src-window-setup *this*
  org-babel-confirm-evaluate-answer-no
  org-src-preserve-indentation org-src-lang-modes
  org-edit-src-content-indentation org-babel-library-of-babel
  t)
 nil
 (add-hook (quote change-major-mode-hook)
  (quote org-babel-show-result-all) (quote append)
  (quote local))
 )
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function '(closure
  (org-id-locations
org-agenda-search-view-always-boolean
org-agenda-overriding-header t)
  (entry) (cdr (assq :title entry)))
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-link-shell-confirm-function 'yes-or-no-p
 org-link-elisp-confirm-function 'yes-or-no-p
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete
org-attach-complete-link)
  ("id" :follow org-id-open)
  ("eww" :follow eww :store org-eww-store-link)
  ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
  ("mhe" :follow org-mhe-open :store org-mhe-store-link)
  ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
  ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
  ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   

Bug: error in org-table-justify-field-maybe - in conjunction with org-sbe [9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)]

2020-02-29 Thread Lester Longley
Hello,

I am encountering an error when using this .org code:

--
| abc | hello |
#+TBLFM: :: $2 = '(org-sbe hello_world)

#+NAME: hello_world
#+BEGIN_SRC shell -n
  echo "hello"
#+END_SRC
--

The error can be reproduced as follows:

(1) setup: (org-babel-do-load-languages 'org-babel-load-languages
'((emacs-lisp . t) (shell . t)))
(2) with position at beg of table - C-c C-c - succeeds
(3) with position (still) at beg of table - C-c C-c (again) - fails, with
Backtrace as attached.

The error is from this line in function "org-table-justify-field-maybe()"
of "org-table.el":

 ((<= (org-string-width new) width)

... where "width" is nil.

It seems to be caused by a wrong state of variable
"org-table-last-column-widths".

After the 1st C-c C-c, org-table-last-column-widths contains: "(3 5)" -
correct
After the 2nd C-c C-c, org-table-last-column-widths contains: "(5)" - wrong

The latter value results, I think, from a prior invocation of
"org-table-import" overwriting "org-table-last-column-widths".

(There are other ways to trigger the error; this is the simplest recipe I
have found.)

Thanks for your help.

Regards,
Lester

Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian
Package: Org mode version 9.3.6 (9.3.6-elpa @ ~/.emacs.d/elpa/org-9.3.6/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 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-confirm-shell-link-function 'yes-or-no-p
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((closure
 (org--rds reftex-docstruct-symbol org-element-greater-elements
  org-clock-history org-agenda-current-date org-with-time
  org-defdecode org-def org-read-date-inactive org-ans2 org-ans1
  org-columns-current-fmt-compiled org-clock-current-task
  org-clock-effort org-agenda-skip-function
  org-agenda-skip-comment-trees org-agenda-archives-mode
  org-end-time-was-given org-time-was-given org-log-note-extra
  org-log-note-purpose org-log-post-message
  org-last-inserted-timestamp org-last-changed-timestamp
  org-entry-property-inherited-from org-blocked-by-checkboxes
  org-state org-agenda-headline-snapshot-before-repeat
  org-capture-last-stored-marker org-agenda-start-on-weekday
  org-agenda-buffer-tmp-name org-priority-regexp buffer-face-mode-face
  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-indent-indentation-per-level org-element-paragraph-separate
  ffap-url-regexp org-inlinetask-min-level t)
 nil
 (add-hook (quote change-major-mode-hook) (quote org-show-all)
  (quote append) (quote local))
 )
(closure
 (org-src-window-setup *this* org-babel-confirm-evaluate-answer-no
  org-src-preserve-indentation org-src-lang-modes
  org-edit-src-content-indentation org-babel-library-of-babel t)
 nil
 (add-hook (quote change-major-mode-hook)
  (quote org-babel-show-result-all) (quote append) (quote local))
 )
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function '(closure
  (org-id-locations
org-agenda-search-view-always-boolean
org-agenda-overriding-header t)
  (entry) (cdr (assq :title entry)))
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-link-shell-confirm-function 'yes-or-no-p
 org-link-elisp-confirm-function 'yes-or-no-p
 org-table-automatic-realign nil
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-open-link :export
org-attach-export-link :complete org-attach-complete-link)
  ("id" :follow org-id-open)
  ("eww" :follow eww :store org-eww-store-link)
  ("rmail" :follow org-rmail-open :store org-rmail-store-link)
  ("mhe" :follow org-mhe-open :store org-mhe-store-link)
  (&q

Org 9.3.6

2020-02-13 Thread Bastien
Hi all,

I've released Org 9.3.6, a bugfix release.

Enjoy!

-- 
 Bastien