From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +GsOKVDmXGCReAAAgWs5BA (envelope-from ) for ; Thu, 25 Mar 2021 20:36:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eEnOJFDmXGCQQAAA1q6Kng (envelope-from ) for ; Thu, 25 Mar 2021 19:36:48 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1F4EA176F3 for ; Thu, 25 Mar 2021 20:36:48 +0100 (CET) Received: from localhost ([::1]:55512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPVmh-0004hP-8P for larch@yhetil.org; Thu, 25 Mar 2021 15:36:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPVlH-0004fj-RI for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 15:35:25 -0400 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:38540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPVlC-0004w1-5E for emacs-orgmode@gnu.org; Thu, 25 Mar 2021 15:35:19 -0400 Received: by mail-qk1-x729.google.com with SMTP id c3so2988723qkc.5 for ; Thu, 25 Mar 2021 12:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=qvNqQrRp6GxWznOsC92zeSk/KDmctX2P1N1oza5eFwM=; b=HbN0gsntCc1H6ZTdFtI7XBW7RQb9xwWk4CL7ZLKmmBWjoJFrinx5MAYCZCpHy4h2PT l3lF/vDP5heipMrocNPAOK4Nssawn5QjwmD0gyvQ9JTgNYd7NZD4KHqqyHCkz9m+7iq8 1cM+ctOmr+9nU+Ayxv7pZaS2DP/CMlMJ0g5CTznBGjYorkUDiNjtzGtzJ1u5iRe4xkS9 jUIesKbJZdpMsiupI1FN5UYv2iKZOHlSFJPpBjPMxPCFWaN00hZN+ptTjiJOFaGZcCCU X94dwj2CuFTY07QvUMmaxC1il7dd/Ns/xPMGmQRCZ0FjbytmQF6q1r0+zAEWRQLgbnjR 18fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=qvNqQrRp6GxWznOsC92zeSk/KDmctX2P1N1oza5eFwM=; b=HRWWMR3kU4XH8DrCdBleEuxn3JYDUl+mnWA0XJtZgi0iJaug9q3UsrMFmLKqWZoO6Z DY3VoUVDQ0zuR3bY6lNfso41reCQ0Zousa/feMMFDjyDx91F2VY8jCpVn/LQdHv4HXKE Vo9fv+gxUP4F0FcXQ9ZHocp2MgGWW5nYYnuwqzfMks7OAw8zhGkUPcYo8D0mj7jfMKNt eakwyaTjauJCkiVocMy7skDcpfH9+oX1qmZ8lnmAitew69xnUQa0+riXIDKicps2LmIC SFkKyW0p0K+xJj9d6Q3Vvj3wMM7Tntnlzyywm6yV3Gx4m/dpSN/MkT9FcgoHKD6WnRRS JvVg== X-Gm-Message-State: AOAM533cYOu30PxHKicWlR42gY8uDq8NcAsgF+DD1v7dIt8+5AaWswsi +Y3Ap9ea8StsiJRafDy4Fj3Ib7169xk= X-Google-Smtp-Source: ABdhPJwGfKHb10IZ87mraI0cxLY8MyE1LLBS76D36E+N9TWRSwHhw8nktbV5/rj/N2GoCw1HQ7YEiA== X-Received: by 2002:a37:74d:: with SMTP id 74mr10060749qkh.85.1616700912067; Thu, 25 Mar 2021 12:35:12 -0700 (PDT) Received: from note (179-96-134-25.life.com.br. [179.96.134.25]) by smtp.gmail.com with ESMTPSA id p8sm4347432qtu.8.2021.03.25.12.35.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 12:35:11 -0700 (PDT) From: Renato Ferreira 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 Message-ID: <87tuozgh75.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=renatofdds@gmail.com; helo=mail-qk1-x729.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616701008; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qvNqQrRp6GxWznOsC92zeSk/KDmctX2P1N1oza5eFwM=; b=gMIMIO/R5goOuhzkgdPkE+ebOnbRpJHb5NGgUfta4JoaCXyB/Y895S2MVADPygJ/uPCfMy 3Evp1/uuIfC5h6+Jx2P4D156LsJ4EaTgkIVxLxjsHrVcem4A3W+4KjbNoCswsoRRJDienB oXvVyEUJbZfakw4IxcE06ZtF9VDG9fkeA3um55LkgzHheIEgKEpE1lT8e3QJLH5k/R0eul XZPw0NUwQaBuG+kSEnTQnabNga37Wh64x6gdtzoO7Og0nzGEN2ATzIzl4ScUSoJ+BYkaon dDG579Jotne1yrVzrRWGCpyJiuSMiedNwWGb8D8jHsAMkskKnEaA6Iu7rNcwUQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616701008; a=rsa-sha256; cv=none; b=eXUQjXgXeymzUyjgUc8af/7JwyPBnXu/LcCo5lczr3XgH95wHBXR7TXpTqXlf7azkwAu3Z 8+11sUP12WY6fy5fEoNMQLAtAqmmmBTR4XFXlDGFEKpSG16h0IY+wrsXT2ahX/1lYfi4Iu hMcxCszouOAtq7aIzLJ8ITdwvNwh8kRyTtDJoNfDtuXxHDFA8Zn6BT5J2mrLECVnOGXoS8 QJvBf1GjAC+Y2cLyp3pFn/dgY6gCX6g8B4ygkbGQKRPsMdNFOsqKhZdRLCXOlD0G+oSwCx xa4CrSBZVaGI70lRmBZdyIO3OMkrJEaFjW17g50H6DAj4F/b9cdwre67I6LHrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=HbN0gsnt; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=HbN0gsnt; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 1F4EA176F3 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: IdgkXSAckoPy * 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