[BUG] {C-c C-c} updating on a sub-headline checkbox statistics caused upper headline checkbox statistics reset to zero

2022-08-16 Thread Christopher M. Miles

Here is a test org content:

#+begin_src org
,* 1 headline [0/2]

,** TODO kk [0/0]
:LOGBOOK:
- State "TODO"   from  [2022-08-17 Wed 06:02]
:END:

,** first-level headline [0/0]

,*** TODO second-level headline [2/2]

- [X] item 1
- [X] item 2

#+end_src

When I press keybinding {C-c C-c} to do checkbox statistics updating on 
headline "TODO second-level
headline [2/2]|" (point is |) checkbox statistics, this caused upper headline 
checkbox statistics
auto update and reset to zero which is wrong.

Environments: I'm using the latest version source code org-mode.

Also I record a video: https://share.cleanshot.com/GlHAYY

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: :session for Julia in org babel?

2022-08-16 Thread Christopher M. Miles

"Fraga, Eric"  writes:

> On Tuesday, 16 Aug 2022 at 21:21, Ihor Radchenko wrote:
>> Can you also update [Worg]
>
> I will do so, maybe tomorrow.  I assume that's okay as it's a separate
> repository?  and as I do not have submit access, I'll post a patch here,
> if that's okay?
>
>> This will set the variable globally. You may want setq-local instead.
>
> I've put the setting into the (let ...) and it seems to work just fine.
> New patch attached.
>
> thank you,
> eric

What about write a elisp function to automatic the installation of those
required two Julia packages? If not, at least raise a warning for user
to install those two packages after detection not exist. WDYT?

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


signature.asc
Description: PGP signature


Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note

2022-08-16 Thread Bhavin Gandhi
On Thu, 21 Jul 2022 at 23:33, Bhavin Gandhi  wrote:
>
> On Sat, 16 Jul 2022 at 14:50, Ihor Radchenko  wrote:
> > > Seems like soon I will cross the TINYCHANGE limit, so I will get the
> > > FSF copyright assignment done.
> >
> > Note that FSF should reply within 5 working days. If not, we can help
> > you to push them.
>
> Thanks! I received the PDF to sign the next day after my email, this
> will probably take a couple of days more from my side as I'm talking
> with my employer.

I finally got this done. I now have a fully executed copy of the copyright
assignment (signed by FSF and me). Do I need to send it to someone so
that they can check and update the page at
https://orgmode.org/worg/contributors.html ?


On Tue, 26 Jul 2022 at 17:18, Ihor Radchenko  wrote:
> >
> > So, I saved this-command and (recursion-depth) value, and I'm checking
> > for it in the org-add-log-note (attaching diff of my changes). But this
> > doesn't guarantee that we are not in the minibuffer when the
> > post-command-hook runs.
> >
> > This is what I did, and it failed after answering the question about 10
> > repeated intervals:
> > 1. M-: (y-or-n-p "Some question")
> > 2. Now I switched to Org mode buffer.
> > 3. Did C-c C-t on the entry.
> >
> > When org-log-add-setup runs, (recursion-depth) is 1, and
> > (minibuffer-depth) is also 1.
> > Now, the question about 10 repeated intervals is asked, once I answer
> > it, post-command-hook runs. And it runs while we are in the minibuffer
> > waiting for 'Some question'.
>
> Yikes! Then, can also check for window-minibuffer-p, but I feel that it
> will be a fight against all kinds of edge cases.

I haven't been able to make much progress on this bug in the last two
weeks. Will try to send a patch in a few days, as the steps I gave above
feels like an edge case which we won't see happening hopefully.

-- 
Bhavin Gandhi (bhavin192) | https://geeksocket.in



[BUG] Incorrect fontification of src blocks for indentation sensitive language modes

2022-08-16 Thread Bhavin Gandhi
In the following Org mode file, the Ledger mode source block is not
highlighted correctly.

How to reproduce:
1. Clone Ledger mode: git clone
https://github.com/ledger/ledger-mode.git /tmp/ledger-mode
2. emacs -Q -L ~/src/org-mode/lisp
3. Evaluate the following in the *scratch* buffer.

(add-to-list 'load-path "/tmp/ledger-mode")
(require 'ledger-mode)

4. Create an Org mode file test.org with following content
--8<---cut here---start->8---
* Some heading
- Option one
  #+begin_src ledger
  2022/08/16 Buy books
  Expenses:Books  ₹299
  Assets:Cash
  #+end_src
--8<---cut here---end--->8---

5. The block is not fontified.
6. Now go to the src block and do C-c ', you will see the block
   correctly fontified, and after doing C-c ' again, we are back to
   incorrect fontification.

I tried to debug this and found the function
org-src-font-lock-fontify-block. Turns out that the code block is
actually being fontified, but Ledger mode seems to get the block with
indentation. I found this by adding a (message string) in this function.

--8<---cut here---start->8---
  2022/08/16 Buy books
  Expenses:Books  ₹299
  Assets:Cash
--8<---cut here---end--->8---

Notice the extra indentation at the beginning of year 2022. This block
is not valid Ledger mode content, so it just keeps it grayed out,
instead of having colors. If we remove the indentation from the src block in
the Org mode file, it gets fontified correctly.

Setting org-adapt-indentation to t didn't make any difference. Value of
org-src-fontify-natively is t by default. I even tried
https://github.com/yantar92/org/tree/feature/org-font-lock-element, it
had the same issue.
I think the language mode should get the block without the extra
indentation. Or am I missing something here?

PS: I haven't looked at the code of org-src-font-lock-fontify-block in
detail, so I could be wrong with this analysis.

-- 
Bhavin Gandhi (bhavin192) | https://geeksocket.in



Re: Dates in headlines

2022-08-16 Thread Ypo

I found it again:

"If the headline contains a timestamp, it is removed from the link, 
which results in a wrong link—you should avoid putting a timestamp in 
the headline."


https://orgmode.org/manual/Handling-Links.html#FOOT28





this iirc has been obsolete for many years and ime and on ml never was
an issue.  i tried to find out why it was mentioned but did not find
anything.  it might have been an ambiguity in the manual to do with
active tses like in your example?  e.g. the agenda will remove the
active ts at least in certain cases, but that is a deliberate feature.

i successfully rely on inactive as below.  they are sorted by the ts.
a capture template inserts them.

much better than date trees for my case.  always show, sorted at
bottom, no hierarchy, nothing out of sync, can scan and bisect to find
an entry or get a sense of number, can change a ts and sort again,
looks the same in the agenda, etc.


* LOG [2021-07-01 Thu] vulcans mediating with klingons
* LOG [2021-06-28 Mon 15:44] brawl.  scottie of course :(.
* LOG [2021-06-28 Mon 15:44] hauled away AS garbage?
* LOG [2021-06-28 Mon 15:44] klingons said garbage scow


On 6/28/22, Ypo  wrote:
>/I think I've read somewhere that it is a "bad practice" to use dates in/
>/headlines, is it correct? I haven't found it in the manual./
>
>/Like:/
>
>/ <2022-06-29 mi. 10:30> Meeting/
>
>/Best regards/
>
*From*: Samuel Wales
*Subject*:  Re: Dates in headlines
*Date*: Tue, 28 Jun 2022 16:23:02 -0700



Re: :session for Julia in org babel?

2022-08-16 Thread Fraga, Eric
On Tuesday, 16 Aug 2022 at 21:21, Ihor Radchenko wrote:
> Can you also update [Worg]

I will do so, maybe tomorrow.  I assume that's okay as it's a separate
repository?  and as I do not have submit access, I'll post a patch here,
if that's okay?

> This will set the variable globally. You may want setq-local instead.

I've put the setting into the (let ...) and it seems to work just fine.
New patch attached.

thank you,
eric
-- 
: Eric S Fraga, with org release_9.5.4-737-gd3a9c4 in Emacs 29.0.50
From dabcbd8005d5323d8a784f031b7fc5d1523b7b6d Mon Sep 17 00:00:00 2001
From: Eric S Fraga 
Date: Tue, 16 Aug 2022 17:03:33 +0100
Subject: [PATCH] lisp/ob-julia.el: Fix session support for Julia

* ob-julia.el (org-babel-julia-evaluate-session, commentary): Add line
to initialize ESS so that Julia sessions work.  Also added text in
commentary about Julia packages that sessions require.  Fix
contributed by Stephen Eglen.  See discussion:
https://stat.ethz.ch/pipermail/ess-help/2022-August/013113.html.
---
 lisp/ob-julia.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
index 7f25fafad..6b2f59354 100644
--- a/lisp/ob-julia.el
+++ b/lisp/ob-julia.el
@@ -26,6 +26,9 @@
 ;; Org-Babel support for evaluating julia code
 ;;
 ;; Based on ob-R.el by Eric Schulte and Dan Davison.
+;;
+;; Session support requires the installation of the DataFrames and CSV
+;; Julia packages.
 
 ;;; Code:
 (require 'cl-lib)
@@ -281,7 +284,8 @@ last statement in BODY, as elisp."
 (value
  (with-temp-buffer
(insert (org-babel-chomp body))
-   (let ((ess-local-process-name
+   (let ((ess-local-customize-alist t)
+ (ess-local-process-name
 	  (process-name (get-buffer-process session)))
 	 (ess-eval-visibly-p nil))
 	 (ess-eval-buffer nil)))
-- 
2.30.2



[off topic] List all non-latin characters in a buffer

2022-08-16 Thread Juan Manuel Macías
Sorry for the offtopic, but I thought this homemade function I wrote
some time ago for my work might perhaps be useful to some Orgers. When
executed in a buffer, the `list-non-latin-chars' function opens a window
displaying a list of all the non (basic) Latin characters present in
that document. Each item in the list contains the character, its Unicode
canonical name, and its hexadecimal code. For example:

殿  CJK IDEOGRAPH-6BBF  #6bbf

Also, each item is a button (created with button.el). If the button
is activated, there are currently two options: a: execute occur on that
character in the document; b : execute describe-char on that character.

By default, the characters displayed in the list correspond to any
Unicode block other than basic-latin. Which means that the zero width
space character is included, a very famous character in this mailing
list :-)

And here is the code (lexical binding is required). Of course, feedback
welcome.

Best regards,

Juan Manuel

#+begin_src emacs-lisp
  (setq ext-chars-actions-list '((?a "Occur"
  (lambda (buf char)
(interactive)
(with-current-buffer buf
  (occur char
  (?b "Describe char"
  (lambda (buf char)
(interactive)
(with-current-buffer buf
  (save-excursion
(goto-char (point-min))
(when (re-search-forward char nil t)
  (describe-char (- (point) 
1)

  (defun ext-chars-choose-action (buf char)
(let ((opt (read-char-choice (concat "Escoger acción >>\n\n"
 (mapconcat (lambda (item)
  (format "%c: %s"
  (car item) (nth 1 
item)))
ext-chars-actions-list " 
--- "))
 (mapcar #'car ext-chars-actions-list
  (apply (nth 2 (assoc opt ext-chars-actions-list))
 (list buf char

  (defvar ext-chars-list nil)

  (defun list-non-latin-chars ()
(interactive)
(setq ext-chars-list nil)
(let ((buf (buffer-name)))
  (save-excursion
(goto-char (point-min))
(while
(re-search-forward "\\([^\u-\u007F]\\)" nil t)
  (add-to-list 'ext-chars-list (format "%s" (match-string 1
(setq ext-chars-list-final
  (mapcar (lambda (char)
(let
((char-name (get-char-code-property (string-to-char 
char) 'name))
 ;; convert to hexadecimal
 (char-code (format "#%x" (string-to-char char
  (setq char (format  "%s\s\s%s\s\s%s" char char-name 
char-code
  ext-chars-list))
(let ((temp-buf (format "*non latin chars in %s*" buf)))
  (when (get-buffer temp-buf)
(kill-buffer temp-buf))
  (get-buffer-create temp-buf)
  (set-buffer temp-buf)
  ;; necessary for Arabic, Hebrew, etc.
  (setq bidi-display-reordering nil)
  ;; insert buttons list
  (mapc (lambda (el)
  (let ((char (when (string-match "^\\(.\\)\s" el)
(match-string 1 el
(insert-button (format "%s" el)
   'action (lambda (x) 
 (interactive) 
 (ext-chars-choose-action buf 
char)))
(insert "\n\n")))
ext-chars-list-final)
  (pop-to-buffer temp-buf)
  (goto-char (point-min))
  (view-mode)
#+end_src

-- 
--
--
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com





Re: [PATCH] Documentation and NEWS for ` org-latex-language-alist'

2022-08-16 Thread Juan Manuel Macías
Hi, Ihor. Sorry for my late reply. These last few days have been a bit
complicated for me due to work issues.

Ihor Radchenko writes:

> I feel like we should first describe what #+LANGUAGE keyword does and
> go into the gory details of LaTeX language support a bit later.
>
> Basically, I am asking you to reshuffle paragraphs a bit possibly moving
> some parts to more relevant 13.10.3 LaTeX header and sectioning
> structure. People have no idea about #+LATEX_HEADER when reading 13.10.2
> LaTeX specific export settings (coming before the 13.10.3).

I am attaching a new version of the patch.

Addendum: Just as I was going to send this email, I saw the other email
from Maxim in this thread, who says:

> Firefox may block downloading of a file through unencrypted http:
> protocol if a link is opened from a https: page (HTML version of the
> Org manual served from orgmode.org this case). The problem with CTAN
> mirrors is that not all hosts have TLS certificates including their
> CTAN names.

I can't figure out how to link to the babel documentation in a way other
than a link to CTAN. If this might be an inconvenience (due to https
issues), perhaps we could simply put in the documentation something like
'see the Babel docs', or referencing the command 'texdoc -M
babel', which opens the locally installed babel documentation. The
problem is that not all GNU/Linux distributions include the
documentation in their versions of TeX live. For example, Arch Linux
does not include documentation in the official repos and must be
installed separately via an AUR package.

Best regards,

Juan Manuel 

-- 
--
--
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com

>From 46192df70cd00e2eca2e8e059e9d39723b9d32d8 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias 
Date: Tue, 16 Aug 2022 15:41:22 +0200
Subject: [PATCH] doc/org-manual.org: documentation for
 `org-latex-language-alist'

* etc/ORG-NEWS: update the news with the new variable.
---
 doc/org-manual.org | 58 --
 etc/ORG-NEWS   | 13 +++
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 466718e6e..8973f08ce 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13370,15 +13370,21 @@ general options (see [[*Export Settings]]).
 - =LANGUAGE= ::
   #+cindex: @samp{LANGUAGE}, keyword
   #+vindex: org-latex-packages-alist
+  #+vindex: org-latex-language-alist
+  
+  The list of languages supported by Org is stored in the variable
+  ~org-latex-language-alist~.
+
   In order to be effective, the =babel= or =polyglossia=
   packages---according to the LaTeX compiler used---must be loaded
   with the appropriate language as argument.  This can be accomplished
   by modifying the ~org-latex-packages-alist~ variable, e.g., with the
-  following snippet:
+  following snippet (note that =polyglossia= does not work with
+  pdfLaTeX):
 
   #+begin_src emacs-lisp
   (add-to-list 'org-latex-packages-alist
-   '("AUTO" "babel" t ("pdflatex")))
+   '("AUTO" "babel" t ("pdflatex" "xelatex" "lualatex")))
   (add-to-list 'org-latex-packages-alist
'("AUTO" "polyglossia" t ("xelatex" "lualatex")))
   #+end_src
@@ -13508,6 +13514,54 @@ A sample Org file with the above headers:
   some more text
 #+end_example
 
+#+cindex: @samp{LANGUAGE}, keyword
+#+vindex: org-export-default-language
+LaTeX packages =babel= or =polyglossia= can also be loaded in a
+document.  The "AUTO" string will be replaced in both cases by the
+appropiate value for the =LANGUAGE= keyword, if present in the
+document, or by the value of ~org-export-default-language~.  Let's see
+some examples in one or another case.
+
+=Babel= accepts the classic syntax and (in addition) the new syntax
+with the =\babelprovide= command to load the languages using the new
+=INI= files procedure.  Keep in mind that there are a number of
+languages that are only served in babel using =INI= files, so they
+cannot be declared using the classic syntax, but only using the
+=\babelprovide= command (see
+http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf).
+Valid usage examples could be:
+
+#+begin_example
+,#+LATEX_HEADER: \usepackage[french,italian,AUTO]{babel}
+#+end_example
+
+where "AUTO" is the main language.  But it can also be loaded using
+the =\babelprovide= command:
+
+#+begin_example
+,#+LATEX_HEADER: \usepackage[french,italian]{babel}
+,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
+#+end_example
+
+=Polyglossia=, for this procedure to be effective, must be loaded
+using the same =babel= classic syntax (but note that /this is not/
+the actual polyglossia syntax).  For example, suppose a document
+declares Polytonic Greek as the primary language, and French as the
+secondary language.  In this case, it would be expressed as:
+

Re: :session for Julia in org babel?

2022-08-16 Thread Fraga, Eric
On Wednesday, 10 Aug 2022 at 15:10, Ihor Radchenko wrote:
> This looks like a bug in ess itself.

[...]

> Please report to ESS devs.

After discussion with Stephen Eglen on the ESS mailing list, he gave me
a single line of elisp to add to ob-julia.el for sessions to work and
noted that the Julia installation must have two specific packages
available (I'm not sure why that is).  See attached patch (which
includes a URL for the archive of the email thread).

thank you,
eric

-- 
: Eric S Fraga, with org release_9.5.4-737-gd3a9c4 in Emacs 29.0.50
From 8847c86ae29d8065353e8f75793d917bf615637e Mon Sep 17 00:00:00 2001
From: Eric S Fraga 
Date: Tue, 16 Aug 2022 13:23:18 +0100
Subject: [PATCH] lisp/ob-julia.el: Fix session support for Julia

* ob-julia.el (org-babel-julia-evaluate-session, commentary): Add line
to initialize ESS so that Julia sessions work.  Also added text in
commentary about Julia packages that sessions require.  Fix
contributed by Stephen Eglen.  See discussion:
https://stat.ethz.ch/pipermail/ess-help/2022-August/013113.html.
---
 lisp/ob-julia.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
index 7f25fafad..a8a832cc4 100644
--- a/lisp/ob-julia.el
+++ b/lisp/ob-julia.el
@@ -26,6 +26,9 @@
 ;; Org-Babel support for evaluating julia code
 ;;
 ;; Based on ob-R.el by Eric Schulte and Dan Davison.
+;;
+;; Session support requires the installation of the DataFrames and CSV
+;; Julia packages.
 
 ;;; Code:
 (require 'cl-lib)
@@ -280,6 +283,7 @@ last statement in BODY, as elisp."
   (cl-case result-type
 (value
  (with-temp-buffer
+   (setq ess-local-customize-alist t)
(insert (org-babel-chomp body))
(let ((ess-local-process-name
 	  (process-name (get-buffer-process session)))
-- 
2.30.2



Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Ihor Radchenko
> Testing of `encode-time' version by running it on
each macro expansion can hardly be called optimal.

It will mostly impact the compile time. If you wish, you may wrap the
version check and the `encode-time' test into `eval-when-compile'

On Tue, Aug 16, 2022 at 8:44 PM Max Nikulin  wrote:

> On 16/08/2022 18:55, Ihor Radchenko wrote:
> > Max Nikulin writes:
> >
> >>> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
> >>>
> >>> I just pushed a workaround that should hopefully fix the issue.
> >>
> >> Is there a chance that `eval-when-compile' around the original
> >> definition will help? Sorry, I am still avoiding setting up of
> >> development environment for emacs.
> >
> > It could, but I took a different approach.
> > See
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261
>
> Thank you for the fix. I asked about `eval-when-compile' because lack of
> it may be my mistake and with hope to find a workaround with no
> performance impact. Testing of `encode-time' version by running it on
> each macro expansion can hardly be called optimal.
>
>
>


Re: :session for Julia in org babel?

2022-08-16 Thread Ihor Radchenko
"Fraga, Eric"  writes:

>> Please report to ESS devs.
>
> After discussion with Stephen Eglen on the ESS mailing list, he gave me
> a single line of elisp to add to ob-julia.el for sessions to work and
> noted that the Julia installation must have two specific packages
> available (I'm not sure why that is).  See attached patch (which
> includes a URL for the archive of the email thread).

Thanks!
Can you also update
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-julia.html?
(https://git.sr.ht/~bzg/worg/)

>  (value
>   (with-temp-buffer
> +   (setq ess-local-customize-alist t)

This will set the variable globally. You may want setq-local instead.

-- 
Ihor Radchenko,
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



Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Max Nikulin

On 16/08/2022 18:55, Ihor Radchenko wrote:

Max Nikulin writes:


This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746

I just pushed a workaround that should hopefully fix the issue.


Is there a chance that `eval-when-compile' around the original
definition will help? Sorry, I am still avoiding setting up of
development environment for emacs.


It could, but I took a different approach.
See 
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261


Thank you for the fix. I asked about `eval-when-compile' because lack of 
it may be my mistake and with hope to find a workaround with no 
performance impact. Testing of `encode-time' version by running it on 
each macro expansion can hardly be called optimal.





Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Ihor Radchenko
Max Nikulin  writes:

>> This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746
>> 
>> I just pushed a workaround that should hopefully fix the issue.
>
> Is there a chance that `eval-when-compile' around the original 
> definition will help? Sorry, I am still avoiding setting up of 
> development environment for emacs.

It could, but I took a different approach.
See 
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d3a9c424ba32382fff1da4f4ecb447dc99205261

-- 
Ihor Radchenko,
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



Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Max Nikulin

On 16/08/2022 16:20, Ihor Radchenko wrote:

Duy Nguyen writes:


Initially, when I generate an ~org-clock-report~ table it works just fine.
However, at some random point it stops working and just gives me the
following error: "Invalid function: org-encode-time". Not sure if I
explained it well, so here is a short video 
to show what is happening (I am continuously pressing C-c to refresh the
org clock table).


This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746

I just pushed a workaround that should hopefully fix the issue.


Is there a chance that `eval-when-compile' around the original 
definition will help? Sorry, I am still avoiding setting up of 
development environment for emacs.






Re: svg file from tikz picture

2022-08-16 Thread reza
> I do not think that ob-latex code has much to add into ox-latex.
> What I was referring to is the giant `cond' form in
> org-babel-execute:latex, which produces different LaTeX templates
> depending on the output file extension.
> 
> The ob-latex templates should probably remain specific to ob-latex since
> they are tailored to produce (usually one-page) documents from short
> LaTeX snippets.

Yes of course, sorry I confused stuff, the TODO item was referring to 
producing PDF vs SVG not ob-latex vs ox-latex




OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Re: svg file from tikz picture

2022-08-16 Thread Ihor Radchenko
reza  writes:

>> It is a part of the same infrastructure, but the LaTeX templates for 
>> html/pdf/svg/tiks export are different for some reason. There is even a 
>> TODO comment in the code saying that things should better be unified. Alas.
>> 
>> Patches improving the situation are always welcome.
>
> Where would I put combined code for ox-latex.el and ob-latex.el?

I do not think that ob-latex code has much to add into ox-latex.
What I was referring to is the giant `cond' form in
org-babel-execute:latex, which produces different LaTeX templates
depending on the output file extension.

The ob-latex templates should probably remain specific to ob-latex since
they are tailored to produce (usually one-page) documents from short
LaTeX snippets.

-- 
Ihor Radchenko,
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



Re: svg file from tikz picture

2022-08-16 Thread reza
> It is a part of the same infrastructure, but the LaTeX templates for 
> html/pdf/svg/tiks export are different for some reason. There is even a 
> TODO comment in the code saying that things should better be unified. Alas.
> 
> Patches improving the situation are always welcome.

Where would I put combined code for ox-latex.el and ob-latex.el?


OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Re: svg file from tikz picture

2022-08-16 Thread Ihor Radchenko
> why is this handled differently, should it at least use part of the same
infrastructure?

It is a part of the same infrastructure, but the LaTeX templates for
html/pdf/svg/tiks export are different for some reason. There is even a
TODO comment in the code saying that things should better be unified. Alas.

Patches improving the situation are always welcome.


On Tue, Aug 16, 2022 at 6:20 PM reza  wrote:

> > AFAIU, the news entry is about LaTeX export (ox-latex.el). Here, we are
> > talking about LaTeX babel backend, which is a different implementation
> > (ob-latex.el).
> >
> > In any case, I can reproduce on the latest main.
>
> why is this handled differently, should it at least use part of the same
> infrastructure?
> It seems to be a bug then...
>


Re: svg file from tikz picture

2022-08-16 Thread reza
> AFAIU, the news entry is about LaTeX export (ox-latex.el). Here, we are
> talking about LaTeX babel backend, which is a different implementation
> (ob-latex.el).
> 
> In any case, I can reproduce on the latest main.

why is this handled differently, should it at least use part of the same 
infrastructure?
It seems to be a bug then...


OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Re: svg file from tikz picture

2022-08-16 Thread Ihor Radchenko
reza  writes:

>> svg generation takes a completely different code branch compared to pdf
>> in ox-latex.el. I am not sure why. Hopefully, someone more familiar with
>> ox-latex and LaTeX in general can chime in.
>
> Just found this in the source [1], maybe it is already fixed?
> https://github.com/bzg/org-mode/blob/b428839f1b5b772d391c1e6bdd80e3f5e23b4441/etc/ORG-NEWS#L768

AFAIU, the news entry is about LaTeX export (ox-latex.el). Here, we are
talking about LaTeX babel backend, which is a different implementation
(ob-latex.el).

In any case, I can reproduce on the latest main.

-- 
Ihor Radchenko,
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



Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Duy Nguyen
>
> I just pushed a workaround that should hopefully fix the issue.
>

Thanks Ihor, it seems to work for me now! Before when I evaluated
~(org-matcher-time "<2022-08-15 Mon 00:00>")~ manually it would give me the
error, however I don't have it anymore with the latest main branch.

Duy


Re: svg file from tikz picture

2022-08-16 Thread reza
> svg generation takes a completely different code branch compared to pdf
> in ox-latex.el. I am not sure why. Hopefully, someone more familiar with
> ox-latex and LaTeX in general can chime in.

Just found this in the source [1], maybe it is already fixed?

[1] 
https://github.com/bzg/org-mode/blob/b428839f1b5b772d391c1e6bdd80e3f5e23b4441/etc/ORG-NEWS#L768


OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys


OpenPGP_signature
Description: PGP signature


Re: svg file from tikz picture

2022-08-16 Thread Ihor Radchenko
reza  writes:

> when running the following code
>
> #+header: :file "absolute-distance.pdf"
> #+header: :results file drawer :exports results :fit yes :border 0cm
> #+header: :headers '("\\usepackage{tikz}")
> #+begin_src latex
>\usetikzlibrary{positioning}
>\begin{tikzpicture}
>  \node[circle,fill,label=above:$P_1$,node font=\Large] (point1) at 
> (0,0) {};
>  \node[circle,fill,label=above:$P_2$,node font=\Large] (point2) at 
> (3,0) {};
>  \draw[latex-latex] (point1) -- (point2);
>\end{tikzpicture}
> #+end_src
>
> everything runs fine and a pdf file gets produced. But when I change the 
> file header to "absolute-distance.svg" an error occurs and no output 
> gets produced. Find attached the tex file and the log of the compilation.

Confirmed.

svg generation takes a completely different code branch compared to pdf
in ox-latex.el. I am not sure why. Hopefully, someone more familiar with
ox-latex and LaTeX in general can chime in.

-- 
Ihor Radchenko,
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



Re: Potential bug: Invalid function: org-encode-time

2022-08-16 Thread Ihor Radchenko
Duy Nguyen  writes:

> Initially, when I generate an ~org-clock-report~ table it works just fine.
> However, at some random point it stops working and just gives me the
> following error: "Invalid function: org-encode-time". Not sure if I
> explained it well, so here is a short video 
> to show what is happening (I am continuously pressing C-c to refresh the
> org clock table).

This is Emacs bug. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56746

I just pushed a workaround that should hopefully fix the issue.

-- 
Ihor Radchenko,
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



Fwd: Re: Typo in info pages

2022-08-16 Thread edgar




 Original Message 
Subject: Re: Typo in info pages
Date: 2022-08-16 06:08
From: Philip Kaludercic 
To: ed...@openmail.cc

ed...@openmail.cc writes:


I stored this link with Org (mode):
[[info:org#Formula syntax for Calc]]

There, one can find

if(typeof(vmean($1..$7)) =​= 12, string(""), vmean($1..$7); E’

which I believe that should be

if(typeof(vmean($1..$7)) =​= 12, string(""), vmean($1..$7)); E’

Cheers!


You should probably send a message to emacs-orgmode@gnu.org about this.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to concatenate string to spreadsheet formula

2022-08-16 Thread edgar

On 2022-08-15 14:40, Fraga, Eric wrote:

Hi Edgar,

I did not quite understand what you actually were calculating but maybe
consider the following expression for table formulas:

#+TBLFM: $3='(format "%s\\textwidth" (/ (* 1.0 $2) $1));N

If you specify ";N", the entries are treated as numbers.  The problem
with division is that if both numbers are integers, integer division is
used so I multiply one of the arguments by 1.0 to ensure floating point
numbers.

HTH,
eric


Aha! Thank you very much.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!