emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Make predicates non-interactive
@ 2023-03-23  4:22 Aaron L. Zeng
  2023-03-23 12:01 ` Ihor Radchenko
  2023-03-23 15:03 ` Max Nikulin
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron L. Zeng @ 2023-03-23  4:22 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Aaron L. Zeng

Predicates like `org-first-sibling-p' are no use when called
interactively, and should not appear in the M-x prompt.

TINYCHANGE
---
 lisp/org.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 23cb6012d..20e6ea6d9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9876,7 +9876,6 @@ inactive time ranges.
 When this function returns a non-nil value, match data is set
 according to `org-tr-regexp-both' or `org-tr-regexp', depending
 on INACTIVE-OK."
-  (interactive)
   (save-excursion
     (catch 'exit
       (let ((pos (point)))
@@ -15475,7 +15474,6 @@ If Org mode thinks that point is actually inside
 an embedded LaTeX environment, return t when the environment is math
 or let `texmathp' do its job otherwise.
 `\\[org-cdlatex-mode-map]'"
-  (interactive)
   (cond
    ((not (derived-mode-p 'org-mode)) (apply orig-fun args))
    ((eq this-command 'cdlatex-math-symbol)
@@ -20525,7 +20523,6 @@ point before the first headline or at point-min."
 
 (defun org-first-sibling-p ()
   "Is this heading the first child of its parents?"
-  (interactive)
   (let ((re org-outline-regexp-bol)
 	level l)
     (unless (org-at-heading-p t)
--
2.38.4



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

* Re: [PATCH] Make predicates non-interactive
  2023-03-23  4:22 [PATCH] Make predicates non-interactive Aaron L. Zeng
@ 2023-03-23 12:01 ` Ihor Radchenko
  2023-03-23 15:03 ` Max Nikulin
  1 sibling, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-03-23 12:01 UTC (permalink / raw)
  To: Aaron L. Zeng; +Cc: emacs-orgmode

"Aaron L. Zeng" <me@bcc32.com> writes:

> Predicates like `org-first-sibling-p' are no use when called
> interactively, and should not appear in the M-x prompt.
>
> TINYCHANGE
> ---
>  lisp/org.el | 3 ---
>  1 file changed, 3 deletions(-)

Thanks!
Applied, onto main. I added appropriate CHANGELOG entries to the commit message.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=04087be6b

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [PATCH] Make predicates non-interactive
  2023-03-23  4:22 [PATCH] Make predicates non-interactive Aaron L. Zeng
  2023-03-23 12:01 ` Ihor Radchenko
@ 2023-03-23 15:03 ` Max Nikulin
  1 sibling, 0 replies; 3+ messages in thread
From: Max Nikulin @ 2023-03-23 15:03 UTC (permalink / raw)
  To: Aaron L. Zeng, emacs-orgmode

On 23/03/2023 11:22, Aaron L. Zeng wrote:
> +++ b/lisp/org.el
...
> @@ -15475,7 +15474,6 @@ If Org mode thinks that point is actually inside
>   an embedded LaTeX environment, return t when the environment is math
>   or let `texmathp' do its job otherwise.
>   `\\[org-cdlatex-mode-map]'"
> -  (interactive)
>     (cond
>      ((not (derived-mode-p 'org-mode)) (apply orig-fun args))
>      ((eq this-command 'cdlatex-math-symbol)

Might it be source of problems since `texmathp' is declared as 
interactive and the purpose of this function is to be around advice? 
Likely it is a false alarm since the functions have no interactive 
arguments.



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

end of thread, other threads:[~2023-03-23 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  4:22 [PATCH] Make predicates non-interactive Aaron L. Zeng
2023-03-23 12:01 ` Ihor Radchenko
2023-03-23 15:03 ` Max Nikulin

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).