From: Renato Ferreira <renatofdds@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-agenda.el: Rename org-agenda-format-item parameters
Date: Thu, 25 Mar 2021 16:35:10 -0300 [thread overview]
Message-ID: <87tuozgh75.fsf@gmail.com> (raw)
* org-agenda.el (org-agenda-format-item): Rename parameters so they
don't clash with dynamic variables used by
`org-prefix-format-compiled'.
TINYCHANGE
---
lisp/org-agenda.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 33b3786f2..f22e6fa65 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6654,14 +6654,14 @@ The flag is set if the currently compiled format contains a `%b'.")
(cl-return (cadr entry))
(cl-return (apply #'create-image (cdr entry)))))))
-(defun org-agenda-format-item (extra txt &optional level category tags dotime
+(defun org-agenda-format-item (extra txt &optional with-level with-category tags dotime
remove-re habitp)
"Format TXT to be inserted into the agenda buffer.
In particular, add the prefix and corresponding text properties.
EXTRA must be a string to replace the `%s' specifier in the prefix format.
-LEVEL may be a string to replace the `%l' specifier.
-CATEGORY (a string, a symbol or nil) may be used to overrule the default
+WITH-LEVEL may be a string to replace the `%l' specifier.
+WITH-CATEGORY (a string, a symbol or nil) may be used to overrule the default
category taken from local variable or file name. It will replace the `%c'
specifier in the format.
DOTIME, when non-nil, indicates that a time-of-day should be extracted from
@@ -6698,7 +6698,7 @@ Any match of REMOVE-RE will be removed from TXT."
(defvar breadcrumbs) (defvar category) (defvar category-icon)
(defvar effort) (defvar extra)
(defvar level) (defvar tag) (defvar time))
- (let* ((category (or category
+ (let* ((category (or with-category
(if buffer-file-name
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))
@@ -6796,7 +6796,7 @@ Any match of REMOVE-RE will be removed from TXT."
time-grid-trailing-characters)))
(t ""))
category (if (symbolp category) (symbol-name category) category)
- level (or level ""))
+ level (or with-level ""))
(if (string-match org-link-bracket-re category)
(progn
(setq l (string-width (or (match-string 2) (match-string 1))))
--
2.31.0
next reply other threads:[~2021-03-25 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 19:35 Renato Ferreira [this message]
2021-03-30 3:20 ` [PATCH] org-agenda.el: Rename org-agenda-format-item parameters Kyle Meyer
2021-03-30 20:21 ` Renato Ferreira
2021-03-31 4:11 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuozgh75.fsf@gmail.com \
--to=renatofdds@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.