Re: [O] Bug: Bulk adding tags in agenda does not respect radio groups

2022-10-24 Thread Ihor Radchenko
Mark Kerr  writes:

> I have a radio group of 3 tags defined in org-tag-alist: now. next, later.
> This tag group works correctly when editing the tags directly in the
> original org files or when the tags are edited individually in the agenda
> using ':'.
>
> When editing tags via the agenda's bulk editing command, however, adding a
> tag from that radio group does not remove any pre-existing tags from that
> group.
>
> For example, say an item is already tagged "now", and the tag "next" is
> added to it via bulk editing. The expected result is that the tag "next" is
> added and the tag "now" is removed. Instead, the result is ":now:next:", as
> the pre-existing tag is not removed.
>
> I have version 9.2.3

Sorry for the late reply.
This is yet another case where limited tag group support shows up.
Note that Org mode support for group tags is mostly tailored for agenda
matching. Commands are not well-adapted.
The fix will require careful review of Org code and is not trivial.
Patches always welcome though.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [O] Bug: Multiple bulk actions on the same task fails [9.0.5 (9.0.5-elpaplus @ /Users/links_world/.emacs.d/elpa/org-plus-contrib-20170210/)]

2022-10-16 Thread Ihor Radchenko
Adrian Bradd  writes:

> Using the following agenda file as an MWE:
>
> * Incoming
> ** TODO Testing1
> ** TODO Testing2
> ** TODO Testing3
>
> I ran org-agenda and pressed 't' to list all todo items. In the agenda
> buffer I marked the task 'Testing1' with 'm' and performed a bulk action with 
> 'B' and
> added a tag with '+'. This completed successfully. If I mark "Testing1'
> again with 'm' and use 'B' to perform a bulk action I receive an error:
>
> user-error: Marker # for bulk 
> command is invalid

For record, this is not reproducible on the latest main.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [O] Bug: org-agenda-category-filter-preset in org-agenda-custom-commands with org-agenda-sticky does not work [9.1.2 (release_9.1.2-99-g4d828b @ /home/cperl/git/org-mode/lisp/)]

2022-10-16 Thread Ihor Radchenko
Chris Perl  writes:

> When using org-agenda-custom-commands with
> org-agenda-category-filter-preset and org-agenda-sticky, it seems as
> though changes to org-agenda-category-filter are global, even though
> the variable is made buffer local.
>
> From the limited digging I've done, it seems that setting the
> :preset-filter property for org-agenda-category-filter affects all
> agenda buffers, not just one.

And... finally should be fixed.
See https://orgmode.org/list/87edvochb7@gmail.com.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [O] BUG: Capture task clocking doesn't stop due to narrowing

2022-10-06 Thread Ihor Radchenko
Ihor Radchenko  writes:

> Bernt Hansen  writes:
>
>> Hi,
>>
>> I ran into an issue this morning where my capture task continues
>> clocking on save.  This occurs in both master and maint when not
>> clocking into a drawer.
>>
>> ECM follows.
>
> Confirmed

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=224708323e0f5682eb3894d58032a593a1a05214

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [O] Bug with Habits and Active Dates

2022-04-18 Thread Ihor Radchenko
cra...@gmx.net writes:

> I have run into problems with a TODO entry that has a body which
> contains an active date. Finishing it results in
>
> Entry repeats: SCHEDULED: <2016-12-13 Tue +1w>
>
> being printed to *Messages*, but no actual new SCHEDULED line is added
> to the entry.

For record, this is not reproducible with latest stable Org.

Best,
Ihor



Re: [O] Bug: org-agenda-set-tags with certain options sets tags on wrong entry [9.2.3 (9.2.3-13-g727c3f-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20190506/)]

2021-12-22 Thread Ihor Radchenko
Allen Li  writes:

> Expected:
>
> agenda tag set on bar entry
>
> Actual:
>
> agenda tag set on foo entry

Just leaving a note that it is not reproducible with latest Org.

Best,
Ihor



Re: [O] BUG: Capture task clocking doesn't stop due to narrowing

2021-10-03 Thread Ihor Radchenko
Bernt Hansen  writes:

> Hi,
>
> I ran into an issue this morning where my capture task continues
> clocking on save.  This occurs in both master and maint when not
> clocking into a drawer.
>
> ECM follows.

Confirmed



bug#32722: [O] bug#32722: bug#32722: bug#32722: bug#32722: 26.1; Org-publish depend on non-free platform ?

2020-05-24 Thread Bastien
AFAICT the issues raised in this thread have been solved, so I am
closing this bug report now.

Org-mode does not encourage users to use GitHub for hosting their
source code, nor does it encourage them to use non-free javascript
by browsing GitHub's page.

Some files in Org still contain references to links starting with
http://github.com but users can use M-x eww on these links and still
get the correct instructions on how to clone the Git repository.

The htmlize/htmlfontify discussion can continue in this report:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7506

If anyone think there are things we can still fix in this area,
please reopen this bug report with suggestions on what to fix and
how to fix it.

Thanks!

-- 
 Bastien





Re: [O bug] table debugging does not preserve window configuration

2020-02-03 Thread Bastien
Hi Eric,

"Fraga, Eric"  writes:

> If I turn debugging on for table updates (C-c {), when the debugging is
> finished, the original window configuration is not remembered.
>
> Should be simple to fix, but possibly beyond my emacs-lisp-fu.

Fixed, thanks!

-- 
 Bastien



Re: [O] [BUG] Infinite loop in org-agenda-show-new-time

2019-12-26 Thread Andrew Hyatt
I've been having this same issue - the issue is quite reproducible for me,
and it has been for years.  I just finally grew tired of the issue and
decided to investigate it, and yes, the issue is org-agenda-show-new-time.

I also have invisible entries in the org buffer, and the call to
org-move-to-column apparently will move several lines forward, which causes
us to process the same lines over and over.

Wrapping the call to org-move-to-column with a let setting the
buffer-invisibility-spec to nil does fix the issue.


On Fri, Aug 23, 2013 at 8:08 AM Nick Dokos  wrote:

> Carsten Dominik  writes:
>
> > I also do not expect negative consequences.  Please apply the patch,
> will you?
> >
>
> OK - patch attached. NB: there is at least one place where the "wrap the
> call to org-move-to-column" has been applied, in
> org.el:`org-comment-or-uncomment-region', presumably for exactly this
> reason. If this patch does not cause unexpected problem, then the
> wrapped setting above can be cleaned up.
>
>
> I hope it conforms to conventions but let me know of any problems.
> --
> Nick
>


[O bug] table debugging does not preserve window configuration

2019-11-10 Thread Fraga, Eric
Hello all,

If I turn debugging on for table updates (C-c {), when the debugging is
finished, the original window configuration is not remembered.

Should be simple to fix, but possibly beyond my emacs-lisp-fu.

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78



Re: [O] Bug: org-read-date ignores hours?

2019-10-24 Thread agzam . ibragimov
While fooling around with capture templates, I have also noticed this:

(progn
  (setq org-popup-calendar-for-date-prompt t)
  (read-date t)))

When prompted, if you type something like "13:00" - it returns correct,
expected datetime.

But, if you do:

(progn
  (setq org-popup-calendar-for-date-prompt nil)
  (read-date t)))

And again, type some time value in the prompt - it returns date with no
time. This seems to be a bug.

On Thu, Oct 24, 2019 at 1:41 AM Marco Wahl  wrote:

> Hi Ag,
>
> > When I use (org-read-date t) and type something like "+2m" it works as
> expected, but for
> > some reason if I type something like "+2h" it returns datetime with no
> > changes. Expected - two hours in the future. Am I missing something?
>
> AFAICS your expectation is not implemented.  See function
> org-read-date-get-relative.
>
> +1 for someone trying to implement this idea.
>
>
> HTH,
> --
> Marco
>


-- 
Regards,
Ag.


Re: [O] Bug: org-map-entries infinite loop for org file with tags [9.2.6 (9.2.6-elpa @ /home/ian/.emacs.d/elpa/org-9.2.6/)]

2019-10-24 Thread John Kitchin
This worked fine for me with org 9.2.3 and 9.2.6 with emacs 26.1.

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 Thu, Oct 24, 2019 at 8:02 AM ian martins  wrote:

> Running org-map-entries on an org file with tags results in an infinite
> loop.
>
> Example function using org-map-entries:
>
> (defun org-map-entries-test ()
>   (interactive)
>   (org-map-entries '(lambda () (message "%s" (org-entry-properties
> (point) 'standard
>   (message "done"))
>
> Example org file:
>
> * one
> * two
> * three
>  :noexport:
>
> expected result: visit each headline once then print "done"
> actual result: visits headlines in an infinite loop and never prints "done"
>
> It fails with: Org mode version 9.2.6 (9.2.6-elpa @
> /home/ian/.emacs.d/elpa/org-9.2.6/)
> It works with: Org-mode version 8.2.10 (release_8.2.10 @
> /usr/share/emacs/24.5/lisp/org/)
> It also works if the org file has no tags.
>
>
> Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
>  of 2017-09-20 on lcy01-07, modified by Debian
> Package: Org mode version 9.2.6 (9.2.6-elpa @
> /home/ian/.emacs.d/elpa/org-9.2.6/)
>
> current state:
> ==
> (setq
>  org-table-export-default-format "orgtbl-to-csv"
>  org-hide-leading-stars 'hidestars
>  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-log-done t
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-startup-folded 'content
>  org-from-is-user-regexp "\\"
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
>  org-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-mode-hook '(#[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook org-show-all append
> local]
>5 "\n\n(fn)"]
>  #[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook
> org-babel-show-result-all append local]
>5 "\n\n(fn)"]
>  org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3
> "\n\n(fn 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-babel-tangle-lang-exts '(("python" . "py") ("java" . "java")
>   ("emacs-lisp" . "el") ("elisp" . "el"))
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-link-parameters '(("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") ("doi" :follow org--open-doi-link)
>("elisp" :follow org--open-elisp-link)
>("file" :complete org-file-complete-link)
>("ftp" :follow
> (lambda (path) (browse-url (concat "ftp:" path
>("help" :follow org--open-help-link)
>("http" :follow
> (lambda (path) (browse-url (concat "http:" path
>("https" :follow
> (lambda (path) (browse-url 

[O] Bug: org-map-entries infinite loop for org file with tags [9.2.6 (9.2.6-elpa @ /home/ian/.emacs.d/elpa/org-9.2.6/)]

2019-10-24 Thread ian martins
Running org-map-entries on an org file with tags results in an infinite
loop.

Example function using org-map-entries:

(defun org-map-entries-test ()
  (interactive)
  (org-map-entries '(lambda () (message "%s" (org-entry-properties
(point) 'standard
  (message "done"))

Example org file:

* one
* two
* three
 :noexport:

expected result: visit each headline once then print "done"
actual result: visits headlines in an infinite loop and never prints "done"

It fails with: Org mode version 9.2.6 (9.2.6-elpa @
/home/ian/.emacs.d/elpa/org-9.2.6/)
It works with: Org-mode version 8.2.10 (release_8.2.10 @
/usr/share/emacs/24.5/lisp/org/)
It also works if the org file has no tags.


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-09-20 on lcy01-07, modified by Debian
Package: Org mode version 9.2.6 (9.2.6-elpa @
/home/ian/.emacs.d/elpa/org-9.2.6/)

current state:
==
(setq
 org-table-export-default-format "orgtbl-to-csv"
 org-hide-leading-stars 'hidestars
 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-log-done t
 org-confirm-shell-link-function 'yes-or-no-p
 org-startup-folded 'content
 org-from-is-user-regexp "\\"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append
local]
   5 "\n\n(fn)"]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5 "\n\n(fn)"]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function #[257 "\300.\236A\207" [:title] 3
"\n\n(fn 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-babel-tangle-lang-exts '(("python" . "py") ("java" . "java")
  ("emacs-lisp" . "el") ("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("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") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
(lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow
(lambda (path) (browse-url (concat "mailto:; path)))
)
   ("news" :follow
(lambda (path) (browse-url (concat "news:; path
   ("shell" :follow org--open-shell-link))
 org-babel-load-languages '((java . t) (python . t) (emacs-lisp . t)
(calc . t) (org . t) (screen . t) (dot . t)
(plantuml . t) (gnuplot . t))
 

Re: [O] Bug: org-read-date ignores hours?

2019-10-24 Thread Marco Wahl
Hi Ag,

> When I use (org-read-date t) and type something like "+2m" it works as 
> expected, but for
> some reason if I type something like "+2h" it returns datetime with no
> changes. Expected - two hours in the future. Am I missing something?

AFAICS your expectation is not implemented.  See function
org-read-date-get-relative.

+1 for someone trying to implement this idea.


HTH,
-- 
Marco



[O] Bug: org-read-date ignores hours?

2019-10-22 Thread Ag Ibragimov


When I use (org-read-date t) and type something like "+2m" it works as 
expected, but for
some reason if I type something like "+2h" it returns datetime with no
changes. Expected - two hours in the future. Am I missing something?



Re: [O] Bug: Problems with ob-scheme in geiser-eval--retort-output [9.2.6 (9.2.6-4-ge30905-elpa @ /home/lockywolf/.emacs.d/elpa/org-20191021/)]

2019-10-21 Thread Vladimir Nikishkin


On 21/10/2019 23:24, Vladimir Nikishkin wrote:
> Well, checking for "output" doesn't seem to be useful any way, since
> "output" is never 'nil.
> 
> Regarding the fact that the error should be reported to the geiser
> mailing list, that's entirely true. The problem is that the person who
> would be responsible for this error would be me. :) At least for the
> chibi-scheme part.
> 
> I don't think that having a few extra checks on the org/geiser interface
> is bad, especially there is also comint coming into play. I can imagine
> valid reasons when "output" is not a valid serialized scheme expression.
> 
> On 21/10/2019 22:46, Neil Jerram wrote:
>> On Mon, 21 Oct 2019 at 15:16, Vladimir Nikishkin > > wrote:
>>
>> Yeah. The "output" is not the result of geiser's elisp functions, as far
>> as I understand, it comes from comint, which reads it from a scheme
>> interpreter, and is expected to be formatted specifically to be fed into
>> geiser-eval--retort-output by the geiser scheme functions (running
>> inside a scheme interpreter).
>>
>> So "output" is never 'nil, because comint, when scheme produces some
>> rubbish, just makes it an empty string, which is not 'nil.
>>
>> Then, "output" is expected to be "retorted" back from a serialized
>> scheme expression into an elisp expression by
>> geiser-eval--retort-output. And this actually may and produce a 'nil,
>> but there is no check for it.
>>
>> So, again, both of the geiser steps (namely, (a) serializing a sexp in
>> scheme, and (b) de-serializing it in geiser-eval--retort-output) may
>> fail.
>>
>>
>> I agree that it's fragile for geiser/scheme to output a sexp that it
>> hopes geiser/elisp will be able to read back.  (I'm guilty of doing that
>> in the past too!)
>>
>> Do you have a specific example of that?  It feels like the right thing
>> to do would be to report that to the Geiser list, as this could and
>> should be fixed entirely within the Geiser code.
>>   
>>
>>
>> Yes, I have seen this going on, actually quite a lot, because both
>> geiser and different scheme interpreters are in constant development and
>> get broken every other day.
>>
>>
>> I use Org with Guile 2.2.3 (via Geiser), and it seems a pretty stable
>> setup to me.
>>  
>> Best wishes,
>>      Neil
>>  


A particularl example could be, perhaps, when an interpreter crashes and
produces something like "Segmentation fault", which is not a valid
geiser-sexp.


pEpkey.asc
Description: application/pgp-keys


Re: [O] Bug Report: Broken Link in Worg

2019-10-21 Thread Nick Dokos
Joshua Meyers  writes:

> In this page (https://orgmode.org/worg/org-gtd-etc.html) the link to
> the "very instructive post by Pete Phillips" now directs to the
> defunct gmane.org.  I think I tracked down the post it is supposed
> to link to, so I don't want others to have to do this work again:
> https://lists.gnu.org/archive/html/emacs-orgmode/2007-12/msg00281.html
>

You can go one step further and actually fix it in the worg page -
worg is user-editable: https://orgmode.org/worg/index.html#org218100b

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [O] Bug: Problems with ob-scheme in geiser-eval--retort-output [9.2.6 (9.2.6-4-ge30905-elpa @ /home/lockywolf/.emacs.d/elpa/org-20191021/)]

2019-10-21 Thread Neil Jerram
On Mon, 21 Oct 2019 at 15:16, Vladimir Nikishkin 
wrote:

> Yeah. The "output" is not the result of geiser's elisp functions, as far
> as I understand, it comes from comint, which reads it from a scheme
> interpreter, and is expected to be formatted specifically to be fed into
> geiser-eval--retort-output by the geiser scheme functions (running
> inside a scheme interpreter).
>
> So "output" is never 'nil, because comint, when scheme produces some
> rubbish, just makes it an empty string, which is not 'nil.
>
> Then, "output" is expected to be "retorted" back from a serialized
> scheme expression into an elisp expression by
> geiser-eval--retort-output. And this actually may and produce a 'nil,
> but there is no check for it.
>
> So, again, both of the geiser steps (namely, (a) serializing a sexp in
> scheme, and (b) de-serializing it in geiser-eval--retort-output) may fail.
>

I agree that it's fragile for geiser/scheme to output a sexp that it hopes
geiser/elisp will be able to read back.  (I'm guilty of doing that in the
past too!)

Do you have a specific example of that?  It feels like the right thing to
do would be to report that to the Geiser list, as this could and should be
fixed entirely within the Geiser code.


>
> Yes, I have seen this going on, actually quite a lot, because both
> geiser and different scheme interpreters are in constant development and
> get broken every other day.
>

I use Org with Guile 2.2.3 (via Geiser), and it seems a pretty stable setup
to me.

Best wishes,
 Neil


Re: [O] Bug: Problems with ob-scheme in geiser-eval--retort-output [9.2.6 (9.2.6-4-ge30905-elpa @ /home/lockywolf/.emacs.d/elpa/org-20191021/)]

2019-10-21 Thread Neil Jerram
Hi Vladimir,

On Mon, 21 Oct 2019 at 03:21, Vladimir Nikishkin 
wrote:

>
> Can we replace the (set) on line 177 of ob-scheme.el with the following
> form:
> (setq result (if output
>  (let ((g-r-o (geiser-eval--retort-output ret)))
>  (if g-r-o
>  g-r-o
>  "Geiser-eval--retort-output returned nil.\nThe
> interpreter produced no output\nor there is a bug in geiser (likely!)"))
> (geiser-eval--retort-result-str ret "")
>
> I am not super sure about what's going on there, but I think that output
> can never be an empty list, because in the worst case it is an empty
> string.
> (But I wouldn't vouch for this.)
>

Can you explain more?  Have you seen cases
where (geiser-eval--retort-output ret) returns nil, even though you say
just above that it can never do that?

Best wishes,
Neil


[O] Bug: python src var error [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2019-10-21 Thread Claire Chambers



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.


Hello! this webpage: https://orgmode.org/manual/var.html says that
unordered lists have nested elements ignored, but running the same code
snippet gives "| simple | (unordered (not) (nested)) |
| list   ||", not  "| simple | list |". 


Emacs  : GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 
Version 10.14.3 (Build 18D109))
of 2019-04-12
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/Applications/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-src-tab-acts-natively t
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-agenda-files '("~/Documents/org/school.org" "~/Documents/org/home.org")
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-reveal-start-hook '(org-decrypt-entry)
org-startup-folded 'overview
org-mode-hook '(yas-minor-mode org-bullets-mode linum-mode turn-on-flyspell 
visual-line-mode
 #[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]
 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-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-from-is-user-regexp "|\\"
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) (python . t))
org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
org-ellipsis " ..."
org-occur-hook '(org-first-headline-recenter)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
 (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" 
"CANCELLED(c@/!)" "PHONE" "MEETING"))
org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el") ("elisp" . 
"el"))
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("id" :follow org-id-open) ("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)
   ("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")
   ("doi" :follow org--open-doi-link) ("elisp" :follow 
org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" 
path
   ("help" :follow org--open-help-link)
   ("http" :follow (lambda (path) (browse-url (concat 
"http:" path
   ("https" :follow (lambda (path) (browse-url (concat 
"https:" path
   ("mailto" :follow (lambda (path) (browse-url (concat 
"mailto:; path

[O] Bug Report: Broken Link in Worg

2019-10-21 Thread Joshua Meyers
In this page (https://orgmode.org/worg/org-gtd-etc.html) the link to the
"very instructive post by Pete Phillips" now directs to the defunct
gmane.org.  I think I tracked down the post it is supposed to link to, so I
don't want others to have to do this work again:
https://lists.gnu.org/archive/html/emacs-orgmode/2007-12/msg00281.html

Best,
Joshua


[O] Bug: Problems with ob-scheme in geiser-eval--retort-output [9.2.6 (9.2.6-4-ge30905-elpa @ /home/lockywolf/.emacs.d/elpa/org-20191021/)]

2019-10-20 Thread Vladimir Nikishkin



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.


Hello, everyone.

Can we replace the (set) on line 177 of ob-scheme.el with the following
form:
(setq result (if output
 (let ((g-r-o (geiser-eval--retort-output ret)))
 (if g-r-o
 g-r-o
 "Geiser-eval--retort-output returned nil.\nThe interpreter 
produced no output\nor there is a bug in geiser (likely!)"))
(geiser-eval--retort-result-str ret "")

I am not super sure about what's going on there, but I think that output
can never be an empty list, because in the worst case it is an empty
string.
(But I wouldn't vouch for this.)

Sorry for not sending a diff.

Cheers, Lockywolf

Emacs  : GNU Emacs 26.3 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.10)
 of 2019-08-30
Package: Org mode version 9.2.6 (9.2.6-4-ge30905-elpa @ 
/home/lockywolf/.emacs.d/elpa/org-20191021/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-after-execute-hook '((lambda nil
 (if org-inline-image-overlays
  (progn (org-redisplay-inline-images)))
 )
)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-pretty-entities t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/DevLinux/chibi-sicp/index.org" 
"~/Personal_Planner/Planner.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-modules '(org-habits org-w3m org-bbdb org-bibtex org-docview org-gnus 
org-info org-irc
   org-mhe org-rmail)
 org-plantuml-jar-path "/usr/local/bin/plantuml.jar"
 org-export-creator-string "Emacs 26.3 (Org mode 9.1.9)"
 org-mode-hook '(org-eldoc-load turn-on-org-cdlatex
 (lambda nil (imenu-add-to-menubar "Imenu"))
 #[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]
 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-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-latex-compiler "lualatex"
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((plantuml . t) (C . t) (scheme . t) (latex . t))
 org-log-done 'time
 org-startup-align-all-tables t
 org-html-creator-string "https://www.gnu.org/software/emacs/\;>Emacs 26.3 (https://orgmode.org\;>Org mode 9.1.9)"
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-src-lang-modes '(("redis" . redis) ("php" . php) ("arduino" . arduino)
  ("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . 
artist)
  ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql)
  ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . 
c++)
  ("screen" . shell-script) ("shell" . sh) ("bash" . sh))
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-agenda-include-diary t
 org-structure-template-alist '(("E"
 "#+begin_src elisp :exports both :results 
output\n?\n#+end_src")
("SV"
 "#+begin_src scheme :exports both :results 
value\n?\n#+end_src")
("SO"
 "#+begin_src scheme :exports both :results 
output\n?\n#+end_src")
("p"
 "#+begin_src plantuml :exports both :file ? 
\n#+end_src ")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")

[O] Bug: calling org-agenda-list programatically when starting with emacs --daemon [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2019-10-17 Thread rrandresf


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 usually start emacs with --daemon.

At the end of my dot emacs I have a funct that calls or-agenda-list on a
thread.

When I call emacsclient  for opening a frame (the first frame) and try
to visit a buffer (any buffer). I have an opened buffer
*Backtrace* with this content:
--8<---cut here---start->8---
Debugger entered--Lisp error: (error "‘recenter’ing a window that does not 
display current-buffer.")
  recenter(-1)
  org-agenda-list(nil)
  funcall-interactively(org-agenda-list nil)
  call-interactively(org-agenda-list)
  (if buf (if (setq wind (get-buffer-window buf)) (select-window wind) (if 
(called-interactively-p) (progn (select-window (display-buffer buf t t)) 
(org-fit-window-to-buffer)) (let ((save-selected-window--state 
(internal--before-with-selected-window (display-buffer buf 
(save-current-buffer (unwind-protect (progn (select-window ... ...) 
(org-fit-window-to-buffer)) (internal--after-with-selected-window 
save-selected-window--state)) (call-interactively (quote org-agenda-list)))
  (let ((buf (get-buffer "*Org Agenda*")) wind) (if buf (if (setq wind 
(get-buffer-window buf)) (select-window wind) (if (called-interactively-p) 
(progn (select-window (display-buffer buf t t)) (org-fit-window-to-buffer)) 
(let ((save-selected-window--state (internal--before-with-selected-window 
...))) (save-current-buffer (unwind-protect (progn ... ...) 
(internal--after-with-selected-window save-selected-window--state)) 
(call-interactively (quote org-agenda-list
  (if (boundp (quote org-agenda-files)) (let ((buf (get-buffer "*Org Agenda*")) 
wind) (if buf (if (setq wind (get-buffer-window buf)) (select-window wind) (if 
(called-interactively-p) (progn (select-window (display-buffer buf t t)) 
(org-fit-window-to-buffer)) (let ((save-selected-window--state ...)) 
(save-current-buffer (unwind-protect ... ...) (call-interactively (quote 
org-agenda-list)
  emacswikino/jump-to-org-agenda()
  funcall(emacswikino/jump-to-org-agenda)
  apply(funcall emacswikino/jump-to-org-agenda)
  timer-event-handler([t 23977 128 0 86400 funcall 
(emacswikino/jump-to-org-agenda) nil 0])
--8<---cut here---end--->8---

Hint: perhaps something like this could help before (recenter -1) on
org-agenda-list function:
--8<---cut here---start->8---
(when (get-buffer-window org-agenda-buffer-name)
(recenter -1))
--8<---cut here---end--->8---

Best Regards

Emacs  : GNU Emacs 26.3 (build 1, armv7l-unknown-linux-gnueabihf, X toolkit, 
Xaw3d scroll bars)
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.3/lisp/org/)



[O] Bug: error: (invalid-function org-table-with-shrunk-field) [9.2.6 (9.2.6-4-ge30905-elpaplus @ /home/minshall/.emacs.d/elpa/org-plus-contrib-20191014/)]

2019-10-15 Thread Greg Minshall
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.


using elpa org-mode, with org-plus-contrib, typing a character, or
deleting a character, in an existing column in a table gives the error
: (invalid-function org-table-with-shrunk-field)

to reproduce, first
: (setq debug-on-error t)

then, open a (presumably empty) file, foo.org, say, and type

| this | is | a | test |

then, at the end of the line, hit , and type, e.g., "t" (or
) and the error appears.

following a suggestion (a comment by the original poster) on
stackexchange

https://emacs.stackexchange.com/q/46923

i deleted org-plus-contrib, restarted emacs, and the problem repeated.
(more precisely, i was originally running the pre-packaged org-mode,
i.e., 9.1.9; when i deleted org-plus-contrib with 9.1.9 org-mode, the
problem went away.  thinking i maybe had version mismatches, i
"upgraded" to org "20191014", using the emacs package manager, and also
reinstalled org-plus-contrib (same "version"), and saw the problem again
(after restarting emacs).  so, i once again deleted org-plus-contrib and
restarted emacs.  but, this time, with "20191014" org-mode, the problem
did *not* go away after deleting org-plus-contrib.)


Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-08-29
Package: Org mode version 9.2.6 (9.2.6-4-ge30905-elpaplus @ 
/home/minshall/.emacs.d/elpa/org-plus-contrib-20191014/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-agenda-files ... /elided/
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-tempo 
org-jsinfo
   org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m 
org-drill)
 org-mode-hook '(org-tempo-setup
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-all append local] 
5]
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 modi/highlight-confusing-chars
 #[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-eldoc-load)
 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-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . 
default)
 ("\\.pdf\\'" . "xpdf %s"))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((emacs-lisp . t) (R . t) (asymptote . t) (ditaa . 
t) (awk . t)
(python . t) (C . t) (latex . t) (org . t) (scheme 
. t)
(octave . t) (shell . t) (gnuplot . t) (js . t))
 org-export-backends '(ascii beamer html latex)
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php) 
("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-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 '(("latex" . "tex") ("D" . "d") ("C++" . "cpp")
  ("python" . "py") ("awk" . "awk") ("asymptote" . 
"asy")
  ("processing" . "pde") ("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-font-lock-set-keywords-hook '(org-drill-add-cloze-fontification)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open) ("w3m" :store 
org-w3m-store-link)
   ("wl" :follow org-wl-open :store org-wl-store-link)
   ("vm-imap" :follow org-vm-imap-open)
   ("vm" :follow org-vm-open :store org-vm-store-link)
 

Re: [O] Bug and quick bugfix

2019-10-15 Thread Godefroy
Thanks for your replies. Your solution works for me, thank you a lot for
your work.

Sincerely,

Godefroy Vannoye

On 10/13/19 1:21 PM, Vladimir Lomov wrote:
> Hello,
> ** Nicolas Goaziou  [2019-10-13 09:26:42 +0200]:
>
>> Hello,
>>
>> Godefroy  writes:
>>
>>> I recently encountered a bug when exporting an org file to LaTeX: when
>>> generating a figure with a caption, the LaTeX result has the following
>>> shape:
>>>
>>> \begin{figure}
>>> …
>>> \caption{\label{…}
>>> Content of the caption}
>>> \end{figure}
>>>
>>> When compiling to LaTeX, the carriage return causes a indesirable white
>>> space in some cases. What I would expect is:
>>>
>>> \begin{figure}
>>> …
>>> \caption{Content of the caption}
>>> \label{…}
>>> \end{figure}
>>>
>>> To fix this, I have changed the org-latex--caption/label-string function
>>> in ox-latex.el on lines 1314 and 1315:
>>>
>>> (format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
>>>  "\\caption%s%s{%s%s}\n")
>>>
>>> becomes
>>>
>>> (format (if nonfloat "\\captionof{%s}%s{%s}\n%s"
>>>  "\\caption%s%s{%s}\n%s")
>> IIRC, the label has to be included in the caption command. I applied
>> a different solution. Let me know if that works for you.
> There is no strict rule but a general good practice: for caption
> material put label command inside the caption macro. Otherwise there
> might be some side effects.
>
>> Regards,
>>
>> -- 
>> Nicolas Goaziou
> ---
> WBR, Vladimir Lomov
>



Re: [O] Bug: Python session raises indentation error [9.2.6 (9.2.6-elpa @ /home/tobias/.emacs.d/elpa/org-9.2.6/)]

2019-10-14 Thread Tobias Müller

Dear, org-mode developer,

I was not aware of the fact, that new lines are special in interactive
mode and indicate the end of an indented block (I have just found out
about that in the babel documentation for python). Therefore the issue
which I have reported is probably not a bug but rather an expected
behavior. Please excuse me for positing a false bug report.

Best regards,
Tobias Müller.

Am 14.10.19 um 19:55 schrieb Tobias Müller:


Dear org-mode developer,

I have discovered the following issue with Python code-blocks: Using
the :session header argument leads to errors of the type
IndentationError: expected an indented block if the code block
contains indented regions with empty lines. An example code-block
which produces this kind of error is the following:

#+begin_src python :session
   for k in range(3):

   print(k)
#+end_src

removing the :session header argument leads to correct execution of
the code block. The same is true if the :results output header
argument is used.

If the blank line within the for-loop is removed the loop also gets
executed correctly, however after executing the block the error
NameError: name '_' is not defined is raised in the buffer of the
Python session.

The generated info-file is attached to this mail.

Best regards,
Tobias Müller.



Re: [O] Bug: org-babel-expand-noweb-references is very slow [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2019-10-14 Thread Nicolas Goaziou
Hello,

Vladimir Nikishkin  writes:

> The mwe would be like:
>
> #+begin_src scheme :exports both :results output :noweb-ref bug1
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug2
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug3
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug4
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug5
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug6
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug7
> #+end_src
>
> #+begin_src scheme :exports both :results output :noweb-ref bug8
> #+end_src
>
> #+begin_src scheme :exports both :results output
> <>
> <>
> <>
> <>
> <>
> <>
> <>
> <>
> #+end_src
>
> C-c C-v C-v is already very slow, takes ~15 seconds to resolve the references
> (can be seen in the Emacs Profiler), even though the inclusion graph is
> very simple.

Please try a more recent version of Org. Release 9.1.9 is pretty old. It
might be fixed already.

Regards,

-- 
Nicolas Goaziou



[O] Bug: org-babel-expand-noweb-references is very slow [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2019-10-14 Thread Vladimir Nikishkin



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.


Hello, everyone.

The mwe would be like:

#+begin_src scheme :exports both :results output :noweb-ref bug1
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug2
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug3
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug4
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug5
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug6
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug7
#+end_src
#+begin_src scheme :exports both :results output :noweb-ref bug8
#+end_src
#+begin_src scheme :exports both :results output
<>
<>
<>
<>
<>
<>
<>
<>
#+end_src

C-c C-v C-v is already very slow, takes ~15 seconds to resolve the references
(can be seen in the Emacs Profiler), even though the inclusion graph is
very simple.

Emacs  : GNU Emacs 26.3 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.10)
 of 2019-08-30
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.3/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-after-execute-hook '((lambda nil
 (if org-inline-image-overlays
  (progn (org-redisplay-inline-images)))
 )
)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-pretty-entities t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/DevLinux/chibi-sicp/index.org" 
"~/Personal_Planner/Planner.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-modules '(org-habits org-w3m org-bbdb org-bibtex org-docview org-gnus 
org-info org-irc
   org-mhe org-rmail)
 org-plantuml-jar-path "/usr/local/bin/plantuml.jar"
 org-mode-hook '(turn-on-org-cdlatex (lambda nil (imenu-add-to-menubar "Imenu"))
 #[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]
 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-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-latex-compiler "lualatex"
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((plantuml . t) (C . t) (scheme . t) (latex . t))
 org-log-done 'time
 org-startup-align-all-tables t
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-agenda-include-diary t
 org-structure-template-alist '(("E"
 "#+begin_src elisp :exports both :results 
output\n?\n#+end_src")
("SV"
 "#+begin_src scheme :exports both :results 
value\n?\n#+end_src")
("SO"
 "#+begin_src scheme :exports both :results 
output\n?\n#+end_src")
("p"
 "#+begin_src plantuml :exports both :file ? 
\n#+end_src ")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT 

Re: [O] Bug and quick bugfix

2019-10-13 Thread Vladimir Lomov
Hello,
** Nicolas Goaziou  [2019-10-13 09:26:42 +0200]:

> Hello,
> 
> Godefroy  writes:
> 
>> I recently encountered a bug when exporting an org file to LaTeX: when
>> generating a figure with a caption, the LaTeX result has the following
>> shape:
>>
>> \begin{figure}
>> …
>> \caption{\label{…}
>> Content of the caption}
>> \end{figure}
>>
>> When compiling to LaTeX, the carriage return causes a indesirable white
>> space in some cases. What I would expect is:
>>
>> \begin{figure}
>> …
>> \caption{Content of the caption}
>> \label{…}
>> \end{figure}
>>
>> To fix this, I have changed the org-latex--caption/label-string function
>> in ox-latex.el on lines 1314 and 1315:
>>
>> (format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
>>  "\\caption%s%s{%s%s}\n")
>>
>> becomes
>>
>> (format (if nonfloat "\\captionof{%s}%s{%s}\n%s"
>>  "\\caption%s%s{%s}\n%s")
> 
> IIRC, the label has to be included in the caption command. I applied
> a different solution. Let me know if that works for you.

There is no strict rule but a general good practice: for caption
material put label command inside the caption macro. Otherwise there
might be some side effects.

> Regards,
> 
> -- 
> Nicolas Goaziou

---
WBR, Vladimir Lomov

-- 
QOTD:
"I thought I saw a unicorn on the way over, but it was just a
horse with one of the horns broken off."


signature.asc
Description: PGP signature


Re: [O] Bug and quick bugfix

2019-10-13 Thread Ken Mankoff


On 2019-10-13 at 09:26 +02, Nicolas Goaziou  wrote...
> IIRC, the label has to be included in the caption command. I applied a
> different solution. Let me know if that works for you.

I thought so too. But I couldn't find a definitive answer for this when 
searching about this last night.

  -k.




Re: [O] Bug and quick bugfix

2019-10-13 Thread Nicolas Goaziou
Hello,

Godefroy  writes:

> I recently encountered a bug when exporting an org file to LaTeX: when
> generating a figure with a caption, the LaTeX result has the following
> shape:
>
> \begin{figure}
> …
> \caption{\label{…}
> Content of the caption}
> \end{figure}
>
> When compiling to LaTeX, the carriage return causes a indesirable white
> space in some cases. What I would expect is:
>
> \begin{figure}
> …
> \caption{Content of the caption}
> \label{…}
> \end{figure}
>
> To fix this, I have changed the org-latex--caption/label-string function
> in ox-latex.el on lines 1314 and 1315:
>
> (format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
>  "\\caption%s%s{%s%s}\n")
>
> becomes
>
> (format (if nonfloat "\\captionof{%s}%s{%s}\n%s"
>  "\\caption%s%s{%s}\n%s")

IIRC, the label has to be included in the caption command. I applied
a different solution. Let me know if that works for you.

Regards,

-- 
Nicolas Goaziou



[O] Bug and quick bugfix

2019-10-12 Thread Godefroy
Hello,

As it is my first email to the list, please forgive me if I do anything
the wrong way.

I recently encountered a bug when exporting an org file to LaTeX: when
generating a figure with a caption, the LaTeX result has the following
shape:

\begin{figure}
…
\caption{\label{…}
Content of the caption}
\end{figure}

When compiling to LaTeX, the carriage return causes a indesirable white
space in some cases. What I would expect is:

\begin{figure}
…
\caption{Content of the caption}
\label{…}
\end{figure}

To fix this, I have changed the org-latex--caption/label-string function
in ox-latex.el on lines 1314 and 1315:

(format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
 "\\caption%s%s{%s%s}\n")

becomes

(format (if nonfloat "\\captionof{%s}%s{%s}\n%s"
 "\\caption%s%s{%s}\n%s")

I hope that this bug report and the quickfix I found will help you.

Sincerely,

Godefroy Vannoye




Re: [O] Bug: COMMENT and noweb-ref

2019-10-08 Thread Sebastian Miele


I wrote:

> I wrote:
>
>> org-babel-tangle on
>>
>>   * A
>>
>> #+BEGIN_SRC elisp :tangle yes :noweb yes
>> ;; A
>> <>
>> #+END_SRC
>>
>>   * COMMENT B
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC
>>
>>   * COMMENT C
>>
>> #+BEGIN_SRC elisp :tangle yes
>> ;; C
>> #+END_SRC
>>
>> produces a file with A and B in it. Expected: Just A. Changing
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC
>>
>> to
>>
>> # #+BEGIN_SRC elisp :noweb-ref B
>> # ;; B
>> # #+END_SRC
>>
>> does yield the expected result.
>
> In the following days I will try to fix it and write a regression test.

I wanted to mention that this is still on my agenda. But it will take a
while. Among other things, I have to learn the formal syntax and the
element api of Org, before I can satisfactorily dive into ob-tangle.el.
Apart from that I had to seriously limit my Emacs time per day.

It may take several weeks. But it will happen.

Best wishes
Sebastian



Re: [O] Bug: org-publish-resolve-external-link doesn't respect org-export-with-broken-links for fuzzy links

2019-10-08 Thread Nicolas Goaziou
Hello,

Robert Irelan  writes:

> Patch to fix attached

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: org-refile-get-target offers default candidate in duplicity [9.2.6 (9.2.6-4-ge30905-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20191007/)]

2019-10-07 Thread Gustavo Barros

Hi Org list,

`org-refile-get-target', when using `org-refile-use-outline-path' 
appends an "extra" slash at the end of every path, but candidates are 
stored in `org-refile-history' without that extra slash. As the default 
candidate passed to `completing-read' is the car of `org-refile-history' 
(the last refile target), the default candidate is provided in duplicity 
(once with the trailing slash and once without it). This is the case 
independent of the completion framework in use, but the difference is 
less prominent with the default `completing-read-default' and more so 
with, e.g., `ivy-completing-read'.


Steps to reproduce:

- Start 'emacs -Q'

- Do an initial setup:
 #+begin_src emacs-lisp
 (package-initialize)
 (setq org-refile-targets '(("~/org/test.org" :maxlevel . 2)))
 (setq org-refile-use-outline-path 'file)
 (setq org-outline-path-complete-in-steps nil)
 (ivy-mode)
 ;; as mentioned, Ivy just makes things clearer, the issue is 
 independent of it

 #+end_src

- Open file "~/org/test.org", with contents:
 #+begin_src org
 ,* Top heading 1
 ,* Top heading 2
 ,** Entry 1
 ,** Entry 2
 #+end_src

- Go to heading "Entry 1", refile it to "Top heading 1"

- Go to heading "Entry 2", and call `org-refile'

- Observe the available candidates, and notice "test.org/Top heading 1" 
 is there twice, once as the default candidate, without a trailing 
 slash, and also on the paths list, with the slash.


Best regards,
Gustavo Barros.



Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.22.30)

of 2019-09-30
Package: Org mode version 9.2.6 (9.2.6-4-ge30905-elpaplus @ 
/home/gustavo/.emacs.d/elpa/org-plus-contrib-20191007/)


current state:
==
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-refile-targets '(("~/org/test.org" :maxlevel . 2))
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-eldoc-load)

org-outline-path-complete-in-steps nil
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-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" 
. php) ("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-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-refile-use-outline-path 'file
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("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")
		   ("elfeed" :follow elfeed-link-open :store 
		   elfeed-link-store-link)
		   ("doi" :follow org--open-doi-link) ("elisp" 
		   :follow org--open-elisp-link)

   ("file" :complete org-file-complete-link)
		   ("ftp" :follow (lambda (path) (browse-url (concat 
		   "ftp:" path

   ("help" :follow org--open-help-link)
		   ("http" :follow (lambda (path) (browse-url 
		   (concat "http:" path
		   ("https" :follow (lambda 

Re: [O] Bug: COMMENT and noweb-ref

2019-10-02 Thread Sebastian Miele
First, here is a patch introducing tests concerning Org comments and
tangling.
>From c769435b9ab11f7a3b5ff5f1ec2df95ae2c6aa32 Mon Sep 17 00:00:00 2001
From: Sebastian Miele 
Date: Wed, 2 Oct 2019 13:02:46 +
Subject: [PATCH] ob-tangle: Add tests

* testing/lisp/test-ob-tangle.el (ob-tangle/commented-src-blocks):
  (ob-tangle/commented-src-blocks-with-nowebref): Add tests.
---
 testing/lisp/test-ob-tangle.el | 85 ++
 1 file changed, 85 insertions(+)

diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el
index 47c31dff5..675f0714b 100644
--- a/testing/lisp/test-ob-tangle.el
+++ b/testing/lisp/test-ob-tangle.el
@@ -296,6 +296,91 @@ another block
(org-split-string (buffer-string
  (delete-file file))
 
+(ert-deftest ob-tangle/commented-src-blocks ()
+  "Test omission of commented src blocks."
+  (should
+   (equal '("A")
+ (let ((file (make-temp-file "org-tangle-")))
+   (unwind-protect
+   (progn
+ (org-test-with-temp-text-in-file
+ (format "#+property: header-args :tangle %S
+* A
+
+  #+BEGIN_SRC emacs-lisp
+  A
+  #+END_SRC
+
+* COMMENT B
+
+  #+BEGIN_SRC emacs-lisp
+  B
+  #+END_SRC
+
+* C
+
+  # #+BEGIN_SRC emacs-lisp
+  # C
+  # #+END_SRC
+
+* D
+
+  #+BEGIN_COMMENT
+  #+BEGIN_SRC emacs-lisp
+  D
+  #+END_SRC
+  #+END_COMMENT"
+ file)
+   (org-babel-tangle))
+ (with-temp-buffer
+   (insert-file-contents file)
+   (org-split-string (buffer-string
+ (delete-file file))
+
+(ert-deftest ob-tangle/commented-src-blocks-with-nowebref ()
+  "Test omission of commented src blocks with nowebref."
+  (should
+   (equal '("A")
+ (let ((file (make-temp-file "org-tangle-")))
+   (unwind-protect
+   (progn
+ (org-test-with-temp-text-in-file
+ (format "#+property: header-args :tangle %S
+* A
+
+  #+BEGIN_SRC elisp :noweb yes
+  A
+  <>
+  <>
+  <>
+  #+END_SRC
+
+* COMMENT B
+
+  #+BEGIN_SRC elisp :noweb-ref B
+  B
+  #+END_SRC
+
+* C
+
+  # #+BEGIN_SRC elisp :noweb-ref C
+  # C
+  # #+END_SRC
+
+* D
+
+  #+BEGIN_COMMENT
+  #+BEGIN_SRC elisp :noweb-ref D
+  D
+  #+END_SRC
+  #+END_COMMENT"
+ file)
+   (org-babel-tangle))
+ (with-temp-buffer
+   (insert-file-contents file)
+   (org-split-string (buffer-string
+ (delete-file file))
+
 (provide 'test-ob-tangle)
 
 ;;; test-ob-tangle.el ends here
-- 
2.23.0



[O] Bug: org-publish-resolve-external-link doesn't respect org-export-with-broken-links for fuzzy links

2019-09-27 Thread Robert Irelan
Patch to fix attached

-- 
Robert Irelan
rire...@gmail.com
From 3d3008398abb6c3a8cdfd796e6daa3f3ba909ad2 Mon Sep 17 00:00:00 2001
From: Robert Irelan 
Date: Fri, 27 Sep 2019 12:19:03 -0700
Subject: [PATCH] ox-publish: signal org-link-broken for broken fuzzy links

* lisp/ox-publish.el (org-publish-resolve-external-link): Signal
`org-link-broken' when `org-link-search' fails to resolve a link.
Without this change, a broken fuzzy link will always abort the export
even when `org-export-with-broken-links' is non-nil.
---
 lisp/ox-publish.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 8928301fd..92a8aead3 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1171,7 +1171,10 @@ (defun org-publish-resolve-external-link (search file  prefer-custom)
 	   (with-current-buffer (find-file-noselect file)
 	 (org-with-point-at 1
 	   (let ((org-link-search-must-match-exact-headline t))
-		 (org-link-search search nil t))
+		 (condition-case err
+		 (org-link-search search nil t)
+		   (error
+		(signal 'org-link-broken (cdr err)
 	   (and (org-at-heading-p)
 		(org-string-nw-p (org-entry-get (point) "CUSTOM_ID"
((not org-publish-cache)
-- 
2.23.0.444.g18eeb5a265-goog



Re: [O] Bug: COMMENT and noweb-ref

2019-09-26 Thread Marco Wahl
Sebastian Miele  writes:

> In the following days I will try to fix it and write a regression test.
>
> However, in the unlikely case that this is a feature and not a bug,
> please let me know. Please also let me know, if anyone is already on it.
>
> Sebastian Miele  writes:
>
>> org-babel-tangle on
>>
>>   * A
>>
>> #+BEGIN_SRC elisp :tangle yes :noweb yes
>> ;; A
>> <>
>> #+END_SRC
>>
>>   * COMMENT B
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC

>> [...]

>>
>> produces a file with A and B in it. Expected: Just A. Changing
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC
>>
>> to
>>
>> # #+BEGIN_SRC elisp :noweb-ref B
>> # ;; B
>> # #+END_SRC
>>
>> does yield the expected result.

Your expectation looks right to me.  I guess nobody thought about this
case before.


Happy hacking,
-- 
Marco




Re: [O] Bug: COMMENT and noweb-ref

2019-09-26 Thread Sebastian Miele
In the following days I will try to fix it and write a regression test.

However, in the unlikely case that this is a feature and not a bug,
please let me know. Please also let me know, if anyone is already on it.

Sebastian Miele  writes:

> org-babel-tangle on
>
>   * A
>
> #+BEGIN_SRC elisp :tangle yes :noweb yes
> ;; A
> <>
> #+END_SRC
>
>   * COMMENT B
>
> #+BEGIN_SRC elisp :noweb-ref B
> ;; B
> #+END_SRC
>
>   * COMMENT C
>
> #+BEGIN_SRC elisp :tangle yes
> ;; C
> #+END_SRC
>
> produces a file with A and B in it. Expected: Just A. Changing
>
> #+BEGIN_SRC elisp :noweb-ref B
> ;; B
> #+END_SRC
>
> to
>
> # #+BEGIN_SRC elisp :noweb-ref B
> # ;; B
> # #+END_SRC
>
> does yield the expected result.



Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-26 Thread Robert Pluim
> On Wed, 25 Sep 2019 20:16:26 +0200, Justus Winter 
>  said:

Justus> "Fraga, Eric"  writes:
>> On Wednesday, 25 Sep 2019 at 11:50, Justus Winter wrote:
>>> I noticed a operator associativity problem when evaluating formulas in
>>> tables.  To reproduce, enter:
>>> 
>>> | :=6/2*3 |
>>> 
>>> And evaluate the formula.  This results in:
>>> 
>>> | 1 |
>>> #+TBLFM: @1$1=6/2*3
>> 
>> Yes, this is a property (feature, ?) of Emacs Calc.

Justus> Wow!  Re-reading the org-mode documentation I see that it is 
prominently
Justus> mentioned indeed, and that it is an precedence thing, not an
Justus> associativity one.

See 'calc-multiplication-has-precedence'

Robert


signature.asc
Description: PGP signature


Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-25 Thread Fraga, Eric
On Wednesday, 25 Sep 2019 at 20:16, Justus Winter wrote:
> However, I cannot fathom the rationale behind this property, and for a
> spreadsheet-like application I consider it borderline negligent.

Not my place to defend (or otherwise) the decisions that went into defining the 
grammar for Calc.  However, there is no single universal precedence definition 
for algebraic expressions.  People do write, e.g. in heat transfer 
applications, W/m^2 K to mean W/(m^2 K) which is not the precedence you believe 
should be implemented.  Just because Excel, say, implements something does not 
make it negligent for others to implement something different.

As a mathematician, I always write my expressions as, for instance, W m^{-2} 
K^{-1} both in practice and when teaching to avoid all doubt.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d



Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-25 Thread Justus Winter
"Fraga, Eric"  writes:

> On Wednesday, 25 Sep 2019 at 11:50, Justus Winter wrote:
>> I noticed a operator associativity problem when evaluating formulas in
>> tables.  To reproduce, enter:
>>
>> | :=6/2*3 |
>>
>> And evaluate the formula.  This results in:
>>
>> | 1 |
>> #+TBLFM: @1$1=6/2*3
>
> Yes, this is a property (feature, ?) of Emacs Calc.

Wow!  Re-reading the org-mode documentation I see that it is prominently
mentioned indeed, and that it is an precedence thing, not an
associativity one.

However, I cannot fathom the rationale behind this property, and for a
spreadsheet-like application I consider it borderline negligent.

Thanks,
Justus


signature.asc
Description: PGP signature


Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-25 Thread Fraga, Eric
On Wednesday, 25 Sep 2019 at 11:50, Justus Winter wrote:
> I noticed a operator associativity problem when evaluating formulas in
> tables.  To reproduce, enter:
>
> | :=6/2*3 |
>
> And evaluate the formula.  This results in:
>
> | 1 |
> #+TBLFM: @1$1=6/2*3

Yes, this is a property (feature, ?) of Emacs Calc.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d



[O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-25 Thread Justus Winter



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.


I noticed a operator associativity problem when evaluating formulas in
tables.  To reproduce, enter:

| :=6/2*3 |

And evaluate the formula.  This results in:

| 1 |
#+TBLFM: @1$1=6/2*3

Whereas AIUI it should be 9:

% gcc -x c - <<< 'int main() { return 6/2*3; }' && ./a.out ; echo $?
9
% python -c 'print(6/2*3)'
9

Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.4)
 of 2019-02-03, modified by Debian
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.1/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 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-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]
 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-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  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-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
   ("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)
   ("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") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
(lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow
(lambda (path) (browse-url (concat "mailto:; path
   ("news" :follow
(lambda (path) (browse-url (concat "news:; path
   ("shell" :follow org--open-shell-link))
 )



[O] Bug: ox-s5: level 1 headers show up as slide sub-title [9.2.3 (9.2.3-dist @ /usr/share/emacs/site-lisp/elpa/org-9.2.3/)]

2019-09-25 Thread Dominique Dumont



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

While exporting an orf file to s5 slide, I would expect h1 section to
show up as slide title. Instead they show up as slide subtitle.

I.e an org file containing:

* My Title

blah-blah


is exported with C-c C-e s o as:


1 My Title


blah-blah





I would expect "My Title" to be enclosed in a  tag, not in a 
tag.

Did I miss something ?

All the best

Dod


Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.11)
 of 2019-09-22, modified by Debian
Package: Org mode version 9.2.3 (9.2.3-dist @ /usr/share/emacs/site-lisp/elpa/
org-9.2.3/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-
edit-buffer)
 org-capture-prepare-finalize-hook '(ejira--sync-new-comment)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-with-sub-superscripts '{}
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '(("~/private/gtd/gtd.org" :maxlevel . 3)
  ("~/private/gtd/someday.org" :level . 1)
  ("~/private/gtd/tickler.org" :maxlevel . 2))
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-
function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/private/gtd/inbox.org" "~/private/gtd/gtd.org" "~/
private/gtd/tickler.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
 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-eldoc-load)
 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-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-from-is-user-regexp "|\\"
 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-babel-load-languages '((emacs-lisp . t) (shell . t) (perl . t) (js . t) 
(haskell . t)
(plantuml . t) (R . t))
 org-export-backends '(s5 confluence md beamer odt latex icalendar html ascii)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-src-lang-modes '(("redis" . redis) ("php" . php) ("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-structure-template-alist '(("n" . "notes") ("a" . "export ascii") ("c" . 
"center")
("C" . "comment") ("e" . "example") ("E" . 
"export")
("h" . "export html") ("l" . "export latex") 
("q" . "quote")
("s" . "src") ("v" . "verse"))
 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)" "WAITING(w)" "|" "DONE(d)" 
"CANCELLED(c)"))
 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-
activate)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-
function
 org-babel-tangle-lang-exts '(("haskell" . "hs") ("perl" . "pl") ("emacs-lisp" 
. "el")
  ("elisp" . "el"))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("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 

Re: [O] [BUG] Tags misalign while editing heading

2019-09-25 Thread Dmitrii Korobeinikov
Oh, I forgot about the "-Q"... Anyway, I figured the behavior is present
with evil-mode.

Here's is how to launch a clean evil environment:

$ git clone https://github.com/emacs-evil/evil
$ cd evil
$ make emacs

Should I file a bug in the evil tracker?

Regards,
Dmitrii.

ср, 25 сент. 2019 г. в 09:00, David Masterson :

> Dmitrii Korobeinikov  writes:
>
> > When I edit a heading (the title), if I add characters, the tags
> auto-align.
> > But if I remove text, tags shift left and so are no longer aligned.
>
> Need much more information about your setup.  You wouldn't, by chance,
> be sharing your Org files with BeOrg on an iPhone?
>
> --
> David
>


Re: [O] [BUG] Tags misalign while editing heading

2019-09-24 Thread David Masterson
Dmitrii Korobeinikov  writes:

> When I edit a heading (the title), if I add characters, the tags auto-align.
> But if I remove text, tags shift left and so are no longer aligned.

Need much more information about your setup.  You wouldn't, by chance,
be sharing your Org files with BeOrg on an iPhone?

--
David



[O] [BUG] Tags misalign while editing heading

2019-09-22 Thread Dmitrii Korobeinikov
When I edit a heading (the title), if I add characters, the tags auto-align.
But if I remove text, tags shift left and so are no longer aligned.

Regards,
Dmitrii


[O] Bug: Comments and Hiding of Emphasis Markers [9.2.6 (release_9.2.6-539-g1fd07c @ /home/w/borg/emacs/org/lisp/)]

2019-09-21 Thread Sebastian Miele
An Org file like

  # -*- lexical-binding: t; -*-
  *bold*

is dispayed as

  # -- lexical-binding: t; --
  bold

where 'bold' is bold and '- lexical-binding: t; -' is not. Expected: In
comments emphasis marker characters are no emphasis markers and despite
hiding of emphasis markers, something like '# *a*' is still dispayed as
'# *a*'.


Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-08-29
Package: Org mode version 9.2.6 (release_9.2.6-539-g1fd07c @ 
/home/w/borg/emacs/org/lisp/)

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-hide-emphasis-markers 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-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\302.Q!\207" ["news" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("mailto" :follow
#[257 "\301\300\302.Q!\207" ["mailto" browse-url ":"]
  5 "\n\n(fn URL)"]
)
   ("https" :follow
#[257 "\301\300\302.Q!\207" ["https" browse-url ":"]
  5 "\n\n(fn URL)"]
)
   ("http" :follow
#[257 "\301\300\302.Q!\207" ["http" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("ftp" :follow
#[257 "\301\300\302.Q!\207" ["ftp" browse-url ":"] 5
  "\n\n(fn URL)"]
)
   ("help" :follow org-link--open-elisp)
   ("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
 org-attach-id-to-path-function 'org-attach-id-folder-format
 )



Re: [O] Bug: Org commit d07d8ff41 breaks square-brace links in recent Emacs. [9.2.6 (release_9.2.6-538-g23113f @ /home/kfogel/src/org-mode/lisp/)]

2019-09-18 Thread Karl Fogel
On 18 Sep 2019, Marco Wahl wrote:
>Karl Fogel  writes:
>> Hi.  It appears that commit d07d8ff4163 in Org Mode causes 
>> square-brace-enclosed links to display incorrectly.
>>
>> The buggy behavior is simple to describe: if you write a link like this
>>
>>   [[URL][LINK-TEXT]]
>>
>> then URL will be displayed instead of LINK-TEXT (and LINK-TEXT goes unused: 
>> URL is still also given as the underlying link).
>
>This was a little accident with the regexp match groups AFAICT.  This is
>fixed in master.

Thanks for the quick fix, Marco.  I can confirm that links are working again 
now.

Best regards,
-Karl



Re: [O] Bug: Org commit d07d8ff41 breaks square-brace links in recent Emacs. [9.2.6 (release_9.2.6-538-g23113f @ /home/kfogel/src/org-mode/lisp/)]

2019-09-18 Thread Marco Wahl
Hi.

Karl Fogel  writes:

> Hi.  It appears that commit d07d8ff4163 in Org Mode causes 
> square-brace-enclosed links to display incorrectly.
>
> The buggy behavior is simple to describe: if you write a link like this
>
>   [[URL][LINK-TEXT]]
>
> then URL will be displayed instead of LINK-TEXT (and LINK-TEXT goes unused: 
> URL is still also given as the underlying link).

This was a little accident with the regexp match groups AFAICT.  This is
fixed in master.


Thanks,
-- 
Marco




[O] Bug: Org commit d07d8ff41 breaks square-brace links in recent Emacs. [9.2.6 (release_9.2.6-538-g23113f @ /home/kfogel/src/org-mode/lisp/)]

2019-09-17 Thread Karl Fogel
Hi.  It appears that commit d07d8ff4163 in Org Mode causes 
square-brace-enclosed links to display incorrectly.

The buggy behavior is simple to describe: if you write a link like this

  [[URL][LINK-TEXT]]

then URL will be displayed instead of LINK-TEXT (and LINK-TEXT goes unused: URL 
is still also given as the underlying link).

I haven't debugged this, but it seems to be caused by this commit in Org Mode:

> commit d07d8ff416373e5a4f2d91ed1d7f9cb3a80b8439
> Author: Max Mouratov 
> AuthorDate: Thu Aug 29 22:48:22 2019 +0500
> Commit: Nicolas Goaziou 
> CommitDate: Mon Sep 16 18:55:04 2019 +0200
> 
> Prevent loss of `re-search-forward' results
> 
> * org.el (org-activate-links): `match-beginning' and `match-end` should
> be called shortly after `re-search-forward'. Otherwise, they may return
> values corresponding to a different invocation of `re-search-forward'.
> 
> TINYCHANGE
> 
> M lisp/org.el

Here's how to verify

  1) Revert just commit d07d8ff41 in your Org Mode source tree
  2) 'make'
  3) 'make autoloads'
  4) Restart Emacs

With that commit reverted, links behave correctly.  When I restored the commit 
(and rebuilt, etc), links behaved incorrectly again.

This is all with the latest 'master' branch of Emacs (commit 746b20c237), with 
latest development Org Mode (commit 23113feb9a, which is only one commit beyond 
the suspect commit).

Best regards,
-Karl


Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.11)
 of 2019-09-17
Package: Org mode version 9.2.6 (release_9.2.6-538-g23113f @ 
/home/kfogel/src/org-mode/lisp/)



[O] bug with emacs 26.3 and hyperlinks

2019-09-17 Thread Thomas Holst
Hello,

today I upgraded to emacs 26.3. and links don't show up correct anymore
with org-mode from git. The link is shown not the description.

Steps to reproduce:

=test.org=:
#+begin_src org
  [[http://www.google.com][A Test link]]
#+end_src

: emacs -Q --find-file="test.org"

All links are shown as described above.

=git bisect= shows following commit as root cause:

Author: Max Mouratov 

Date:   Thu Aug 29 22:48:22 2019 +0500

Prevent loss of `re-search-forward' results

* org.el (org-activate-links): `match-beginning' and `match-end` should
be called shortly after `re-search-forward'. Otherwise, they may return
values corresponding to a different invocation of `re-search-forward'.

TINYCHANGE

:04 04 f3bac3041e71bff7b3c0ca2495bd629d8f3f2833 
634c8baa25f1ad4f3620d9ad26995ac17c26de6b M  lisp

"GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 
2019-09-16"

Org mode version 9.2.6 (release_9.2.6-541-g46767c @ 
/home/thommy/git-emacs/org-mode/lisp/)

Thanks for looking into this.

--
  Thomas



Re: [O] Bug: COMMENT and noweb-ref

2019-09-16 Thread Sebastian Miele
GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 
2019-08-29
Org mode version 9.2.6 (release_9.2.6-538-g23113f @ 
/home/w/borg/emacs/org/lisp/)



[O] Bug: COMMENT and noweb-ref

2019-09-16 Thread Sebastian Miele
org-babel-tangle on

  * A

#+BEGIN_SRC elisp :tangle yes :noweb yes
;; A
<>
#+END_SRC

  * COMMENT B

#+BEGIN_SRC elisp :noweb-ref B
;; B
#+END_SRC

  * COMMENT C

#+BEGIN_SRC elisp :tangle yes
;; C
#+END_SRC

produces a file with A and B in it. Expected: Just A. Changing

#+BEGIN_SRC elisp :noweb-ref B
;; B
#+END_SRC

to

# #+BEGIN_SRC elisp :noweb-ref B
# ;; B
# #+END_SRC

does yield the expected result.



Re: [O] BUG? Extra colon for inherited tags in agenda

2019-09-07 Thread Carsten Dominik
Hi David

On Sat, Sep 7, 2019 at 1:14 AM David Masterson 
wrote:

> Carsten Dominik  writes:
>
> > On Thu, Sep 5, 2019, 00:45 David Masterson 
> wrote:
>
> >>  I see that, for tags picked up via inheritance from parent headlines,
> >>  when the tags are produced in the agenda, the current agenda item will
> >>  have an extra colon after the inherited tags.  Is this by design?
>
> > Yes, it is by design, for display in the agenda only, to show the
> > difference between direct and inherited tags.
> >
> > Why would. You want to change it?
>
> Maybe not. Didn't remember seeing it in the documentation, so, at first,
> I thought it might be a bug, but it made sense after I thought about it.
> As to in the agenda only, I could also see this being something that
> export backend might want access to (if it doen't already have access
> to it).  Other than that, it's good.
>

Yes, if an export backend wanted to show inherited tags at entries, the
same syntax could be used.  I don't know if any backend is trying to show
inherited tags.

In the Agenda this is necessary because entries are shown outside of their
normal hierarchy.  In an Org buffer, or in an exported version of it, the
original hierarchy is still in place.

Cheers

Carsten


> --
> David
>


Re: [O] BUG? Extra colon for inherited tags in agenda

2019-09-06 Thread David Masterson
Carsten Dominik  writes:

> On Thu, Sep 5, 2019, 00:45 David Masterson  wrote:

>>  I see that, for tags picked up via inheritance from parent headlines,
>>  when the tags are produced in the agenda, the current agenda item will
>>  have an extra colon after the inherited tags.  Is this by design? 

> Yes, it is by design, for display in the agenda only, to show the
> difference between direct and inherited tags. 
>
> Why would. You want to change it? 

Maybe not. Didn't remember seeing it in the documentation, so, at first,
I thought it might be a bug, but it made sense after I thought about it.
As to in the agenda only, I could also see this being something that
export backend might want access to (if it doen't already have access
to it).  Other than that, it's good.
--
David



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Tim Cross


maybe add org-lint to the after-save-hook - maybe something like
(untested)

(add-hook 'after-save-hook (lamda ()
 (when (eq buffer-mode 'org-mode)
   (org-lint


Christoph Groth  writes:

> Nicolas Goaziou wrote:
>> Christoph Groth  writes:
>>
>> > I understand now that Org does what it should.  However, I find this
>> > behavior quite dangerous.  It caught me after more than 10 years of
>> > using Org.  If there's a list of long-term issues with Org
>> > somewhere, this problem may deserve being added to it.
>>
>> I don't think there is much to fix here. In any case, the command
>> `org-lint' warns you about this kind of error.
>
> Thanks for mentioning 'org-lint'.  I just ran it on my agenda files, and
> it found multiple errors in most of my (very long) files.  So at least
> for me (and likely for other Org users as well), the risk of missing
> TODO items is real - that's a rather serious problem for a task manager!
>
> My agenda files are populated using 'org-capture'.  Do you have
> suggestions how to best integrate org-lint transparently into everyday
> org usage?  For example, files could be linted automatically before they
> are saved, or before a new item is captured.


-- 
Tim Cross



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Tim Cross


You may also find the command M-x org-lint useful. I regularly run it on
my larger org files after an org release to spot problems in my org
files (either due to my error or changes in orgmode)

Tim

Christoph Groth  writes:

> Nicolas Goaziou wrote:
>
>> Planning information (SCHEDULED, DEADLINE and CLOSED keywords) must
>> appear right after the headline, per Org syntax. This is specified at
>> the first paragraph in (info "(org) Deadlines and Scheduling").
>>
>> Elswhere, only the timestamp is meaningful to Org.
>
> Thanks for the quick clarification!  I didn't see the relevant line in
> the documentation since my Emacs from Debian shows only the info
> documentation for the (outdated) Org that is bundled with Emacs [1].
>
> I understand now that Org does what it should.  However, I find this
> behavior quite dangerous.  It caught me after more than 10 years of
> using Org.  If there's a list of long-term issues with Org somewhere,
> this problem may deserve being added to it.
>
> Cheers
> Christoph
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725408


-- 
Tim Cross



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Carsten Dominik
On Thu, Sep 5, 2019 at 3:38 PM Christoph Groth 
wrote:

> Nicolas Goaziou wrote:
>
> > Planning information (SCHEDULED, DEADLINE and CLOSED keywords) must
> > appear right after the headline, per Org syntax. This is specified at
> > the first paragraph in (info "(org) Deadlines and Scheduling").
> >
> > Elswhere, only the timestamp is meaningful to Org.
>
> Thanks for the quick clarification!  I didn't see the relevant line in
> the documentation since my Emacs from Debian shows only the info
> documentation for the (outdated) Org that is bundled with Emacs [1].
>

This is, in fact, one of the very few things that did change with the
introduction of org-elements.el and the fore formal parsing of Org files.
Originally, SCHEDULED and DEADLINE could be anywhere in the entry.  But
with the development of the parser, and (I think) in order to define
everything well in particular also for the export backends, the planning
information was confined to the first line.

I don't think you need to be worried about more surprises, this was the
most significant one IIRC.

Carsten


>
> I understand now that Org does what it should.  However, I find this
> behavior quite dangerous.  It caught me after more than 10 years of
> using Org.  If there's a list of long-term issues with Org somewhere,
> this problem may deserve being added to it.
>
> Cheers
> Christoph
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725408
>
>


Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Nicolas Goaziou wrote:
> Christoph Groth  writes:
>
> > I understand now that Org does what it should.  However, I find this
> > behavior quite dangerous.  It caught me after more than 10 years of
> > using Org.  If there's a list of long-term issues with Org
> > somewhere, this problem may deserve being added to it.
>
> I don't think there is much to fix here. In any case, the command
> `org-lint' warns you about this kind of error.

Thanks for mentioning 'org-lint'.  I just ran it on my agenda files, and
it found multiple errors in most of my (very long) files.  So at least
for me (and likely for other Org users as well), the risk of missing
TODO items is real - that's a rather serious problem for a task manager!

My agenda files are populated using 'org-capture'.  Do you have
suggestions how to best integrate org-lint transparently into everyday
org usage?  For example, files could be linted automatically before they
are saved, or before a new item is captured.



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Nicolas Goaziou
Christoph Groth  writes:

> I understand now that Org does what it should.  However, I find this
> behavior quite dangerous.  It caught me after more than 10 years of
> using Org.  If there's a list of long-term issues with Org somewhere,
> this problem may deserve being added to it.

I don't think there is much to fix here. In any case, the command
`org-lint' warns you about this kind of error.



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Nicolas Goaziou wrote:

> Planning information (SCHEDULED, DEADLINE and CLOSED keywords) must
> appear right after the headline, per Org syntax. This is specified at
> the first paragraph in (info "(org) Deadlines and Scheduling").
>
> Elswhere, only the timestamp is meaningful to Org.

Thanks for the quick clarification!  I didn't see the relevant line in
the documentation since my Emacs from Debian shows only the info
documentation for the (outdated) Org that is bundled with Emacs [1].

I understand now that Org does what it should.  However, I find this
behavior quite dangerous.  It caught me after more than 10 years of
using Org.  If there's a list of long-term issues with Org somewhere,
this problem may deserve being added to it.

Cheers
Christoph

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725408



Re: [O] Bug: Language code for Brazilian in org-latex-babel-language-alist and org-latex-polyglossia-language-alist

2019-09-05 Thread Nicolas Goaziou
Hello,

Gustavo Barros  writes:

> I hadn’t checked the commit back then, but now I was seeing if I could
> remove my local workaround on this and I noticed that while
> `org-latex-babel-language-alist' is now looking good,
> `org-latex-polyglossia-language-alist' was not changed. (This is so in
> an up to date org-plus-contrib-20190904/ox-latex.el).

Fixed, too! Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Nicolas Goaziou
Hello,

Christoph Groth  writes:

> With Org 9.2.3, the following two TODO items behave differently:
>
> ** TODO Something
> blabla
> SCHEDULED: <2019-09-01 Sun>
> [2019-09-05 Thu 14:39]
> ** TODO Something else
> SCHEDULED: <2019-09-01 Sun>
> foobar
> [2019-09-05 Thu 14:40]
>
> The first one behaves as expected, i.e. it appears in today's
> (2019-09-05) agenda, since it's not done yet.
>
> The second one does appear in today's agenda, but it is visible for the
> day 2019-09-01.
>
> Is this behavior by design?  If yes, could someone please explain the
> rationale or point me to relevant documentation or discussions?

Planning information (SCHEDULED, DEADLINE and CLOSED keywords) must
appear right after the headline, per Org syntax. This is specified at
the first paragraph in (info "(org) Deadlines and Scheduling").

Elswhere, only the timestamp is meaningful to Org.

Regards,

-- 
Nicolas Goaziou



[O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Dear org mode experts,

I have noticed the following behavior that (after reading the relevant
documentation) I find at least surprising and error-prone.

With Org 9.2.3, the following two TODO items behave differently:

** TODO Something
blabla
SCHEDULED: <2019-09-01 Sun>
[2019-09-05 Thu 14:39]
** TODO Something else
SCHEDULED: <2019-09-01 Sun>
foobar
[2019-09-05 Thu 14:40]

The first one behaves as expected, i.e. it appears in today's
(2019-09-05) agenda, since it's not done yet.

The second one does appear in today's agenda, but it is visible for the
day 2019-09-01.

Is this behavior by design?  If yes, could someone please explain the
rationale or point me to relevant documentation or discussions?

Thanks!
Christoph



Re: [O] Bug: Language code for Brazilian in org-latex-babel-language-alist and org-latex-polyglossia-language-alist

2019-09-05 Thread Gustavo Barros

Hi Nicolas,

On Thu, Aug 15 2019, Nicolas Goaziou wrote:


Hello,

Gustavo Barros  writes:


`org-latex-babel-language-alist' and
`org-latex-polyglossia-language-alist' have the language code for
Brazilian as =("bt-br" . "brazilian")=.  I am a native Brazilian and
our language is Portuguese, and Brazilian Portuguese is a variant.
That to say that I’ve never seen the language code "bt-br" to refer 
to
"brazilian", whereas the usual code is "pt-br" (hyphen or 
underscore).

So this looks very much like a typo.


Fixed. Thank you!


I hadn’t checked the commit back then, but now I was seeing if I could 
remove my local workaround on this and I noticed that while 
`org-latex-babel-language-alist' is now looking good, 
`org-latex-polyglossia-language-alist' was not changed. (This is so in 
an up to date org-plus-contrib-20190904/ox-latex.el).


Best regards,
Gustavo.



Re: [O] BUG? Extra colon for inherited tags in agenda

2019-09-04 Thread Carsten Dominik
Hi,




On Thu, Sep 5, 2019, 00:45 David Masterson  wrote:

> I see that, for tags picked up via inheritance from parent headlines,
> when the tags are produced in the agenda, the current agenda item will
> have an extra colon after the inherited tags.  Is this by design?


Yes, it is by design, for display in the agenda only, to show the
difference between direct and inherited tags.

Why would. You want to change it?

Carsten


Can
> that be controlled?
>
> Example Parent  :tag1:
> Example child of Parent :tag1::
> --
> David
>
>


[O] BUG? Extra colon for inherited tags in agenda

2019-09-04 Thread David Masterson
I see that, for tags picked up via inheritance from parent headlines,
when the tags are produced in the agenda, the current agenda item will
have an extra colon after the inherited tags.  Is this by design?  Can
that be controlled?

Example Parent  :tag1:
Example child of Parent :tag1::
--
David



Re: [O] Bug: org-edit-src keeps splitting the window [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)]

2019-09-03 Thread Nicolas Goaziou
Hello,

Immanuel Litzroth  writes:

> You want me to do that and send a new patch or are you going
> to do it after you apply the patch?

The former, if you don't mind.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-edit-src keeps splitting the window [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)]

2019-09-02 Thread Immanuel Litzroth
You want me to do that and send a new patch or are you going
to do it after you apply the patch?
Regards,
Immanuel

On Mon, Sep 2, 2019 at 9:41 PM Nicolas Goaziou  wrote:
>
> Hello,
>
> immanuel  writes:
>
> > When org-edit-src-code is called with org-window-setup equal to
> > 'split-window-below or 'split-window-right it will keep splitting the
> > window if the mouse is clicked on the src block in the org buffer.
> > This patch tries to address that
>
> [...]
>
> > +(defun org-src-select-window-for-buffer (buffer split-fun)
>
> You should make it an internal function: `org-src--select-window-for-buffer'.
>
> > +  "Tries to select an existing window for buffer or splits the
> > window."
>
> You need to expound the docstring a bit, e.g.:
>
>   "Re-use an existing window or split the current window.
>   If BUFFER is current in a window, use it.  Otherwise, split the current
>   window, according to SPLIT-FUN, in order to display it.
>
> Also, I think this should be notified in ORG-NEWS file.
>
> Thank you!
>
> Regards,
>
> --
> Nicolas Goaziou



Re: [O] Bug: org-edit-src keeps splitting the window [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)]

2019-09-02 Thread Nicolas Goaziou
Hello,

immanuel  writes:

> When org-edit-src-code is called with org-window-setup equal to
> 'split-window-below or 'split-window-right it will keep splitting the
> window if the mouse is clicked on the src block in the org buffer.
> This patch tries to address that

[...]

> +(defun org-src-select-window-for-buffer (buffer split-fun)

You should make it an internal function: `org-src--select-window-for-buffer'.

> +  "Tries to select an existing window for buffer or splits the
> window."

You need to expound the docstring a bit, e.g.:

  "Re-use an existing window or split the current window.
  If BUFFER is current in a window, use it.  Otherwise, split the current
  window, according to SPLIT-FUN, in order to display it.

Also, I think this should be notified in ORG-NEWS file.

Thank you!

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: tangling with elisp as lang in a noweb reference doesn't work [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-31 Thread Immanuel Litzroth
No problem! I have some more coming up :-)
I've been looking at getting org-babel to add line directives for
languages that support it.
(c, c++, haskell...). It would make literate programming for these
kinds of languages much
better, and other people have been complaining e.g.
https://paulbatchelor.github.io/blog/posts/2018-09-21-org-babel-impressions.html

Unfortunately there is no easy way to hook this into org-babel now
without doing some rather
intrusive work.
1) The language specific expansions don't know the file or the line a
block comes from, and
noweb references have already been expanded.
2) The tangle-body-hook is useless since it runs in a temp buffer that
doesn't even have the major
mode set for the language you're tangling to.
3) The :comments mechanism is not strong enough to allow language
specific comments and it 's
different for noweb vs. normal block expansion.

Would there be interest in such a feature, if it doesn't change
current behaviour?
Immanuel

On Fri, Aug 30, 2019 at 11:37 PM Nicolas Goaziou  wrote:
>
> Hello,
>
> immanuel  writes:
>
> > #+NAME: this is a test
> > #+BEGIN_SRC elisp :tangle no
> >
> > (message \"aha\") #+END_SRC
> >
> > #+BEGIN_SRC elisp :noweb yes :comments noweb :tangle out.el
> > first
> > <>
> > second
> > #+END_SRC
> >
> > #+BEGIN_SRC elisp :tangle no
> > (progn
> > (org-babel-tangle)
> > (with-temp-buffer
> > (insert-file-contents "out.el")
> > (buffer-string)
> > #+END_SRC
> >
> >
> > Doesn't work. The reason is that the function
> > org-babel-expand-noweb-references uses
> >
> > #+BEGIN_SRC emacs-lisp
> > (c-wrap (lambda (text)
> > (with-temp-buffer
> > (funcall (intern (concat lang "-mode")))
> > ...
> > #+END_SRC
>
> Fixed! Thank you for the report and the analysis.
>
> Regards,
>
> --
> Nicolas Goaziou



[O] Bug: org-babel-tangle-clean seems buggy [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)]

2019-08-31 Thread immanuel


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.


When running 'org-babel-tangle-clean on this buffer:

>>

[[file:foo][something]]

<>
[[file:bar][something else]]

<>

>>

I get

>>
<>
>>


Given the code of that function -- especially the (while (or -- it's highly
unlikely that that code does what the docstring says it does. I'm also not
clear on why you'd want to remove noweb references.

#+BEGIN_SRC emacs-lisp
(defun org-babel-tangle-clean ()
  "Remove comments inserted by `org-babel-tangle'.
Call this function inside of a source-code file generated by
`org-babel-tangle' to remove all comments inserted automatically
by `org-babel-tangle'.  Warning, this comment removes any lines
containing constructs which resemble Org file links or noweb
references."
  (interactive)
  (goto-char (point-min))
  (while (or (re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t)
 (re-search-forward (org-babel-noweb-wrap) nil t))
(delete-region (save-excursion (beginning-of-line 1) (point))
   (save-excursion (end-of-line 1) (forward-char 1) (point)
#END_SRC

Immanuel

Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.2.5 (release_9.2.5-504-g3c24be @ 
/home/immanuel/.emacs.d/straight/build/org/)

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-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-mode-hook '((closure
  (org-agenda-skip-regexp org-table1-hline-regexp 
org-table-tab-recognizes-table\.el org-table-dataline-regexp 
org-table-any-border-regexp
   org-agenda-restriction-lock-overlay 
org-agenda-overriding-restriction org-agenda-diary-file 
org-complex-heading-regexp calendar-mode-map t)
  nil (setq imenu-create-index-function (quote 
org-imenu-get-tree)))
 (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 org-mode-abbrev-table 
org-mode-syntax-table
   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 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-link-file-path-type 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 
auto-fill-mode)
 org-odt-format-drawer-function '(closure
  (hfy-user-sheet-assoc hfy-html-quote-regex 
hfy-html-quote-map hfy-face-to-css hfy-begin-span-handler hfy-end-span-handler 
archive-zip-extract
   nxml-auto-insert-xml-declaration-flag t)
  (_name contents) contents)
 org-archive-hook '(org-attach-archive-delete-maybe)
 

Re: [O] Bug: tangling with elisp as lang in a noweb reference doesn't work [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-30 Thread Nicolas Goaziou
Hello,

immanuel  writes:

> #+NAME: this is a test
> #+BEGIN_SRC elisp :tangle no
>
> (message \"aha\") #+END_SRC
>
> #+BEGIN_SRC elisp :noweb yes :comments noweb :tangle out.el
> first
> <>
> second
> #+END_SRC
>
> #+BEGIN_SRC elisp :tangle no 
> (progn
> (org-babel-tangle)
> (with-temp-buffer
> (insert-file-contents "out.el")
> (buffer-string)
> #+END_SRC
>
>
> Doesn't work. The reason is that the function
> org-babel-expand-noweb-references uses 
>
> #+BEGIN_SRC emacs-lisp
> (c-wrap (lambda (text)
> (with-temp-buffer
> (funcall (intern (concat lang "-mode")))
> ...
> #+END_SRC

Fixed! Thank you for the report and the analysis.

Regards,

-- 
Nicolas Goaziou



[O] Bug: org-edit-src keeps splitting the window [9.2.5 (release_9.2.5-504-g3c24be @ /home/immanuel/.emacs.d/straight/build/org/)]

2019-08-30 Thread immanuel

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.

When org-edit-src-code is called with org-window-setup equal to
'split-window-below or 'split-window-right it will keep splitting the
window if the mouse is clicked on the src block in the org buffer.
This patch tries to address that

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 9134d5b5d..c7e201687 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -786,6 +786,13 @@ Raise an error when current buffer is not a source editing buffer."
   (unless (org-src-edit-buffer-p) (error "Not in a source buffer"))
   org-src--source-type)
 
+(defun org-src-select-window-for-buffer (buffer split-fun)
+  "Tries to select an existing window for buffer or splits the window."
+  (select-window
+   (or
+(display-buffer-reuse-window buffer '())
+(funcall split-fun
+
 (defun org-src-switch-to-buffer (buffer context)
   (pcase org-src-window-setup
 (`current-window (pop-to-buffer-same-window buffer))
@@ -794,12 +801,12 @@ Raise an error when current buffer is not a source editing buffer."
 (`split-window-below
  (if (eq context 'exit)
 	 (delete-window)
-   (select-window (split-window-vertically)))
+   (org-src-select-window-for-buffer buffer #'split-window-vertically))
  (pop-to-buffer-same-window buffer))
 (`split-window-right
  (if (eq context 'exit)
 	 (delete-window)
-   (select-window (split-window-horizontally)))
+   (org-src-select-window-for-buffer buffer #'split-window-horizontally))
  (pop-to-buffer-same-window buffer))
 (`other-frame
  (pcase context


Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.2.5 (release_9.2.5-504-g3c24be @ 
/home/immanuel/.emacs.d/straight/build/org/)

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-reveal-start-hook '(org-decrypt-entry)
 org-mode-hook '(#[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2] #[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
 auto-fill-mode)
 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) (C) (python . t) (shell . t) 
(plantuml . t))
 org-src-preserve-indentation 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 '(("D" . "d") ("C++" . "cpp") ("abc" . "abc") 
("asymptote" . "asy") ("awk" . "awk") ("clojure" . "clj") ("fortran" . "F90") 
("groovy" . "groovy")
  ("haskell" . "hs") ("io" . "io") ("java" . 
"java") ("latex" . "tex") ("LilyPond" . "ly") ("lisp" . "lisp") ("lua" . "lua") 
("maxima" . "max") ("ocaml" . "ml")
  ("perl" . "pl") ("picolisp" . "l") ("processing" 
. "pde") ("ruby" . "rb") ("sed" . "sed") ("vala" . "vala") ("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)
   

[O] Bug: (org-babel-script-escape) is whitespace at the end of line dependent. [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2019-08-29 Thread Vladimir Nikishkin



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.


Hello, everyone.

First, let me show the mwe (uses org-babel, created using chibi-scheme,
but doesn't really need it (chicken should also work)):

#+begin_src scheme :export both :results output
(display "(+ 0) ")
#+end_src

#+RESULTS:
: 0

#+begin_src scheme :export both :results output
(display "(+ 0)")
#+end_src

#+RESULTS:
| + | 0 |

The difference in behaviour is caused by difference in the evaluation of
the following calls:
(org-babel-script-escape "(+ 0)") (org-babel-script-escape "(+ 0) ")

Also, both of those are actually wrong, because the interpreter prints:
(+ 0)

Would be super grateful if someone could have a look into it!

Vlad

Emacs  : GNU Emacs 26.3 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.10)
 of 2019-08-30
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.3/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-after-execute-hook '((lambda nil
 (if org-inline-image-overlays
  (progn (org-redisplay-inline-images)))
 )
)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-pretty-entities t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/DevLinux/chibi-sicp/index.org" 
"~/Personal_Planner/Planner.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-modules '(org-habits org-w3m org-bbdb org-bibtex org-docview org-gnus 
org-info org-irc
   org-mhe org-rmail)
 org-plantuml-jar-path "/usr/local/bin/plantuml.jar"
 org-mode-hook '((lambda nil (imenu-add-to-menubar "Imenu"))
 #[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]
 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-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-latex-compiler "lualatex"
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((plantuml . t) (C . t) (scheme . t))
 org-log-done 'time
 org-startup-align-all-tables t
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-agenda-include-diary t
 org-structure-template-alist '(("E"
 "#+begin_src elisp :export both :results value 
:session\n?\n#+end_src")
("S"
 "#+begin_src scheme :export both :results 
value :session\n?\n#+end_src")
("p" "#+begin_src plantuml :export both :file ? 
\n#+end_src ")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT")
("L" "#+LaTeX: ")
("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT") 
("H" "#+HTML: ")
("a" "#+BEGIN_EXPORT ascii\n?\n#+END_EXPORT")
("A" "#+ASCII: ") ("i" "#+INDEX: ?")
("I" "#+INCLUDE: %file ?"))
 org-cycle-hook '(org-cycle-hide-archived-subtrees 

Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-27 Thread Tim Cross


I think I agree with Julius. While it may be a legitimate use case, the
risk that it will break other use cases seems a bit high (I've never run
into this issue in many years of org use).

Perhaps add another document 'type' into 'org-latex-classes which adds
the xpatch and associated change to the default. I have a number of such
'templates' (e.g. to generate work documents with the 'approved' colours
and logo etc). It works quite well.

Tim


Julius Dittmar  writes:

> Hi folks,
>
> Am 27.08.19 um 08:57 schrieb Vladimir Nikishkin:
>> I have indeed investigated the issue, and this is the link:
>> https://latex.org/forum/viewtopic.php?f=47=32788
>>
>> To make the long story short, the folowing trick is needed to allow
>> page breaks after headings (which is a completely standard case in
>> -org).
>>
>> #+begin_src latex
>> \usepackage{xpatch}
>> \makeatletter
>> % This is not recommended, because it can break several things
>> \xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{%
>> \typeout{WARNING: \string\@afterheading\space broken}%
>> }{%
>> \@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd%
>> }
>> \makeatother
>> #+end_src
>>
>> Shall this trick be considered for inclusion in 'org' officially?
>> I mean, having lists of empty headings is a perfectly standard use case for 
>> org.
>
> I would not want that as the default. Yes, it is one standard use case.
> It would break other standard use cases, like creating ordinary
> documents, though.
>
> Perhaps variant adding such a patch could be added to org-latex-classes,
> or at least mentioned in the docs to org-latex-classes? That way you can
> use this "class" version for such cases without adding unnecessary
> uglyness to other org-created documents.
>
> Another possible approach would be a change in the export functions.
> What really is needed here, from my point of view, is that the export
> adds a superficial paragraph to a heading in the case that there's no
> content at all. Nothing should be added if the heading has sub-headings,
> I count that as content. In case there is no content at all, then some
> form of breakable vertical space should be added. I don't know enough
> LaTeX to find the least intrusive way, though I'd try \vspace{0pt}.
>
> I did never dig into the export functions, so I don't know how difficult
> that would be.
>
> Just my thoughts,
> Julius Dittmar


--
Tim Cross



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-27 Thread Julius Dittmar
Hi folks,

Am 27.08.19 um 08:57 schrieb Vladimir Nikishkin:
> I have indeed investigated the issue, and this is the link:
> https://latex.org/forum/viewtopic.php?f=47=32788
>
> To make the long story short, the folowing trick is needed to allow
> page breaks after headings (which is a completely standard case in
> -org).
>
> #+begin_src latex
> \usepackage{xpatch}
> \makeatletter
> % This is not recommended, because it can break several things
> \xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{%
> \typeout{WARNING: \string\@afterheading\space broken}%
> }{%
> \@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd%
> }
> \makeatother
> #+end_src
>
> Shall this trick be considered for inclusion in 'org' officially?
> I mean, having lists of empty headings is a perfectly standard use case for 
> org.

I would not want that as the default. Yes, it is one standard use case.
It would break other standard use cases, like creating ordinary
documents, though.

Perhaps variant adding such a patch could be added to org-latex-classes,
or at least mentioned in the docs to org-latex-classes? That way you can
use this "class" version for such cases without adding unnecessary
uglyness to other org-created documents.

Another possible approach would be a change in the export functions.
What really is needed here, from my point of view, is that the export
adds a superficial paragraph to a heading in the case that there's no
content at all. Nothing should be added if the heading has sub-headings,
I count that as content. In case there is no content at all, then some
form of breakable vertical space should be added. I don't know enough
LaTeX to find the least intrusive way, though I'd try \vspace{0pt}.

I did never dig into the export functions, so I don't know how difficult
that would be.

Just my thoughts,
Julius Dittmar



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-27 Thread Vladimir Nikishkin
I have indeed investigated the issue, and this is the link:
https://latex.org/forum/viewtopic.php?f=47=32788

To make the long story short, the folowing trick is needed to allow
page breaks after headings (which is a completely standard case in
-org).

#+begin_src latex
\usepackage{xpatch}
\makeatletter
% This is not recommended, because it can break several things
\xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{%
\typeout{WARNING: \string\@afterheading\space broken}%
}{%
\@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd%
}
\makeatother
#+end_src

Shall this trick be considered for inclusion in 'org' officially?
I mean, having lists of empty headings is a perfectly standard use case for org.

пн, 26 авг. 2019 г. в 17:47, Nicolas Goaziou :
>
> Hello,
>
> Vladimir Nikishkin  writes:
>
> > I have a problem in that when I try to export an .org file into latex/pdf,
> > long sections are not wrapped to the next page, but are truncated instead.
> >
> > The result is on the picture (points 10.34 to 10.37 missing), and the
> > (not)working example is attached to this email.
>
> The LaTeX code generated by Org looks correct.
>
> I tried to remove all \label{...}, all \href{...} from the ".tex" file,
> but the problem is still the same.
>
> It may be a LaTeX issue, not an Org one. You may want to investigate in
> this direction.
>
> HTH,
>
> Regards,
>
> --
> Nicolas Goaziou



-- 
Yours sincerely, Vladimir Nikishkin



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-26 Thread Julius Dittmar
Hi Vladimir,

I see two problems in the generated LaTeX-file you'd need to address.

First, LaTeX has problems handling URLs in section (or subsection)
headers. That's one of the reasons LaTeX chokes on the second run of
that file -- it's only partially generated, not completely.

The second is the fact that there's no content in all those subsections.
I guess that's why LaTeX's page break algorithm fails: It does not want
to make a page break immediately after a section heading. Thus there's
no viable place for LaTeX to break that page.

As there's no contents in all those subsections, how about changing it
to a list with checkboxes? Then the problem with the URLs is solved too.

HTH,
Julius

Am 26.08.19 um 05:46 schrieb Vladimir Nikishkin:
> I have a problem in that when I try to export an .org file into
> latex/pdf, long sections are not wrapped to the next page, but are
> truncated instead.



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-26 Thread Nicolas Goaziou
Hello,

Vladimir Nikishkin  writes:

> I have a problem in that when I try to export an .org file into latex/pdf,
> long sections are not wrapped to the next page, but are truncated instead.
>
> The result is on the picture (points 10.34 to 10.37 missing), and the
> (not)working example is attached to this email.

The LaTeX code generated by Org looks correct.

I tried to remove all \label{...}, all \href{...} from the ".tex" file,
but the problem is still the same.

It may be a LaTeX issue, not an Org one. You may want to investigate in
this direction.

HTH,

Regards,

-- 
Nicolas Goaziou



[O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-25 Thread Vladimir Nikishkin
 Hello, friends!

I have a problem in that when I try to export an .org file into latex/pdf,
long sections are not wrapped to the next page, but are truncated instead.

The result is on the picture (points 10.34 to 10.37 missing), and the
(not)working example is attached to this email.




-- 
Yours sincerely, Vladimir Nikishkin


temp-for-publish.org
Description: Binary data


[O] Bug: tangling with elisp as lang in a noweb reference doesn't work [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-25 Thread immanuel


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.


#+NAME: this is a test
#+BEGIN_SRC elisp :tangle no
(message \"aha\")
#+END_SRC

#+BEGIN_SRC elisp :noweb yes :comments noweb :tangle out.el
first
<>
second
#+END_SRC

#+BEGIN_SRC elisp :tangle no 
(progn
(org-babel-tangle)
(with-temp-buffer
(insert-file-contents "out.el")
(buffer-string)
#+END_SRC

Doesn't work. The reason is that the function
org-babel-expand-noweb-references uses 
#+BEGIN_SRC emacs-lisp
(c-wrap (lambda (text)
(with-temp-buffer
(funcall (intern (concat lang "-mode")))
...
#+END_SRC

Instead of the possibly more correct turning on of the major mode that
is found in org-babel-tangle:
#+BEGIN_SRC emacs-lisp
(lang-f (intern
 (concat
  (or (and (cdr (assoc lang org-src-lang-modes))
   (symbol-name
(cdr (assoc lang org-src-lang-modes
  lang)
  "-mode")))
#+END_SRC


Immanuel

Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/share/emacs/26.2/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-listings t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-plantuml-jar-path "/home/immanuel/bin/plantuml.jar"
 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]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
auto-fill-mode)
 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-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-from-is-user-regexp "|\\"
 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-babel-load-languages '((emacs-lisp . t) (C . t) (python . t) (lilypond . 
t) (shell . t) (plantuml . t))
 org-log-done 'time
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-babel-python-command "ipython --simple-prompt -i --pylab"
 org-src-preserve-indentation t
 org-occur-hook '(org-first-headline-recenter)
 org-structure-template-alist '(("r" "#+BEGIN_SRC rust\n?\n#+END_SRC") ("p" 
"#+BEGIN_SRC plantuml\n?\n#+END_SRC")
("ha" "#+BEGIN_SRC haskell\n?\n#+END_SRC")
("ly"
 "#+LaTeX: \\linebreak\n#+ATTR_LaTeX: 
width=17cm\n#+BEGIN_SRC lilypond :file ?.png :noweb yes\n#+END_SRC")
("bnf" "#+BEGIN_SRC abnf\n?\n#+END_SRC")
("cpp"
 "#+NAME:\n#+HEADER: :tangle\n#+HEADER: :main 
no\n#+HEADER: :noeval\n#+HEADER: :noweb yes\n#+BEGIN_SRC cpp\n?\n#+END_SRC")
("yp" "#+END_SRC\n?\n#+BEGIN_SRC python :noweb 
yes")
("py" "#+BEGIN_SRC python :noweb 
yes\n?\n#+END_SRC") ("ab" "#+END_SRC\n#+BEGIN_SRC bash")
("ba" "#+BEGIN_SRC bash?\n#+END_SRC") ("le" 
"#+END_SRC\n#+BEGIN_SRC emacs-lisp?")
("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC") 
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" 
"#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") ("V" 
"#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") ("C" 
"#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT") 
("L" "#+LaTeX: ")
("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT") 
("H" "#+HTML: ")

Re: [O] Bug: org-babel-tangle-comment-links does not start-line but start-point. [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-24 Thread Nicolas Goaziou
Hello,

immanuel  writes:

> Try this in a buffer (results are also here for quick reference):
>
> #+NAME: start
> #+BEGIN_SRC emacs-lisp :tangle no
>
> (message "start") #+END_SRC
>
> #+NAME: end
> #+BEGIN_SRC emacs-lisp :tangle no
>
> (message "end") #+END_SRC
>
> #+BEGIN_SRC emacs-lisp :tangle output.el :comments noweb :noweb yes
> (progn
> <>
> <>
> )
> #+END_SRC
>
> #+BEGIN_SRC emacs-lisp :tangle no
> (let ((org-babel-tangle-comment-format-beg "start %start-line")
>   (org-babel-tangle-comment-format-end "end %start-line"))
>   (org-babel-tangle-file (buffer-file-name))
>   (with-temp-buffer 
>   (insert-file-contents "output.el")
>   (buffer-string)))
> #+END_SRC
>
>
> #+RESULTS:
>
> #+begin_example
> ;; start 12
> (progn
> ;; start 15
> (message "start")
> ;; end 15
> ;; start 90
> (message "end")
> ;; end 90
> )
> ;; end 12
> #+end_example

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: org-babel-tangle-comment-links does not honor org-babel-tangle-uncomment-comments in noweb comments [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-24 Thread immanuel


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.


Try the following code;
#+NAME: start
#+BEGIN_SRC emacs-lisp :tangle no
(message "start")
#+END_SRC

#+NAME: end
#+BEGIN_SRC emacs-lisp :tangle no
(message "end")
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle output.el :comments noweb :noweb yes
start
<>
end
<>
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle no
(let ((org-babel-tangle-comment-format-beg "start %start-line\n")
  (org-babel-tangle-comment-format-end "end %start-line\n")
  (org-babel-tangle-uncomment-comments t))
  (org-babel-tangle-file (buffer-file-name))
  (with-temp-buffer 
  (insert-file-contents "output.el")
  (buffer-string)))
#+END_SRC

#+RESULTS:
#+begin_example
start 71
start
;; start 285
(message "start")
;; end 285
;; start 1256
(message "start")
;; end 1256
end
;; start 360
(message "end")
;; end 360
;; start 1331
(message "end")
;; end 1331
end 71
#+end_example

You see the noweb comments are commented out. The reason is this cl-wrap
definition in org-babel-expand-noweb-references.

#+BEGIN_SRC emacs-lisp
(let ..
   (c-wrap (lambda (text)
   (with-temp-buffer
 (funcall (intern (concat lang "-mode")))
 (comment-region (point) (progn (insert text) (point)))
 (org-trim (buffer-string))
#+END_SRC



Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/share/emacs/26.2/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-listings t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/home/immanuel/bin/plantuml.jar"
 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]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
auto-fill-mode)
 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-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-from-is-user-regexp "|\\"
 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-babel-load-languages '((emacs-lisp . t) (C . t) (python . t) (lilypond . 
t) (shell . t) (plantuml . t))
 org-log-done 'time
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-babel-python-command "ipython --simple-prompt -i --pylab"
 org-src-preserve-indentation t
 org-occur-hook '(org-first-headline-recenter)
 org-structure-template-alist '(("r" "#+BEGIN_SRC rust\n?\n#+END_SRC") ("p" 
"#+BEGIN_SRC plantuml\n?\n#+END_SRC")
("ha" "#+BEGIN_SRC haskell\n?\n#+END_SRC")
("ly"
 "#+LaTeX: \\linebreak\n#+ATTR_LaTeX: 
width=17cm\n#+BEGIN_SRC lilypond :file ?.png :noweb yes\n#+END_SRC")
("bnf" "#+BEGIN_SRC abnf\n?\n#+END_SRC")
("cpp"
 "#+NAME:\n#+HEADER: :tangle\n#+HEADER: :main 
no\n#+HEADER: :noeval\n#+HEADER: :noweb yes\n#+BEGIN_SRC cpp\n?\n#+END_SRC")
("yp" "#+END_SRC\n?\n#+BEGIN_SRC python :noweb 
yes")
("py" "#+BEGIN_SRC python :noweb 
yes\n?\n#+END_SRC") ("ab" "#+END_SRC\n#+BEGIN_SRC bash")
("ba" "#+BEGIN_SRC bash?\n#+END_SRC") ("le" 
"#+END_SRC\n#+BEGIN_SRC emacs-lisp?")
("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC") 
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" 
"#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") ("V" 

Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-24 Thread Charles Millar via Emacs-orgmode



Nicolas Goaziou  writes:



It changed between Org 9.2 and Org 9.3, for every language. There is an
ORG-NEWS entry about it, namely:

  *** ~:file~ header argument no longer assume "file" ~:results~



Thank you. I read that entry and others concerning ;file prior to
posting and it did not penetrate my thick skull.

Regards,



[O] Bug: org-babel-tangle-comment-links does not start-line but start-point. [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-24 Thread immanuel


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.

Try this in a buffer (results are also here for quick reference):

#+NAME: start
#+BEGIN_SRC emacs-lisp :tangle no
(message "start")
#+END_SRC

#+NAME: end
#+BEGIN_SRC emacs-lisp :tangle no
(message "end")
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle output.el :comments noweb :noweb yes
(progn
<>
<>
)
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle no
(let ((org-babel-tangle-comment-format-beg "start %start-line")
  (org-babel-tangle-comment-format-end "end %start-line"))
  (org-babel-tangle-file (buffer-file-name))
  (with-temp-buffer 
  (insert-file-contents "output.el")
  (buffer-string)))
#+END_SRC

#+RESULTS:
#+begin_example
;; start 12
(progn
;; start 15
(message "start")
;; end 15
;; start 90
(message "end")
;; end 90
)
;; end 12
#+end_example


The reason is that the function org-babel-tangle-comment-links uses
#+BEGIN_SRC emacs-lisp :tangle no
("start-line" . ,(number-to-string
 (org-babel-where-is-src-block-head)
#+END_SRC

Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/share/emacs/26.2/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-listings t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/home/immanuel/bin/plantuml.jar"
 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]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
auto-fill-mode)
 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-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-from-is-user-regexp "|\\"
 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-babel-load-languages '((emacs-lisp . t) (C . t) (python . t) (lilypond . 
t) (shell . t) (plantuml . t))
 org-log-done 'time
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-babel-python-command "ipython --simple-prompt -i --pylab"
 org-src-preserve-indentation t
 org-occur-hook '(org-first-headline-recenter)
 org-structure-template-alist '(("r" "#+BEGIN_SRC rust\n?\n#+END_SRC") ("p" 
"#+BEGIN_SRC plantuml\n?\n#+END_SRC")
("ha" "#+BEGIN_SRC haskell\n?\n#+END_SRC")
("ly"
 "#+LaTeX: \\linebreak\n#+ATTR_LaTeX: 
width=17cm\n#+BEGIN_SRC lilypond :file ?.png :noweb yes\n#+END_SRC")
("bnf" "#+BEGIN_SRC abnf\n?\n#+END_SRC")
("cpp"
 "#+NAME:\n#+HEADER: :tangle\n#+HEADER: :main 
no\n#+HEADER: :noeval\n#+HEADER: :noweb yes\n#+BEGIN_SRC cpp\n?\n#+END_SRC")
("yp" "#+END_SRC\n?\n#+BEGIN_SRC python :noweb 
yes")
("py" "#+BEGIN_SRC python :noweb 
yes\n?\n#+END_SRC") ("ab" "#+END_SRC\n#+BEGIN_SRC bash")
("ba" "#+BEGIN_SRC bash?\n#+END_SRC") ("le" 
"#+END_SRC\n#+BEGIN_SRC emacs-lisp?")
("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC") 
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" 
"#+BEGIN_QUOTE\n?\n#+END_QUOTE")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") ("V" 
"#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") ("C" 
"#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT") 
("L" "#+LaTeX: ")
("h" "#+BEGIN_EXPORT 

Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-23 Thread Nicolas Goaziou
Hello,

Charles Millar via Emacs-orgmode  writes:

> Now a "just curious," comment and question:
>
> I had a few files that used the ECM source code block, just many more
> entries in each. The last time that I evaluated any of them was last
> October and it produced the results I expected, i.e. I did not specify
> ":results file"
>
> So, up until October was I just lucky or did something change in Org
> that affected the sh language?

It changed between Org 9.2 and Org 9.3, for every language. There is an
ORG-NEWS entry about it, namely:

  *** ~:file~ header argument no longer assume "file" ~:results~


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-23 Thread Charles Millar via Emacs-orgmode

On 8/23/19 4:15 AM, Nicolas Goaziou wrote:

Hello,

Charles Millar via Emacs-orgmode  writes:


#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

   and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created


You probably need to specify that the output is a file, which is not the
default for "sh" language. You may want to add ":results file" to the
header of the source block.

Regards,


Thank you, Nicolas. That solved it.

Now a "just curious," comment and question:

I had a few files that used the ECM source code block, just many more 
entries in each. The last time that I evaluated any of them was last 
October and it produced the results I expected, i.e. I did not specify 
":results file"


So, up until October was I just lucky or did something change in Org 
that affected the sh language?


Regards,

Charlie Millar






Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-23 Thread Nicolas Goaziou
Hello,

Charles Millar via Emacs-orgmode  writes:

> #+begin_src sh :file test.rec
> cat << EOF
> # -*- mode: rec -*-
>
> %rec: somerecord
>
> Account: something
> Amount: 0.00
>
>  end of file
> EOF
>
> #+end_src
>
> I expect that when I execute the above code block that
>
>   1. An external file test.rec is produced with contents
>
>   # -*- mode: rec -*-
>
>   %rec: somerecord
>
>   Account: something
>   Amount: 0.00
>
>    end of file
>
>   and
>
>   2. A link to that file is placed below the source code block
>
> Instead all I get is a table and no external file is created

You probably need to specify that the output is a file, which is not the
default for "sh" language. You may want to add ":results file" to the
header of the source block.

Regards,

-- 
Nicolas Goaziou



[O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-22 Thread Charles Millar via Emacs-orgmode
Org mode version 9.2.5 (release_9.2.5-494-g4848b8 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-22


ECM

#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

 and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created

#+RESULTS:
| # |   -*- | mode: | rec | -*- |
| %rec: | somerecord | | | |
| Account: | sometyhing | | | |
| Amount: | 0.0 | | | |
|  | end | of | file | |

I reported this earlier but my subject line was not correct.

Charlie Millar



Re: [O] Bug: org-babel-tangle-file [9.2.4 (9.2.4-3-g7bc6f8-elpaplus @ /home/stettberger/.emacs.d/elpa/org-plus-contrib-20190701/)]

2019-08-22 Thread Nicolas Goaziou
Hello,

Christian Dietrich  writes:

> I think a found a bug in org-babel-tangle-file. It closes an user-opened
> buffer if called with a symlink that points to the same file. Please see
> the attached patch, which fixes the problem for me.

Applied. Thank you!

Regards,

-- 
Nicolas Goaziou



[O] Bug: :lexical header argument not handled when tangling [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2019-08-21 Thread immanuel


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.



#+BEGIN_SRC emacs-lisp :lexical t :tangle elisp.el
(defun lex-p ()
  "Return t if lexical binding is in effect."
  (interactive)
  (let (lex
_lex-p)
(let ((lex t))
  (setq _lex-p
(lambda ()
  lex)))
(if (funcall _lex-p)
(message "lexical binding")
  (message "no lexical binding"

(lex-p)
#+END_SRC

When evaluating this code block with C-c C-c I get lexical binding.
When tangling it or with org-babel-load-file I get no lexical binding.
Immanuel

Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-07-17
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/share/emacs/26.2/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-listings t
 org-pomodoro-long-break-length 30
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-babel-tangle-body-hook '(il-org-babel-tangle-body-hook)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-plantuml-jar-path "/home/immanuel/bin/plantuml.jar"
 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] 
org-babel-result-hide-spec org-babel-hide-all-hashes
 auto-fill-mode)
 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-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-from-is-user-regexp "|\\"
 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-babel-load-languages '((emacs-lisp . t) (C . t) (python . t) (lilypond . 
t) (shell . t) (plantuml . t))
 org-log-done 'time
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-babel-python-command "ipython --simple-prompt -i --pylab"
 org-src-preserve-indentation t
 org-occur-hook '(org-first-headline-recenter)
 org-pomodoro-ticking-sound 
"/home/immanuel/.emacs.d/straight/build/org-pomodoro/resources/tick.wav"
 org-structure-template-alist '(("r" "#+BEGIN_SRC rust\n?\n#+END_SRC") ("p" 
"#+BEGIN_SRC plantuml\n?\n#+END_SRC") ("ha" "#+BEGIN_SRC haskell\n?\n#+END_SRC")
("ly" "#+LaTeX: \\linebreak\n#+ATTR_LaTeX: 
width=17cm\n#+BEGIN_SRC lilypond :file ?.png :noweb yes\n#+END_SRC") ("bnf" 
"#+BEGIN_SRC abnf\n?\n#+END_SRC")
("cpp" "#+header: :tangle\n#+header: :main 
no\n#+header: :noeval\n#+header: :noweb yes\n#+BEGIN_SRC cpp\n?\n#+END_SRC")
("yp" "#+END_SRC\n?\n#+BEGIN_SRC python :noweb 
yes") ("py" "#+BEGIN_SRC python :noweb yes\n?\n#+END_SRC") ("ab" 
"#+END_SRC\n#+BEGIN_SRC bash")
("ba" "#+BEGIN_SRC bash?\n#+END_SRC") ("le" 
"#+END_SRC\n#+BEGIN_SRC emacs-lisp?") ("el" "#+BEGIN_SRC 
emacs-lisp\n?\n#+END_SRC")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC") ("e" 
"#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE") ("v" 
"#+BEGIN_VERSE\n?\n#+END_VERSE")
("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM") 
("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") ("C" 
"#+BEGIN_COMMENT\n?\n#+END_COMMENT")
("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT") 
("L" "#+LaTeX: ") ("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT") ("H" "#+HTML: ")
("a" "#+BEGIN_EXPORT ascii\n?\n#+END_EXPORT") 
("A" "#+ASCII: ") ("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?"))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
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-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("LilyPond" 

Re: [O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode

A follow up

On 8/20/19 9:32 AM, Charles Millar via Emacs-orgmode wrote:
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 
entries; over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last 
October.At that time the SomeFile.rec file was produced, as expected. 
However, the size of the entries has not changed and now the above 
error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 
to 2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if 
so what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 
3.24.10) of 2019-08-20


Charlie Millar

It appears that the above now creates a table, not a recutils file. 
Spaces are the delimiter,



#+begin_src sh?? :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

#+RESULTS:
| #?? | -*-?? | mode: | rec?? | -*- |
| %rec:?? | somerecord | |?? | |
| Account: | sometyhing | |?? | |
| Amount:?? | 0.0?? | |?? | |
|  | end?? | of?? | file | |




[O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 entries; 
over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last October.At 
that time the SomeFile.rec file was produced, as expected. However, the 
size of the entries has not changed and now the above error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 to 
2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if so 
what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-20


Charlie Millar





[O] Bug: org-babel-tangle-file [9.2.4 (9.2.4-3-g7bc6f8-elpaplus @ /home/stettberger/.emacs.d/elpa/org-plus-contrib-20190701/)]

2019-08-19 Thread Christian Dietrich
Hi!

I think a found a bug in org-babel-tangle-file. It closes an user-opened
buffer if called with a symlink that points to the same file. Please see
the attached patch, which fixes the problem for me.

chris

Emacs  : GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.0)
 of 2018-10-06
Package: Org mode version 9.2.4 (9.2.4-3-g7bc6f8-elpaplus @ 
/home/stettberger/.emacs.d/elpa/org-plus-contrib-20190701/)

>From 7901afc9c9b535cf2b5a523c4610ada37a468dfb Mon Sep 17 00:00:00 2001
From: Christian Dietrich 
Date: Tue, 13 Aug 2019 15:43:03 +0200
Subject: [PATCH] Fix bug in org-babel-tangle-file with symlinked files

Assume that there is file A and symlink B that points to file A. If
there is an open buffer that points to A and we
call (org-babel-tangle-file "B"), then this function kills the buffer
since get-file-buffer does not follow symlinks.
---
 lisp/ob-tangle.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index f9f785910..7dbd618a6 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -174,7 +174,7 @@ export file for all source blocks.  Optional argument LANG can be
 used to limit the exported source code blocks by language.
 Return a list whose CAR is the tangled file name."
   (interactive "fFile to tangle: \nP")
-  (let ((visited-p (get-file-buffer (expand-file-name file)))
+  (let ((visited-p (find-buffer-visiting (expand-file-name file)))
 	to-be-removed)
 (prog1
 	(save-window-excursion
-- 
2.23.0.rc1



[O] Bug: Re: ob-scheme.el has two problems: not killing a misbehaving interpreter and sometimes returns nil [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-08-18 Thread Vladimir Nikishkin



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.


The super-pedestrian patch I wrote to patch this issue is:

diff --git a/usr/src/emacs/lisp/org/ob-scheme.el 
b/usr/share/emacs/26.2/lisp/org/ob-scheme.el
index 798cf4e..1df4df9 100644
--- a/usr/src/emacs/lisp/org/ob-scheme.el
+++ b/usr/share/emacs/26.2/lisp/org/ob-scheme.el
@@ -175,7 +175,10 @@ is true; otherwise returns the last value."
(geiser-debug-show-debug-p nil))
(let ((ret (geiser-eval-region (point-min) (point-max
  (setq result (if output
-  (geiser-eval--retort-output ret)
+  (let ((g-r-o (geiser-eval--retort-output ret)))
+(if g-r-o
+g-r-o
+  "Geiser-eval--retort-output returned 
nil.\nThe interpreter produced no output\nor there is a bug in geiser 
(likely!)"))
 (geiser-eval--retort-result-str ret "")
  (when (not repl)
(save-current-buffer (set-buffer repl-buffer)


Emacs  : GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.10)
 of 2019-07-18
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.2/lisp/org/)
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



[O] Bug: ob-scheme.el has two problems: not killing a misbehaving interpreter and sometimes returns nil [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-08-18 Thread Vladimir Nikishkin



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.


Hello, everyone.

I am trying to write a quasi coursework solution for SICP with org and
Chibi-scheme. Unfortunately, chibi is not very well supported in geiser
(although some evaluation features work), so I am having the following
difficulties with the following code:

#+BEGIN_SRC scheme :export both :results output :session
(import (scheme small))
(display "Hello 1\n")
t
#+END_SRC

Note that t is not a registered symbol in scheme (should be #t), but is
shows two errors:

1. The buffer "myfile.org chibi REPL" is not killed after the execution
is finished. Maybe ob-scheme tries to run some internal exit function in
the interpreter, which fails, or whatever, but I am left with a dangling
buffer. (Maybe line 184 in ob-scheme.el, kill-buffer is not doing its job?)

2. In this case, org-babel-scheme-execute-with-geiser returns nil. This
is wrong, because org-babel-reassemble-table does not expect nil as an
input. Moreover, since all of this is not exception-handled, it turns
out into a silent error.

3. In this case, the output of the interpreter is "ERROR: undefined
variable: t", printed to stderr. Geiser processes this by forwarding
back the (error . "<...> error output") cons cell, but org doesn't seem
to be using this. I mean, if I change :results to be "value", I am
getting the exception message into the org buffer, but I suspect that is
should also be displayed when ":results output" since that is what the
interpreter is actually printing.

4. Is there some legitimate way to get all three output channels of a
block of code together? By "all three" I mean, "STDOUT", "STDERR" and
the expression return value?

Cheers, everyone, thanks for your work!

Emacs  : GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.10)
 of 2019-07-18
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/share/emacs/26.2/lisp/org/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-after-execute-hook '((lambda nil
 (if org-inline-image-overlays
  (progn (org-redisplay-inline-images)))
 )
)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-html-format-inlinetask-function 
'org-html-format-inlinetask-default-function
 org-pretty-entities t
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-agenda-files '("~/Personal_Planner/Planner.org")
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt-entry)
 org-modules '(org-habits org-w3m org-bbdb org-bibtex org-docview org-gnus 
org-info org-irc
   org-mhe org-rmail)
 org-plantuml-jar-path "/usr/local/bin/plantuml.jar"
 org-mode-hook '((lambda nil (imenu-add-to-menubar "Imenu"))
 #[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]
 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-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-latex-compiler "lualatex"
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-babel-load-languages '((plantuml . t) (C . t) (scheme . t))
 org-log-done 'time
 org-startup-align-all-tables t
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-agenda-include-diary t
 org-structure-template-alist '(("p" "#+begin_src plantuml :export both :file ? 
\n#+end_src ")
("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")

  1   2   3   4   5   6   7   8   9   10   >