[BUG] Patch: Add an option to silence org-latex-preview (also a feature request) [9.7.11 (release_9.7.11 @ /usr/local/share/emacs/30.0.91/lisp/org/)]

2024-10-04 Thread Daan Ro
[PATCH] org-latex-preview: add org-latex-preview-quiet customization

* lisp/org.el (org-latex-preview): define customizable boolean
org-latex-preview-quiet.

Emacs : GNU Emacs 30.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, 
cairo version 1.18.2)
of 2024-09-30
Package: Org mode version 9.7.11 (release_9.7.11 @ 
/usr/local/share/emacs/30.0.91/lisp/org/)

Daanturo



0001-org-latex-preview-add-org-latex-preview-quiet-customization.patch
Description: Binary data


Quick fix: ATTR_BEAMER not showing in autocompletion

2024-10-04 Thread Pedro Andres Aranda Gutierrez
Hi,

I needed to prepare a couple of slides on emacs-30.0.91 and while editing
found that I wasn't getting ATTR_BEAMER in the autocompletion. Attached is
a quick fix for that on the main branch. I hope it can be applied on elpa
too and maybe make it to emacs-30 on time.

-- 
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
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 01ee2ac8b..7ab3bde5f 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -232,7 +232,8 @@ When completing for #+STARTUP, for example, this function returns
 			  ;; a space.
 			  (and (member name '("EXPORT" "SRC")) " "))
 		  block-names)
-		(push (format "ATTR_%s: " name) block-names)))
+		(push (format "ATTR_%s: " name) block-names))
+  (push "ATTR_BEAMER:" block-names))
 	(mapcar (lambda (keyword) (concat keyword ": "))
 		(org-get-export-keywords
(substring pcomplete-stub 2)))


[BUG] A call of (org-end-of-meta-data t) goes too far in a heading with only whitespace

2024-10-04 Thread Benjamin McMillan
Specifically, a call to (org-end-of-meta-data t) with point at the > on the
following tree will go all the way to the next heading.
In contrast, a call to just (org-end-of-meta-data), without the FULL flag,
will go to the beginning of heading content, as expected.
* >heading


* another heading


The issue arises from the code for skipping clock lines, which does so by
checking if point is looking at (concat "[ \t]*$" "\\|" org-clock-line-re).
I'm not sure of the intention of the first alternative, the "[ \t]*$", but
it matches an empty line, and so the loop advances point to the next line,
until reaching the next heading in the case above.
Removing that from the regexp appears to fix the issue.

If this change is fine, then I am happy to provide a patch.
Thanks,
Ben


Re: org-element-cache error when storing footnotes using capture buffer

2024-10-04 Thread Akash


Dear Maintainers,

I seem to have been able to solve this issue through some brute force debugging.
The problem emanates from when copying over the local variables, especially the 
`buffer-file-name' variable

The function definition `org-src--edit-element' contains a provision to make 
the said variable nil - but it is quickly reset during initialisation of the 
buffer just 1 line downstream. Moving the setq statement 4 lines below seems to 
solve the issue,

Herein I give the patch,

```
--- org-src.el  2024-10-04 15:54:11.357117268 +0530
+++ org-src-patched.el  2024-10-04 15:55:24.041730163 +0530
@@ -609,7 +609,6 @@
(let ((lf (eq type 'latex-fragment)))
   (unless preserve-ind (org-do-remove-indentation (and lf block-ind) 
lf)))
(set-buffer-modified-p nil)
-   (setq buffer-file-name nil)
;; Initialize buffer.
(when (functionp initialize)
  (let ((org-inhibit-startup t))
@@ -617,6 +616,7 @@
(funcall initialize)
  (error (message "Initialization fails with: %S"
  (error-message-string e))
+   (setq buffer-file-name nil)
;; Transmit buffer-local variables for exit function.  It must
;; be done after initializing major mode, as this operation
;; may reset them otherwise.

```

The following in .init can also be done by users not willing to patch the 
source file `org-src.el'

;; ---

(defun patch/org-src--edit-element (&rest args)
  (setq-local buffer-file-name nil))
(advice-add 'org-src--edit-element
:after
#'patch/org-src--edit-element)

;; ---


Thank you,
Akash P