emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Have org-string-width's temporary buffer be declared as such
@ 2025-02-02 19:38 Jules Tamagnan
  0 siblings, 0 replies; only message in thread
From: Jules Tamagnan @ 2025-02-02 19:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Hi all,

I hope this email finds you well. This is my first time contributing to
this mailing list attempting to contribute to org-mode, so hopefully I
do this correctly.

I recently noticed that `org-string-width` ran all buffer hooks like
`buffer-list-update-hook` for the ` *Org string width*` buffer. This
doesn't seem needed because it feels like ` *Org string width*` should
act like a temporary buffer that is only needed for these simple
operations. With that in mind I wanted to set `inhibit-buffer-hooks` to
`t`.

Hopefully this rationale and patch makes sense. After getting this in I
can also review other places that `get-buffer-create` is used and
possible use `inhibit-buffer-tools` there as well if it would help.

Best,
Jules


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Have org-string-width's temporary buffer be declared as such --]
[-- Type: text/x-patch, Size: 945 bytes --]

From cc8dc0a9d8d4b72f2a820dd901b6ddcb9727b9fb Mon Sep 17 00:00:00 2001
From: Jules Tamagnan <jtamagnan@gmail.com>
Date: Fri, 31 Jan 2025 11:36:13 -0800
Subject: [PATCH] Have org-string-width's temporary buffer be declared as such

---
 lisp/org-macs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 044c49efb..9d35857e2 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -1199,7 +1199,7 @@ STRING width.  When REFERENCE-FACE is nil, `default' face is used."
                      (push el result)))
                  result)))
           (current-char-property-alias-alist char-property-alias-alist))
-      (with-current-buffer (get-buffer-create " *Org string width*")
+      (with-current-buffer (get-buffer-create " *Org string width*" t)
         (setq-local display-line-numbers nil)
         (setq-local line-prefix nil)
         (setq-local wrap-prefix nil)
--
2.47.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-02 19:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 19:38 [PATCH] Have org-string-width's temporary buffer be declared as such Jules Tamagnan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).