From mboxrd@z Thu Jan 1 00:00:00 1970 From: Madan Ramakrishnan Subject: [PATCH] Agenda: Fix org-agenda-bulk-toggle when point is at already marked item Date: Sun, 15 Apr 2012 22:29:49 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30564067a607ab04bdc298eb Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJc6L-0005Cx-Vh for emacs-orgmode@gnu.org; Sun, 15 Apr 2012 22:55:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJc6K-0008OY-6E for emacs-orgmode@gnu.org; Sun, 15 Apr 2012 22:55:37 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:47771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJc6J-0008OH-SU for emacs-orgmode@gnu.org; Sun, 15 Apr 2012 22:55:36 -0400 Received: by ggeq1 with SMTP id q1so2684923gge.0 for ; Sun, 15 Apr 2012 19:55:32 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --20cf30564067a607ab04bdc298eb Content-Type: text/plain; charset=ISO-8859-1 * lisp/org-agenda.el (org-agenda-bulk-mark): truly make arg optional as advertised by the function Problem here was that org-agenda-bulk-toggle calls org-agenda-bulk-mark with no parameters; however, the (max arg 1) call inside org-agenda-bulk-mark will fail with no parameter. Change the max to an or and all is well. This is my first patch for org so apologies for any inadvertent missteps TINYCHANGE --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 0ffaadb..4e9473d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8299,7 +8299,7 @@ This is a command that has to be installed in `calendar-mode-map'." (defun org-agenda-bulk-mark (&optional arg) "Mark the entry at point for future bulk action." (interactive "p") - (dotimes (i (max arg 1)) + (dotimes (i (or arg 1)) (unless (org-get-at-bol 'org-agenda-diary-link) (let* ((m (org-get-at-bol 'org-hd-marker)) ov) -- 1.7.9.2 --20cf30564067a607ab04bdc298eb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
* lisp/org-agenda.el (org-agenda-bulk-mark): truly make arg optional
as advertised by the function

Problem her= e was that org-agenda-bulk-toggle calls org-agenda-bulk-mark
with= no parameters; however, the (max arg 1) call inside org-agenda-bulk-mark
will fail with no parameter. =A0Change the max to an or and all is wel= l.

This is my first patch for org so apologies for= any inadvertent missteps

TINYCHANGE
---
=A0lisp/org-agenda.e= l | =A0 =A02 +-
=A01 file changed, 1 insertion(+), 1 deletion(-)<= /div>

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.= el
index 0ffaadb..4e9473d 100644
--- a/lisp/org-agenda.el
=
+++ b/lisp/org-agenda.el
@@ -8299,7 +8299,7 @@ This is a com= mand that has to be installed in `calendar-mode-map'."
=A0(defun org-agenda-bulk-mark (&optional arg)
=A0 =A0"M= ark the entry at point for future bulk action."
=A0 =A0(inte= ractive "p")
- =A0(dotimes (i (max arg 1))
+ = =A0(dotimes (i (or arg 1))
=A0 =A0 =A0(unless (org-get-at-bol 'org-agenda-diary-link)
=A0 =A0 =A0 =A0(let* ((m (org-get-at-bol 'org-hd-marker))
= =A0 =A0 =A0 ov)
--= =A0
1.7.9.2

--20cf30564067a607ab04bdc298eb--