all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add alias for `org-insert-structure-template' using "block" term
@ 2024-11-14  3:09 Okamsn via General discussions about Org-mode.
  2024-12-23 17:43 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Okamsn via General discussions about Org-mode. @ 2024-11-14  3:09 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

Markup structures like "#+begin_src" and "#+being_quote" can be
inserted using the command `org-insert-structure-template'.  In much
of the documentation, these structures are called "blocks", including
the existing documentation for `org-insert-structure-template'.
I personally found the name `org-insert-structure-template' harder to 
remember when wanting to insert a "block", because I kept assuming that 
the word "block" would be used in the name of the command.

This attached patch adds the alias `org-insert-block-template' for 
`org-insert-structure-template', which I would have found more memorable 
when learning how to use Org's markup blocks.

Thank you.

[-- Attachment #2: 0001-org.el-Add-alias-for-org-insert-structure-template-u.patch --]
[-- Type: text/x-patch, Size: 1363 bytes --]

From b58cf3de62bdc34c5ead9a40fe8ad424ed55da73 Mon Sep 17 00:00:00 2001
From: Earl Hyatt <okamsn@protonmail.com>
Date: Wed, 13 Nov 2024 21:31:10 -0500
Subject: [PATCH] org.el: Add alias for `org-insert-structure-template' using
 "block" term

* lisp/org.el (org-insert-block-template): Create as an alias
of `org-insert-structure-template'.

Markup structures like "#+begin_src" and "#+being_quote" can be
inserted using the command `org-insert-structure-template'.  In much
of the documentation, these structures are called "blocks", including
the existing documentation for `org-insert-structure-template'.
Therefore, add the alias `org-insert-block-template' as a more
discoverable name in case a user is familiar with the term "block"
but not with the term "structure".
---
 lisp/org.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org.el b/lisp/org.el
index 1e9057935..a47ee3567 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9276,6 +9276,7 @@ (defun org--insert-structure-template-unique-keys (keys)
 	    (cl-sort menu-keys #'<
 		     :key (lambda (elm) (cl-position (cdr elm) keys))))))
 
+(defalias 'org-insert-block-template #'org-insert-structure-template)
 (defun org-insert-structure-template (type)
   "Insert a block structure of the type #+begin_foo/#+end_foo.
 Select a block from `org-structure-template-alist' then type
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-23 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14  3:09 [PATCH] Add alias for `org-insert-structure-template' using "block" term Okamsn via General discussions about Org-mode.
2024-12-23 17:43 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.