[PATCH] org-ctags.el: Protect shell specials in directory name

2024-04-28 Thread Max Nikulin
On 20/03/2024 19:08, Ihor Radchenko wrote: Max Nikulin writes: The committed change is anyway incomplete. May you submit a patch? See the attachments.From 067dc590bb1c26c881f14d218da2cd502413ec5d Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Wed, 27 Mar 2024 23:04:07 +0700 Subject

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-27 Thread Max Nikulin
On 27/04/2024 17:31, Max Nikulin wrote: On 26/04/2024 18:49, Ihor Radchenko wrote: +    shell-file-name ... +    (list shell-command-switch +  (concat (file-local-name script-file)  " " cmdline)))) Max Niku

Re: [PATCH] ob-lua: Support all types and multiple values in results

2024-04-27 Thread Max Nikulin
On 26/04/2024 20:40, Ihor Radchenko wrote: +++ b/lisp/ob-lua.el @@ -282,6 +282,8 @@ (defvar org-babel-lua-wrapper-method end end return result + elseif type(it) == 'string' then + return '\"' .. it .. '\"' If you are adding quotes around then quote characters

Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends

2024-04-27 Thread Max Nikulin
On 26/04/2024 20:09, Ihor Radchenko wrote: Max Nikulin writes: However looking wider, I do not like that :cmdline for ob-shell has different meaning than for other languages, see e.g. ob-sql. Only for shell this parameter is treated as arguments of a *script*. In other cases :cmdline is used

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-27 Thread Max Nikulin
On 26/04/2024 18:49, Ihor Radchenko wrote: +shell-file-name ... +(list shell-command-switch + (concat (file-local-name script-file) " " cmdline)))) Max Nikulin writes: Using `shell-comm

Re: FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-26 Thread Max Nikulin
On 26/04/2024 18:08, Ihor Radchenko wrote: Max Nikulin writes: My guess is that GPLv2 BASH on macOS does not support associative arrays. Perhaps these tests should be skipped if BASH_VERSION is not fresh enough (not supplied by Apple). https://git.savannah.gnu.org/cgit/emacs/org-mode.git

Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-04-26 Thread Max Nikulin
On 26/04/2024 15:17, Protesilaos Stavrou wrote: Since we are now using labels for the HTML export, I think it makes sense to optionally use those for the anchor tags as well. [...] +(defcustom org-html-footnote-use-label-for-anchor-text nil Another option may be to rely on the existing one:

Re: Trailing whitespace after export snippets without a transcoder

2024-04-25 Thread Max Nikulin
On 23/04/2024 02:01, Ihor Radchenko wrote: For example, consider an HTML exporter that aligns tags nicely and keeps blank lines between markup blocks for readability. If we remove such blank lines unconditionally, it will be problematic. I consider that just newlines are enough to make HTML

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-25 Thread Max Nikulin
On 24/04/2024 19:52, Ihor Radchenko wrote: Max Nikulin writes: I believe, multiple arguments should be specified as '(1 a "b c"). Yes, but we do not, in general, know how to split them. Something should be changed anyway since current behavior is inconsistent and so is buggy.

Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2024-04-24 Thread Max Nikulin
On 27/03/2023 21:16, Ihor Radchenko wrote: +++ b/etc/ORG-NEWS @@ -145,6 +145,27 @@ execution completes. The new ~:async~ header allows users to continue editing with Emacs while a ~:session~ block executes. ** Miscellaneous +*** Blank lines after removed objects are not retained during

Re: FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-24 Thread Max Nikulin
On 24/04/2024 19:54, Ihor Radchenko wrote: Max Nikulin writes: On 15/04/2024 23:46, Alexander Adolf wrote: FAILED test-ob-shell/bash-uses-assoc-arrays ((should (equal "two" (org-trim (org-babel-execute-src-block :form (equal "two" "three") :

FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-24 Thread Max Nikulin
On 15/04/2024 23:46, Alexander Adolf wrote: FAILED test-ob-shell/bash-uses-assoc-arrays ((should (equal "two" (org-trim (org-babel-execute-src-block :form (equal "two" "three") :value nil :explanation (arrays-of-different-length 3 5 "two" "three" first-mismatch-at 1)) FAILED

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-24 Thread Max Nikulin
On 23/04/2024 17:28, Ihor Radchenko wrote: I propose the attached patch. +++ b/lisp/ob-shell.el @@ -322,14 +322,12 @@ (defun org-babel-sh-evaluate (session body params stdin cmdline) (with-temp-buffer (with-connection-local-variables (apply

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-23 Thread Max Nikulin
On 23/04/2024 17:51, Max Nikulin wrote: I am in favor of dropping `shell-command-switch' in the latter case to pass arguments literally in both cases. Dropping "-c" may have side effects. Instead of :shebang, a source block may have shebang in the body #+begin_src bash #!/bin/ba

Re: [POLL] Should we enable or disable automatic tag alignment by default everywhere

2024-04-23 Thread Max Nikulin
On 23/04/2024 18:47, Ihor Radchenko wrote: Max Nikulin writes: There should be a way to align tags for a specific heading even when `org-auto-align-tags' is nil. I can convert org-align-tags into a command. I would prefer to have C-u C-c C-q (`org-set-tags-command') applied just

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-23 Thread Max Nikulin
On 21/04/2024 22:09, Matt wrote: The proposed solution assumes we intend to parse the characters following :cmdline as space delimited and grouped by quotes. However, AFAICT, the parsing issue makes this solution ambiguous. Matt, I am sorry, but I do not agree with your proposal. I do not

Re: MathML and ODT export: inline possible?

2024-04-22 Thread Max Nikulin
On 22/04/2024 16:05, Fraga, Eric wrote: On Friday, 19 Apr 2024 at 23:19, Max Nikulin wrote: MathJax may be your friend. LaTeXML and katex do not add as well. MathJax works well but for websites; my context is that I need to prepare a Word document to share with others. I have not tried

Re: Trailing whitespace after export snippets without a transcoder

2024-04-22 Thread Max Nikulin
On 21/04/2024 20:00, Ihor Radchenko wrote: Max Nikulin writes: A space@@ascii:*@@ character. Hmm. We actually have a similar scenario in `org-export--prune-tree' with a slightly different logic - only keep spaces when previous object does not have any. I like this idea. At first I

Re: Trailing whitespace after export snippets without a transcoder

2024-04-20 Thread Max Nikulin
On 20/04/2024 18:14, Ihor Radchenko wrote: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a6d9fd82e Back-end developers should pay attention to the fact that white spaces before and after an ignored export snippet now are accumulated in the output. I have no

Re: [BUG] LaTeX preview should use a subdirectory in /tmp

2024-04-20 Thread Max Nikulin
On 19/04/2024 22:00, emm.charpent...@free.fr wrote: Embedding /home/charpent/WinFiles/Temporaire/Org/file:ltximg/EssaiSnippetsLaTeX_2923a1941c0e63eab69544afa1be2ec0d95a01c4.png as Images/0001.png... See Ihor Radchenko. Re: strange export problem with a file: link. Sat, 20 Apr 2024 12:25:56

Re: MathML and ODT export: inline possible?

2024-04-19 Thread Max Nikulin
On 18/04/2024 22:51, Fraga, Eric wrote: In LaTeX, something like $a_{b_c}$. Pandoc generates a b c (where the a, b, and c are ...) whereas, by hand, I use a b c MathJax may be your friend. LaTeXML and katex do not add as well. Actually I asked to confirm that your troubles are not

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 19/04/2024 00:58, Корякин Артём wrote: shell-file-name ; "pwsh.exe" system-type ; windows-nt (w32-shell-dos-semantics) ; nil I have no idea what style of escaping is expected by pwsh.exe. If it is the same as for cmd.exe then I would try to add it to

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 18/04/2024 03:11, Корякин Артём wrote: Maybe I could somehow rewrite shell-quote-argument using advices ? Maybe some more global changes is needed for emacs on windows ? Please, evaluate the following expressions e.g. in the scratch buffer: shell-file-name system-type

Re: MathML and ODT export: inline possible?

2024-04-18 Thread Max Nikulin
On 18/04/2024 22:03, Fraga, Eric wrote: PS - also thanks for details on latexmlmath. I am still curious if pandoc can handle your math expressions.

Re: strange export problem with a file: link

2024-04-18 Thread Max Nikulin
On 18/04/2024 21:37, Fraga, Eric wrote: On Thursday, 18 Apr 2024 at 19:08, Max Nikulin wrote: It is a side effect of 72b0e9ff0 2024-02-05 16:39:05 +0100 Ihor Radchenko: org-export: Do not strip link type by default during export I have now checked the ORG-NEWS file, which I probably should

Re: MathML and ODT export: inline possible?

2024-04-18 Thread Max Nikulin
around %i if you are on the main branch. On bugfix it is necessary to use an alternative command with %I. However LaTeXML has issues with latex3 Max Nikulin… Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command. Tue, 5 Mar 2024 19:01:16 +0700. https

Re: strange export problem with a file: link

2024-04-18 Thread Max Nikulin
On 18/04/2024 17:50, Fraga, Eric wrote: #+begin_src latex :results file raw :exports results :file function.png \[ y = f(x) \] #+end_src org-odt-export-to-odt: OpenDocument export failed: Opening input file: No such file or directory, /tmp/file:function.png It is a side effect of 72b0e9ff0

org syntax: is \begin{equation} a latex-fragment?

2024-04-18 Thread Max Nikulin
Hi, Is it expected that 8< \begin{equation} >8 is parsed by (org-element-parse-buffer) as the following? (latex-fragment ... :value "\\begin{equation}") \begin{something} is quite special in LaTeX, so despite it is similar to `latex-fragment' definition, it almost

Re: [POLL] Should we enable or disable automatic tag alignment by default everywhere

2024-04-18 Thread Max Nikulin
get properly aligned tags after editing. In that thread tag alignment was just an example when minor user mistake can lead to global changes. Max Nikulin. Preventing inadvertent global modifications. Tue, 12 Sep 2023 23:47:30 +0700. https://list.orgmode.org/udq4n4$1me$1...@ciao.gmane.io

Re: [PATCH v2] org-faq.org: Inline comments

2024-04-17 Thread Max Nikulin
On 15/04/2024 19:17, Ihor Radchenko wrote: +#+begin_src org +The following line may become a patagraph separator. +@@comment: might give unexpected effect @@ +Put some text before @@comment: a better variant +@@ and after instread. +#+end_src I am no longer able to reproduce the problem with

Re: Verbatim content (inline-special-block)

2024-04-12 Thread Max Nikulin
On 11/04/2024 19:58, Ihor Radchenko wrote: Max Nikulin writes: @code{ unlike =code=, we can have leading and trailing spaces } @code{ @foo{is not interpreted inside}} I think, it should be controlled by some optional parameter like @kbd[:verbatim t]{ unlike =code

Re: [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]

2024-04-11 Thread Max Nikulin
On 10/04/2024 15:19, Ihor Radchenko wrote: Chang Xiaoduan writes: I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as the code marker. I use the following code in my configuration file: Custom markup markers are not supported. This customization is only useful to

Re: [Q] startup hook: How do I detect if the current buffer has been opened programmatically?

2024-04-11 Thread Max Nikulin
On 09/04/2024 00:31, Rudi C wrote: I want to automatically preview all LaTeX fragments if the buffer was opened by the user Be careful and limit automatic preview to files you created yourself. Doing so for an arbitrary file downloaded from net might cause huge amount of garbage files in

Link to the repository (Re: inline-special-block: part2)

2024-04-11 Thread Max Nikulin
On 11/04/2024 17:49, Max Nikulin wrote: I think, it is better to create a new thread to discuss next bunch of questions related to the inline special block feature. I have realized that I forgot to add the link for those who wish to try the new feature in action: Juan Manuel Macías

Re: Experimental public branch for inline special blocks

2024-04-11 Thread Max Nikulin
On 02/03/2024 03:34, Juan Manuel Macías wrote: Finally, I have made public on GitLab my experimental branch for the new (possible) inline-special-block element: <https://gitlab.com/maciaschain/org-mode.git> Next part of this thread: Max Nikulin. inline-special-block: part2. Thu, 11 Ap

Verbatim content (inline-special-block)

2024-04-11 Thread Max Nikulin
Ihor Radchenko. Re: Experimental public branch for inline special blocks. Tue, 09 Apr 2024 08:52:38 +. https://list.orgmode.org/875xwqj4tl.fsf@localhost - We should be able to define special markup for code, where the contents is not parsed. Something like @code{ unlike

inline-special-block: part2

2024-04-11 Thread Max Nikulin
I think, it is better to create a new thread to discuss next bunch of questions related to the inline special block feature. Previous thread is rather huge: Juan Manuel Macías. Experimental public branch for inline special blocks. Fri, 01 Mar 2024 20:34:35 +.

Re: Experimental public branch for inline special blocks

2024-04-09 Thread Max Nikulin
On 09/04/2024 15:52, Ihor Radchenko wrote: Aside: It looks like your public branch is not up-to-date as the time of writing this email - I do not see commits changing the syntax to @foo{...} and @@{...} yet, Do you have in your local copy the following? latest commit ba2fc870c

Re: [BUG] Partially broken Org mode when remote setupfile is unavailable

2024-04-09 Thread Max Nikulin
On 09/04/2024 15:07, Ihor Radchenko wrote: Ihor Radchenko writes: #+setupfile: http://localhost:8000/setup-http-987.org * Heading [[https://orgmode.org/][Link]] [...] See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5 The Emacs bug has been fixed. There is no workaround we can

Re: [POLL] Dealing with +1m/y repeaters when jumping to impossible date (should 05-31 +1m be 07-01 or 06-30?)

2024-04-06 Thread Max Nikulin
On 06/04/2024 01:34, Ihor Radchenko wrote: Generally, I did see several requests to change the strategy when calculating next month/year. However, that would be a breaking change. I'd only go for it if people are strongly in favor of the change. So, changing this to a poll. I think the

Re: [PATCH] Unit tests for function calling MathML converters (Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command)

2024-04-01 Thread Max Nikulin
On 31/03/2024 15:27, Ihor Radchenko wrote: Max Nikulin writes: +(ert-deftest test-org/format-latex-as-html () + "Test shell special characters escaping in `org-format-latex-as-html'." + (let ((org-latex-to-html-convert-command + "printf \"\" %i")) I

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-04-01 Thread Max Nikulin
On 31/03/2024 15:25, Ihor Radchenko wrote: Max Nikulin writes: I think it is in the right direction. - Manual needs update as well. - I would explicitly stress that quotes causes undefined or even dangerous behavior. See e.g. the last paragraph https://specifications.freedesktop.org/desktop

Re: [BUG] Partially broken Org mode when remote setupfile is unavailable

2024-04-01 Thread Max Nikulin
On 30/03/2024 17:02, Ihor Radchenko wrote: Ihor Radchenko writes: Unexpected errors: - When point is on any non-empty line, RET is broken save-excursion: Wrong type argument: stringp, nil - The link is not fontified (it is parsed properly however and even may be opened). This is because

Re: [BUG] ox-html output does not pass validation for html4-strict doctype [9.7-pre (release_9.6.23-1423-gcea6a1.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]

2024-03-27 Thread Max Nikulin
On 25/03/2024 18:18, Ihor Radchenko wrote: I am wondering whether it is at all possible to use the same syntax and yet pass validation for all the allowed values of `org-html-doctype': "html4-strict", "html4-transitional", "html4-frameset", "xhtml-strict", "xhtml-transitional", "xhtml-frameset",

Re: [BUG] Partially broken Org mode when remote setupfile is unavailable

2024-03-27 Thread Max Nikulin
On 20/03/2024 19:15, Ihor Radchenko wrote: Max Nikulin writes: #+setupfile: /dav:localhost#8000:/setup-dav-123.org [...] Package ‘tramp-gvfs’ not supported File mode specification error: (user-error Package `tramp-gvfs' not supported) [...] - When point is on any non-empty line, RET

Re: inline-special-block: export rules

2024-03-26 Thread Max Nikulin
On 21/03/2024 17:26, Juan Manuel Macías wrote: Max Nikulin writes: I am afraid that :export will cause confusion with :exports for source code blocks. Its name differs by just "s" but possible values have nothing common. I agree. At the moment two alternative names come to mind:

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-26 Thread Max Nikulin
On 24/03/2024 15:58, Ihor Radchenko wrote: Max Nikulin writes: On 22/03/2024 05:55, Michael wrote: I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the current one). I suspect

Re: [BUG] org-clock-sum: Wrong type argument: fixnump, nil [9.7-pre (release_9.6.22-1309-g8507ef @ /home/grfz/src/org-mode/lisp/)]

2024-03-26 Thread Max Nikulin
On 25/03/2024 22:46, Gregor Zattler wrote: rm -rf *; git checkout -f git clean -dffx should be a bit safer. However there is still risk to lost files have not been committed to git.

Re: [BUG] LaTeX preview should use a subdirectory in /tmp

2024-03-26 Thread Max Nikulin
On 25/03/2024 19:49, Max Nikulin wrote: (defun org-ensure-tmp-dir (dir-symbol prefix)   (let ((dir (symbol-value dir-symbol)))     ;; Temporary directory has not been cleaned.     (or (and dir (file-directory-p dir) dir) `if' should be used instead of `or' here. (setf (symbol-value

Re: [BUG] LaTeX preview should use a subdirectory in /tmp

2024-03-25 Thread Max Nikulin
On 25/03/2024 18:40, Ihor Radchenko wrote: Max Nikulin writes: This feature should not write temporary files to /tmp directly See the attached tentative patch. Thanks for prompt reaction. +++ b/lisp/org.el @@ -16361,7 +16361,7 @@ (defun org-create-formula-image org-format

[BUG] LaTeX preview should use a subdirectory in /tmp

2024-03-25 Thread Max Nikulin
This is a follow-up to recent changes related to LaTeX preview. This feature should not write temporary files to /tmp directly, some subdirectory should be created for this purpose. The idea is to mitigate consequences if a user opens a file from a compromised or a malicious source and gets

Re: [PATCH] Run latex more than once for LaTeX src block evaluation

2024-03-24 Thread Max Nikulin
On 22/03/2024 05:55, Michael wrote: I have a small patch for `org-preview-latex-process-alist' making the default setting for LaTeX source block evaluation be running latex three times (instead of the current one). I suspect it may make the LaTeX preview feature unacceptably slow for

fixup! and git

2024-03-19 Thread Max Nikulin
On 19/03/2024 23:27, Ihor Radchenko wrote: Oops. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4f548f948 fixup! org-create-math-formula: Do not run file-related hooks when checking output "fixup!" is a keyword for "git rebase --interactive --autosquash" and usually added

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-03-19 Thread Max Nikulin
On 19/03/2024 21:49, Ihor Radchenko wrote: but I do not see downsides of using `insert-file-contents' instead of `find-file-noselect' and not running `find-file-hook' in this particular case (other cases in Org tree appears to be fine from a quick glance).

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-19 Thread Max Nikulin
On 19/03/2024 02:42, Juan Manuel Macías wrote: As I mentioned in a past email, these days I will be somewhat busy, but I will try to keep up to date with your comments. Although it may take a while to respond. Would you mind against new thread as an umbrella for next bunch of topics? Current

[BUG] Partially broken Org mode when remote setupfile is unavailable

2024-03-19 Thread Max Nikulin
Hi, I have tried the following .org file --- 8< --- #+setupfile: /dav:localhost#8000:/setup-dav-123.org * Heading [[https://orgmode.org/][Link]] --- >8 --- Having no webdav server running. Expected error: Package ‘tramp-gvfs’ not supported File mode specification error: (user-error Package

Re: [PATCH] `org-ctags-create-tags` creates empty TAGS file [9.6.15 (release_9.6.15 @ /home/martin/Projects/emacs/lisp/org/)]

2024-03-19 Thread Max Nikulin
On 11/02/2024 04:10, Morgan Willcock wrote: The shell expansion should work if the asterisk is outside of the quotes. I've attached an (untested) patch to explain what I mean. Never try to quote arbitrary strings by double or single quotes in shell. There are enough fancy characters that

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-03-18 Thread Max Nikulin
On 15/03/2024 20:49, Ihor Radchenko wrote: Max Nikulin writes: On 12/03/2024 20:03, Ihor Radchenko wrote: - '%i' and "%i" in any position including e.g. --option='%i' and protocol:"%i" - 'something%i' and "something%i" surrounded by spaces or at the end

Re: How to properly attribute authorship with Git (was Re: [PATCH] lisp/ob-shell.el: Also override explicit-shell-file-name)

2024-03-17 Thread Max Nikulin
On 17/03/2024 20:42, Matt wrote: On Sun, 17 Mar 2024 11:31:00 +0100 Ihor Radchenko wrote --- > > (1) revert the commit; (2) re-apply the > commit version with the correct author attribution. Done. 1. git revert 2. make changes (e.g. emacs followed by *type-type-type* or some

Re: Reproducible work with natively compiled Emacs

2024-03-17 Thread Max Nikulin
On 17/03/2024 13:13, Pedro Andres Aranda Gutierrez wrote: In practice, I was not able to delete the .eln files from a make native. In order to have a more controlled environment, I delete them _before_ I refresh my local org-mode/main directory, and then do a make native after refreshing my

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-16 Thread Max Nikulin
On 15/03/2024 23:26, Juan Manuel Macías wrote: Tomorrow I will make a new commit with your code. An update with a couple of bugs fixed. Now it is possible to specify different export rules for a backend and all its derivatives: (ignore (pp (let ((rules

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-15 Thread Max Nikulin
On 15/03/2024 20:10, Juan Manuel Macías wrote: Max Nikulin writes: 1. "-" is a valid backend name and valid last character of backend name I had not thought of it. Can + also be a valid character? https://orgmode.org/worg/org-syntax.html#Affiliated_Keywords BACKEND A string

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-15 Thread Max Nikulin
On 15/03/2024 21:00, Ihor Radchenko wrote: Max Nikulin writes: 1. "-" is a valid backend name and valid last character of backend name I am not following this branch of the discussion closely, but what about not inviting a new DSL here and instead using Elisp sexps here? Some

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-15 Thread Max Nikulin
On 15/03/2024 09:19, Juan Manuel Macías wrote: The attribute supports one or more elements separated by a space. Each element can be any of the following signs: "*" (export only the content), "-" (do not export), "=" (export the rest normally), "=*" (export the rest, but only the content), "=-"

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-13 Thread Max Nikulin
On 13/03/2024 00:41, Juan Manuel Macías wrote: Max Nikulin writes: It is not clear for me how to achieve the following. Add a link [[https://youtube.com/...][Org mode in action demo (video)]] for all backends (EPUB, LaTeX, ODT, text, etc.) besides HTML because there is an #+export_html block

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-03-13 Thread Max Nikulin
On 12/03/2024 20:03, Ihor Radchenko wrote: Max Nikulin writes: It is trivial to cause shell failure when single quotes are used around %i. I am in doubts concerning double quotes. Perhaps stripping them is more reliable. May you list the cases to you propose to recognize? Sun, 25 Feb 2024

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-12 Thread Max Nikulin
On 12/03/2024 20:45, Juan Manuel Macías wrote: backend-name = full export backend-name* = only contents And the "rest" option is introduced, with the same syntax as before. Examples: It is not clear for me how to achieve the following. Add a link [[https://youtube.com/...][Org mode in

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-11 Thread Max Nikulin
On 11/03/2024 20:59, Juan Manuel Macías wrote: I have a bit different expectations in respect to export predicates. It should be possible to express that some content should be exported by all backend except the given list. The use case is fallback for backends not covered by export snippets:

Re: `:export' attribute?: Re: Experimental public branch for inline special blocks

2024-03-11 Thread Max Nikulin
of @@:...@@ syntax extension: Max Nikulin. Re: Org-syntax: Intra-word markup. Fri, 28 Jan 2022 21:52:17 +0700. https://list.orgmode.org/868df76e-69e0-1d14-ae8a-13b746982...@gmail.com Another case for backend predicates is whether it should be applicable to derived backends or just to explicitly

[PATCH] Fix headers in some testing lisp files

2024-03-10 Thread Max Nikulin
-*- lexical-binding: t; -*- testing/lisp/test-org-fold.el:1: ;;; test-org.el --- tests for org.el -*- lexical-binding: t; -*- testing/lisp/test-ox-ascii.el:1: ;;; test-ox-latex.el --- tests for ox-latex.el -*- lexical-binding: t; -*-From 030556adf3b072e6f27388beea4bd769ca870abc Mon Sep 17

Re: [BUG] obscure error for invalid :exports

2024-03-10 Thread Max Nikulin
On 08/03/2024 16:46, Ihor Radchenko wrote: Max Nikulin writes: Trying to export (to HTML buffer) src_elisp[:exports source]{a} I have got an obscure error org-export-as: Wrong type argument: char-or-string-p, nil See the attached tentative patch. Thanks, Ihor. With this patch

Re: false positives: Re: Experimental public branch for inline special blocks

2024-03-09 Thread Max Nikulin
On 09/03/2024 22:24, Juan Manuel Macías wrote: Well, I hope that in the last commit the two bugs that you mentioned have been fixed. Please check: Albha@Beta[ @sp@n{lorem ipsum} {lorem ipsum} Thanks, Juan Manuel. I do not see issues any more. I would still consider unit tests to not

[PATCH] Unit tests for function calling MathML converters (Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command)

2024-03-09 Thread Max Nikulin
On 09/03/2024 22:23, Max Nikulin wrote: On 08/03/2024 18:16, Ihor Radchenko wrote: Attaching tentative patch that fixes the problem. I propose to add unit tests, see first attachment. I have tried to add some unit tests, but I faced an issue with `org-create-math-formula'. It creates

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-03-09 Thread Max Nikulin
On 08/03/2024 18:16, Ihor Radchenko wrote: Max Nikulin writes: I decided not to introduce stdin. User can always use echo %i | ... instead. printf "%%s" %i should be safer. However in this particular case, input that may be recognized like echo options ("-n") should b

Re: false positives: Re: Experimental public branch for inline special blocks

2024-03-09 Thread Max Nikulin
On 09/03/2024 01:57, Juan Manuel Macías wrote: Ok, I think you and Maxim are right. This is a clear bug. I hope it was fixed in the last commit. (org-export-string-as "Alpha@Beta{" 'latex t)) ==> Alpha@Beta\{ (org-export-string-as "Alpha@Beta{gamma}" 'latex t)) ==> Alpha\Beta{gamma}

Re: naming: Re: Experimental public branch for inline special blocks

2024-03-08 Thread Max Nikulin
On 08/03/2024 12:26, Samuel Wales wrote: cannot follow discussion but is the role and scope of the proposed semantics settled and agreed upon by those who do? I think, there are enough issues with the proposed feature to discuss. Notice "naming" added to the message subject with hope to

Re: false positives: Re: Experimental public branch for inline special blocks

2024-03-08 Thread Max Nikulin
On 08/03/2024 22:44, Juan Manuel Macías wrote: Max Nikulin writes: (org-export-string-as "Alpha@Beta{" 'html '(:export-options (body-only))) "\nAlpha{\n" (org-export-string-as "Alpha@Beta[" 'html

Re: false positives: Re: Experimental public branch for inline special blocks

2024-03-08 Thread Max Nikulin
On 08/03/2024 01:21, Juan Manuel Macías wrote: Ihor Radchenko escribió: I am wondering if @@[...]{...} would be better than @_... It should be slightly easier to type. Anyway, in the last commit I replaced _ with @. Let's see how it goes... Now the anonymous variant is @@[...]{...}.

[BUG] obscure error for invalid :exports

2024-03-07 Thread Max Nikulin
Hi, Trying to export (to HTML buffer) src_elisp[:exports source]{a} I have got an obscure error org-export-as: Wrong type argument: char-or-string-p, nil I believe, some meaningful error should be signaled. I was quite surprised since the following is exported with no error

false positives: Re: Experimental public branch for inline special blocks

2024-03-07 Thread Max Nikulin
On 02/03/2024 03:34, Juan Manuel Macías wrote: Finally, I have made public on GitLab my experimental branch for the new (possible) inline-special-block element: It seems the parser finds new objects where syntactical constructs are incomplete:

Re: naming: Re: Experimental public branch for inline special blocks

2024-03-07 Thread Max Nikulin
On 06/03/2024 17:56, Ihor Radchenko wrote: Max Nikulin writes: Custom inline markup. "Markup" is something abstract to my taste. I would prefer something related to concrete instances of such objects. IMHO, the whole point of the discussed construct is exactly being abstract

To avoid zero width space: Re: Experimental public branch for inline special blocks

2024-03-06 Thread Max Nikulin
On 02/03/2024 03:34, Juan Manuel Macías wrote: Finally, I have made public on GitLab my experimental branch for the new (possible) inline-special-block element: The new feature is promising as an alternative for U+200B zero width space as an

Re: smallcaps: Re: Experimental public branch for inline special blocks

2024-03-06 Thread Max Nikulin
On 06/03/2024 00:28, Juan Manuel Macías wrote: Max Nikulin escribió: I think that the current implementation is very flexible and gives rise to many possible variations, and the combination of direct formatting and styles to suit the user. OK, just consider it as my dissenting opinion. I

Re: naming: Re: Experimental public branch for inline special blocks

2024-03-06 Thread Max Nikulin
On 05/03/2024 00:29, Ihor Radchenko wrote: Max Nikulin writes: Does anybody have an idea of a better name for a feature? Maybe something like inline custom objects, snippets. "Objects" are used to describe syntax, but not used in the manual though. Custom inline markup.

smallcaps: Re: Experimental public branch for inline special blocks

2024-03-05 Thread Max Nikulin
On 02/03/2024 03:34, Juan Manuel Macías wrote: │ Caesar's famous quote: ![:smallcaps t :color blue]{Alea iacta est} ==> LaTeX: │ Caesar's famous quote: {\scshape{}\color{blue}\foreignlanguage{latin}{\textit{Alea iacta est}}} == HTML: │ Caesar's famous quote: Alea iacta est I am in doubts if

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-03-05 Thread Max Nikulin
On 25/02/2024 17:41, Max Nikulin wrote: Max Nikulin writes: So `shell-quote-argument' is necessary and quotes around %i must be stripped similar to %s in mailcap entries in `org-open-file'. ... Please, revert the commit that added a misleading recommendation. ... It should be more reliable

Re: naming: Re: Experimental public branch for inline special blocks

2024-03-05 Thread Max Nikulin
On 05/03/2024 00:49, Juan Manuel Macías wrote: Ihor Radchenko writes: Max Nikulin writes: Does anybody have an idea of a better name for a feature? Maybe something like inline custom objects, snippets. "Objects" are used to describe syntax, but not used in the manual though. Cus

naming: Re: Experimental public branch for inline special blocks

2024-03-04 Thread Max Nikulin
On 02/03/2024 03:34, Juan Manuel Macías wrote: Finally, I have made public on GitLab my experimental branch for the new (possible) inline-special-block element: I find the feature name confusing, however I am unsure if others share my opinion. In Org syntax, "elements" are paragraphs and

Re: [proof of concept] inline language blocks

2024-02-29 Thread Max Nikulin
On 29/02/2024 17:41, Juan Manuel Macías wrote: Max Nikulin writes: I do not try to dispute \foo and class="foo" as default behavior. I suggest to implement possibility to override default behavior of {text} to \bar{text} and text. The same is applicable for anonymo

Re: [proof of concept] inline language blocks

2024-02-28 Thread Max Nikulin
: Max Nikulin writes: #+options: custom-object(:type la :latex_element foreignlanguage :latex_pre "{latin}") mmm, I see it as not very flexible and perhaps too complicated for the user. Do not concentrate on \foreignlanguage. I am using it just because the thread was started f

Re: [proof of concept] inline language blocks

2024-02-28 Thread Max Nikulin
On 28/02/2024 20:15, Juan Manuel Macías wrote: #+options: inline-special-block-aliases:(("latin" :lang "la" :color blue :prelatex "\\itshape " :html "style=\"font-style:italic;\"")) This is an example of Latin text: &_[@latin@]{lorem ipsum dolor sit amet}. It is more verbose than {lorem

Re: [proof of concept] inline language blocks

2024-02-28 Thread Max Nikulin
On 22/02/2024 06:02, Juan Manuel Macías wrote: Samuel Wales writes: :fr{some text in French} being expressed as $[lang :fr "bonjour"] To expand a little more... Another problem I see in your example is nesting. In my proposal, the blocks can be nested: :fr{text in French and :it{text in

Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links

2024-02-27 Thread Max Nikulin
r xdg-open or run-mailcap through alternatives. Some notes are inline. On 14/02/2024 21:51, Ihor Radchenko wrote: Max Nikulin writes: May you please explain more about this? What happens if a mailcap entry, say, declares "less" as a mimetype handler and Emacs is running in terminal?

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-02-26 Thread Max Nikulin
On 26/02/2024 17:48, Ihor Radchenko wrote: Max Nikulin writes: Something weird may be executed in the case of sufficiently complex equations. It should be more reliable to pass fragment to command stdin. It can be done if %i is missed in `org-latex-to-html-convert-command'. I agree

Re: org-mode: example blocks are no longer syntax highlighted in emacs

2024-02-26 Thread Max Nikulin
On 25/02/2024 17:04, Ihor Radchenko wrote: Rudi C writes: After upgrading to emacs 29.2 and org 9.7, my example blocks are no longer syntax highlighted in emacs. Yet, there is no reason to remote it. I recovered example block fontification on main. At least some people are against the

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-02-25 Thread Max Nikulin
On 23/02/2024 19:46, Ihor Radchenko wrote: Max Nikulin writes: On 19/02/2024 02:36, Martin Edström wrote: +Since this is a shell-command, remember to use single-quotes +around \\='%i\\=', not double-quotes! Else a math fragment such +as \"$y = 200$\" gets butchered into onl

Re: Warn about shell-expansion in the docstring of org-latex-to-html-convert-command

2024-02-21 Thread Max Nikulin
On 19/02/2024 02:36, Martin Edström wrote: +Since this is a shell-command, remember to use single-quotes +around \\='%i\\=', not double-quotes! Else a math fragment such +as \"$y = 200$\" gets butchered into only \" = 200\"." I am afraid, the code, not the docstring must be fixed. I have not

Re: [BUG] ox-odt messes with auto-mode-alist [9.7-pre (release_9.6.11-1090-g76468c.dirty @ /home/viz/lib/emacs/straight/build/org/)]

2024-02-16 Thread Max Nikulin
On 16/02/2024 21:57, Visuwesh wrote: (dolist (desc org-odt-file-extensions) ;; Let Emacs open all OpenDocument files in archive mode. (add-to-list 'auto-mode-alist (cons (concat "\\." (car desc) "\\'") 'archive-mode))) Package: Org mode version 9.7-pre

Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links

2024-02-13 Thread Max Nikulin
On 13/02/2024 22:44, Max Nikulin wrote: (info "emacs-mailcap") (info "emacs-mime")

Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links

2024-02-13 Thread Max Nikulin
On 13/02/2024 18:27, Ihor Radchenko wrote: Max Nikulin writes: I am mostly going to address user confusion about mailcap XDG configuration and so xdg-open behavior is often confusing to users as well, especially in the cases of KDE and no DE. In GNOME it is alleviated by a step

  1   2   3   4   5   6   7   8   9   10   >