Re: [orgweb/zh-CN] [DRAFT PATCH v7] Tentative zh-CN translation

2023-04-20 Thread General discussions about Org-mode.

Ihor Radchenko  writes:

> Ruijie Yu  writes:
>
>>> -org-mode-parser
>>> +/org-mode-parser/
>>>
>>> This probably belongs to the English version as well.
>>
>> Should the English version change belong to a new commit, unrelated to
>> the translation patchset?  Or would I just modify it in the same commit
>> where I translate zh-CN/tools.org?
>
> A separate commit would be cleaner. However, if it requires you to do too
> much unnecessary rebasing, we can postpone it until the main translation
> is merged.

I had planned to send an update email but forgot to actually send it..
Anyways, attached at the end of this message are all the commits in
master..v7.  As usual, it is also available on
https://git.sr.ht/~ruijieyu/orgweb/log/translate/zh-CN--v7.

---
What changed from v5?

The first patch (0001, a9fef16e) addresses the italicization and added a
period mentioned up-thread.

The copy-symlink patch (0003, 1b8b2f2f) and the patch on zh-CN/tools.org
(0008, 6b81da7c) are then adjusted accordingly.

On the postamble patch (0013, 0abd949), I translated the "unicorn" in
the alttext.

Then, we have this patch (0014, d448a30) that was part of another
thread, LGTM'd by Bastien, which converts `load' into `require' in
publish.sh.

The final patch (0016, 9c8a8d8) requires Bastien's attention (CC'd): it
is a patch on publish.sh which introduces a fallback definition to
`file-name-with-extension', then replaces ad-hoc use in the `dolist'
form into calling this function.  In addition, it replaces `find-file'
into `find-file-noselect' so that contributors who `eval-buffer' this
script can rest assured that no .org buffers will pop up on the right
side.

If necessary, I can rebase patches 0014 and 0016 onto current master so
that they can be installed separately.

---
Should there be more iterations needed, I will only post patches that
are new or changed in order to save bandwidth.  I will be (hopefully)
very clear in what remains, what gets replaced by what, and what is
removed, etc.

---
>From a9fef16eb3cdbebf380220a64c2285949f6510b8 Mon Sep 17 00:00:00 2001
From: Ruijie Yu 
Date: Mon, 17 Apr 2023 17:05:59 +0800
Subject: [PATCH 01/16] * tools.org (Parsers): italicize for consistency;
 sentence period

---
 tools.org | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools.org b/tools.org
index a2325ca..1b1c27c 100644
--- a/tools.org
+++ b/tools.org
@@ -118,7 +118,7 @@ Includes (primitive) system for literate programming.
 {{{link(/gioorgi.com/org-mode-parser/)}}}
 [[https://seeklogo.com/images/N/nodejs-logo-FBE122E377-seeklogo.com.png]]
 
-org-mode-parser
+/org-mode-parser/
 {{{end-link}}}
 ** Python
 {{{gh(karlicoss/orgparse)}}}
@@ -130,7 +130,7 @@ org-mode-parser
 {{{link(metacpan.org/release/Org-Parser)}}}
 [[https://upload.wikimedia.org/wikipedia/commons/f/f0/Cebolla_Chulita.png]]
 
-Org​::parser
+/Org​::parser/
 {{{end-link}}}
 ** Ruby
 {{{gh(bdewey/org-ruby)}}}
@@ -198,7 +198,7 @@ other makups to org.
 {{{gh(fasheng/vimwiki2org)}}}
 [[https://cdn.freebiesupply.com/logos/large/2x/vim-logo-png-transparent.png]]
 
-A simple tool to convert vimwiki file to Org
+A simple tool to convert vimwiki file to Org.
 {{{end-link}}}
 ** Exchange calenders
 {{{gh(kautsig/ews-orgmode)}}}
-- 
2.40.0

>From 549f5d50e8803e0f028f1a171f667da150e6d09f Mon Sep 17 00:00:00 2001
From: Ruijie Yu 
Date: Tue, 11 Apr 2023 23:19:42 +0800
Subject: [PATCH 02/16] * zh-CN/.gitignore: Added gitignore for output HTML
 files

---
 zh-CN/.gitignore | 5 +
 1 file changed, 5 insertions(+)
 create mode 100644 zh-CN/.gitignore

diff --git a/zh-CN/.gitignore b/zh-CN/.gitignore
new file mode 100644
index 000..d36543d
--- /dev/null
+++ b/zh-CN/.gitignore
@@ -0,0 +1,5 @@
+/features.html
+/index.html
+/manuals.html
+/quickstart.html
+/tools.html
\ No newline at end of file
-- 
2.40.0

>From 1b8b2f2fa76f2dd908146fea1df24def408f6982 Mon Sep 17 00:00:00 2001
From: Ruijie Yu 
Date: Tue, 11 Apr 2023 01:32:26 +0800
Subject: [PATCH 03/16] Copies and symlinks to initialize zh-CN

Symlinking zh-CN/Changes.org because translating it is not worth the effort due
to its size.

Symlinking zh-CN/elpa.org because this file is unreferenced in any language, so
it is not worth translating it.  See relevant discussion in
https://list.orgmode.org/87a5zeu136.fsf@localhost/.

* zh-CN/Changes.org: Symlink from Changes.org.
* zh-CN/LICENSE.org: Copy from LICENSE.org.
* zh-CN/elpa.org: Symlink from elpa.org.
* zh-CN/features.org: Copy from features.org.
* zh-CN/index.org: Copy from index.org.
* zh-CN/manuals.org: Copy from manuals.org.
* zh-CN/org-demo.html: Copy from org-demo.html.
* zh-CN/quickstart.org: Copy from quickstart.org.
* zh-CN/resources/fonts: Symlink from resources/fonts.
* zh-CN/resources/img: Symlink from resources/img.
* zh-CN/resources/js: Symlink from resources/js.
* zh-CN/resources/normal-outline-3.html: Symlink from
resources/normal-outline-3.html.
* zh-CN/resources/oembed.info.json: Symlink from resources/oembed.info.json.
* 

Re: Major mode of orgweb/publish.sh?

2023-04-20 Thread General discussions about Org-mode.


Bastien Guerry  writes:

> Ihor Radchenko  writes:
>
>>> Converted the `load' into `require' because it allows someone working on a 
>>> local
>>> repo to `eval-buffer' successfully, given that the individual installs these
>>> dependencies from GNU/NonGNU Elpa.  Previously, due to the hard-coded path,
>>> `eval-buffer' would not be successful.
>>
>> Looks reasonable, but I will let Bastien decide on this. He is the
>> author of this file.
>
> LGTM too!  Please go ahead, thanks,

Thanks, I'll include this part in my translation patchset if you don't
mind.

-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- still investigating.]



Re: [BUG] Org-LaTeX-export: >> and << (inside of ~code~/=verbatim=) gets exported to single monospace symbol instead of 2 monospace symbols [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]

2023-04-20 Thread Garid Z.


Ihor Radchenko  writes:

> "Garid Z."  writes:
>
>> | 3 | =>>>=| =<<<=|
>> | 4 | ==   | ==   |
>> ...
>> Resulted PDF file has » and « symbols (maybe: U+00BB, U+00AB)
>> instead of 2 normal < symbols.
>> ...
>> Solution for this might be almost identical with the previous fix.
>> Maybe something like:
>>
>> +(cond ((equal m ">>") ">{}>{}")
>> +(cond ((equal m "<<") "<{}<{}")
>
> Thanks for reporting!
> Fixed, on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=27ee55ebf

Glad that it helped

-- 
Garid Z.



Re: [BUG] Org-LaTeX-export: >> and << (inside of ~code~/=verbatim=) gets exported to single monospace symbol instead of 2 monospace symbols [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]

2023-04-20 Thread Max Nikulin

On 20/04/2023 22:00, Ihor Radchenko wrote:

Max Nikulin writes:


While \texttt is used, this source of bugs would not exhaust soon.


Maybe we can somehow use `org-latex--protect-text' in
`org-latex--protect-texttt'.


Unfortunately it does not cover the case of babel shortcuts like "<">.





Re: [BUG] Org-LaTeX-export: >> and << (inside of ~code~/=verbatim=) gets exported to single monospace symbol instead of 2 monospace symbols [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]

2023-04-20 Thread Ihor Radchenko
Max Nikulin  writes:

> While \texttt is used, this source of bugs would not exhaust soon.

Maybe we can somehow use `org-latex--protect-text' in
`org-latex--protect-texttt'.

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



Re: [BUG] Org-LaTeX-export: >> and << (inside of ~code~/=verbatim=) gets exported to single monospace symbol instead of 2 monospace symbols [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]

2023-04-20 Thread Max Nikulin

On 20/04/2023 21:18, Ihor Radchenko wrote:

+(cond ((equal m ">>") ">{}>{}")
+(cond ((equal m "<<") "<{}<{}")


Thanks for reporting!
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=27ee55ebf


While \texttt is used, this source of bugs would not exhaust soon.

Input:

#+language: ru
#+LATEX_HEADER: \usepackage[AUTO]{babel}
Test ="<">=

Output:

Test «»




Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-20 Thread Max Nikulin

On 17/04/2023 22:21, Ihor Radchenko wrote:

Matt writes:

I was able to resolve it by simply requiring `sh-script' in `org-src'.  
Committed and pushed.


Note that it will break Emacs 26.


org-protocol.el defines polyfill for `flatten-tree'.





Re: [BUG] Org-LaTeX-export: >> and << (inside of ~code~/=verbatim=) gets exported to single monospace symbol instead of 2 monospace symbols [9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/)]

2023-04-20 Thread Ihor Radchenko
"Garid Z."  writes:

> | 3 | =>>>=| =<<<=|
> | 4 | ==   | ==   |
> ...
> Resulted PDF file has » and « symbols (maybe: U+00BB, U+00AB)
> instead of 2 normal < symbols.
> ...
> Solution for this might be almost identical with the previous fix.
> Maybe something like:
>
> +(cond ((equal m ">>") ">{}>{}")
> +(cond ((equal m "<<") "<{}<{}")

Thanks for reporting!
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=27ee55ebf

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



Re: [RFC] Backend vs. back-end (was: 2 'echo' bash instructions produce a table)

2023-04-20 Thread Ihor Radchenko
Ihor Radchenko  writes:

> It looks like "backend" is more popular at the end.
>
> I will go for it everywhere unless there are objections.

Done on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f81ba451a

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



How to set priority of a heading with the highest one among its children

2023-04-20 Thread Edouard Debry


Given this tree :

* TODO Main [#2]
** DONE Child1 [#0]
** TODO Child2 [#3]
** TODO Child3 [#4]
*** TODO Subchild1 [#1]
*** TODO Subchild2 [#2]

I would like that the priority of parent headings be automatically set to the 
highest
priority among its note done children.

So, in previous example, as soon as Subchild1 priority is set to 1 (0=highest, 
5=lowest),
then priority of Child3 should be replaced by 1 (instead of 4) and priority of 
Main should
also be changed to 1 as this became the priority of its child Child3, but it 
would not
be set to 0, priority of Child1, as this task is done.

The reason for this it that usually a project is a main heading, which is split 
in
subtasks and, I want the overall project priority to reflect the highest 
priority of its
not done tasks.

To do so, I need to create a recursive function :

(adjust-priority ()
  (apply-on-child  #'adjust-priority)
  (set-priority (if-child (collect highest-priority

and apply this function to the top level heading whenever a change in priority 
occurs in
its children.

But this involves org skills a bit beyond my understanding, I wonder if you 
could give
me some piece of advices on how to do that :
- is there a suitable hook for this function ?
- when in a given tree, how can I select the top level heading ?
- when at a given heading, how can I change programmatically the priority ?

For this latter question, I tried (org-entry-put nil "PRIORITY" "2"), but it 
replied that

 org-priority: Priority must be between ‘0’ and ‘5’


Regards



Re: [BUG] org-latex-packages-alist type specification [9.6.3 (release_9.6.3-2-gf2949d @ /usr/local/share/emacs/29.0.90/lisp/org/)]

2023-04-20 Thread General discussions about Org-mode.

Ihor Radchenko  writes:

> Ruijie Yu  writes:
>
>>> Compiler list may also be nil.
>>
>> This should be covered by the repeat case?  Unless you want to be explicit
>> about this, in which case you can wrap it in a choice, whose first choice
>> being (const :tag “description” nil), and the second choice being the repeat
>> case.
>
> Yes, explicit tag will be better.

Updated and rebased (cleanly) onto current main.  Note that I moved the
type into a new line to keep everything below 66 columns.

>From cd9bc0751c8ab5b9a733cfbad3230d73d9642af0 Mon Sep 17 00:00:00 2001
From: Ruijie Yu 
Date: Thu, 13 Apr 2023 13:14:36 +0800
Subject: [PATCH] * lisp/org.el org-latex-packages-alist: fixed type definition

---
 lisp/org.el | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 463b4f594..bef5d0ca4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3485,13 +3485,17 @@ Make sure that you only list packages here which:
   :group 'org-export-latex
   :set 'org-set-packages-alist
   :get 'org-get-packages-alist
-  :type '(repeat
-	  (choice
-	   (list :tag "options/package pair"
-		 (string :tag "options")
-		 (string :tag "package")
-		 (boolean :tag "Snippet"))
-	   (string :tag "A line of LaTeX"
+  :type
+  '(repeat
+(choice
+ (list :tag "options/package pair"
+   (string :tag "options")
+   (string :tag "package")
+   (boolean :tag "snippet")
+   (choice
+(const :tag "All compilers include this package" nil)
+(repeat :tag "Only include from these compilers" string)))
+ (string :tag "A line of LaTeX"
 
 (defgroup org-appearance nil
   "Settings for Org mode appearance."
-- 
2.40.0


-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- will fix soon.]


Re: [PATCH v2] Add compat.el support to Org (was: [POLL] Use compat.el in Org? (was: Useful package? Compat.el))

2023-04-20 Thread Ihor Radchenko
Max Nikulin  writes:

>> Sure. And you will have such option (EFLAGS).
>> However, I decided to enable auto-downloading by default to not break
>> the previous working compilation instructions.
>
> For me adding external dependencies is strong enough reason to change 
> compiling instructions. My vote is for clear separation of dependency 
> management (even if performed through make targets) and 
> compiling/testing/etc.
> ...
> In my opinion, ideally there should be 3 options for dependency management:
> 1. Completely disabled. If load from default paths failed than it is a 
> fatal error.

I have no problem with this approach when using system packages.
However, it is almost guaranteed that compat.el is absent in global
load-path as long as compat.el is not built-in.

> 2. Use specified directory outside of Org tree (~/.emacs.d/elpa by 
> default) or any other directory that you named pkgdir. Only dedicated 
> target may clean this directory.

This is mostly an equivalent of -L switch. I do not like the idea of
using ~/.emacs.d/elpa default. It is fragile if this default ever
changes.

> 3. Install packages to Org source/build directory.
>
> You decided to make 3 the default variant. I believe, it should be 
> activated by a variable, e.g. AUTODEP = 1 in local.mk or from command 
> line "make compile AUTODEP=1

It is now activated by EPACKAGES being non-empty.

> I think, it is better to require an additional command
>
> make autoloads
> make fetch-dependencies
> make compile

Maybe. Then, also make doc and make install?
And make repro, which is dislike in particular - make repro is supposed
to be easy to use for users unfamiliar with Emacs internals or typical
GNU make conventions.

>> +package-install = --eval '(unless (require '"'"'$(package) nil t) (message 
>> "%s" load-path) (package-install '"'"'$(package)))'
>
> I do not like that versions of dependencies are ignored. I have noticed 
> `package-install-from-buffer'. Perhaps it can be used to generate a stub 
> package (e.g. org-build-deps) with Package-Requires line obtained from 
> org.el. The only purpose of this package is to pull dependencies. It is 
> just an idea, I have not tried such approach.

This sounds fragile. I see no reason to go this far and using so complex
approach.

>> +EMACS_VERSION := $(shell $(EMACS) -Q --batch --eval '(message "%s" 
>> emacs-version)' 2>&1)
>
> Ideally $(BATCH) should be used, but it is defined below. (princ 
> emacs-version) is an alternative, but I have not idea which variant is 
> better.

I used $(EMACS) on purpose. $(BATCH) may contain more things, which we
do not want (on purpose) here.

>> Subject: [PATCH 3/7] Use compat.el library instead of ad-hoc compatibility
>>  function set
>> 
>> * mk/default.mk (EPACKAGES): Demand compat library during compile time.
>
> when I asked for more granular commits I expected this change in
>
>> Subject: [PATCH 2/7] org-compat: Enable compat.el
>
> To separate adding dependency and replacing org-compat functions to compat.

For me, PATCH 3/7 grouping is more reasonable. So, I disagree.
Splitting EPACKAGES modification would create transient commit with
non-working Org.

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



Re: [ANN] org-jami-bot

2023-04-20 Thread Ihor Radchenko
Hanno Perrey  writes:

> Do you know of a maintained XMPP client written in Elisp to start looking 
> into?

Also, consider ERC and ement.el.
For XMPP, https://codeberg.org/emacs-jabber/emacs-jabber, AFAIK.

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



Re: [BUG] org-latex-packages-alist type specification [9.6.3 (release_9.6.3-2-gf2949d @ /usr/local/share/emacs/29.0.90/lisp/org/)]

2023-04-20 Thread Ihor Radchenko
Ruijie Yu  writes:

>> Compiler list may also be nil.
>
> This should be covered by the repeat case?  Unless you want to be explicit 
> about this, in which case you can wrap it in a choice, whose first choice 
> being (const :tag “description” nil), and the second choice being the repeat 
> case. 

Yes, explicit tag will be better.

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



Re: [PATCH] ox.el: Customize org-export-dispatch options

2023-04-20 Thread Ihor Radchenko
Jim Wisniewski  writes:

>> Now, need to wait until your copyright is in order.
>
> Okay, I just emailed back my signed copyright assignment.

Thanks! Let us know when FSF replies with a countersignature.

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



Re: [BUG] Org publish makeindex doesn't work on symlinked path [9.6.4 ( @ /home/bence/src/org-mode/lisp/)]

2023-04-20 Thread Ihor Radchenko
Bence Fábián  writes:

> - org-publish calling `file-truename' inconsistently during the
> publishing process.

May you check which places are not calling `file-truename'?
We should certainly be consistent here, either by preferring relative
paths to the true paths.

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



Re: [BUG] Org publish makeindex doesn't work on symlinked path [9.6.4 ( @ /home/bence/src/org-mode/lisp/)]

2023-04-20 Thread Bence Fábián
Hi all,

Upon further reflection I came to the following conclusions:

There are multiple things at play here (I refrain from using the word "issue"):
- emacs resolving or not resolving true path upon visiting files.
  This is not at all org-related.
- org-publish calling `file-truename' inconsistently during the
publishing process.
  This might or might not be an issue.  I leave it up to your discretion.

The trivial solution to my problem:
instead of
(let ((base-dir default-directory)) ...)
use
(let ((base-dir (file-truename default-directory))) ...)

I'll leave the repo on my github "As is" for future reference.

BR,
Bence



Re: [ANN] org-jami-bot

2023-04-20 Thread Max Nikulin

On 18/04/2023 02:22, Hanno Perrey wrote:

=org-jami-bot= provides hooks
and functions that extend this to Org mode captures.


Thank you for the idea (I can not say anything concerning implementation 
yet) to take advantage of messenger infrastructure for CLI variant of 
org-capture. Certainly it is an option when ssh is not available or 
overkill. It has caused change of my attitude in respect to chat bots.


Are there chat clients optimized as a kind of terminals for CLI 
operation? I mean GNU readline features like TAB completion, incremental 
reverse history search C-r, substituting last argument from previous 
command M-., executing with selection of next command for edit C-o, 
expand history "!" substitutions M-^, multiple kill buffers, etc.? Since 
chat driven RPC is more asynchronous than regular terminals, perhaps 
variants of sorting for command "output" should be implemented as 
threaded grouping or receive order sorting in mail clients.


Earlier I was forced to use a messenger to manage virtual machines even 
from a desktop (so when full-size keyboard and mouse are available). 
That time I wrote a python tool that was called from shell and sent 
arguments to HTTP RPC endpoint used by that bot. Even though it was one 
way communication (responses were sent to the messenger), I found it 
much more convenient. That is why I started to hate inappropriately used 
chat bots.


I admit that messengers have features allowing to create some kinds of 
UI with less efforts than web or native applications. It would be great 
to have specialized clients and protocol features dedicated for CLI, not 
human communications.


Back to Org, are there mobile Org applications that support org-capture 
and org-protocol? I mean purely local using of mobile terminal 
application and simple tool to sent intentions to the Org App?