Re: [PATCH] Delete some Emacs 24 compat code

2022-08-11 Thread Bastien
Ihor Radchenko  writes:

> Sounds reasonable, though we might emphasize a bit more that it is
> relevant to the latest Org from ELPA/git.
>
> We have
>
>If, for one reason or another, you want to install Org on top of this
> pre-packaged version, you can use the Emacs package system or clone
> Org’s git repository.
>
> Adding the information that Org from ELPA/git is only compatible with
> certain Emacs versions is important.

I tried something in https://git.sr.ht/~bzg/org-mode/commit/b428839f
but feel free to enhance the wording if needed.

-- 
 Bastien



Re: [PATCH] ob-tangle.el: fix ‘:comments noweb’ double linking

2022-08-11 Thread Hraban Luyat


On 8/11/22 12:26 AM, Ihor Radchenko wrote:
> Hraban Luyat  writes:
>
>>> Is there any problem with the following?
>>>
>>> (alist-get :tangle params)
>>
>> This bit of code was moved, I didn't write it. The original code uses a
>> variable `src-tfile' which isn't available here, so I reused the
>> definition of that variable (which is (cdr (assq yada yada))). When
>> creating this patch, I tried to change as little as possible, to keep
>> everything the same as much as I can. Don't write new code, just move
>> existing code around.
>>
>> The (cdr (assq ..)) is used in some other places, too; maybe it's worth
>> a separate refactor if we want to change that? I'd rather keep this
>> patch as isolated as possible.
>
> I suspect that alist-get was not there in Emacs 24.
> Otherwise, alist-get with no optional parameters is just a wrapper for
> (cdr (assq...))
>
> We can change it, though I do not see this as a big problem.
>
>> @Ihor: I have rebased the patch and attached it.
>
> Sorry, but the patch still does not apply on my side onto the current
> main branch.

Just rebased and recreated it. Based off
6acc58c9c6bcfd45dcc5964cac7e3df8347121cc.

@Max: what do you think of when-let? That seems more appropriate for
this situation. Thoughts?

>
> --
> 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/yantar92From 0c89c48a80b0095c40a1c4c478fdfd581e0110fd Mon Sep 17 00:00:00 2001
From: Hraban Luyat 
Date: Mon, 8 Aug 2022 16:58:05 -0400
Subject: [PATCH] =?UTF-8?q?ob-tangle.el:=20fix=20=E2=80=98:comments=20nowe?=
 =?UTF-8?q?b=E2=80=99=20double=20linking?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/ob-tangle.el: Refactor the double implementation to a single
helper function.  This avoids the double link wrapping.

* testing/lisp/test-ob-tangle.el: Add unit tests.

Babel tangle allows inserting comments at the tangled site which link
back to the source in the org file.  This linking was implemented
twice, to handle separate cases, but when using ‘:comments noweb’ it
ended up going through both codepaths.  This resulted in doubly
wrapped links.

By refactoring all link generation into a single function, this double
wrapping is avoided.

Example file, /tmp/test.org:

* Inner
#+name: inner
#+begin_src emacs-lisp
2
#+end_src

* Main
#+header: :tangle test.el :comments noweb :noweb yes
#+begin_src emacs-lisp
1
<>
#+end_src

Before:

;; [[file:test.org::*Main][Main:1]]
1
;; file:/tmp/test.org::inner][inner]]][inner]]
2
;; inner ends here
;; Main:1 ends here

After:

;; [[file:test.org::*Main][Main:1]]
1
;; [[file:test.org::inner][inner]]
2
;; inner ends here
;; Main:1 ends here
---
 lisp/ob-tangle.el  | 62 +-
 testing/lisp/test-ob-tangle.el | 56 ++
 2 files changed, 87 insertions(+), 31 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 4b8fad6ce..4db0adda7 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -469,6 +469,33 @@ code blocks by target file."
 (mapcar (lambda (b) (cons (car b) (nreverse (cdr b
(nreverse blocks
 
+(defun org-babel-tangle--unbracketed-link (params)
+  "Get a raw link to the src block at point, without brackets.
+
+The PARAMS are the 3rd element of the info for the same src block."
+  (unless (string= "no" (cdr (assq :comments params)))
+(save-match-data
+  (let* (;; The created link is transient.  Using ID is not necessary,
+ ;; but could have side-effects if used.  An ID property may
+ ;; be added to existing entries thus creating unexpected file
+ ;; modifications.
+ (org-id-link-to-org-use-id nil)
+ (l (org-no-properties
+ (cl-letf (((symbol-function 'org-store-link-functions)
+(lambda () nil)))
+   (org-store-link nil
+ (bare (and (string-match org-link-bracket-re l)
+(match-string 1 l
+(when bare
+  (if (and org-babel-tangle-use-relative-file-links
+   (string-match org-link-types-re bare)
+   (string= (match-string 1 bare) "file"))
+  (concat "file:"
+  (file-relative-name (substring bare (match-end 0))
+  (file-name-directory
+   (cdr (assq :tangle params)
+bare))
+
 (defun org-babel-tangle-single-block (block-counter &optional only-this-block)
   "Collect the tangled source for current block.
 Return the list of block attributes needed by
@@ -485,20 +512,7 @@ non-nil, return the full association list to be used by
  

Re: [PERFORMANCE] Why some org code is so deep invoked?

2022-08-11 Thread Ihor Radchenko
"Christopher M. Miles"  writes:

> When I profiling Org Agenda generation, I found that org code is deeply 
> invoked in Emacs profiler report.
>
> My Question:
>
> - What reason caused this situation?
> - Can Org Mode optimize those deeply invoked code?

Could you please clarify what exactly is your problem?
Is agenda generation slow?
I do not see much issue with deep nesting of the code.

-- 
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



[PERFORMANCE] Why some org code is so deep invoked?

2022-08-11 Thread Christopher M. Miles

When I profiling Org Agenda generation, I found that org code is deeply invoked 
in Emacs profiler report.

My Question:

- What reason caused this situation?
- Can Org Mode optimize those deeply invoked code?

I have option ~org-agenda-start-with-clockreport-mode~ enabled. And have lot 
files in ~org-agenda-files~ list:

#+begin_src emacs-lisp
(length org-agenda-files)
#+end_src

#+RESULTS[(2022-08-12 08:29:28) 1c2c57fd8db39360b33abd3465e5ebb26c817627]:
: 46

And here is those files lines size:

#+begin_src emacs-lisp :results value verbatim
(sort
 (let ((return '()))
   (dolist (file org-agenda-files
 return)
 (when-let ((buffer (get-buffer (file-name-nondirectory file
   (with-current-buffer buffer
 (setf return
   (add-to-list 'return (count-lines (point-min) (point-max
 '>)
#+end_src

#+RESULTS[(2022-08-12 09:03:07) 2af183ec8f3ea19e280dc2c53e861b75c3e42b7a]:
: (25455 12361 11772 10938 9530 8506 4457 3752 2316 2041 1277 1216 1196 1163 
1006 1005 878 762 689 685 657 510 378 353 316 268 228 226 197 143 133 94 93 78 
68 46 44 39 38 36 34 20 18 17 14 0)

Here is the Emacs profiler reports in attachments:

1618  56% - command-execute
1618  56%  - call-interactively
1228  42%   - funcall-interactively
1224  42%- org-agenda
1224  42% - catch
1224  42%  - let*
1193  41%   - cond
1193  41%- call-interactively
1193  41% - funcall-interactively
1193  41%  - org-agenda-list
1193  41%   - catch
1119  39%- let*
1077  37% - if
1074  37%  - progn
1074  37%   - let
1073  37%- setq
1073  37% - apply
1073  37%  - org-clock-get-clocktable
1073  37%   - let
1073  37%- save-current-buffer
1073  37% - unwind-protect
1073  37%  - progn
1072  37%   - org-update-dblock
1072  37%- save-excursion
1072  37% - let*
1069  37%  - funcall
1069  37%   - org-dblock-write:clocktable
1069  37%- catch
1069  37% - let*
1033  36%  - org-agenda-prepare-buffers
1033  36%   - let
1032  35%- let
1032  35% - while
1032  35%  - let
1032  35%   - catch
1032  35%- save-current-buffer
 999  34% - save-excursion
 999  34%  - save-restriction
 577  20%   - or
 547  19%- 
org-refresh-stats-properties
 547  19% - let*
 547  19%  - unwind-protect
 547  19%   - progn
 547  19%- let
 547  19% - save-excursion
 547  19%  - save-excursion
 547  19%   - 
save-restriction
 547  19%- let
 537  18% - progn
 537  18%  - let*
 537  18%   - let
 537  18%- while
 537  18% - let
 536  18%  - cond
 459  16%   - if
 459  16%- progn
 459  16% - let
 443  15%  - 
unwind-protect
 443  15%   - 
progn
 441  15%- 
if
 441  15% - 
if
 441  15%  
- and
 437  15%   

Re: how to beamer export overlay figure?

2022-08-11 Thread Max Nikulin

On 10/08/2022 23:39, edgar wrote:


#+latex: \includegraphics<2->[height=0.5\regheight]{example-image-a}

That is: replacing the =#+latex:= line with a =[[file:figure.png]]= 
which allows for overlays with Beamer. I already tried some stuff, but I 
think that it would only be noise to add it here. Thanks!


I have not tried it, but the manual suggests

#+ATTR_BEAMER: :overlay <2->

Does it work for lists only and not for images?

info "(org) Beamer specific syntax" 
https://orgmode.org/manual/Beamer-specific-syntax.html





Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 14:06, Fraga, Eric wrote:

On Thursday, 11 Aug 2022 at 13:05, ed...@openmail.cc wrote:

(the <2-> is within the square brackets).


Ooops.  Sorry about that.  Didn't look closely enough at the LaTeX
created.  My bad.

In that case, I'm out of suggestions other than to put the <2-> on the
list entry itself (which I believe is possible) or as an option for a
block that only contains the figure?


Thank you for your time and the suggestions :) .

-
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: [PATCH] Re: Adding target and custom id links doesn't ask for description

2022-08-11 Thread Max Nikulin

On 10/08/2022 19:30, Carlos Pita wrote:


I suggest to set description to nil and thus ask the user in such
scenario.

I'm fine with that. Alternatively the default may be the target or 
custom id (that is, the same that is in the link part), again letting 
the user change it. Thanks!


Carlos, have you tried Ihor's patch? I like the intention, but I do not 
see any effect. If I read the code correctly, first chunk is for C-u 
C-u, second one for id, not CUSTOM_ID links. The latter works on the 
main branch: I am prompted to confirm heading title as description. So I 
am confused.


In my environment my patches:

Max Nikulin. Re: Bug: org-store-link uses CUSTOM_ID instead of target 
point. Sat, 6 Nov 2021 19:51:29 +0700. 
https://list.orgmode.org/e2c807a7-1924-6f08-9e63-4f70aee9d...@gmail.com


helps for #CUSTOM_ID and <> links. Heading title is offered in 
the first case and empty description in the latter.


P.S. The reason why file name is originally stored is that the link may 
be inserted to another file. When link is inserted to the same document, 
only target part is transformed to strip file name, description remains 
as it was stored.




Re: [PATCH] ob-tangle.el: fix ‘:comments noweb’ double linking

2022-08-11 Thread Max Nikulin

On 11/08/2022 03:54, Hraban Luyat wrote:

On 8/3/22 11:55 AM, Max Nikulin wrote:

Do you mean to rewrite

  (when bare (if x y bare))

to this?

  (and bare x y)

If that's what you meant, I think it would evaluate differently if bare
= truthy and x = falsy, right? Form 1 evaluates to `bare', form 2
evaluates to x (i.e. NIL). Or did I misunderstand the suggestion?


You are right. I tried to suggest an expression that was wrong.

I am going to make another attempt:

  (if (and bare
   org-babel-tangle-use-relative-file-links
   (string-match org-link-types-re bare)
   (string= (match-string 1 bare) "file"))
  (concat "file:"
  (file-relative-name (substring bare (match-end 0))
  (file-name-directory
   (cdr (assq :tangle params)
bare)

I do not think that such code is dramatically clearer, but at least it 
has 1 conditional form less.






Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)]

2022-08-11 Thread Max Nikulin

On 11/08/2022 11:19, Ihor Radchenko wrote:

Max Nikulin writes:


I slightly dislike the "___xx" compared to "__" because it will
create a proliferation of top-level folders as opposed to cramping the
non-standard IDs into a single "__" folder.


I believed that proliferation of folders is for purpose. Intermediate
directories allows to avoid excessive number of files in single
directory. ext4 with directory tree index usually is not the case, but
other filesystems may have rather poor performance when too much files
are stuffed into single folder. Some applications become really slow for
huge directories.


I was referring to TS style timestamp resolver here. It is designed to
group directories by creation time, not to distribute them homogeneously.


My bad, I have realizes that my idea of mapping

"x" -> "__x/x"
"xy" -> "_xy/xy"

was a really bad one. It leads to a separate directory for each short 
ID. However I still believe that the purpose of 
`org-attach-id-ts-folder-format' is avoid concentration of huge number 
of file in a single directory. Distribution of attachments over 
subdirectories is not perfectly even but it still works reasonably well 
for long-lasting projects while IDs follow assumed format and month is 
included into directory names.


Back to the original problem. First of all, I believe that if a user 
decided to use non-standard IDs then it is their responsibility to 
customize `org-attach-id-to-path-function-list' and to provide a 
function that implements alternative layout of attachment files. 
Depending on expected amount, they may be put into single directory, 
spread using some hash function, or accordingly to project structure. So 
today I am against default fallback directories especially in 
`org-attach-id-ts-folder-format'.


I believe that interaction between `org-attach-dir-from-id' and members 
of `org-attach-id-to-path-function-list' could be improved. If a too 
short ID is passed to `org-attach-id-uuid-folder-format', 
`org-attach-id-ts-folder-format', or a user-defined function, they may 
return nil and `org-attach-dir-from-id' should try next element from the 
list. If nothing succeeds then a user error should be signaled demanding 
to implement a strategy to properly deal with peculiar IDs.


There should be no problem to put single character IDs into a common 
directory (UUID case), but there are enough variants for 5 characters 
long names to create delayed performance problem. The worst case is when 
a user decides to use some common prefix, e.g. "id-" before UUID and all 
files go to the same directory. On the other hand I do not think that 
code should detect such cases.




Re: how to beamer export overlay figure?

2022-08-11 Thread Fraga, Eric
On Thursday, 11 Aug 2022 at 13:05, ed...@openmail.cc wrote:
> (the <2-> is within the square brackets).

Ooops.  Sorry about that.  Didn't look closely enough at the LaTeX
created.  My bad.

In that case, I'm out of suggestions other than to put the <2-> on the
list entry itself (which I believe is possible) or as an option for a
block that only contains the figure?

-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50


Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 09:51, Fraga, Eric wrote:

#+attr_latex: :options <2->
[[file:figure.png]]


Thanks. That creates

\begin{center}
\includegraphics[<2->,width=.9\linewidth]{example-image-a.png}
\end{center}

(the <2-> is within the square brackets).

GNU Emacs 28.1, Org 9.4.6. I did M-: (require 'ox-beamer)

-
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: [BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Emmanuel Charpentier
Le jeudi 11 août 2022 à 12:32 +, Fraga, Eric a écrit :
> On Thursday, 11 Aug 2022 at 13:51, Emmanuel Charpentier wrote:

[ Snip... ]

> > Why locally ?
> 
> In case you have different configurations.

Nice idea ! I was (still am) aiming at a "default configuration" I
could slap on my .init.el. But your idea  of local configuration might
go on document templates.

>   But if you are happy with
> this as a global value, just use setq instead.  I tend to configure
> each
> (large) org document with local settings so that they don't interfere
> with each other.

What about emacs' "custom" interface ? Do you use it ?

Thanks again !




Re: [BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Fraga, Eric
On Thursday, 11 Aug 2022 at 14:39, Emmanuel Charpentier wrote:
> What about emacs' "custom" interface ? Do you use it ?

I do but generally only for user interface aspects, e.g. appearance and
interaction, and not for document specific aspects like exporting and
publishing.

-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50


Re: [BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Fraga, Eric
On Thursday, 11 Aug 2022 at 13:51, Emmanuel Charpentier wrote:
> Aaaarghhh... You're right. This works perfectly.

Great!

> Why locally ?

In case you have different configurations.  But if you are happy with
this as a global value, just use setq instead.  I tend to configure each
(large) org document with local settings so that they don't interfere
with each other.

-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50


Re: [PATCH] Delete some Emacs 24 compat code

2022-08-11 Thread Ihor Radchenko
Bastien  writes:

> Ihor Radchenko  writes:
>
>> Should we document this workflow in
>> https://orgmode.org/worg/org-maintenance.html ?
>
> I slightly updated the page again, let me know if it's clear:
> https://orgmode.org/worg/org-maintenance.html

Thanks! LGTM!

>> Maybe we can add this information to the manual in the Installation
>> section?
>
> Yes, maybe just one sentence regarding Emacs compatibility like 
>
>   "Org releases are compatible with the latest three major Emacs
>   releases."
>
> with a footnote pointing to
> https://orgmode.org/worg/org-maintenance.html

Sounds reasonable, though we might emphasize a bit more that it is
relevant to the latest Org from ELPA/git.

We have

   If, for one reason or another, you want to install Org on top of this
pre-packaged version, you can use the Emacs package system or clone
Org’s git repository.

Adding the information that Org from ELPA/git is only compatible with
certain Emacs versions is important.

-- 
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: [BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Emmanuel Charpentier
Le jeudi 11 août 2022 à 09:48 +, Fraga, Eric a écrit :
> On Thursday, 11 Aug 2022 at 10:00, Emmanuel Charpentier wrote:
> > Since about a week, exporting directly to Beamer ceased to work.
> > See
> > the attached Minimal.org file :
> > Debugger entered--Lisp error: (wrong-type-argument sequencep 108)
> 
> org-latex-pdf-process should be a list of strings, not a string. 

Aaaarghhh... You're right. This works perfectly.
Old age is a wreckage...

> Also,
> I would not use custom-set-variables but simply set the value
> locally:
> 
> #+begin_src emacs-lisp :exports none :results silent
>   (require 'ox-beamer)
>   (setq-local org-latex-pdf-process
>  '("latexmk -shell-escape -f -pdf -%latex -
> interaction=nonstopmode -output-directory=%o %f"))
> #+end_src

Why locally ?
What's the point ?
I don't doubt that it exists, but I don't see it.

Anyway, thank you very much !

--
Emmanuel Charpentier
Now, where is that wakisashi ?...




Re: [BUG] org-get-buffer-tags no longer strips text properties

2022-08-11 Thread Ihor Radchenko
Anders Johansson  writes:

> Hi,
> Commit 819409 introduced a change where the text-properties of tags
> collected from a buffer are no longer stripped, which means tags may be
> fontified in unwanted ways in completing-read (this became especially ugly
> using org-modern and code for right aligning tags with display properties).
>
> Something like this would fix it:
> @@ -11974,7 +11974,7 @@ (defun org-get-buffer-tags ()
>  (org-element-cache-map
>   (lambda (el)
> (dolist (tag (org-element-property :tags el))
> - (puthash (list tag) t hashed
> + (puthash (list (substring-no-properties tag)) t hashed

Thanks for reporting!
Fixed on main via 6acc58c9c.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6acc58c9c6bcfd45dcc5964cac7e3df8347121cc

-- 
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: [PATCH] Delete some Emacs 24 compat code

2022-08-11 Thread Bastien
Ihor Radchenko  writes:

> Should we document this workflow in
> https://orgmode.org/worg/org-maintenance.html ?

I slightly updated the page again, let me know if it's clear:
https://orgmode.org/worg/org-maintenance.html

>>> If you are running an unsupported
>>> versions, either you should avoid updates or be prepared for breakage
>>> without warning. When we do know a commit has broken compatibility, that
>>> information will be relayed to the list, but we cannot guarantee we can
>>> provide such information at the time the change is committed. Running an
>>> unsupported versions is at your own risk.
>>
>> Yes, thanks for articulating this very clearly.
>
> Maybe we can add this information to the manual in the Installation
> section?

Yes, maybe just one sentence regarding Emacs compatibility like 

  "Org releases are compatible with the latest three major Emacs
  releases."

with a footnote pointing to
https://orgmode.org/worg/org-maintenance.html

Thanks,

-- 
 Bastien



Re: [BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Fraga, Eric
On Thursday, 11 Aug 2022 at 10:00, Emmanuel Charpentier wrote:
> Since about a week, exporting directly to Beamer ceased to work. See
> the attached Minimal.org file :
> Debugger entered--Lisp error: (wrong-type-argument sequencep 108)

org-latex-pdf-process should be a list of strings, not a string.  Also,
I would not use custom-set-variables but simply set the value locally:

#+begin_src emacs-lisp :exports none :results silent
  (require 'ox-beamer)
  (setq-local org-latex-pdf-process
 '("latexmk -shell-escape -f -pdf -%latex -interaction=nonstopmode 
-output-directory=%o %f"))
#+end_src

-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50


Re: how to beamer export overlay figure?

2022-08-11 Thread Fraga, Eric
On Wednesday, 10 Aug 2022 at 16:39, ed...@openmail.cc wrote:
> That is: replacing the =#+latex:= line with a =[[file:figure.png]]=
> which allows for overlays with Beamer. I already tried some stuff, but I
> think that it would only be noise to add it here. Thanks!

Try

#+attr_latex: :options <2->
[[file:figure.png]]

Seems to work for me.
-- 
: Eric S Fraga, with org release_9.5.4-720-g4db67d in Emacs 29.0.50


[BUG] org-get-buffer-tags no longer strips text properties

2022-08-11 Thread Anders Johansson
Hi,
Commit 819409 introduced a change where the text-properties of tags
collected from a buffer are no longer stripped, which means tags may be
fontified in unwanted ways in completing-read (this became especially ugly
using org-modern and code for right aligning tags with display properties).

Something like this would fix it:
@@ -11974,7 +11974,7 @@ (defun org-get-buffer-tags ()
 (org-element-cache-map
  (lambda (el)
(dolist (tag (org-element-property :tags el))
- (puthash (list tag) t hashed
+ (puthash (list (substring-no-properties tag)) t hashed

Best,
Anders Johansson


[BUG](?) Export to beamet recently stopped working.

2022-08-11 Thread Emmanuel Charpentier
Dear list,

Since about a week, exporting directly to Beamer ceased to work. See
the attached Minimal.org file :

 - This file exports perfectly to a LaTeX file (via C-c C-e l b).

 - The resulting Minimal.tex exports perfectly to Minimal.pdf.

 - Trying to export directly to PDF via C-c C-e l P fails ; content of
the *Messages* buffer :

-
Saving file /home/charpent/Boulot/Cellule
Innovation/BayesDec/Minimal.tex...
Wrote /home/charpent/Boulot/Cellule Innovation/BayesDec/Minimal.tex
Processing LaTeX file Minimal.tex...
Wrong type argument: sequencep, 108
-

 - Ditto when exporting to PDF via C-c C-e l p (= export to PDF withot
making frames at header level 2).

Retrying Beamer PDF export with debug-on-error set to t gives me the
following backtrace :

-
Debugger entered--Lisp error: (wrong-type-argument sequencep 108)
  replace-regexp-in-string("%\\(?:\\(?:bib\\|la\\)tex\\|bib\\)\\>"
#f(compiled-function (m) #) 108)
  #f(compiled-function (command) #)(108)
  mapcar(#f(compiled-function (command) #)
"latexmk -shell-escape -f -pdf -%latex -interaction...")
  org-latex-compile("Minimal.tex")
  org-export-to-file(beamer "Minimal.tex" nil nil nil nil nil org-
latex-compile)
  org-beamer-export-to-pdf(nil nil nil nil)
  org-export-dispatch(nil)
  funcall-interactively(org-export-dispatch nil)
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)
-

which isn't very helpful... Any hint would be welcome.

Sincerely yours,

--
Emmanuel Charpentier

PS : CC me would be appreciated : I'm not on the list, and read it via
the archive...

# Pour débugguer l'exportation Beamer

#+begin_src emacs-lisp :exports none :results silent
  (require 'ox-beamer)
  (custom-set-variables
   '(org-latex-pdf-process
 "latexmk -shell-escape -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"))
#+end_src


#+language: fr
#+options: tex:t toc:nil H:2
# #+latex_compiler: lualatex
#+latex_compiler: latexmk
#+PANDOC_OPTIONS: pdf-engine:latexmk
#+PANDOC_OPTIONS: pdf-engine-opt=-shell-escape
#+PANDOC_OPTIONS: standalone:t 
#+property: header-args:sage :session

#+latex_compiler: lualatex
#+latex_class: beamer
#+latex_class_options: [french]
#+latex-header: \usetheme{AnnArbor}
#+latex-header: \usefonttheme{professionalfonts}
#+Latex_header: \usepackage{fontspec}
#+latex_header: \usepackage{unicode-math}
#+latex_header: \setsansfont{Fira Sans}
#+latex_header: \setmathfont{Fira Math}
#+latex_header: \usepackage{babel}
#+latex_header: \usepackage[newfloat]{minted}

#+title: Essais ~beamer~ de ~org~.
#+subtitle: Un orteil dans l'Arctique...