Re: source blocks mangled when edited

2021-05-31 Thread Sébastien Miquel
acs -q`, right ? I'll try to see if I can reproduce with emacs 26.1 tomorrow. -- Sébastien Miquel

Re: source blocks mangled when edited

2021-05-31 Thread Sébastien Miquel
s happening ? Is `org-src--contents-for-write-back` populating the buffer correctly ? Does the `replace-buffer-contents` call in `org-edit-src-exit` return `t` ? Regards, -- Sébastien Miquel

Re: [PATCH] Bug: No highlighting after [9.4.6 (release_9.4.6-544-gc5573b @ /home/user/.emacs.d/straight/build/org/)]

2021-05-28 Thread Sébastien Miquel
line is formatted as normal text. Thanks for the report, I can confirm this bug with latest org. Here's a patch that fixes this. Regards, -- Sébastien Miquel >From c598f705bf1d8003514751fffc07fd64620a7e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Fri

Re: Question Regarding Yasnippet With Org Mode (Emacs 27.2)

2021-05-23 Thread Sébastien Miquel
uld work. I have not tested it though. Regards, -- Sébastien Miquel

Re: Question Regarding Yasnippet With Org Mode (Emacs 27.2)

2021-05-23 Thread Sébastien Miquel
he src block is specified. In Emacs 27.2, the default value of =org-src-tab-acts-natively= was changed to `t`. With this setting, trying to indent a src block with no language results in this error. -- Sébastien Miquel

Re: Bug: [PATCH] Can't set background color of latex fragment

2021-05-23 Thread Sébastien Miquel
Hi, Here's a patch that fixes this bug by calling `dvipng' with the `-bg Transparent' argument only when no background color is set. Regards, -- Sébastien Miquel >From 5872fc3143162fbda11cf2aa5a3798567664be99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Mique

Re: Bug: Can't set background color of latex fragment

2021-05-18 Thread Sébastien Miquel
you explain the use for a `Transparent` background ? Transparent images are poorly supported in emacs, all it does is render it with the background color of the default face -- which may not be the expected result. Regards, -- Sébastien Miquel On Wed, Apr 7, 2021 at 1:38 PM Sébastien Miquel

Re: [PATCH] Fontification for inline src blocks

2021-05-18 Thread Sébastien Miquel
faces for this? You should create new faces yes. I do not know whether one or two faces is best. Regards, -- Sébastien Miquel

Re: begin_src Indentation in org 9.4.4, 9.4.5

2021-05-18 Thread Sébastien Miquel
lly, but I hold no particular interest (or deep understanding) in this specific file. Regards, -- Sébastien Miquel >From 1be7fa790e68d1fc2d198eee81c0d3bb72156d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Tue, 18 May 2021 14:39:33 +0200 Subject: [PATCH] org.el

Re: [PATCH] Fontification for inline src blocks

2021-05-18 Thread Sébastien Miquel
s =t=, it will be called again. A case can be made for keeping the loop though. It works fine and is clearer since the aforementioned fontlock behaviour is poorly documented. Really, the only downside is the loss of consistency, since the function ~org-fontify-meta-lines-and-blocks-1~ doesn't loop. Regards, -- Sébastien Miquel

Re: begin_src Indentation in org 9.4.4, 9.4.5

2021-05-17 Thread Sébastien Miquel
ion of the #+begin_src line). I think this is reasonable, but perhaps some might disagree. Regards, -- Sébastien Miquel

Re: [Patch] Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2021-05-16 Thread Sébastien Miquel
write-back buffers are never killed. Regards, -- Sébastien Miquel >From f293a9d5808c413ce785646ebf5f480df3a00a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Sun, 16 May 2021 19:13:53 +0200 Subject: [PATCH] org-src.el (org-edit-src-exit): Fix write-back-buf not g

Re: [PATCH] tangling seems to have broken today

2021-05-06 Thread Sébastien Miquel
right? In this case, the patch does not apply. Can you check and repropose a patch against maint? Or just let me know if I'm mistaken. It fixes an issue introduced by a commit in master, so it should be applied to master. So we're all set here? This should be it! Regards, -- Sébastien Miquel

Re: [PATCH] tangling seems to have broken today

2021-05-05 Thread Sébastien Miquel
duplication. To keep the patch as simple as possible, I have introduced a new helper function, I hope this is okay. I have tested the attached patch with the uses cases shown so far, as well as my own and the org test suite. I apologise again for the troubles. -- Sébastien Miquel >F

Re: tangling seems to have broken today

2021-05-05 Thread Sébastien Miquel
Eric S Fraga writes: I was using org-babel-tangle. Although, in this case, with C-u before to tangle just the particular block. Indeed, I have broken this. I'll provide a patch, shortly. -- Sébastien Miquel

Re: tangling seems to have broken today

2021-05-05 Thread Sébastien Miquel
your example. -- Sébastien Miquel

Re: Bug: [PATCH] org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)]

2021-05-04 Thread Sébastien Miquel
nd changing the extension according to the src block language. Thank you again for the report, and sorry for breaking everything. -- Sébastien Miquel >From b7c5103fdd05c3d30805ebcc5084ef82c44cd8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Wed, 5 May 2021 08:31:43 +02

Re: Bug: org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)]

2021-05-04 Thread Sébastien Miquel
ead permissions afterwards. -- Sébastien Miquel >From e56a05f4f5a3cce9cfdeb71854475e29aac1a6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Tue, 4 May 2021 22:59:36 +0200 Subject: [PATCH] ob-tangle.el (org-babel-tangle): Fix readonly tangle * lisp/ob-tangle.el (org-

Re: Bug: org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)]

2021-05-04 Thread Sébastien Miquel
k you for the report. -- Sébastien Miquel diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 36144d6ae..c041ff4b3 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -270,9 +270,10 @@ matching a regular expression." (make-directory fnd 'parents)) ;;

Re: Bug: org-babel-tangle: persmission denied when tangling [9.4.5 (9.4.5-gbc2659 @ /home/n/.emacs.d/straight/build/org/)]

2021-05-04 Thread Sébastien Miquel
o set file permission. Although subsequent tangles will still fail. -- Sébastien Miquel

Re: [Feature request] String escaped noweb expansion

2021-05-02 Thread Sébastien Miquel
of my proposal is to allow one to write unescaped latex in the latex src block. (Mostly to avoid doubling every backslash). It is quite the shame to have to write non latex code in a latex src block. Regards, -- Sébastien Miquel

[Feature request] String escaped noweb expansion

2021-05-02 Thread Sébastien Miquel
ine). This allows the following. #+BEGIN_SRC latex :noweb-ref latex-ref \some \multiline \unescaped \latex \code #+END_SRC #+BEGIN_SRC emacs-lisp :noweb yes (setq my-latex-code "<>\n") #+END_SRC I don't think there's any way to achieve such functionality currently. -- Sébastien Miquel

Re: <> and ?font-lock? fly-check, ...

2021-05-02 Thread Sébastien Miquel
g that doesn't interfere with bash syntax. Regards, -- Sébastien Miquel

Re: [PATCH] ob-tangle.el: Speed up tangling

2021-05-01 Thread Sébastien Miquel
be grouped according to language, and are now tangled in the order in which they appear. I assumed this was an oversight in the previous code, but since this test exists, maybe it was intended ? Nicolas Goaziou wrote this test, perhaps he could comment on this. Regards, -- Sébastien Miq

Re: [PATCH] ob-tangle.el: Speed up tangling

2021-04-20 Thread Sébastien Miquel
user will certainly notice and should assume that everything is broken until another tangling succeeds. I've kept the modes improvements. Regards, -- Sébastien Miquel >From 6b123c956ac7abe0210cf7b1145ebe0a68f04713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: S

Re: [PATCH] ob-tangle.el: Speed up tangling

2021-04-19 Thread Sébastien Miquel
laced the use of ~when-let~. Regards, -- Sébastien Miquel >From 82e4c1beade71194c90d377cdff7ef23532f4aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Sat, 17 Apr 2021 21:48:30 +0200 Subject: [PATCH] ob-tangle.el: Improve tangling ,* lisp/ob-tangle.el (org-babel-

[PATCH] ob-tangle.el: Speed up tangling

2021-04-18 Thread Sébastien Miquel
collected blocks by tangled file name. (org-babel-tangle): Avoid quadratic behavior in number of blocks. -- Sébastien Miquel >From 939fedb0fa94f044eda6966f55f460aa292e345f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Sat, 17 Apr 2021 21:48:30 +0200 Subject: [PATCH]

Bug: Can't set background color of latex fragment

2021-04-07 Thread Sébastien Miquel
mmit 2f9e1569f which adds the option `-bg Transparent` to the arguments of `dvipng`. According to its manual, this option should be ignored if a background is already set, but it doesn't seem to be. Perhaps org should set it differently. -- Sébastien Miquel

Re: Using backticks for the inline code delimeter?

2021-03-31 Thread Sébastien Miquel
nd `org-do-emphasis-faces`. Maybe that'd be enough. For the cosmetic part, there's this  piece of code from https://archive.casouri.cat/note/2020/better-looking-verbatim-markup-in-org-mode/index.html that displays org's `=` and `~` markers as ```. -- Sébastien Miquel

Re: Why is there no inline-src syntax highlighting?

2021-03-29 Thread Sébastien Miquel
ults). Regards, -- Sébastien Miquel

Re: [PATCH] org.el (org-do-latex-and-related): Fix duplicate 'latex-and-related faces

2021-03-25 Thread Sébastien Miquel
ldn't get fontification, I think  - If you add an empty line in a multiline $ fragment by mistake, which    breaks fontification, then remove it -- Sébastien Miquel >From 7fb4e2d408791742281bf220d227ccdcfd5baa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Fri,

[PATCH] org.el (org-do-latex-and-related): Fix duplicate 'latex-and-related faces

2021-03-19 Thread Sébastien Miquel
properties. The attached patch fixes this. -- Sébastien Miquel >From ccce24e08b903e0e955a6b22f6c7321851ec5750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Fri, 19 Mar 2021 16:55:27 +0100 Subject: [PATCH] org.el (org-do-latex-and-related): Fix duplicate 'latex fa

Re: [PATCH] org-compat.el (org-mode-flyspell-verify): Do not spell check code in headline

2021-03-14 Thread Sébastien Miquel
ase let me know I'll update your status listed at <https://orgmode.org/worg/org-contribute.html>). Thanks. I have completed the paperwork. -- Sébastien Miquel

[PATCH] org-compat.el (org-mode-flyspell-verify): Do not spell check code in headline

2021-03-07 Thread Sébastien Miquel
Hi, Currently code and verbatim snippets, and LaTeX fragments are spell checked by `flyspell` if they're in a headline. The attached patch fixes that. -- Sébastien Miquel >From b4291ce0ea455af499e75d3c9313183a0e8f46ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel

[PATCH] ~org-font-lock-add-priority-faces~: ensure priority cookies are in a headline

2021-02-26 Thread Sébastien Miquel
Priority cookies are always in a headline. The attached patch speeds up fontification of a 1k lines buffer by 0.1 second. Note that the variable org-priority-regexp can't be modified since it is used in the agenda and in org-get-priority. Regards, -- Sébastien Miquel

Re: Typing latency

2021-02-15 Thread Sébastien Miquel
hange this makes wrt to typing latency. -- Sébastien Miquel

Re: local variables and export processing in hooks

2021-02-11 Thread Sébastien Miquel
copied buffer. Also, these variables are set after macro expansion (and org-export-before-parsing-hook). I'm curious, could you explain why/how you use macros to set variables in the original buffer ? -- Sébastien Miquel

Re: Typing latency

2021-02-09 Thread Sébastien Miquel
27;ve set it so aswell. It does speed up the initial fontification of the buffer. I've looked into org-do-latex-and-related, but even replacing it with a dud doesn't fix the delay, which must be caused by the already fontified parts. I guess the issue must be wih emacs' internals. -- Sébastien Miquel

Re: Typing latency

2021-02-09 Thread Sébastien Miquel
priority cookies). I doubt that those two account for the whole of the slowdown, but I'll be checking it out. -- Sébastien Miquel

Re: Typing latency

2021-02-09 Thread Sébastien Miquel
Russell Adams writes: My only suggestion is have you looked at disabling flyspell? Yes, thank you. Flyspell can cause some delay on its own aswell, but in this situation/configuration it doesn't change the results. -- Sébastien Miquel

Re: Typing latency

2021-02-09 Thread Sébastien Miquel
Eric S Fraga writes: What Emacs version are you using? This is using the latest ative-comp git branch. -- Sébastien Miquel

Re: local variables and export processing in hooks

2021-02-09 Thread Sébastien Miquel
le and its value can be read during macro expansion. It seems the org-export-before-parsing-hook functions are run before the #+BIND values are collected (see org-export-as in ox.el). -- Sébastien Miquel

Re: Bug: Unexpected movement of cursor when commenting code blocks

2021-01-15 Thread Sébastien Miquel
ly happens in Org-mode, not when I edit the code block in a separate buffer with "C-c C-'". I have previously proposed a patch that I think fixes this issue, see https://orgmode.org/list/3072e244-4615-aaad-4019-621bb3d1d...@posteo.eu/#t Regards, -- Sébastien Miquel

Re: [Patch] Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-10-23 Thread Sébastien Miquel
I've fixed an issue in my previous patch with the write-back buffer not getting killed. Quick recap of the issue for anyone who might be interested: When ~org-src-tab-acts-natively~ is t (which is now the default) functions such as ~indent-region~ and ~comment-region~ acting on a src block wi

Re: [Patch] Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-10-04 Thread Sébastien Miquel
Hi, The attached patch fixes this issue for emacs >= 26.1. It also fixes a similar issue where comment-line moves the cursor to the beginning of the block aswell. Can this patch be applied ? Regards, Sébastien Miquel >From 36f01b8e9d8dc335564f8dc932caf21c43c374eb Mon Sep 17 00:00:0

Re: [PATCH] org-preview-latex-fragment dvipng fix for packages in org-latex-packages-alist breaking 'latex' command

2020-09-19 Thread Sébastien Miquel
Hi, If I've understood your problem correctly, simply using ("" "fontspec" nil) in org-latex-packages-alist should fix your issue. Per the documentation, this third argument stops the package from being used when compiling preview fragments. Regards, Sébastien Gabriel S. X. Smith writes

Re: [PATCH] Bug: Fontification: Heading following a comment

2020-09-15 Thread Sébastien Miquel
ve replaced all instances of blank with (any " \t") in this function (that's the only instances in org.el). The attached patch fixes the original issue. Regards, Sébastien Miquel Nicolas Goaziou wrote: Hello, Sebastien Miquel writes: (rx

Re: Bug: org-block face isn't applied to special blocks

2020-09-14 Thread Sébastien Miquel
As far as src blocks being treated differently, there's already the ~org-src-block-faces~ variable. How about the following :  + Make the ~org-block~ face apply to every block  + either    - add an ~org-src-block~ face    - modify ~org-src-block-faces~ to allow a catch-all case    It'd be nice

Re: Bug: org-block face isn't applied to special blocks

2020-09-10 Thread Sébastien Miquel
ng. (It is also more in line with the previous docstring). (I also think it should apply to unrecognized src blocks) Regards, Sebastien Hi Sébastien Sébastien Miquel writes: Hi Bastien, With latest org-mode master, and emacs -q, run (defface org-block '((t (:background "#494949

Re: Bug: org-block face isn't applied to special blocks

2020-09-04 Thread Sébastien Miquel
he src block, and not to the quote block, nor the special block. #+BEGIN_theorem #+END_theorem #+BEGIN_SRC sh #+END_SRC #+BEGIN_QUOTE #+END_QUOTE Regards, Hi Sébastien, Sébastien Miquel writes: Afaict, the org-block face isn't applied to special blocks. Its documentation i

Couple of issues with org block meta lines faces

2020-07-10 Thread Sébastien Miquel
Hi, If you start emacs as follows, making sure emacs picks up the latest org from org-plus-contrib, and with file.org being the content of this mail, #+BEGIN_SRC sh :async emacs -q \   --eval "(defface org-block-begin-line '((t (:background \"blue\" :height 0.8))) \"\")" \   --eval "

Re: Breaking line inside list item

2020-06-29 Thread Sébastien Miquel
. Hello, Sébastien Miquel writes: Is there a binding or functionality to go from this, (where | is the cursor position):  - Cogito, |ergo sum. To this:  - Cogito,    |ergo sum. There is RET or C-j, depending on your settings. In the case of nested list, a way to cycle the indentation

Breaking line inside list item

2020-06-29 Thread Sébastien Miquel
Hi, Is there a binding or functionality to go from this, (where | is the cursor position):  - Cogito, |ergo sum. To this:  - Cogito,    |ergo sum. Pressing enter + tab (calls ~indent-for-tab-command~) doesn't work : the line is indented to the dash instead. Although ~indent-for-tab-command

org-babel block with :exports code that gets evaluated on export

2020-04-01 Thread Sébastien Miquel
Hi, Is there a way to have an org-babel block which only exports its code but still gets evaluated when exporting ?

Re: Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-02-29 Thread Sébastien Miquel
Hi Bastien, Thank you again for looking into this. I guess you couldn't find an easy fix. This bug is quite the pain, since it gets triggered by the comment-line function: every time I try to comment something, the cursor goes to the beginning of the block. With org-src-tab-acts-natively b

Bug: org-block face isn't applied to special blocks

2020-02-29 Thread Sébastien Miquel
Afaict, the org-block face isn't applied to special blocks. Its documentation implies it applies to any block. The relevant function is org-fontify-meta-lines-and-blocks-1. It may be a simple matter of changing the logic a bit and adding (add-face-text-property bol-after-beginline beg-of-endli

Re: Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-02-09 Thread Sébastien Miquel
se. Hi Sébastien, Sébastien Miquel writes: Thank you for your reply. I can still reproduce with latest Org Mh, yes, I can reproduce this now, and this is fixed in maint. Thanks!

Re: Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-02-03 Thread Sébastien Miquel
Hi, Thank you for your reply. I can still reproduce with latest Org: what I did was start emacs with emacs -q --load empty_init.el, with empty_init.el setting the org package-archive to http://orgmode.org/elpa/, update org to 9.3.2 then proceed with the previous steps. The result is the same.

Bug: org-indent-region doesn't restore cursor position when org-src-tab-acts-natively is t [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]

2020-02-02 Thread Sébastien Miquel
Given the following src block in org-mode: #+BEGIN_SRC emacs-lisp (defun my-function ()   (instruction1)   (instruction2) ;;  (instruction3)   ) #+END_SRC Steps to reproduce (with emacs -Q):  1) set org-src-tab-acts-natively to t  2) set the mark at the beginning of the function definition insid

<    1   2