Re: [RFC] The best way to choose an "action" at point: context-menu-mode, transient, which-key or embark?

2025-01-28 Thread Ihor Radchenko
Tor-björn Claesson  writes:

>> So, my tentative plan is the following:
>>
>> 1. You finish your patch for org-cite
>> 2. We will slightly generalize the patch, so that it can be used outside
>>org-cite context (should not be too hard)
>> 3. We will look into converting transient menu layout into context menu
>>keymaps and into which-key layout to see how it can work
>
> Sound good!
>
> 1. Here is the current version. The difference from the previous one is
> that the default action is customizeable.
>
> I have been testing this a bit geting an article through peer review,
> and it seens to work quite well=)

Thanks!
Here are more comments:

1. I am looking at C-- C-u prefix, and I am not sure if it is ideal
   What I think might be better is:
   - make a short C-- ('- argument) the switch
   - make the switch customizable (if users do not like C--)

2. DOI copy command will err without user-readable message if there is
   no DOI in a given BibTeX record. Instead, a user-error should be displayed

3. I think we should add "browse URL/DOI" command to the default
   menu. Also, "copy URL" - that makes sense as a companion to DOI (some
   references only have URL, but no DOI)

4. Moving towards my item (2) in the plan, we need to generalize
   (transient-define-prefix org-cite-basic-follow ...) into a macro that
   can work for arbitrary command; not just for `org-cite-basic-follow'.
   Let me know if you want my help on how to write such a macro.

5. If we are going to have multiple commands with menu+menuless
   versions, it probably makes sense to create a minor mode that will
   enable/disable menus everywhere. In other words, instead of
   individual commands having dedicated option like
   `org-cite-basic-follow-ask', we make a minor mode that can be
   enabled/disabled. That minor mode will have a global customization
   that will list which commands should use menus.

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



Re: Babel Forth

2025-01-28 Thread Ihor Radchenko
"Thomas S. Dye"  writes:

> I pushed Forth documentation to the Worg repo,

Thanks!
I have 2 comments:

> +Babel evaluates Forth code blocks in an inferior Forth process.
> +You can start an inferior Forth process with =M-x run-forth=.

Does it mean that users _must_ run M-x run-forth? Otherwise, I am not
sure why this paragraph is present.

> +#+begin_example
> +,#+begin_src forth :exports both
> +." Hello World!"
> +,#+end_src
> +#+end_example
> +
> +#+begin_src forth :exports both
> +." Hello World!"

This will export into 3! snippets. I feel that
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-forth.html
is confusing. Maybe we just put both the code and result into verbatim
example, as in
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html

> ...but saw a build 
> error that I don't know how to fix.

Savannah was under DDoS making our WORG build script fail when it
attempted to clone org-mode git repo. Should be OK now, AFAIK.

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



Re: [BUG] Latex exporter should consider export settings [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]

2025-01-28 Thread Antero Mejr
Pedro Andres Aranda Gutierrez  writes:

> attached is a fix for the reported BUG, including a couple of test cases

That seems to work, thanks. I attached a patch that handles
org-export-with-creator too.

It would be good if these fixes were also ported over to org-beamer,
since the same problem happens there.

>From 81106718ffd0c5341a5de03d0f0a615832d7d504 Mon Sep 17 00:00:00 2001
From: Antero Mejr 
Date: Tue, 28 Jan 2025 14:13:35 -0500
Subject: [PATCH] lisp/ox-latex.el: Obey :with-creator when exporting

* lisp/ox-latex.el (org-latex-template) Do not fill pdfcreator
hypersetup field when :with-creator is nil.
---
 lisp/ox-latex.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 409fa98cb..8884cf786 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2061,6 +2061,9 @@ holding export options."
  (unless (plist-get info :with-title)
;; Replace title *and* subtitle
(setq template (replace-regexp-in-string "%[ts]" "" template)))
+ (unless (plist-get info :with-creator)
+   ;; Replace creator
+   (setq template (replace-regexp-in-string "%c" "" template)))
  (format-spec template spec)))
  ;; engrave-faces-latex preamble
  (when (and (eq (plist-get info :latex-src-block-backend) 'engraved)
-- 
2.43.0



Re: Babel Forth

2025-01-28 Thread Thomas S. Dye

Ihor Radchenko  writes:


"Thomas S. Dye"  writes:


I pushed Forth documentation to the Worg repo,


Thanks!
I have 2 comments:

+Babel evaluates Forth code blocks in an inferior Forth 
process.

+You can start an inferior Forth process with =M-x run-forth=.


Does it mean that users _must_ run M-x run-forth? Otherwise, I 
am not

sure why this paragraph is present.


Thanks!
Edited to indicate a running Forth instance is needed to evaluate 
Forth code blocks.



+#+begin_example
+,#+begin_src forth :exports both
+." Hello World!"
+,#+end_src
+#+end_example
+
+#+begin_src forth :exports both
+." Hello World!"


This will export into 3! snippets. I feel that
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-forth.html
is confusing. Maybe we just put both the code and result into 
verbatim

example, as in
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html


Matt did a great job on ob-doc-shell.

I kind of like the 3 (not 3! :) snippets because they show the Org 
mode buffer, the code export, and the results export.  I feel this 
illustrates a lot of Babel capability.


Nevertheless, the multiple snippets are potentially confusing, so 
I've followed Matt's lead and changed to a single example block.


Hopefully, some Forth programmers can help flesh out this 
documentation stub.


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: [PATCH] Autoload org-link-set-parameters

2025-01-28 Thread Max Nikulin

On 26/01/2025 14:22, Joseph Turner wrote:

This change allows other packages to autoload their own link handlers.
See this mu4e issue:

https://github.com/djcb/mu/pull/2798


Sorry if I confused everything. Does it mean that loading of mu4e will 
cause immediate loading of ol and so whole org? Is it acceptable to use 
`with-eval-after-load' in packages?





Re: [BUG] Latex exporter should consider export settings [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]

2025-01-28 Thread Pedro Andres Aranda Gutierrez
BTW,

Antero writes:
> The \title{} section is also populated when `org-export-with-title` is
> nil.

In this case, we should also eliminate the \maketitle right?

Best, /PA

On Tue, 28 Jan 2025 at 08:31, Pedro Andres Aranda Gutierrez <
paag...@gmail.com> wrote:

> Antero writes:
> > When exporting a latex document using `org-latex-export-to-latex`, a
> > \hypersetup section is added that contains the author name and title,
> > even though the variables `org-export-with-title` and
> > `org-export-with-author` are nil.
> >
> > The \title{} section is also populated when `org-export-with-title` is
> > nil.
> >
> > I think the latex exporter should work like the HTML exporter, and
> > respect the `org-export-with-*` settings to suppress the export of those
> > commands.
> >
> > Emacs  : GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.41,
> > cairo version 1.18.0)
> >  of 2024-04-01, modified by Debian
> > Package: Org mode version 9.6.15 (release_9.6.15 @
> > /usr/share/emacs/29.3/lisp/org/)
>
> This is a good one... Working on it
>
> Best, /PA
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Headaches with a Juju log:
> unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
> a leader-deposed hook here, but we can't yet
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet


Re: [DISCUSSION] Contributing policy for WORG

2025-01-28 Thread Bastien Guerry
Hi Joseph,

Joseph Turner  writes:

>> What about gollum?
>>
>> https://github.com/gollum/gollum
>>
>> From what I understand, it would provide a way to let users modify Org
>> files by editing them from a web interface (without Git knowledge), on
>> top of rendering the .org files as HTML pages.
>
> Interesting project.  Would you want to allow contributions from anyone?
> Or would you need to set up auth also?  

If someone has the time to install a test-instance Gollum, then we can
experiment with it and see if it feels like a good way to open Worg to
more contributions. If sensible regarding spam and security, yes, I'd
like anyone to be able to contribute.

> I'm not sure if contributions automatically push master.

I'm not sure either, the experiment could tell.

-- 
 Bastien Guerry



Re: [ANN] Ihor is now officially the new Org maintainer

2025-01-28 Thread Max Nikulin

On 07/12/2024 15:19, Bastien wrote:


not much of a surprise, but very good news nonetheless: Ihor is now
officially in charge of maintaining Org Mode. He will need every Org
user to continue the great work he has done so far.


Should the admin/MAINTAINERS file in the Emacs repository be updated?

Actually lisp/org entry is duplicated there.

P.S. I just have noticed recent commits changing this file in the 
emacs-30 branch.




Re: [BUG] Latex exporter should consider export settings [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]

2025-01-28 Thread Pedro Andres Aranda Gutierrez
Hi,

attached is a fix for the reported BUG, including a couple of test cases

Best, /PA

On Tue, 28 Jan 2025 at 09:02, Pedro Andres Aranda Gutierrez <
paag...@gmail.com> wrote:

> BTW,
>
> Antero writes:
> > The \title{} section is also populated when `org-export-with-title` is
> > nil.
>
> In this case, we should also eliminate the \maketitle right?
>
> Best, /PA
>
> On Tue, 28 Jan 2025 at 08:31, Pedro Andres Aranda Gutierrez <
> paag...@gmail.com> wrote:
>
>> Antero writes:
>> > When exporting a latex document using `org-latex-export-to-latex`, a
>> > \hypersetup section is added that contains the author name and title,
>> > even though the variables `org-export-with-title` and
>> > `org-export-with-author` are nil.
>> >
>> > The \title{} section is also populated when `org-export-with-title` is
>> > nil.
>> >
>> > I think the latex exporter should work like the HTML exporter, and
>> > respect the `org-export-with-*` settings to suppress the export of those
>> > commands.
>> >
>> > Emacs  : GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version
>> 3.24.41,
>> > cairo version 1.18.0)
>> >  of 2024-04-01, modified by Debian
>> > Package: Org mode version 9.6.15 (release_9.6.15 @
>> > /usr/share/emacs/29.3/lisp/org/)
>>
>> This is a good one... Working on it
>>
>> Best, /PA
>> --
>> Fragen sind nicht da, um beantwortet zu werden,
>> Fragen sind da um gestellt zu werden
>> Georg Kreisler
>>
>> Headaches with a Juju log:
>> unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should
>> run a leader-deposed hook here, but we can't yet
>>
>>
>
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Headaches with a Juju log:
> unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
> a leader-deposed hook here, but we can't yet
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
From 46eedaf8c71446c2d12f5484ecced491ae7ae760 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" 
Date: Tue, 28 Jan 2025 10:59:12 +0100
Subject: [PATCH 2/2] Test last patch and announce it in ORG-NEWS

---

etc/ORG-NEWS: Announce fix for :with-title and :with-author
testing/lisp/test-ox-latex.el: Add to tests for fixed behaviour

* etc/ORG-NEWS: Announce fix for :with-title and :with-author
* testing/lisp/test-ox-latex.el: (test-ox-latex/with-title-nil)
Make sure the title is not included in the generated LaTeX if
:with-title is nil
(test-ox-latex/with-author-nil)
Make sure the author is not included in the generated LaTeX if
:with-author is nil

 etc/ORG-NEWS  |  7 ++
 testing/lisp/test-ox-latex.el | 44 +++
 2 files changed, 51 insertions(+)

Reported-by: "Antero Mejr"
Link: https://lists.gnu.org/archive/html/emacs-orgmode/2025-01/msg00313.html

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index cb2c16da8..7fa30223f 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -527,6 +527,13 @@ were tangled into a file named =NAME.bibtex=.  Now, they are tangled
 into a file named =FILE.bib=, using the standard extension =.bib=,
 matching the rest of the ecosystem, including BibTeX and LaTeX.
 
+*** =ox-latex=: fixed =:with-title= and =:with-author= handling
+
+The LaTeX exporter will not include the author in the resulting
+document if the =:with-author= property is ~nil~; the same will happen
+for =:with-title=. These properties are set with the
+~org-export-with-author~ and ~org-export-with-title~ global variables.
+
 * Version 9.7
 
 ** Important announcements and breaking changes
diff --git a/testing/lisp/test-ox-latex.el b/testing/lisp/test-ox-latex.el
index 892ac4437..be107f510 100644
--- a/testing/lisp/test-ox-latex.el
+++ b/testing/lisp/test-ox-latex.el
@@ -127,5 +127,49 @@ Column & Column 
  (search-forward
   "\\href{https://orgmode.org/worg/images/orgmode/org-mode-unicorn.svg}{\\includegraphics[width=.9\\linewidth]{/wallpaper.png}}";
 
+(ert-deftest test-ox-latex/with-title-nil ()
+  "Test suppressing title in exported LaTeX"
+  (let ((org-export-with-title nil))
+(org-test-with-exported-text
+ 'latex
+ "#+AUTHOR: me
+#+TITLE: Supressed
+
+* A test
+A wonderful text"
+ (goto-char (point-min))
+ (should-not
+  (search-forward "\\maketitle" nil t))
+ (goto-char (point-min))
+ (should-not
+  (search-forward "\\title{Suppressed}" nil t))
+ (goto-char (point-min))
+ (should-not
+  (search-forward "pdftitle={Suppressed}," nil t))
+ (goto-char (point-min))
+ (should
+  (search-forward "pdftitle={},"))
+ )))
+
+(ert-deftest test-ox-latex/with-author-nil ()
+  "Test suppressing author in exported LaTeX"
+  (let ((org-export-with-author nil))
+(org-test-with-exported-text
+ 'latex
+ "#+AUTHOR: me
+#+TITLE: Supressed
+

Re: [ANN] Ihor is now officially the new Org maintainer

2025-01-28 Thread Bastien Guerry
Hi Max,

Max Nikulin  writes:

> On 07/12/2024 15:19, Bastien wrote:
>> not much of a surprise, but very good news nonetheless: Ihor is now
>> officially in charge of maintaining Org Mode. He will need every Org
>> user to continue the great work he has done so far.
>
> Should the admin/MAINTAINERS file in the Emacs repository be updated?

Yes.

> Actually lisp/org entry is duplicated there.

Indeed, good catch. I've now removed this entry from Emacs master 
branch (commit c400ac680f4):

Bastien Guerry
Org
lisp/org/*
doc/misc/org.texi

Thanks!

-- 
 Bastien Guerry



Re: [DISCUSSION] Contributing policy for WORG

2025-01-28 Thread Joseph Turner
Bastien Guerry  writes:

> Hi Joseph,
>
> Joseph Turner  writes:
>
>>> What about gollum?
>>>
>>> https://github.com/gollum/gollum
>>>
>>> From what I understand, it would provide a way to let users modify Org
>>> files by editing them from a web interface (without Git knowledge), on
>>> top of rendering the .org files as HTML pages.
>>
>> Interesting project.  Would you want to allow contributions from anyone?
>> Or would you need to set up auth also?
>
> If someone has the time to install a test-instance Gollum, then we can
> experiment with it and see if it feels like a good way to open Worg to
> more contributions. If sensible regarding spam and security, yes, I'd
> like anyone to be able to contribute.

I think it's a worthy experiment.  Right now, I cannot volunteer to set
this up, but I'll be happy to test it out.

>> I'm not sure if contributions automatically push master.
>
> I'm not sure either, the experiment could tell.



Re: [BUG] Latex exporter should consider export settings [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]

2025-01-28 Thread Pedro Andres Aranda Gutierrez
Hi,

Thanks a lot. I would like a couple of days to look at the creator part 
specifically and adding this in to ox-Beamer. Or maybe even factoring out.

FTMB, let’s wait for Ihor’s reaction to this and discuss the pdfcreator part. 

The semantics behind is different. I happens to be the program that created the 
PDF.
Could you please expand on why you want to block that too?

Best, /PA

Enviado desde mi iPad

> El 28 ene 2025, a las 20:20, Antero Mejr  escribió:
> 
> Pedro Andres Aranda Gutierrez  writes:
> 
>> attached is a fix for the reported BUG, including a couple of test cases
> 
> That seems to work, thanks. I attached a patch that handles
> org-export-with-creator too.
> 
> It would be good if these fixes were also ported over to org-beamer,
> since the same problem happens there.
> 
> <0001-lisp-ox-latex.el-Obey-with-creator-when-exporting.patch>