emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Agenda: Fix org-agenda-bulk-toggle when point is at already marked item
@ 2012-04-16  2:29 Madan Ramakrishnan
  2012-04-16  6:36 ` Nick Dokos
  2012-04-20 12:55 ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Madan Ramakrishnan @ 2012-04-16  2:29 UTC (permalink / raw)
  To: emacs-orgmode

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

* 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

[-- Attachment #2: Type: text/html, Size: 1448 bytes --]

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

end of thread, other threads:[~2012-04-20 12:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16  2:29 [PATCH] Agenda: Fix org-agenda-bulk-toggle when point is at already marked item Madan Ramakrishnan
2012-04-16  6:36 ` Nick Dokos
2012-04-16 12:07   ` Madan Ramakrishnan
2012-04-16 14:07     ` Nick Dokos
2012-04-20 12:55 ` Bastien

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