Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
Yeah, but it's still getting funky when some init files load the
built-in version.

But nevertheless, I don't seem to see this problem any more.

This bug can be closed.

On Tue, 26 Dec 2023 at 22:30, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > :\ that patch doesn't cleanly apply on top of emacs' master by itself.
> >
> > And I don't know how to merge org's master into Emacs gracefully.
> >
> > I will try with melpa's org, but it's likely to produce a mess with the 
> > configs.
> > Let me see what I can do.
>
> See 
> https://orgmode.org/manual/Installation.html#Using-Org_0027s-git-repository-1
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
:\ that patch doesn't cleanly apply on top of emacs' master by itself.

And I don't know how to merge org's master into Emacs gracefully.

I will try with melpa's org, but it's likely to produce a mess with the configs.
Let me see what I can do.


On Tue, 26 Dec 2023 at 21:27, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > org-version variable returns 9.6.13
> > (org-version) function call also returns 9.6.13
> >
> > The test.org file itself has the org version stamp.
>
> I see. What about the latest development version of Org mode (main branch)?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
org-version variable returns 9.6.13
(org-version) function call also returns 9.6.13

The test.org file itself has the org version stamp.

On Tue, 26 Dec 2023 at 21:19, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> > Logs attached, the file is very simple, also attached:
>
> Looks like a bug fixed in Org 9.6.10:
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=37d6bde27
>
> And you seems to be using Org 9.6.8.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin
On Tue, 26 Dec 2023 at 20:20, Ihor Radchenko  wrote:
>
> Vladimir Nikishkin  writes:
>
> >> If you are using the latest main, you can set `debug-on-error' to t.
> >> Then, you will see the backtrace of the error that you can share.
> >
> > Did that, but it's not very useful:
> >
> > #+begin_src elisp
> > Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
> > point)")
> >   org-element-paragraph-parser(23 (23))
>
> Then, you can disable debug-on-error, and add the following to your config:
> (setq org-element--cache-self-verify 'backtrace)
> (setq org-element--cache-self-verify-frequency 1.0)
>
> This will make Org mode produce the detailed parser logs, which you can
> share. (Note that the log may contain parts of your Org file, so you
> may consider sharing privately or obfuscating the logs)
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>

In which buffer?

-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>> So, this might not actually be the case.
>> I am getting a lot of org-element-cache errors recently, and I don't
>> seem to be able to find what triggers them to appear.
>> The error message is always the same,
>> "Invalid search bound (wrong side of point)"
>>
>> Any ideas on how to debug this?
>
> If you are using the latest main, you can set `debug-on-error' to t.
> Then, you will see the backtrace of the error that you can share.

Did that, but it's not very useful:

#+begin_src elisp
Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
point)")
  org-element-paragraph-parser(23 (23))
  org-element--current-element(23 element nil nil)
  org-element--parse-to(573 nil nil)
  org-element--cache-process-request([552 552 3010 22 nil 1] nil 3010 nil nil 
nil)
  org-element--cache-sync(# 3010)
  org-element-at-point()
  org-eldoc-get-src-lang()
  org-eldoc-documentation-function(#f(compiled-function (string  plist) 
#))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #()
  apply(# nil)
  timer-event-handler([t 0 0 50 nil # nil idle 0 nil])
#+end_src

The beginning of the call stack may be different, but the deep levels,
with "org-element--parse-to" are always more or less the same, and
produce the same error.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-12-26 Thread Vladimir Nikishkin


Vladimir Nikishkin  writes:

> Ihor Radchenko  writes:
>
>> Vladimir Nikishkin  writes:
>>
>>>> May you elaborate about incompatibility?
>>>>
>>>
>>> Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
>>> in an org file, I am having the '*Messages*' buffer filled with
>>> #+begin_src elisp
>>> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
>>> 2015_Passwords.org.rclignore::53653. Resetting.
>>>  The error was: (error "Invalid search bound (wrong side of point)")
>>>  Backtrace:
>>> "  backtrace-to-string(nil)
>>>   org-element-at-point()
>>
>> This has nothing to do with eldoc.
>> If you can reproduce this problem consistently, may you create a minimal
>> example as described in https://orgmode.org/manual/Feedback.html#Feedback ?
>
> I found and fixed this problem.
> It was actually unrelated to bare org, it was due to my experiments with
> org-ts-mode. Sorry for the confusion.

So, this might not actually be the case.
I am getting a lot of org-element-cache errors recently, and I don't
seem to be able to find what triggers them to appear.
The error message is always the same,
"Invalid search bound (wrong side of point)"

Any ideas on how to debug this?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-11-09 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>>> May you elaborate about incompatibility?
>>>
>>
>> Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
>> in an org file, I am having the '*Messages*' buffer filled with
>> #+begin_src elisp
>> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
>> 2015_Passwords.org.rclignore::53653. Resetting.
>>  The error was: (error "Invalid search bound (wrong side of point)")
>>  Backtrace:
>> "  backtrace-to-string(nil)
>>   org-element-at-point()
>
> This has nothing to do with eldoc.
> If you can reproduce this problem consistently, may you create a minimal
> example as described in https://orgmode.org/manual/Feedback.html#Feedback ?

I found and fixed this problem.
It was actually unrelated to bare org, it was due to my experiments with
org-ts-mode. Sorry for the confusion.


-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-20 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>> org-contrib has the following lines 206 and 207 in org-eldoc:
>> #+begin_src elisp
>> ;;;###autoload
>> (add-hook 'org-mode-hook #'org-eldoc-load)
>> #+end_src
>>
>> which set up that hook automatically when the package org-contrib is
>> installed.
>>
>> that hook is, seemingly, incompatible with the recent org-element,
>
> May you elaborate about incompatibility?
>

Yes. With org-eldoc loaded, and having a property '#+date: unpublished'
in an org file, I am having the '*Messages*' buffer filled with
#+begin_src elisp
⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
2015_Passwords.org.rclignore::53653. Resetting.
 The error was: (error "Invalid search bound (wrong side of point)")
 Backtrace:
"  backtrace-to-string(nil)
  org-element-at-point()
  org-eldoc-get-src-lang()
  org-eldoc-documentation-function(#f(compiled-function (string  plist) 
#))
  #(org-eldoc-documentation-function)
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #()
  apply(# nil)
  timer-event-handler([t 0 0 50 nil # nil idle 0 nil])
"
 Please report this to Org mode mailing list (M-x org-submit-bug-report).
#+end_src

>> Could those lines be removed? If someone is interested in
>> patching/using/maintaining that code, he can probably try to refactor it
>> in a better way.
>>
>> (In any case, it is probably better to add such hooks in the :hook
>> clause of use-package.)
>
> That would constitute incompatible change for the existing users.
> Although, autoload may cause org-eldoc to be loaded for users of
> org-contrib, who are not interested in org-eldoc.
> What we might do as a compromise is removing the autoload cookie only
> and leaving the (add-hook ...) to be executed upon (require 'org-eldoc).

Yes, maybe that is even better. Why would one (require 'org-eldoc) with
no intention of using it?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



[BUG] org-contrib: org-eldoc has an autload, but is incompatible with modern emacs. [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-19 Thread Vladimir Nikishkin
Dear Org developers,

org-contrib has the following lines 206 and 207 in org-eldoc:
#+begin_src elisp
;;;###autoload
(add-hook 'org-mode-hook #'org-eldoc-load)
#+end_src

which set up that hook automatically when the package org-contrib is
installed.

that hook is, seemingly, incompatible with the recent org-element,
and in general it seems dubious to automatically add features from a
deprecated repo.

Could those lines be removed? If someone is interested in
patching/using/maintaining that code, he can probably try to refactor it
in a better way.

(In any case, it is probably better to add such hooks in the :hook
clause of use-package.)

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



[BUG] org-clock-auto-clockout does not actually use x11idle on X11 [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-10-13 Thread Vladimir Nikishkin
For some time I have been wondering why auto-clockout does not use
x11idle on my machine. Today I finally got to studying this issue.

Here is `org-clock-auto-clockout-insinuate'

#+begin_src elisp
(defun org-clock-auto-clockout-insinuate ()
  "Set up hook for auto clocking out when Emacs is idle.
See `org-clock-auto-clockout-timer'.

This function is meant to be added to the user configuration."
  (require 'org-clock)
  (add-hook 'org-clock-in-hook #'org-clock-auto-clockout t))
#+end_src

Okay, the only thing it does is it adds a hook.
What does the hook do?

#+begin_src elisp
(defun org-clock-auto-clockout ()
  "Clock out the currently clocked in task if Emacs is idle.
See `org-clock-auto-clockout-timer' to set the idle time span.
This is only effective when `org-clock-auto-clockout-insinuate'
is present in the user configuration."
  (when (and (numberp org-clock-auto-clockout-timer)
 org-clock-current-task)
(run-with-idle-timer
 org-clock-auto-clockout-timer nil #'org-clock-out)))
#+end_src

just runs auto clockout on an emacs idle timer, which does not care
about X11 idleness either. It also runs only once, since the seconds
argument is nil.

#'org-clock-out does not use x11idle either.

So, at least in Org 9.6.8, the Manual's claim that
#+begin_quote
   (1) On computers using macOS, idleness is based on actual user
idleness, not just Emacs’ idle time.  For X11, you can install a utility
program ‘x11idle.c’, available in the ‘org-contrib/’ repository, or
install the xprintidle package and set it to the variable
‘org-clock-x11idle-program-name’ if you are running Debian, to get the
same general treatment of idleness.  On other systems, idle time refers
to Emacs idle time only.
#+end_quote

is false.

I suggest rewriting that timer expression like this:

#+begin_src elisp
(run-with-timer 60 60
(lambda ()
  (if (< org-clock-auto-clockout-timer (if org-x11idle-exists-p
  (org-x11-idle-seconds)
(current-idle-time
  (org-clock-out)
nil)))
#+end_src

or, even better:

#+begin_src elisp
(defun org-clock-auto-clockout-maybe ()
   (if (< org-clock-auto-clockout-timer (if org-x11idle-exists-p
   (org-x11-idle-seconds)
 (current-idle-time)
(defun org-clock-auto-clockout-insinuate ()
  "Set up hook for auto clocking out when Emacs is idle.
See `org-clock-auto-clockout-timer'.

This function is meant to be added to the user configuration."
  (require 'org-clock)
  (add-hook 'org-clock-in-hook #'org-clock-auto-clockout-maybe t)
  (add-hook 'org-clock-out-hook (lambda ()
   (cancel-function-timers 'org-clock-auto-clockout-maybe
#+end_src

Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.31, cairo version 1.16.0)
 of 2023-09-22
Package: Org mode version 9.6.8 (release_9.6.8-3-g21171d @ 
/usr/share/emacs/30.0.50/lisp/org/)
-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



How do I enable exports of code only for the whole file?

2023-09-13 Thread Vladimir Nikishkin
Hello, everyone

I have quite a lot of src_XXX code blocks in my article.
I want to export them all as code only.
I know that I can write src_org[:exports code], but doing that for each
inline code block is a lot of (needless) work.

The manual on page [[info:org#Exporting Code Blocks][org#Exporting Code 
Blocks]] 
is pointing to the page: [[info:org#Literal Examples][org#Literal Examples]],
but this page does not have that information either.


-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



[BUG] src and example blocks do not properly escape headings [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-09-12 Thread Vladimir Nikishkin
Hello, everyone,

My MWE is the following:

```
Hello, preamble.

* Heading one

body one

#+begin_src org
* heading 2
#+end_src

#+begin_example
* heading 3
#+end_example

#+begin_verbatim
* heading 4
#+end_verbatim


```

Clearly, "heading 2", "heading 3", and of course, "heading 4" should not
be considered headings of the original document. However, here they are
treated as normal headings, in particular, they are not just breaking
the folding logic, they are even breaking the detection of begin_*/end_*
blocks.

I have a feeling that this was not the case in the past...?

Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.31, cairo version 1.16.0)
 of 2023-07-31
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/usr/share/emacs/30.0.50/lisp/org/)
-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] Consider supporting C-x 4 and C-x 5 and C-x t in org-open-at-point [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-09-07 Thread Vladimir Nikishkin


Ihor Radchenko  writes:

> Vladimir Nikishkin  writes:
>
>> Emacs has a long established tradition of adjusting presentation mode
>> for a command using prefix parameters.
>
> True.
>
>> ... One can run C-x 4 C-f to visit a
>> file in a new window. (C-x 5, and C-x t for the new frame and tab,
>> respectively).
>
> ... but C-x 4 is not a prefix argument - it is a prefix key that
> triggers `ctl-x-4-map'. Same for C-x 5 - it triggers `ctl-x-5-map'.
>

That is why I wrote "prefix parameters", not "prefix arguments".

>> ... However, org-open-at-point does not seem to follow this
>> tradition.
>
>> Would it be possible to add it, at least for the types of links that are
>> known to work within Emacs itself, such as info: and *?
>
> I think that it will be acceptable to add new bindings like
> C-x 4 C-c C-o and C-x 5 C-c C-o that will open a link in other window or
> frame, if possible. Patches welcome!

:)

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



[BUG] Consider supporting C-x 4 and C-x 5 and C-x t in org-open-at-point [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-09-06 Thread Vladimir Nikishkin
Dear Org developers,

Emacs has a long established tradition of adjusting presentation mode
for a command using prefix parameters. One can run C-x 4 C-f to visit a
file in a new window. (C-x 5, and C-x t for the new frame and tab,
respectively). However, org-open-at-point does not seem to follow this
tradition.

Would it be possible to add it, at least for the types of links that are
known to work within Emacs itself, such as info: and *?


Emacs  : GNU Emacs 30.0.50 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.31, cairo version 1.16.0)
 of 2023-07-31
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/usr/share/emacs/30.0.50/lisp/org/)
-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: [BUG] Consider replacing bachload with batch in ob-maxima. [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-09-02 Thread Vladimir Nikishkin


Leo Butler  writes:

> On Sat, Sep 02 2023, Ihor Radchenko  wrote:
>
>> Lockywolf  writes:
>>
>>> At the moment, ob-maxima has a straightforward way of evaluating
>>> babel blocks,
>>>
>>> #+begin_src shell
>>> maxima --very-quiet -r batchload\(\"/tmp/ob-maximaFOOBAR.mac\"\)\$
>>> #+end_src
>>> (line 87 of ob-maxima.el),
>>>
>>> I suggest replacing batchload with batch(), and changing line 73 from
>>> "gnuplot_close ()$" to  "gnuplot_close ()$ \nquit();"
>>>
>>> The difference between "batch" and "batchload" is that "batch" can
>>> process :lisp expressions in addition to maxima's own, and it prints
>>> input/output labels. However, it is possible to customise label printing
>>> from maxima's own code, and being able to evaluate :lisp just seems
>>> uncontrovercially good.
>>>
>>> It might be that I am missing something, but batch seems a better fit
>>> for Org-Babel.
>>
>> May you please explain more about :lisp expressions?
>
> This special syntax is not necessary. A recent change introduced the
> function `eval_string_lisp' that removes the need for it. I.e. one can
> batchload a file and execute lisp code inside a call to eval_string_lisp.
>

Well, necessary or not, but it existed for many years, and continues to
be a valid part of maxima so far. It is surprising for new users to not
see it working when quite a lot of howtos use it. (Especially the famous
pattern-matching howto from Michael Talon.)

Also, I would be hesitant to say that it "removes the need for it",
because a "valid expression" is not the same thing as a "string". In
particular, error processing should be different.

>>
>> Also, what is the benefit/downside of printing input/output labels? Is
>> there any chance they will be caught into the source block output? If
>> so, it would be a breaking change.
>
> Yes, his requests are breaking changes. That is why I suggested opening
> up the internals a bit so that one can alter the behavior while
> maintaining the same default.
>
> Leo

Well, this change is "breaking", in the sense that it would make the
output of ob-maxima be more consistent with what, say, imaxima is doing.
However, I thing that there is a way to make it non-breaking, by
prepending some maxima code which would make adjust maxima using "batch"
to have the same output as "batchload". Something like
src_maxima{programmode: true; nolabels: true;} should turn off labels
if that is desired.

But I would agree with Leo Butler that customisation is the best
solution here. Both "full batch", and "pseudo-interactive" modes are
useful.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Marking task creation date or re-scheduling.

2023-06-07 Thread Vladimir Nikishkin
Hello, fellow org users,

Until recently, I used to just Schedule a task once, and it would stay
in the agenda until it is done.

This has a nice property of having "Schedules x234 days" displayed near
the task in Agenda, so I know for how long this task has been hanging.

However, often I find myself wanting to make the task as "done for
today", meaning not that a task is finished, but rather that I have done
everything I could do today.

People around seem to suggest just re-scheduling it for tomorrow. This
way the task will disappear from the Agenda. However, this way I am
losing that nice metadata of "when a task was created".

This can be worked around by, say, creating a clock-in session right
after the creation of a task, or just marking it as a time-stamp, but
this looks unpleasant. It's more convoluted than just counting time
elapsed since "SCHEDULED" until "CLOSED".

So, is it possible to add, or maybe there is some built-in way of
accommodating for such a use-case? Maybe a way to automatically add a
"CREATED" time-stamp for a task? Or maybe hide from agenda the tasks
that "have a logbook entry today"?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



How can I disable "priority penalty" for Scheduled overdue tasks?

2023-06-07 Thread Vladimir Nikishkin
Hello, fellow org users

I have a problem with my agenda. I have a task scheduled 3 years ago,
org-priority-show displays 2199.

Agenda thinks that this is a super important task, and sorts it above
all other tasks. In reality this task is so unimportant that I seldom
get to doing it, hence such a slow progress in 3 years.

Is it possible to ignore that "scheduled long ago" behaviour?

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Different faces for breadcrumbs and main entry in agenda

2023-05-18 Thread Vladimir Nikishkin
Hello, everyone.

Can someone suggest how I could implement different colours for
breadcrumbs and for the main entry name in the agenda view?

I really need this, in my case it would greatly improve readability.

-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2021-09-26 Thread Vladimir Nikishkin
>In Org syntax namely empty line serves as paragraph separator (and two empty 
>lines to terminate list).
>As a result of exporting of Org file it should be possible to get indentation 
>instead of vertical space to represent paragraphs, however some tuning for 
>each format (ascii, html, latex) will be required.
>Would you expect from TeX that it should accept spaces in the beginning of 
>line just as empty line for paragraph separator? Org is a markup format as 
>well, so source files are not necessary should follow traditions of 
>typesetting.

This report is not about exporting Org code. It is perfectly fine that
an empty line is required in org to demarcate a paragraph. The example
above is just what I would imagine as an "ideal case".
However, when `paragraph-indent-minor-mode` is turned on,
`org-adapt-indentation` stops working, even though nothing else has
changed. The text is exactly the same, and is valid org markup.

On Tue, 7 Sept 2021 at 12:14, Vladimir Nikishkin  wrote:
>
> Hello, everyone.
>
> Basically, my bug report is roughly about the subject.
> `paragraph-indent-minor-mode` is shipped with Emacs by default (just like
> org), and its behaviour is very standard for a lot of languages. A one
> or two spaces indentation starts a new paragraph in quite a few human
> languages.
>
> However, turning on `paragraph-indent-minor-mode` seemingly disables
> org's automatic indentation to the first letter of a heading, regardless
> of `org-adapt-indentation` being set.
>
> I think that with paragraph-indent-minor-mode, paragraphs should start
> by adding "two more spaces" to the indentation, like this:
>
> #+begin_example
> * Heading one
>   First paragraph is a paragraph even if not indented.
> Second paragraph is a paragraph because indented.
>   This line belongs to the second paragraph.
>
>   Third paragraph is a paragraph even if not indented because of a
>   newline.
>
> But fourth paragraph can be indented too. And the very long line I
>   have written should be wrapped like this.
>
> ** Heading two
>  This is also a start of a paragraph.
>  This line starts a new paragraph too.
>Normal level-two indentation.
> #+end_example
>
> It would be nice if the two modes shipped with emacs were compatible, at
> least to a degree at which indentation works.
>
> Emacs  : GNU Emacs 27.1 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
> 3.24.24)
>  of 2021-02-18
> Package: Org mode version 9.4.5 (9.4.5-16-g94be20-elpaplus @ 
> /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)
>
> current state:
> ==
> (setq
>  org-icalendar-store-UID t
>  org-src-mode-hook '(#2=
>  (closure #1=
>   ((--cl-my-org-confirm-babel-evaluate-- closure #1# 
> (lang body)
> "Define by lockywolf to silence org-babel.\nLANG is 
> what is after begin_src, and BODY is ignored"
> (not
>  (or (string= lang "plantuml") (string= lang "C") 
> (string= lang "scheme") (string= lang "fortran")
>   (string= lang "f90") (string= lang "elisp") 
> (string= lang "latex") (string= lang "shell"))
>  )
> )
>(--cl-syntax-improver-- . #2#) t)
>   nil
>   (progn (message "Improving syntax for org-mode.") 
> (modify-syntax-entry 60 ".") (modify-syntax-entry 62 ".")
>(setq geiser-autodoc--inhibit t))
>   )
>  org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
>  org-agenda-scheduled-leaders '("Scheduled: " "Sched.%4dx: ")
>  org-after-todo-state-change-hook '(org-checklist)
>  org-latex-listings t
>  org-link-shell-confirm-function 'yes-or-no-p
>  org-babel-after-execute-hook '(org-redisplay-inline-images)
>  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-html-format-inlinetask-function 
> 'org-html-format-inlinetask-default-function
>  org-icalendar-combined-agenda-file 
> "~/Personal_Planner/Journal/org-journal-export.ics"
>  org-pretty-entities t
>  org-special-ctrl-k t
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-special-ctrl-a/e t
>  org-latex-pdf-process '("latexmk -e '$biber=qq(biber --isbn-normalise)' 
> -lualatex -outdir=%o -f %f")
>  org-agenda-files '("

Bug: org-adapt-indentation is not compatible with paragraph-indent-minor-mode [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)]

2021-09-06 Thread Vladimir Nikishkin
 ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}") 
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . 
"\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" 
. "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . 
"\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" 
. "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 )
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-mairix-display-hook 'org-mairix-gnus-display-results
 org-confirm-babel-evaluate '#1=(closure #2=
 ((--cl-my-org-confirm-babel-evaluate-- . #1#)
  (--cl-syntax-improver-- closure #2# nil
   (progn (message "Improving syntax for 
org-mode.") (modify-syntax-entry 60 ".")
(modify-syntax-entry 62 ".") (setq 
geiser-autodoc--inhibit t))
   )
  t)
 (lang body)
 "Define by lockywolf to silence 
org-babel.\nLANG is what is after begin_src, and BODY is ignored"
 (not
  (or (string= lang "plantuml") (string= lang 
"C") (string= lang "scheme") (string= lang "fortran")
   (string= lang "f90") (string= lang "elisp") 
(string= lang "latex") (string= lang "shell"))
  )
 )
 org-use-sub-superscripts '{}
 org-agenda-custom-commands '(("n" "Agenda and all TODO" ((agenda #1="" nil) 
(alltodo #1# nil)) nil
   "/run/user/1000/agenda-snapshot.txt")
  )
 org-link-from-user-regexp 
"|\\"
 org-latex-listings-options '(("numbers" "none") ("frame" "single") 
("basicstyle" "\\footnotesize\\ttfamily ")
  ("keywordstyle" "\\ttfamily") ("upquote" "true") 
("extendedchars" "true"))
 org-use-speed-commands t
 org-ql-sidebar-buffer-setup-hook '(toggle-truncate-lines)
 org-mairix-gnus-select-display-group-function 
'org-mairix-gnus-select-display-group-function-gg
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/Personal_Planner/notes.org"
 )
-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Bug: Add an option for org-html-self-link-headlines to add an anchor-link instead of making the headline a link. [9.4.5 (9.4.5-16-g94be20-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-2021

2021-05-23 Thread Vladimir Nikishkin



Hello, everyone!

May I suggest a feature addition in org?

The setting org-html-self-link-headlines at the moment turns headlines
into links to themselves. While this is an excellent tool to make
references to the "place where I am reading now", it is a bit confusing,
because the reader may think that this link leads to some external
valuable content.

Would it be possible to, instead, add a small link, with the same href,
and the visible part of something short, such as (#) or (*) hear the
headline.

Such "small anchors" are almost universally seen as "technical", and
thus not leading to valuable content, but are still noticeable enough to
just "copy link location" when required.

Many thanks to people who develop org!

Emacs  : GNU Emacs 27.1 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 
3.24.24)
 of 2021-02-18
Package: Org mode version 9.4.5 (9.4.5-16-g94be20-elpaplus @ 
/home/lockywolf/.emacs.d/elpa/org-plus-contrib-20210412/)
-- 
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



add org-ebib-open to ox-bibtex?

2021-02-08 Thread Vladimir Nikishkin
Dear all,

In ox-bibtex (contrib), line 169 there is the following code:

#+begin_src elisp
(let ((jump-fn (car (cl-remove-if-not #'fboundp '(ebib 
org-bibtex-goto-citation)
  (org-add-link-type "cite" jump-fn))
#+end-src

May I suggest that 'org-ebib-open be added as a follower instead of
'ebib?

Is is provided by org-ebib, shipped together with ebib, and is
semantically closer to what is needed. (ebib db key) opens a db file,
given as a first argument, whereas cite: expects a key (and the db is
usually in the #+bibliography). Unless every record has its own bib file,
this is not going to give an expected result.

Thank you.

-- 
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



ox-bibtex incorrectly renders bibtex entries with slashes.

2021-02-08 Thread Vladimir Nikishkin
Hello, everyone.

I have the following behaviour on org-plus-contrib-202011:

Entries that have alphanumberic keys, are rendered correctly, that is,
they appear as a number in the text, hyperlinked to the main body of the
bibliography.

However, keys which have slashes in them (that is mostly DBLP entries
fetched automatically, such as DBLP:books/mit/AbelsonS85), are rendered
having those keys as link texts, rather than numbers. Looks quite bad.

Example:
https://lockywolf.net/2021-02-08_Solving-SICP-Experience-Report-on-solving-sicp-from-icfp-scheme-2020-html-version-from-2020-08-29/Experience_Report.html
, search for "DBLP:"

Replacing those slashes with underscores makes them render as usual, but
this makes fetching entries from dblp a bit less convenient.

Does anybody have a workaround for this?

Vladimir

-- 
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



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

2020-11-18 Thread Vladimir Nikishkin
So what is the status of this story?

I believe that if one exports an org file with sufficiently many empty
TODO headings (to me, it seems a perfectly valid use case of org,
printing lists of TODOs), they won't fit on a single page, and latex
will drop them. Would the latex snippet in this thread be a good
candidate for inclusion into org as a canned trick?

On Tue, 27 Aug 2019 at 14:57, Vladimir Nikishkin  wrote:
>
> 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



-- 
Yours sincerely, Vladimir Nikishkin
(Sent from GMail web interface.)



Re: org-babel prepends <> expansions with the prefix of the <>? Can this be turned off?

2020-09-10 Thread Vladimir Nikishkin
Hello, Bastien,

Thanks for getting back to me.
In ob-core.el, function org-babel-expand-noweb-references, line 2747,
there is a 'mapconcat, that is commented as ";; Interpose PREFIX
between every line."
It prepends the "prefix", that is the content of the block to be
expanded from the beginning of the line where a <> reference is
encountered to the beginning of the reference itself, that is to the
first "<".

My point is that this is not the most obvious way to do the expansion.
It does work if the "prefix" is a line comment character, similar to C++ "//"

However, consider the following example:

```
# -*- mode: org; -*-

* test
  :PROPERTIES:
  :header-args::noweb yes
  :END:

#+name: block1
#+begin_src shell
printf "test1 \n"
printf "test2 \n"
printf "test3 \n"

#+end_src

#+begin_src shell :shebang "#!/bin/chibi-scheme"
#<> <>

#+end_src
```

Expanding this example gives:

```
#printf "test1 \n"
#printf "test2 \n"
#printf "test3 \n"
# printf "test1 \n"
#<> printf "test2 \n"
#<> printf "test3 \n"
#<>
```

Not a very obvious interpretation!
At least I would expect the following instead:

```
#printf "test1 \n"
printf "test2 \n"
printf "test3 \n" printf "test1 \n"
printf "test2 \n"
printf "test3 \n"
```

Because at least it wouldn't leave anything resembling a "<>"
block in the expansion result.

Thanks for looking at this issue.

Vlad

On Mon, 7 Sep 2020 at 12:33, Bastien  wrote:
>
> Hi Vladimir,
>
> Vladimir Nikishkin  writes:
>
> > That's not entirely what I want.
>
> What do you want instead?  It's not clear to me from your example.
>
> Thanks,
>
> --
>  Bastien



-- 
Yours sincerely, Vladimir Nikishkin



Re: org-babel opens the error output of a block in a separate window... unless :stdin is given, but how are they connected?

2020-09-10 Thread Vladimir Nikishkin
I don't know how to debug this.
The *Org-Babel Error Output* emerges when the control flow returns
from the following sexp:
(org-babel-execute-src-block
current-prefix-arg (org-babel-get-src-block-info nil context))

It is line 17862 in the org.el

I do not understand what causes its appearance, because while the
execution continues inside the org-babel-execute-src-block, no
expression creates this buffer. I don't know "what" to instrument to
debug this behaviour.

>The example above does not work for me.  Can you provide another one?

I do have another example that is "almost" the same and does not
involve chibi-scheme.

```
# -*- mode:org; -*-
#+name: empty
#+begin_quote
1
#+end_quote

#+begin_src shell :stdin empty
printf "test\n" 1>&2
#+end_src
```

Compare the evaluation of the second block with and without the ":stdin empty".
On my machine, if no ":stdin empty" is present, the block produces no
output when C-c'd (which, I guess, is expected), since the output is
empty.
However, add ":stdin empty". The line ": test" magically appears after
the #+RESULTS: , although I suspect that it shouldn't, as "test" is
printed to the standard error, not standard output.

Apparently, adding ":stdin" somehow magically switches org from "print
code's standard output in the #+results and process errors as if they
are errors in a separate buffer if the return value is not 0" to "just
print whatever the program prints on the console, regardless of
whether it is standard output or standard error after the #+results:
line".

Hope this helps.

Added later:

I actually found that the way the script is evaluated is totally
different in the presence and in the absence of :stdin.
The line 213 of ob-shell.el checks for "(or stdin cmdline)", and the
evaluation goes into two independent routes, and does not even get
evaluated with org-babel-eval.
(org-babel-eval) is the actual function that creates the error window,
and if :stdin is not given, control flow doesn't even use this
function.

So my question, perhaps, would be "would it be possible to modify
org-babel-sh-evaluate" so that only one function be used for code
evaluation? Perhaps the one that is used with the (or stdin cmdline)
route, as it seems more functional (and can be forced by setting
:stdin to an empty block name).

Vlad

On Mon, 7 Sep 2020 at 12:32, Bastien  wrote:
>
> Hi Vladimir,
>
> Vladimir Nikishkin  writes:
>
> > #+name: empty
> > #+begin_quote
> >
> > 1
> > #+end_quote
> >
> > #+begin_src shell :shebang "#! /usr/bin/chibi-scheme :stdin empty
> > (/ 1 0)
> > #+end_src
>
> The example above does not work for me.  Can you provide another one?
>
> > Now the chibi-scheme shebang is just an example of an app writing
> > things to stderr. The actual content of the <> doesn't matter,
> > the app errs before ever having a chance to read anything from stdin.
> >
> > However, when :stdin is given (as in the MWE), the resulting error
> > output is printed in the :RESULTS , and if not, it is displayed in a
> > separate (a bit annoying) window called "*Org-Babel Error Output*.
> >
> > I would like to ask how these two things, stdin, and stderr are
> > connected. Perhaps, this is a bug?
>
> I don't know but perhaps you can instrument the relevant functions in
> ob-shell.el and see what going on, if you still have this issue?
>
> Thanks,
>
> --
>  Bastien



-- 
Yours sincerely, Vladimir Nikishkin



Re: Shouldn't ob-shell's org-babel-expand-src-block prepend the :shebang value?

2020-09-10 Thread Vladimir Nikishkin
Well, why exactly Racket people decided to introduce the #lang
directive in such a way that it looks like a shell comment or a
shebang line seems to elude my understanding.
(declare :lang 'whatever), at least to me, seems much more lispy, and
even (read) able by a standard reader (which could later be switched
to a different mode).

>because the shebang line will not actually be included when executing the code

How so? I never had problems using shebangs in my code. They seem to
be prepended to the autogenerated files in /tmp/org-* just fine (in
some other function).


>due to the addition of a prologue section

When does this happen? :prologue seems to be already included in the
'expanded variable.

>It also becomes necessary to remove the shebang line from the edit buffer

C-c C-v C-v does not make an edit buffer. It expands the buffer for a
preview. I never suggested to prepend a shebang to the C-' buffer. In
fact, saving the C-c C-v C-v buffer is the only reasonable thing you
can do to it. Editing it makes no direct sense, because expansion is a
many-to-one process, and you cannot "unexpand" the buffer (without
evil diff trickery at least).

>the need to keep what will be run by org babel in line

This actually _is_ about keeping the two things in line. When
evaluating a noweb-enabled block, and in fact, any block, org already
prepends the :shebang value. I'm just suggesting to make the preview
consistent


On Thu, 10 Sep 2020 at 15:11, Tom Gillespie  wrote:
>
> Hi Vladimir,
>I have encountered similar issues with wanting to have a racket
> #lang line included in a tangled block while also allowing org to know
> exactly which #lang it is working with. I haven't found a good
> solution. One issue with embedding the shebang when editing a buffer
> is that it is very likely to cause confusion because the shebang line
> will not actually be included when executing the code, or if it was
> included then there is a reasonable possibility that in some cases it
> would not be included as the first line due to the addition of a
> prologue section. It also becomes necessary to remove the shebang line
> from the edit buffer, which means you have to know which shebang lines
> were added automatically and which were not. Further, the need to keep
> what will be run by org babel in line with what is shown via these
> various views makes it seem unlikely that this should be implemented
> as default behavior. I have a long email that touches on these issues
> in the works for after the 9.4 release, so thank you for providing an
> excellent example. It seems like one possible solution for your
> workflow would be to advise org-babel-expand-src-block to insert the
> shebang. Best,
> Tom
>
> On Wed, Sep 9, 2020 at 11:53 PM Vladimir Nikishkin  
> wrote:
> >
> > So, my point is the following. A shebang is an almost universally
> > accepted way to specify which interpreter should be used for code
> > evaluation.
> >
> > In the ob-core.el, at line 787, the function called
> > org-babel-expand-src-block makes a buffer out of the noweb-expanded
> > code.
> > (I am working with org 20200907)
> >
> > The sexp is looking like this:
> >
> > (org-edit-src-code
> >  expanded (concat "*Org-Babel Preview " (buffer-name) "[ " lang " ]*"))
> >
> > I suggest replacing this sexp with
> >
> > (org-edit-src-code
> >  (seq-concatenate 'string (or (alist-get :shebang params) "") "\n"
> > expanded) (concat "*Org-Babel Preview " (buffer-name) "[ " lang "
> > ]*"))
> >
> > This way the expanded buffer would respect the shebang, and the
> > resulting buffer would be saveable as a runnable file.
> >
> > I suspect that the second branch of the (if) should be left as it is,
> > because non-interactive usage probably means that the code will be
> > used later as a part of something, and therefore does not need a
> > shebang.
> >
> > Vlad
> >
> > On Sat, 5 Sep 2020 at 15:13, Bastien  wrote:
> > >
> > > Vladimir Nikishkin  writes:
> > >
> > > > I'll try to do one this week, but I can't submit a patch officially
> > > > because of my employer being staunchly against signing the copyright
> > > > disclaimer.
> > >
> > > :/
> > >
> > > So please just give directions on what to modify and how, and that'd
> > > be enough for someone (probably me) to get started.
> > >
> > > Thanks!
> > >
> > > --
> > >  Bastien
> >
> >
> >
> > --
> > Yours sincerely, Vladimir Nikishkin
> >



-- 
Yours sincerely, Vladimir Nikishkin



Re: Bug: ob-shell cannot forward empty blocks to stdin [9.3.1 (release_9.3.1-101-gc9ee3d @ /home/lockywolf/OfficialRepos/org-mode/lisp/)]

2020-09-10 Thread Vladimir Nikishkin
s (org-element-property :contents-begin
element) (org-element-property :contents-end element ((or
`center-block `quote-block `verse-block `special-block)
(org-remove-indentation (buffer-substring-no-properties
(org-element-property :contents-begin element) (org-element-property
:contents-end element (_ nil)))
  (save-excursion (save-restriction (widen) (goto-char
(org-element-property :post-affiliated element)) (pcase
(org-element-type element) (`fixed-width (let ((v (org-trim ...))) (or
(org-babel--string-to-number v) v))) (`table (org-babel-read-table))
(`plain-list (org-babel-read-list)) (`example-block (let ((v
(org-element-property :value element))) (if (or
org-src-preserve-indentation (org-element-property :preserve-indent
element)) v (org-remove-indentation v (`export-block
(org-remove-indentation (org-element-property :value element)))
(`paragraph (skip-chars-forward " \11") (if (and (looking-at
org-link-bracket-re) (save-excursion (goto-char ...)
(skip-chars-forward " \15\11\n") (<= ... ...))) (org-babel-read-link)
(buffer-substring-no-properties (org-element-property :contents-begin
element) (org-element-property :contents-end element ((or
`center-block `quote-block `verse-block `special-block)
(org-remove-indentation (buffer-substring-no-properties
(org-element-property :contents-begin element) (org-element-property
:contents-end element (_ nil
  (org-with-wide-buffer (goto-char (org-element-property
:post-affiliated element)) (pcase (org-element-type element)
(`fixed-width (let ((v (org-trim (org-element-property :value
element (or (org-babel--string-to-number v) v))) (`table
(org-babel-read-table)) (`plain-list (org-babel-read-list))
(`example-block (let ((v (org-element-property :value element))) (if
(or org-src-preserve-indentation (org-element-property
:preserve-indent element)) v (org-remove-indentation v
(`export-block (org-remove-indentation (org-element-property :value
element))) (`paragraph (skip-chars-forward " \11") (if (and
(looking-at org-link-bracket-re) (save-excursion (goto-char (match-end
0)) (skip-chars-forward " \15\11\n") (<= (org-element-property :end
element) (point (org-babel-read-link)
(buffer-substring-no-properties (org-element-property :contents-begin
element) (org-element-property :contents-end element ((or
`center-block `quote-block `verse-block `special-block)
(org-remove-indentation (buffer-substring-no-properties
(org-element-property :contents-begin element) (org-element-property
:contents-end element (_ nil)))
  org-babel-read-element((quote-block (:begin 22 :end 63
:contents-begin nil :contents-end nil :post-blank 1 :post-affiliated
36 :name "empty" :parent nil)))
  org-babel-ref-resolve("empty")
  org-babel-execute:shell("" ((:colname-names) (:rowname-names)
(:result-params "replace") (:result-type . value) (:results .
"replace") (:exports . "code") (:session . "none") (:cache . "no")
(:noweb . "no") (:hlines . "no") (:tangle . "no") (:stdin . "empty")))
  org-babel-execute-src-block(nil ("shell" "" ((:colname-names)
(:rowname-names) (:result-params "replace") (:result-type . value)
(:results . "replace") (:exports . "code") (:stdin . "empty") (:tangle
. "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session .
"none")) "" nil 63 "(ref:%s)"))
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  #(org-ctrl-c-ctrl-c nil nil)
  apply(# org-ctrl-c-ctrl-c (nil nil))
  call-interactively@ido-cr+-record-current-command(# org-ctrl-c-ctrl-c nil nil)
  apply(call-interactively@ido-cr+-record-current-command # (org-ctrl-c-ctrl-c nil nil))
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)
```

On Sat, 5 Sep 2020 at 21:55, Bastien  wrote:
>
> Hi Vladimir,
>
> Vladimir Nikishkin  writes:
>
> > The MWE would be the following:
> >
> > #+name: empty
> > #+begin_quote
> >
> > #+end_quote
> >
> > #+begin_src shell :stdin empty
> > #+end_src
> >
> > Now if you try to execute the second block, you will get a lisp error.
> > "Wrong argument integer-or-marker-p"
>
> It probably has been fixed a long time ago because I cannot reproduce
> it here.  Sorry if I lost part of the discussion about this bug.  If
> you can confirm the fix, that'd be good.
>
> Thanks,
>
> --
>  Bastien



-- 
Yours sincerely, Vladimir Nikishkin



Re: Shouldn't ob-shell's org-babel-expand-src-block prepend the :shebang value?

2020-09-10 Thread Vladimir Nikishkin
So, my point is the following. A shebang is an almost universally
accepted way to specify which interpreter should be used for code
evaluation.

In the ob-core.el, at line 787, the function called
org-babel-expand-src-block makes a buffer out of the noweb-expanded
code.
(I am working with org 20200907)

The sexp is looking like this:

(org-edit-src-code
 expanded (concat "*Org-Babel Preview " (buffer-name) "[ " lang " ]*"))

I suggest replacing this sexp with

(org-edit-src-code
 (seq-concatenate 'string (or (alist-get :shebang params) "") "\n"
expanded) (concat "*Org-Babel Preview " (buffer-name) "[ " lang "
]*"))

This way the expanded buffer would respect the shebang, and the
resulting buffer would be saveable as a runnable file.

I suspect that the second branch of the (if) should be left as it is,
because non-interactive usage probably means that the code will be
used later as a part of something, and therefore does not need a
shebang.

Vlad

On Sat, 5 Sep 2020 at 15:13, Bastien  wrote:
>
> Vladimir Nikishkin  writes:
>
> > I'll try to do one this week, but I can't submit a patch officially
> > because of my employer being staunchly against signing the copyright
> > disclaimer.
>
> :/
>
> So please just give directions on what to modify and how, and that'd
> be enough for someone (probably me) to get started.
>
> Thanks!
>
> --
>  Bastien



-- 
Yours sincerely, Vladimir Nikishkin



What are the #+bibliography: statement and the org-reftex-citation command?

2020-06-08 Thread Vladimir Nikishkin
Hello, everyone

The title is a bit of misnomer.

They seem to be "roughly speaking", implementing the citation mode
based on links and link exports roughly as suggested by
http://www-public.imtbs-tsp.eu/~berger_o/weblog/2012/03/23/how-to-manage-and-export-bibliographic-notesrefs-in-org-mode/)

However, they are not documented anywhere within org, and even the official faq:
https://orgmode.org/worg/org-faq.html#using-reftex-in-org-mode
presents yet another, and seemingly also obsolete (in the presence of
org-ref) way of integrating org and biblatex.

Yet they are also not marked as obsolete. What's their role in the org 9.3?

-- 
Yours sincerely, Vladimir Nikishkin



Re: [Patch] Add support for geiser-scheme-implementation to lisp/ob-scheme.el

2020-06-08 Thread Vladimir Nikishkin
Could someone with a right of commit apply this patch?



2020-05-31 12:40 GMT+08:00, Vladimir Nikishkin :
> Hello, everyone
>
> ob-scheme doesn't seem to be respecting geiser-scheme-implementation,
> which is a buffer-local variable to specify which implementation in
> particular to use in an org buffer by default.
>
> This 2-line patch adds this support.
>
> Please, consider adding it.
>
> --
> Yours sincerely, Vladimir Nikishkin
>


-- 
Yours sincerely, Vladimir Nikishkin



Re: issue tracker?

2020-06-02 Thread Vladimir Nikishkin
Does any other email client apart from Gnus support adding additional headers?

-- 
Yours sincerely, Vladimir Nikishkin



[Patch] Add support for geiser-scheme-implementation to lisp/ob-scheme.el

2020-05-30 Thread Vladimir Nikishkin
Hello, everyone

ob-scheme doesn't seem to be respecting geiser-scheme-implementation,
which is a buffer-local variable to specify which implementation in
particular to use in an org buffer by default.

This 2-line patch adds this support.

Please, consider adding it.

-- 
Yours sincerely, Vladimir Nikishkin
From f7b0277b1de47305dbfaeab614cd4530e07921c1 Mon Sep 17 00:00:00 2001
From: Lockywolf 
Date: Sun, 31 May 2020 12:34:53 +0800
Subject: [PATCH] Add support for geiser-scheme-implementation in ob-scheme.el

---
 lisp/ob-scheme.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el
index 5ca7f871d..3eee8213d 100644
--- a/lisp/ob-scheme.el
+++ b/lisp/ob-scheme.el
@@ -43,6 +43,7 @@
 (require 'geiser-impl nil t)
 (defvar geiser-repl--repl) ; Defined in geiser-repl.el
 (defvar geiser-impl--implementation)   ; Defined in geiser-impl.el
+(defvar geiser-scheme-implementation)  ; Defined in geiser-impl.el
 (defvar geiser-default-implementation) ; Defined in geiser-impl.el
 (defvar geiser-active-implementations) ; Defined in geiser-impl.el
 (defvar geiser-debug-show-debug-p) ; Defined in geiser-debug.el
@@ -211,6 +212,7 @@ This function is called by `org-babel-execute-src-block'."
   (let* ((result-type (cdr (assq :result-type params)))
 	 (impl (or (when (cdr (assq :scheme params))
 			 (intern (cdr (assq :scheme params
+		   geiser-scheme-implementation
 		   geiser-default-implementation
 		   (car geiser-active-implementations)))
 	 (session (org-babel-scheme-make-session-name
-- 
2.26.2



Bug: org export rewrites the org buffer. if Emacs crashes during the export, the file gets corrupted [9.3.4 (9.3.4-5-ga0f3bb-elpa @ /home/lockywolf/.emacs.d/elpa/org-20200210/)]

2020-05-28 Thread Vladimir Nikishkin
("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-link-elisp-confirm-function 'yes-or-no-p
 org-org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".")
  (modify-syntax-entry 62 "."))
 )
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-latex-packages-alist '((#1="" "color") (#1# "listings"))
 org-image-actual-width nil
 org-html-use-infojs t
 org-latex-classes '(("acmart"
  
"\\documentclass[sigplan,anonymous,review,timestamp,natbib=false]{acmart}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("article" "\\documentclass[11pt]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . 
"\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . 
"\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 )
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-sub-superscripts '{}
 org-latex-listings-options '(("numbers" "left") ("frame" "single"))
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/Personal_Planner/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Bug: Subtle bug with calling "noweb" blocks with already computed :results output code and :cache yes [9.3.4 (9.3.4-5-ga0f3bb-elpa @ /home/lockywolf/.emacs.d/elpa/org-20200210/)]

2020-05-27 Thread Vladimir Nikishkin
ot; :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)
   ("rtcite" :follow org-bibtex-open :export 
my-rtcite-export-handler)
   ("file+sys") ("file+emacs") ("shell" :follow 
org-link--open-shell)
   (#1="news" :follow
#[257 #2="\301\300\302Q!\207" [#1# browse-url #4=":"] 5 
#5=
  "\n\n(fn URL)"]
)
   (#3="mailto" :follow #[257 #2# [#3# browse-url #4#] 5 
#5#])
   (#6="https" :follow #[257 #2# [#6# browse-url #4#] 5 
#5#])
   (#7="http" :follow #[257 #2# [#7# browse-url #4#] 5 #5#])
   (#8="ftp" :follow #[257 #2# [#8# browse-url #4#] 5 #5#])
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-link-elisp-confirm-function 'yes-or-no-p
 org-org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".")
  (modify-syntax-entry 62 "."))
 )
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-latex-packages-alist '((#1="" "color") (#1# "listings"))
 org-image-actual-width nil
 org-html-use-infojs t
 org-latex-classes '(("acmart"
  
"\\documentclass[sigplan,anonymous,review,timestamp,natbib=false]{acmart}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("article" "\\documentclass[11pt]{article}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . 
"\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . 
"\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 )
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-sub-superscripts '{}
 org-latex-listings-options '(("numbers" "left") ("frame" "single"))
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/Personal_Planner/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: Replace Org's C-TAB with C-M-TAB - objection?

2020-05-26 Thread Vladimir Nikishkin
I'd rather support this change, as I don't have TAB on my keyboard, I
use C-i instead of TAB

OTOH, C-M-i , which is essentially M-TAB, and essentially what the
changes is supposed to be, if flyspell-auto-correct-word (found in
flyspell-mode-map)

So, if this change is made, and flyspell is turned on by default (an
not turning it on is an offence punishable by Grammar Nazi), this
binding will be shadowed.

All this is a mess.

-- 
Yours sincerely, Vladimir Nikishkin



Bug: why does org-goto call org-latex-preview?

2020-05-26 Thread Vladimir Nikishkin
Hello, everyone!

Below is an excerpt of the profiler report after  typing C-c C-j:

- command-execute2385  76%
 - call-interactively2385  76%
  - funcall-interactively1928  61%
   - org-goto1878  60%
- org-goto-location  1867  59%
 - org-mode  1861  59%
  - org-latex-preview1590  51%
   - org--latex-preview-region   1590  51%
- org-format-latex   1588  50%

Why is it that org-goto enforces the regeneration of previews in a buffer?

In my case, the buffer has a huge number of latex formulae, and in
total is 65000 lines long, so I can't really wait till the
regeneration finishes, just takes too much time.

-- 
Yours sincerely, Vladimir Nikishkin



Re: [bug] Should #+attr_latex affect image display within the org buffer itself?

2020-05-25 Thread Vladimir Nikishkin
At the moment, I'm working around this by setting the width in "TeX points":

#+attr_latex: :width 224pt

The exported image becomes 224 points wide (roughly 8 cm), and the
embedded image is 224 pixels wide, which is okay.


2020-05-26 12:01 GMT+08:00, Vladimir Nikishkin :
> Hello, everyone
>
> My problem is the following:
>
> Compare the following three pieces of  org code:
>
> #+attr_latex: :width 80px
> [[file:figure-1-1-dot.png]]
>
> #+attr_latex: :width 8cm
> [[file:figure-1-1-dot.png]]
>
> #+attr_latex: :width 80mm
> [[file:figure-1-1-dot.png]]
>
> They get exported into LaTeX as expected.
> But if you org-redisplay-inline-images, you will see that the first
> one is rendered 80 pixels wide,
> the second one ise rendered 8 pixels wide, and the third one is
> rendered 80 (again) pixels wide.
>
> So it seems that org is using #+attr_latex as a guide in setting the
> width of the images in the org-buffer.
>
> This seems wrong.
>
> --
> Yours sincerely, Vladimir Nikishkin
>


-- 
Yours sincerely, Vladimir Nikishkin



[bug] Should #+attr_latex affect image display within the org buffer itself?

2020-05-25 Thread Vladimir Nikishkin
Hello, everyone

My problem is the following:

Compare the following three pieces of  org code:

#+attr_latex: :width 80px
[[file:figure-1-1-dot.png]]

#+attr_latex: :width 8cm
[[file:figure-1-1-dot.png]]

#+attr_latex: :width 80mm
[[file:figure-1-1-dot.png]]

They get exported into LaTeX as expected.
But if you org-redisplay-inline-images, you will see that the first
one is rendered 80 pixels wide,
the second one ise rendered 8 pixels wide, and the third one is
rendered 80 (again) pixels wide.

So it seems that org is using #+attr_latex as a guide in setting the
width of the images in the org-buffer.

This seems wrong.

-- 
Yours sincerely, Vladimir Nikishkin



How do I set attr_latex for the babel-block outputs?

2020-05-24 Thread Vladimir Nikishkin
And the same question: I am drawing pictures for my book suing TikZ and babel.

This is my code (almost and mwe):

#+name: figure-1-2
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 300
#+header: :fit yes :headers '("\\usepackage{tikz}")
#+header: :buffer on
#+begin_src latex :results value graphics file :exports both :file
figure-1-2-tree.png
\usetikzlibrary{trees}
\begin{tikzpicture}[color=gray]
\node {sqrt} % root
  child { node {sqrt-iter}
  child[sibling distance=5cm] { node{ good-enough }
  child[sibling distance=2cm] { node { square } }
  child[sibling distance=2cm] { node { abs } } }
  child { node{ improve }
  child { node { average } } } };
\end{tikzpicture}
#+end_src

The #+RESULTS has a link
[file:figure-1-2-tree.png]]
below it.

However, after export the picture is rendered \textwidth-wide.

If I manually set
#+attr_latex: :width 8cm above the #+RESULTS, it is displayed as
expected, but If I recompute the picture, it is pasted above my
manually added attr line.

As far as I understand, the "graphics" Format is essentially
org-mode-text. Is it possible to set proper width attributes?


-- 
Yours sincerely, Vladimir Nikishkin



Re: How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?)

2020-05-24 Thread Vladimir Nikishkin
Additionally, what does the :buffer on header argument do?

I seem to see it in the examples, but can't find in the info document.

2020-05-25 11:10 GMT+08:00, Vladimir Nikishkin :
> Hello, everyone
>
> So...
>
> I have the following block:
>
> #+name: figure-1-2
> #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry
> 300
> #+header: :fit yes :headers '("\\usepackage{tikz}")
> #+header: :buffer on
> #+begin_src latex :results value graphics file :exports both :file
> figure-1-2-tree.png
> \usetikzlibrary{trees}
> \begin{tikzpicture}[color=gray]
> \node {sqrt} % root
>   child { node {sqrt-iter}
>   child[sibling distance=5cm] { node{ good-enough }
>   child[sibling distance=2cm] { node { square } }
>   child[sibling distance=2cm] { node { abs } } }
>   child { node{ improve }
>   child { node { average } } } };
> \end{tikzpicture}
> #+end_src
>
> Note the [color=gray] parameter to the tikzpicture environment.
>
> I use a dark theme (arguably more merciful for the eyes when spending
> a lot of time working with computers).
>
> Therefore, when I type C-c at a picture block, I'm want to be getting
> a picture that is decently viewable on a black background. But when I
> am exporting the document, I expect to print it on a white piece of
> paper, so I want the pictures to be viewable too.
>
> These two requirements are contradictory to each other, so I need some
> additional level of abstraction somewhere here. But where?
>
> [color=gray] is a workaround, as it is visible on both the black
> background and the white background. If I don't find anything better,
> I will just either let it be, or replace it with [color=blue].
>
> But ideally, I'd like to export black-on-white pictures to LaTeX, and
> keep white-on-black when using the org document directly.
>
> Has this been already solved by some canned recipe? I'm getting lost
> in too many levels of abstraction:
> GTK Theme -> Emacs Theme -> org -> TikZ -> LaTeX -> Viewer
>
> --
> Yours sincerely, Vladimir Nikishkin
>


-- 
Yours sincerely, Vladimir Nikishkin



How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?)

2020-05-24 Thread Vladimir Nikishkin
Hello, everyone

So...

I have the following block:

#+name: figure-1-2
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 300
#+header: :fit yes :headers '("\\usepackage{tikz}")
#+header: :buffer on
#+begin_src latex :results value graphics file :exports both :file
figure-1-2-tree.png
\usetikzlibrary{trees}
\begin{tikzpicture}[color=gray]
\node {sqrt} % root
  child { node {sqrt-iter}
  child[sibling distance=5cm] { node{ good-enough }
  child[sibling distance=2cm] { node { square } }
  child[sibling distance=2cm] { node { abs } } }
  child { node{ improve }
  child { node { average } } } };
\end{tikzpicture}
#+end_src

Note the [color=gray] parameter to the tikzpicture environment.

I use a dark theme (arguably more merciful for the eyes when spending
a lot of time working with computers).

Therefore, when I type C-c at a picture block, I'm want to be getting
a picture that is decently viewable on a black background. But when I
am exporting the document, I expect to print it on a white piece of
paper, so I want the pictures to be viewable too.

These two requirements are contradictory to each other, so I need some
additional level of abstraction somewhere here. But where?

[color=gray] is a workaround, as it is visible on both the black
background and the white background. If I don't find anything better,
I will just either let it be, or replace it with [color=blue].

But ideally, I'd like to export black-on-white pictures to LaTeX, and
keep white-on-black when using the org document directly.

Has this been already solved by some canned recipe? I'm getting lost
in too many levels of abstraction:
GTK Theme -> Emacs Theme -> org -> TikZ -> LaTeX -> Viewer

-- 
Yours sincerely, Vladimir Nikishkin



Is there a way to export only a subtree of a document to LaTeX (or anywhere)?

2020-05-24 Thread Vladimir Nikishkin
I have a huge document written in org, which takes a lot of time to export.

I want to preview chapters/sections as I'm writing, before finishing
the whole book.

Is it possible without copying a subtree to a temporary buffer?


-- 
Yours sincerely, Vladimir Nikishkin



Re: Clock connection between the files

2020-05-24 Thread Vladimir Nikishkin
I don't remember any more how this worked out, sorry.

I only remember that #+latex_header, if set in a wrong way, breaks almost
everything. One of the things it's breaking is C-c C-j, but it actually
breaks more.

Moreover, I had both files in the agenda list, so this may be a potential
"mis-coupling".

But I sent faithfully reenact the setup of March.

Sorry

Bastien  於 2020年5月24日 週日 19:54 寫道:

> Hi Vladimir,
>
> Vladimir Nikishkin  writes:
>
> > How come org knows the connection between the first and the second
> > file? There are not any references to the second file in the first one
> > whatsoever.
>
> I cannot reproduce the problem.  Can you reproduce it (without adding
> that much contents to the second file)?  Otherwise I don't see where
> the error can come from.
>
> Thanks,
>
> --
>  Bastien
>


Re: How to properly set up reminders for paying cellphone fees in org?

2020-04-30 Thread Vladimir Nikishkin
Ah, great, thanks!

I have been looking at the wrong node all the time.

However, the manual node you're pointing to disagrees with the claim that
those are equivalent:

>If you need both a repeater and a special warning period in a deadline
>entry, the repeater should come first and the warning period last
> DEADLINE: <2005-10-01 Sat +1m -3d>

However, the manual may be incomplete.

Thank you, problem seems to be solved.

Kyle Meyer  於 2020年4月30日 週四 13:02 寫道:

> Vladimir Nikishkin  writes:
>
> > I need to pay a fee by every 28th of the month, and I want this task
> > to show up in the agenda from the 20th of the next not paid month.
> >
> > What's the proper DEADLINE  format?
> >
> > DEADLINE: <2020-02-28 Sun .+1m -10d>  ?
> > DEADLINE: <2020-02-28 Sun -10d .+1m>  ?
>
> Those are equivalent.  Though you might consider whether you'd prefer
> '+' or '++' for this rather than '.+'.  See (info "(org)Repeated tasks")
> if you're not aware of the differences.
>
> And note that a utility like datefudge or libfaketime is useful for
> testing these sorts of things out.  For example:
>
>   $ datefudge "2020-02-18" emacs [...]
>


How to properly set up reminders for paying cellphone fees in org?

2020-04-29 Thread Vladimir Nikishkin
Hello, everyone

I need to pay a fee by every 28th of the month, and I want this task
to show up in the agenda from the 20th of the next not paid month.

What's the proper DEADLINE  format?

DEADLINE: <2020-02-28 Sun .+1m -10d>  ?
DEADLINE: <2020-02-28 Sun -10d .+1m>  ?

Thanks!
-- 
Yours sincerely, Vladimir Nikishkin



Bug: org-preview-latex-process-alist's :latex-header should not fall back to org-format-latex-header [9.3.4 (9.3.4-5-ga0f3bb-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20200210/)]

2020-04-28 Thread Vladimir Nikishkin
" :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)
   (#1="news" :follow
#[257 #2="\301\300\302Q!\207" [#1# browse-url #4=":"] 5 
#5=
  "\n\n(fn URL)"]
)
   (#3="mailto" :follow #[257 #2# [#3# browse-url #4#] 5 
#5#])
   (#6="https" :follow #[257 #2# [#6# browse-url #4#] 5 
#5#])
       (#7="http" :follow #[257 #2# [#7# browse-url #4#] 5 #5#])
   (#8="ftp" :follow #[257 #2# [#8# browse-url #4#] 5 #5#])
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-link-elisp-confirm-function 'yes-or-no-p
 org-org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".")
  (modify-syntax-entry 62 "."))
 )
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-sub-superscripts '{}
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/Personal_Planner/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: Specifying the execution function and/or nested major mode for babel blocks

2020-04-26 Thread Vladimir Nikishkin
>> (add-to-list 'org-src-lang-modes '("f90" . fortran))

Language alignment is fine. What needs to be done is to make org-babel
use org-babel-execute:fortran for both begin_src fortran, and for
begin_src f90.

пн, 27 апр. 2020 г. в 12:12, Kyle Meyer :
>
> Vladimir Nikishkin  writes:
>
> > This is fine most of the time, however, there are exceptions.
> > The one I am interested in is fortran/f90. There are separate
> > fortran-mode and f90-mode, however, afaiu, just a single
> > ob-fortran.el, which works fine with both of those.
>
> In that case, you'd just need (fortran . t) in org-babel-load-languages,
> I think.
>
> > #+begin_src fortran
> > #+end_src
> > or turns on syntax highlighting for fortran-mode, not for f90-mode.
> > I can make blocks like:
> > #+begin_src f90
> > #+end_src
> > This makes syntax highlighting work, but evaluation doesn't, because
> > org doesn't know that f90 and fortran have the same evaluation
> > (compilation) function.
> >
> > I feel that this is a super minor thing that can be solved in, like,
> > one line of code. But I don't seem to be able to find which one.
> >
> > Any suggestions?
>
> Perhaps you're looking for org-src-lang-modes?  This (untested) might do
> what you want:
>
>   (add-to-list 'org-src-lang-modes '("f90" . fortran))



-- 
Yours sincerely, Vladimir Nikishkin



Specifying the execution function and/or nested major mode for babel blocks

2020-04-26 Thread Vladimir Nikishkin
Hello, everyone.

In org.el we have the following:
(require (intern (concat "ob-" lang)))

This is fine most of the time, however, there are exceptions.
The one I am interested in is fortran/f90. There are separate
fortran-mode and f90-mode, however, afaiu, just a single
ob-fortran.el, which works fine with both of those.

Moreover, when I make block like:
#+begin_src fortran
#+end_src
or turns on syntax highlighting for fortran-mode, not for f90-mode.
I can make blocks like:
#+begin_src f90
#+end_src
This makes syntax highlighting work, but evaluation doesn't, because
org doesn't know that f90 and fortran have the same evaluation
(compilation) function.

I feel that this is a super minor thing that can be solved in, like,
one line of code. But I don't seem to be able to find which one.

Any suggestions?

Vlad

-- 
Yours sincerely, Vladimir Nikishkin



Shouldn't ob-shell's org-babel-expand-src-block prepend the :shebang value?

2020-03-12 Thread Vladimir Nikishkin
I use C-c C-v C-v quite often to check the final file produced.
I use ob-shell with the :shebang of "#!/usr/bin/chibi-scheme", because
my code is actually scheme-script, and I need to use :stdin, which
isn't supported by ob-scheme and geiser. (And geiser also has some not
inconveniences).

However, when I expand the block, the shebang line is not added to the
top. The top line could also be potentially used for file type
detection, and what is also annoying, errors reported by the
interpreter are off by 1 (due to the missing first line).

-- 
Yours sincerely, Vladimir Nikishkin



Clock connection between the files

2020-03-10 Thread Vladimir Nikishkin
Hello, everyone.

I have a strange situation. I have a file where I track my used time.
I have another file, in which I write a literate-style book. So I
clock-in in the first file, then open the second one and start
working.

Recently I wrote some terrible code which made my second file blow up
in size to 19 Mb, and I had to kill Emacs.

After restarting Emacs, I wanted to clock-in into the dangling clock
in the first file, but when I type C-c C-x C-i, (!) Emacs asks whether
to open the second file, warning that it is large.
The actual message is "File file2.org is large (19.7M), really open? (y, or n)"

How come org knows the connection between the first and the second
file? There are not any references to the second file in the first one
whatsoever.

Thanks everyone.

-- 
Yours sincerely, Vladimir Nikishkin



How do I diff the outputs of two blocks in org-babel?

2020-03-04 Thread Vladimir Nikishkin
Support I have two blocks:

#+name: block1
#+begin_src shell
cat <<'ADDTEXT4'
#!/bin/bash
echo "This script creates a new file"
var1=10
var3=50
((result=$var1*$var2))
echo "The result = $result"
ADDTEXT4
#+end_src

#+name: block2
#+begin_src shell
cat <<'ADDTEXT4'
#!/bin/bash
echo "This script creates a new file"
var1=10
var2=50
((result=$var1*$var2))
echo "The result = $result"
ADDTEXT4
#+end_src

The first one has a bug in it.

At the moment I am diffing them like this:

#+begin_src shell :results output code :wrap src patch
  output1=$(
  cat <>
  EOF
  )

  output2=$(
  cat <>
  EOF
  )
  diff -s -u <(echo "$output1") <(echo "$output2")
#+end_src

But this looks a bit too complicated.

Any better solution?

-- 
Yours sincerely, Vladimir Nikishkin



org-babel prepends <> expansions with the prefix of the <>? Can this be turned off?

2020-02-24 Thread Vladimir Nikishkin
Hello, everyone

I have the following case:

#+name: test1
#+begin_src shell
LINE to comment
LINE to not comment
#+end_src

#+begin_src shell
  #<>
#+end_src

When I expand it, I get:
#LINE to comment
#LINE to not comment

That's not entirely what I want. Can this behaviour be switched off somehow?

-- 
Yours sincerely, Vladimir Nikishkin



org-babel opens the error output of a block in a separate window... unless :stdin is given, but how are they connected?

2020-02-24 Thread Vladimir Nikishkin
Hello, everyone

The MWE would be the following:

#+name: empty
#+begin_quote
1
#+end_quote

#+begin_src shell :shebang "#! /usr/bin/chibi-scheme :stdin empty
(/ 1 0)
#+end_src

Now the chibi-scheme shebang is just an example of an app writing
things to stderr. The actual content of the <> doesn't matter,
the app errs before ever having a chance to read anything from stdin.

However, when :stdin is given (as in the MWE), the resulting error
output is printed in the :RESULTS , and if not, it is displayed in a
separate (a bit annoying) window called "*Org-Babel Error Output*.

I would like to ask how these two things, stdin, and stderr are
connected. Perhaps, this is a bug?

-- 
Yours sincerely, Vladimir Nikishkin



Bug: ob-shell cannot forward empty blocks to stdin [9.3.1 (release_9.3.1-101-gc9ee3d @ /home/lockywolf/OfficialRepos/org-mode/lisp/)]

2020-02-24 Thread Vladimir Nikishkin
-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-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-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 '(("EL" . "src elisp :exports both :results 
output")
("SE" . "src scheme :exports code")
("SV" . "src scheme :exports both :results 
value")
("SO" . "src scheme :exports both :results 
output")
("p" . "src plantuml :exports both :file ")
("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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("latex" . "tex") ("D" . "d") ("C++" . "cpp")
  ("emacs-lisp" . "el") ("elisp" . "el"))
 org-format-latex-options '(:foreground default :background default :scale 2.0
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :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)
   (#1="news" :follow
#[257 #2="\301\300\302Q!\207" [#1# browse-url #4=":"] 5 
#5=
  "\n\n(fn URL)"]
)
   (#3="mailto" :follow #[257 #2# [#3# browse-url #4#] 5 
#5#])
   (#6="https" :follow #[257 #2# [#6# browse-url #4#] 5 
#5#])
   (#7="http" :follow #[257 #2# [#7# browse-url #4#] 5 #5#])
       (#8="ftp" :follow #[257 #2# [#8# browse-url #4#] 5 #5#])
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-link-elisp-confirm-function 'yes-or-no-p
 org-org-src-mode-hook '((lambda nil (modify-syntax-entry 60 ".")
  (modify-syntax-entry 62 "."))
 )
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: Bug or not a bug? dot expansion in ob-shell

2020-02-19 Thread Vladimir Nikishkin
That's an excellent response, Eric!

Now what about this block:

#+begin_src shell
  printf "%s" '
  (computer . ?type)
  exit'
#+end_src

ср, 19 февр. 2020 г. в 19:56, Fraga, Eric :

> On Wednesday, 19 Feb 2020 at 12:38, Bastien wrote:
> > "0" is the _exit code_ of the successful echo command, not the value
> > returned by the echo command.
>
> But echo does not "return" the string as a value.  It outputs the
> string.
>
> To quote the man page for bash, "the return value of a simple command is
> its status".  Further, a function does not actually return any value
> beyond the status of the last command or a value given on a =return=
> statement.
>
> > So In Vladimir's example, both ":results value" and ":results output"
> > should return the same result, i.e. ".".
>
> I disagree.  I think the current behaviour (i.e. before your attempt to
> "correct"" this) is correct given the documentation you quoted!
>
> > Was it common to expect the exit code when executing shell code?
>
> Common?  I have no idea.  *I* did expect this.  But that's maybe because
> I do use the shell a lot.
>
> I think there's a clear distinction between value and output for src
> blocks and blurring this distinction for shell src blocks would be
> misleading.  The option to request the output as the outcome of the src
> block is already there.
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-345-g415083
>


-- 
Yours sincerely, Vladimir Nikishkin


Bug or not a bug? dot expansion in ob-shell

2020-02-19 Thread Vladimir Nikishkin
Hello, everyone

Could you check if the following block behaves as expected?

#+begin_src shell
echo .
#+end_src

-- 
Yours sincerely, Vladimir Nikishkin


How to make org-babel expand <> but _not_ evaluate the code fed into another block?

2020-02-17 Thread Vladimir Nikishkin
Hello, everyone!

What I want to do is roughly the following:

#+name: for-expansion
#+begin_src scheme
(display "hello world\n")
#+end_quote

#+name: for-input
#+begin_src scheme
(import (srfi 27))
<>
#+end_src

#+name: block-in-question
#+begin_src shell :shebang "#! /usr/bin/chibi-scheme" :results output
:stdin for-input
(eval (read))
#+end_src

At the moment this doesn't work, because babel _evaluates_ for-input before
feeding it into the next block. It is also not possible to make the
"for-input" block a +begin_quote block, because then <> syntax
doesn't get expanded.

At the moment I am getting around it the following way:

#+name: for-expansion
#+begin_src scheme
(display "hello world\n")
#+end_src

#+name: for-input
#+begin_src shell
cat <>
EOF
#+end_src

#+name: block-in-question
#+begin_src shell :stdin for-input
(eval (read))
#+end_src

This is not very good for two reasons or which the first one is not super
importand, but the second is:
1)I am losing syntax highlighting in the for-input block
2)I lose the ability to use the EOF letter combination in the scheme code,
which is quite bad, since scheme doesn't have almost any forbidded
characters which I could use to demarcate scheme code.

Is there some way to tell babel to _not_ evaluate a block, but rather feed
it in as is? Or, maybe, instead, allow <> references inside the
+begin_example blocks? (I tried substituting begin_quote with
begin_example, but they both seem to be not expanding <>.

Any recommendations?

Lockywolf
-- 
Yours sincerely, Vladimir Nikishkin


Re: ob-scheme doesn't support :stdin?

2020-01-20 Thread Vladimir Nikishkin
I just thought that practically speaking, I no interpreter should
really need stdin, right?
Since everything that is prepended with a shebang: #! interpreter
is at the same time a valid shell script, isn't it?

сб, 18 янв. 2020 г. в 13:02, Kyle Meyer :
>
> Vladimir Nikishkin  writes:
>
> > Is it true that ob-scheme doesn't support :stdin ?
> >
> > I just tried, and doesn't seem to work, although it works with ob-shell.
> >
> > (This is not a complaint, I just would like to confirm that I
> > understand things correctly.)
>
> Yes, that's true as far as I can tell:
>
>   $ git grep :stdin
>   lisp/ob-awk.el:;; - :stdin takes an Org data or code block reference, the 
> value of
>   lisp/ob-awk.el:  (stdin (let ((stdin (cdr (assq :stdin params
>   lisp/ob-sed.el:  (stdin (let ((stdin (cdr (assq :stdin params
>   lisp/ob-shell.el:(stdin (let ((stdin (cdr (assq :stdin params
>   testing/examples/ob-awk-test.org:#+begin_src awk  :stdin genseq :results 
> silent
>   testing/examples/ob-sed-test.org:  #+BEGIN_SRC sed :stdin ex1
>
> So it seems support for :stdin is limited to awk, sed, and shell.



-- 
Yours sincerely, Vladimir Nikishkin



ob-scheme doesn't support :stdin?

2020-01-17 Thread Vladimir Nikishkin
Hello, friends.

Is it true that ob-scheme doesn't support :stdin ?

I just tried, and doesn't seem to work, although it works with ob-shell.

(This is not a complaint, I just would like to confirm that I
understand things correctly.)

-- 
Yours sincerely, Vladimir Nikishkin



How do I add #+name: to a structured template?

2020-01-08 Thread Vladimir Nikishkin
I have the following in the .emacs:
(add-to-list 'org-structure-template-alist
 '("SO" . "src scheme :exports both :results output\n?\n"))

A structured template block is automatically prepended with #+start_ ,
but I actually need it to insert
#+name: 
#+start_srt ... etc.

How can I do that with the new template expansion mechanism?

-- 
Yours sincerely, Vladimir Nikishkin



Re: 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/)]

2020-01-08 Thread Vladimir Nikishkin
Ouch, that was unexpected.

The manual for my version only includes four mentions if the noweb-ref
header argument. Is it becoming deprecated?

What does "apparently don't need" actually mean? That is, when should I use
the name, and when the header argument? What can the header argument do
that the name cannot?


Nicolas Goaziou  於 2020年1月9日 週四 01:23 寫道:

> Hello,
>
> Vladimir Nikishkin  writes:
>
> > I am attaching the file in which tangling is still slow.
> >
> > The file is quite big, but that alone doesn't seem to be the reason
> > for slowliness (I tried adding 1M-long words in the random places of
> > the previous mwe).
> >
> > You can see the result by C-c C-v C-v'ing the code block at the
> > "Ramanujan numbers" heading.
> >
> > Below is the profiler report for C-c C-v C-v'ing.with the heaviest
> > blocks expanded:
>
> This is because you're using :noweb-ref, which _is_ slow, although you
> apparently don't need it in the document. Use name keyword instead,
> e.g.,
>
> #+name: primetest
> #+begin_src scheme :exports both :results output
>   (define (smallest-divisor n)
> (find-divisor n 2))
>   (define (find-divisor n test-divisor)
> (cond ((> (square test-divisor) n) n)
>   ((divides? test-divisor n) test-divisor)
>   (else (find-divisor n (+ test-divisor 1)
>   (define (divides? a b) (= (remainder b a) 0))
>
>   (define (prime? n)
> (= n (smallest-divisor n)))
> #+end_src
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Bug: org-attach dispatcher has no obvious way to scroll it [9.3 (9.3-8-geab7c4-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20191209/)]

2020-01-04 Thread Vladimir Nikishkin
e :exports both :results 
output\n?\n")
("p" . "src plantuml :exports both :file ? \n ")
("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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("latex" . "tex") ("D" . "d") ("C++" . "cpp")
  ("emacs-lisp" . "el") ("elisp" . "el"))
 org-format-latex-options '(:foreground default :background default :scale 2.0
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 org-ref-pdf-to-bibtex-function 'copy-file
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("message" :follow org-mac-message-open)
   ("x-devonthink-item" :follow org-devonthink-item-open)
   ("mac-evernote" :follow org-mac-evernote-note-open)
   ("mac-outlook" :follow org-mac-outlook-message-open)
   ("acrobat" :follow org-mac-acrobat-open)
   ("skim" :follow org-mac-skim-open)
   ("addressbook" :follow org-mac-addressbook-item-open)
   ("x-together-item" :follow org-mac-together-item-open)
   ("mairix" :follow org-mairix-open :store 
org-mairix-store-gnus-link)
   ("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)
   (#1="news" :follow
#[257 #2="\301\300\302Q!\207" [#1# browse-url #4=":"] 5 
#5=
  "\n\n(fn URL)"]
)
   (#3="mailto" :follow #[257 #2# [#3# browse-url #4#] 5 
#5#])
   (#6="https" :follow #[257 #2# [#6# browse-url #4#] 5 
#5#])
   (#7="http" :follow #[257 #2# [#7# browse-url #4#] 5 #5#])
   (#8="ftp" :follow #[257 #2# [#8# browse-url #4#] 5 #5#])
   ("help" :follow org-link--open-help)
   ("file" :complete org-link-complete-file)
   ("elisp" :follow org-link--open-elisp)
   ("doi" :follow org-link--open-doi))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-link-elisp-confirm-function 'yes-or-no-p
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-mairix-display-hook 'org-mairix-gnus-display-results
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-ref-cite-onclick-function 'org-ref-cite-onclick-minibuffer-menu
 org-use-speed-commands t
 org-mairix-gnus-select-display-group-function 
'org-mairix-gnus-select-display-group-function-gg
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: Question mark not supported in structured templates?

2019-10-29 Thread Vladimir Nikishkin
What is the canonical difference between org-insert-structure-template
and org-tempo then?

I think, emacs skeleton libraries (M-x info-display-manual RET
autotype RET) support placing the point (with a "_" marker)

ср, 30 окт. 2019 г. в 00:43, Berry, Charles :
>
> `org-tempo' is the replacement. It is mentioned in the docstring for 
> `org-structure-template-alist'.
>
> Here is what I have in my `emacs-init.org' file:
>
> (The letter `p' denotes where point should land. `n' is a newline. See the 
> docstring for `tempo-define-template' for more details.)
>
>
> #+begin_src emacs-lisp
>
>   (require 'org-tempo)
>
>
>   (tempo-define-template "org-src_R"
>  '("#+begin_src R" p  n
>n "#+end_src" )
>  "
>   (tempo-define-template "org-src-named-R"
>  '("#+name: " p  n
>"#+begin_src R"   n
>   n "#+end_src" )
>  "
>   (tempo-define-template "org-eqnarray"
>  '("\\begin{eqnarray} " '> n p
>   n "\\end{eqnarray}" >)
>  "
>   (tempo-define-template "org-equation"
>  '("\\begin{equation} " '> n p
>   n "\\end{equation}" >)
>  "
>   (tempo-define-template "org-displaymath"
>  '("# begin math" n
>"\\["  p n
>"\\]" n
>"# end math" n)
>  "
> #+end_src
>
> HTH,
>
> Chuck
>
>
> > On Oct 29, 2019, at 1:59 AM, Vladimir Nikishkin  wrote:
> >
> > In the version 8 of org-mode you could indicate where to put the point
> > after the template is expanded. In the template
> > (list "p" "#begin_src plantuml :file ? :export both \n#end_src"),
> > after the template is expanded, the point would be located after
> > :file, whereas in the template (list "SO" "#begin_src scheme :export
> > both \n?\n#end_src") the point would be located on the frist line
> > after the header.
> >
> > At the moment, `org-insert-structure-template' just inserts the
> > question mark verbatim. I would consider this a regression, but maybe
> > there is some replacement mechanism?
>
>


-- 
Yours sincerely, Vladimir Nikishkin



Re: Bug: Wrong syntax in org-mode files with babel fragments in src blocks [9.2.6 (9.2.6-4-ge30905-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20191021/)]

2019-10-29 Thread Vladimir Nikishkin
That's probably a working solution, but I still wonder why org 8
doesn't have this problem.

Thanks anyway.

ср, 30 окт. 2019 г. в 00:40, Fraga, Eric :
>
> On Tuesday, 29 Oct 2019 at 23:50, Vladimir Nikishkin wrote:
> > The MWE would be the following:
> >
> > #+begin_src scheme
> > (display (< 1 3))
> > #+end_src
> >
> > In this example, if you put the point on the "<" symbol, it is
> > highlighted (fontified) together with the ")" following 3, which is
> > incorrect, since in general, "<" is not a paired entity. (I.e. is a
> > symbol "less" rather than an angular bracket.)
>
> I have the following 2 lines in my org-mode-hook to cater for this issue
> which arises when using source blocks.
>
> (modify-syntax-entry ?< ".")
> (modify-syntax-entry ?> ".")
>
> HTH
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-544-gd215c3



-- 
Yours sincerely, Vladimir Nikishkin



Bug: Wrong syntax in org-mode files with babel fragments in src blocks [9.2.6 (9.2.6-4-ge30905-elpaplus @ /home/lockywolf/.emacs.d/elpa/org-plus-contrib-20191021/)]

2019-10-29 Thread Vladimir Nikishkin
-link
 org-edit-src-auto-save-idle-delay 15
 org-agenda-include-diary t
 org-structure-template-alist '(("EL" . "src elisp :exports both :results 
output\n?\n")
("SV" . "src scheme :exports both :results 
value\n?\n")
("SO" . "src scheme :exports both :results 
output\n?\n")
("p" . "src plantuml :exports both :file ? \n ")
("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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("stata" . "do") ("tcl" . "tcl") ("vala" . "vala")
  ("vbnet" . "vb") ("latex" . "tex") ("D" . "d") 
("C++" . "cpp")
  ("emacs-lisp" . "el") ("elisp" . "el"))
 org-format-latex-options '(:foreground default :background default :scale 2.0
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 org-ref-pdf-to-bibtex-function 'copy-file
 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) ("message" :follow 
org-mac-message-open)
   ("x-devonthink-item" :follow org-devonthink-item-open)
   ("mac-evernote" :follow org-mac-evernote-note-open)
   ("mac-outlook" :follow org-mac-outlook-message-open)
   ("acrobat" :follow org-mac-acrobat-open)
   ("skim" :follow org-mac-skim-open)
   ("addressbook" :follow org-mac-addressbook-item-open)
   ("x-together-item" :follow org-mac-together-item-open)
   ("mairix" :follow org-mairix-open :store 
org-mairix-store-gnus-link)
   ("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-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-texinfo-format-inlinetask-function 
'org-texinfo-format-inlinetask-default-function
 org-texinfo-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-tab-before-tab-emulation-hook '(org-tempo-complete-tag)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-mairix-display-hook 'org-mairix-gnus-display-results
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-ref-cite-onclick-function 'org-ref-cite-onclick-minibuffer-menu
 org-use-speed-commands t
 org-mairix-gnus-select-display-group-function 
'org-mairix-gnus-select-display-group-function-gg
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Vladimir Nikishkin
Please, consider visitiong M-x info-display-manual RET org RET section
15.2, paragraph 4.

вт, 29 окт. 2019 г. в 18:08, Fraga, Eric :
>
> On Tuesday, 29 Oct 2019 at 17:06, Vladimir Nikishkin wrote:
> > No it is not, please, don't disinform people.
>
> Not intending to do so but please clarify: in which way am I
> misinforming people?
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-544-gd215c3



-- 
Yours sincerely, Vladimir Nikishkin



Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Vladimir Nikishkin
And this question is _not_ about the template expansion, but about the
electric-pair-mode.

вт, 29 окт. 2019 г. в 17:06, Vladimir Nikishkin :
>
> No it is not, please, don't disinform people.
>
> вт, 29 окт. 2019 г. в 17:03, Fraga, Eric :
> >
> > On Tuesday, 29 Oct 2019 at 16:50, Vladimir Nikishkin wrote:
> > > I think, these are two different mechanisms. C-c C-, works as expected.
> > > The "<" mechanism comes from org-tempo, and is faster, because you
> > > don't have to choose anything.
> >
> > I don't know anything about org-tempo but, just to be clear, the old <
> > at beginning of line mechanism that was available, by default, in org
> > 8.x is no longer available.  It was replaced by C-c C-,.
> >
> > --
> > Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
>
>
>
> --
> Yours sincerely, Vladimir Nikishkin



-- 
Yours sincerely, Vladimir Nikishkin



Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Vladimir Nikishkin
No it is not, please, don't disinform people.

вт, 29 окт. 2019 г. в 17:03, Fraga, Eric :
>
> On Tuesday, 29 Oct 2019 at 16:50, Vladimir Nikishkin wrote:
> > I think, these are two different mechanisms. C-c C-, works as expected.
> > The "<" mechanism comes from org-tempo, and is faster, because you
> > don't have to choose anything.
>
> I don't know anything about org-tempo but, just to be clear, the old <
> at beginning of line mechanism that was available, by default, in org
> 8.x is no longer available.  It was replaced by C-c C-,.
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78



-- 
Yours sincerely, Vladimir Nikishkin



Re: Question mark not supported in structured templates?

2019-10-29 Thread Vladimir Nikishkin
In the version 8 of org-mode you could indicate where to put the point
after the template is expanded. In the template
(list "p" "#begin_src plantuml :file ? :export both \n#end_src"),
after the template is expanded, the point would be located after
:file, whereas in the template (list "SO" "#begin_src scheme :export
both \n?\n#end_src") the point would be located on the frist line
after the header.

At the moment, `org-insert-structure-template' just inserts the
question mark verbatim. I would consider this a regression, but maybe
there is some replacement mechanism?

вт, 29 окт. 2019 г. в 16:23, Fraga, Eric :
>
> On Tuesday, 29 Oct 2019 at 15:57, Vladimir Nikishkin wrote:
> > The problem is that for ob-plantuml I need the value of point be right
> > after the :file header parameter, because plantuml always requires a
> > file name.
>
> I don't see this in my configuration.  But it could be that I do not
> understand what you are saying.  Maybe explain a bit further and/or give
> a small example?
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78



-- 
Yours sincerely, Vladimir Nikishkin



Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Vladimir Nikishkin
I think, these are two different mechanisms. C-c C-, works as expected.
The "<" mechanism comes from org-tempo, and is faster, because you
don't have to choose anything.

вт, 29 окт. 2019 г. в 16:21, Fraga, Eric :
>
> On Tuesday, 29 Oct 2019 at 16:09, Vladimir Nikishkin wrote:
> > I used org 8 until recently, and it used to be that I could type "<"
> > at the beginning of a line, and it would be still a single "<" (thus
> > allowing the expansion of structured templates with TAB)
>
> Expansion of structured templates is no longer done using < at the start
> of a line.  A more general approach is now available,
> org-insert-structure-template which is bound to C-c C-, for me at
> least.  It prompts for what to insert and, most importantly, will wrap
> the structure around any region that has been selected.
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78



-- 
Yours sincerely, Vladimir Nikishkin



Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Vladimir Nikishkin
I used org 8 until recently, and it used to be that I could type "<"
at the beginning of a line, and it would be still a single "<" (thus
allowing the expansion of structured templates with TAB)

In org 9.2 electric-pair-mode seems to be working all the time.

What is the recommended way of making paired parentheses in org 9.2?

Shall I inhibit electric-pair-mode somehow myself, and instead rely on
org-cdlatex-mode?

What would be the correct incantation to put in the .emacs file?

Thanks!

-- 
Yours sincerely, Vladimir Nikishkin



Question mark not supported in structured templates?

2019-10-29 Thread Vladimir Nikishkin
Hello, everyone.

I recently updated to org 9.2 from org-melpa, and I have the following issue:

I use org with org-babel to write a book with many examples and illustrations.

I use ob-plantuml and ob-scheme in particular.
The problem is that for ob-plantuml I need the value of point be right
after the :file header parameter, because plantuml always requires a
file name.

For scheme, however, there is no need to write a file name, there are no files.

Is there no way to specify where to put the point in the new version of org?

-- 
Yours sincerely, Vladimir Nikishkin



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 > <mailto:lockyw...@gmail.com>> 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


[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
  ("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 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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("clojure" . "clj") ("latex" . "tex") ("D" . "d")
  ("C++" . "cpp") ("emacs-lisp" . "el") ("elisp" . 
"el"))
 org-format-latex-options '(:foreground default :background default :scale 2.0
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 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))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



[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
  ("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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("latex" . "tex") ("D" . "d") ("C++" . "cpp")
  ("emacs-lisp" . "el") ("elisp" . "el"))
 org-format-latex-options '(:foreground default :background default :scale 2.0
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 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))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



[O] LaTeX org-mode tikz with a dark background plots with black on black

2019-09-09 Thread Vladimir Nikishkin
Hello, everyone

I am trying to follow the example from the contributed manual:

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#org30df2de

The code I am trying to get compiled is the following:

#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 200
#+header: :fit yes :headers '("\\usepackage{tikz}")
#+header: :buffer on
#+begin_src latex :results raw file :exports code :file test.png
  \usetikzlibrary{trees}
  \begin{tikzpicture}
\node [circle, draw, fill=red!20] at (0,0) {1}
  child { node [circle, draw, fill=blue!30] {2}
  child { node [circle, draw, fill=green!30] {3} }
  child { node [circle, draw, fill=yellow!30] {4} }};
  \end{tikzpicture}
#+end_src

I am getting the picture, and the circles are where they should be,
but (!), the arrows are black, which makes them not really visible on
a black background. How would I either make the background white, or
(better) just make the foreground white (just for this particular
block of latex, not for export, and not even for the entire file).

The formulate like \( e = mc^2 \) are properly rendered both in Emacs
(white on black), and when exported (black on white).

Any suggestions welcome.



-- 
Yours sincerely, Vladimir Nikishkin



[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
")
("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-edit-src-turn-on-auto-save t
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-hierarchical-todo-statistics nil
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("D" . "d") ("C++" . "cpp") ("emacs-lisp" . "el")
  ("elisp" . "el"))
 org-format-latex-options '(:foreground default :background default :scale 2.5
:html-foreground "Black" :html-background 
"Transparent"
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" 
"\\(" "\\["))
 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))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



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



[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] :noweb expansion happens before :prologue expansion. Why?

2019-08-20 Thread Vladimir Nikishkin
Hello, everyone

I wanted to do the following
#+name: common
#+begin_src scheme
(display "Common header\n")
#+end_src

#+begin_src scheme :noweb yes :prologue "<>"
(display "particular block")
#+end_src

This fails, because :prologue is language-specific, and is expanded
later than :noweb, so I am getting <> in my code rather than
the expansion.

Why? Only four language modules care to implement :prologue (R,
scheme, maxima, gnuplot) , and all of them do it by just concatenating
it with the rest of the code, and as a result the wonderful
possibility of attaching common headers to blocks is greatly reduced,
since they are not expanded at all.

Would it make more sense to expand the :prologue and :epilogue
_before_ :noweb rather than after and do it in a uniform way (that is,
simply concatenate)?

I am ready to make a patch, as long as it won't be rejected.

-- 
Yours sincerely, Vladimir Nikishkin



[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
ntuml :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 org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-edit-src-turn-on-auto-save t
 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 '(("D" . "d") ("C++" . "cpp") ("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
   ("news" :follow (lambda (path) (browse-url (concat 
"news:; path
   ("shell" :follow org--open-shell-link))
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-agenda-start-with-follow-mode t
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-image-actual-width nil
 org-html-use-infojs t
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 org-use-speed-commands t
 org-latex-bib-compiler "biber"
 org-default-notes-file "~/org/notes.org"
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



Re: [O] Bug: org manual 15.10.2 Packages that conflict with Org mode doesn't include EDE [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-07-06 Thread Vladimir Nikishkin
EDE is  Emacs Development Environment, is shipped with stock Emacs and is
recommended to be turned on as a global minor mode, in the official Emacs
Manual, Section 25.4, page 330 of the printed version, or 352 of the pdf.

It's not a 'mere keybinding conflict', it's a conflict that anyone reading
the official manual would be bumping into. It's not some obscure tiny
extension no-one is using, it is an official part of Emacs, just as Org is.



On Sun, Jul 7, 2019, 05:05 Nicolas Goaziou  wrote:

> Hello,
>
> Vladimir Nikishkin  writes:
>
> > Although they actually do conflict is that the default bindings for EDE
> > start with C-c . ,
> > whereas Org uses this keybinding branch as an org-time-stamp binding.
>
> I don't know what is EDE. Anyway I don't think a mere key-binding
> conflict deserves an entry in the "Conflicts" section.
>
> It's true that Org shouldn't have used `C-c .` and `C-c !` in the first
> place, but that ship sailed long ago.
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] Bug: org manual 15.10.2 Packages that conflict with Org mode doesn't include EDE [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-07-06 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.


Although they actually do conflict is that the default bindings for EDE
start with C-c . ,
whereas Org uses this keybinding branch as an org-time-stamp binding.

Emacs  : GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, Motif Version 
2.3.8)
 of 2019-05-30
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-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 '(#[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-babel-load-languages '((plantuml . t))
 org-log-done 'time
 org-startup-align-all-tables t
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-edit-src-turn-on-auto-save t
 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))
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



[O] Bug: babel plantuml doesn't support multipage diagrams [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-07-06 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!

My mwe is the following:

#+begin_src plantuml :file test.png :export both
class "Class1" as c1
newpage
class "Class2" as c2
#+end_src

PlantUML generates two files if given this source. test.png and
test_001.png
However, org-babel only shows the first one.
It would be nice if it could show both.

Thank you!

Lockywolf gmail.com

Emacs  : GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, Motif Version 
2.3.8)
 of 2019-05-30
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-plantuml-jar-path "/usr/local/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)
 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 '((plantuml . t))
 org-startup-align-all-tables t
 org-catch-invisible-edits t
 org-occur-hook '(org-first-headline-recenter)
 org-edit-src-auto-save-idle-delay 15
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-edit-src-turn-on-auto-save t
 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))
 org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate
 )
-- 
--
Vladimir Nikishkin (MiEr, lockywolf)



[O] Bug: babel-plantuml doesn't support multipage diagrams [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-07-06 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.

my mwe is the following:

#+begin_src plantuml :file test.png,test_001.png :export both
'title "Title 1"
class "Class1" as c1
newpage
'title "Title 2"
class "Class2" as c2
#+end_src

PlantUML supports generating multipage documents as of version 1.2019.6,
but I didn't find how to show all pages (two in my case) in an org buffer.


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