From mboxrd@z Thu Jan 1 00:00:00 1970 From: netty hacky Subject: Re-marking agenda entries, with advice on org-agenda-bulk-action in .emacs Date: Sun, 2 Oct 2011 02:13:38 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf307c9d4c1abf0404ae4d46e2 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAI7B-0007DK-I0 for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:13:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAI7A-0007tc-Dk for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:13:41 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:49791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAI7A-0007tP-BJ for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:13:40 -0400 Received: by vws16 with SMTP id 16so2712103vws.0 for ; Sun, 02 Oct 2011 02:13:39 -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 --20cf307c9d4c1abf0404ae4d46e2 Content-Type: text/plain; charset=ISO-8859-1 Hello, The issue of re-marking agenda entries has been raised before: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00200.html I am facing the same problem. I always do more than one bulk actions on the same set of agenda entries, so having to re-mark them manually has been a pain. The org-agenda-bulk-mark-regexp command sort of helped, but I still prefer the Dired behavior of retaining the mark after action is performed, (typing one 'U' is much less keystroke than any manual re-marking). Anyway, I put the following piece of code in .emacs to give me the Dired like behavior. It seems to work for me. Since I'm new to Emacs Lisp and this is the 2nd day I'm hacking Org-mode code, could anyone help spot anything I did stupid here that may shoot me in the foot? Much appreciated. (eval-after-load 'org-agenda '(defadvice org-agenda-bulk-action (around bulk-re-mark (&optional arg) activate) "Re-mark entries marked before action." (let ((entries (copy-sequence org-agenda-bulk-marked-entries))) ad-do-it (let (pos (cnt 0) (cntskip 0) (msg (current-message))) (dolist (e entries) (setq pos (text-property-any (point-min) (point-max) 'org-hd-marker e)) (if (not pos) (setq cntskip (1+ cntskip)) (goto-char pos) (call-interactively 'org-agenda-bulk-mark) (setq cnt (1+ cnt)))) (message "%s (%d entries re-marked, %d skipped)" msg cnt cntskip))))) Cheers, Net P.S. I would like to express my sincere gratitude to all who helped make Org-mode such a beautiful piece of software and a life-changing experience. --20cf307c9d4c1abf0404ae4d46e2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

The issue of re-marking agenda entries has been raised before= :
http://lists.gnu.org/archive/html/emacs-orgmo= de/2011-02/msg00200.html

I am facing the same problem.=A0 I always do more than one bulk actions= on the same set of agenda entries, so having to re-mark them manually has = been a pain.=A0 The org-agenda-bulk-mark-regexp command sort of helped, but= I still prefer the Dired behavior of retaining the mark after action is pe= rformed, (typing one 'U' is much less keystroke than any manual re-= marking).

Anyway, I put the following piece of code in .emacs to give me the Dire= d like behavior.=A0 It seems to work for me.=A0 Since I'm new to Emacs = Lisp and this is the 2nd day I'm hacking Org-mode code, could anyone he= lp spot anything I did stupid here that may shoot me in the foot?=A0 Much a= ppreciated.

(eval-after-load 'org-agenda
=A0 '(defadvice org-agenda-bulk= -action (around bulk-re-mark
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 (&optional arg)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 activate)
=A0=A0=A0=A0 "Re-mark entries marked before action."
=A0=A0=A0= =A0 (let ((entries (copy-sequence org-agenda-bulk-marked-entries)))
=A0= =A0=A0=A0=A0=A0 ad-do-it
=A0=A0=A0=A0=A0=A0 (let (pos (cnt 0) (cntskip 0= ) (msg (current-message)))
=A0=A0=A0=A0=A0=A0=A0=A0 (dolist (e entries)<= br> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq pos (text-property-any (point-min) (po= int-max) 'org-hd-marker e))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (not = pos)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq cntskip (1+ cntski= p))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (goto-char pos)
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 (call-interactively 'org-agenda-bulk-mark)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq cnt (1+ cnt))))
=A0=A0=A0=A0= =A0=A0=A0=A0 (message "%s (%d entries re-marked, %d skipped)" msg= cnt cntskip)))))

Cheers,
Net
P.S. I would like to express my = sincere gratitude to all who helped make Org-mode such a beautiful piece of= software and a life-changing experience.
--20cf307c9d4c1abf0404ae4d46e2-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: netty hacky Subject: Re: Re-marking agenda entries, with advice on org-agenda-bulk-action in .emacs Date: Sun, 2 Oct 2011 02:28:51 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAILu-0001Md-SM for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAILt-0001Wq-Cy for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:28:54 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:36159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAILt-0001Wm-9G for emacs-orgmode@gnu.org; Sun, 02 Oct 2011 05:28:53 -0400 Received: by vws16 with SMTP id 16so2715708vws.0 for ; Sun, 02 Oct 2011 02:28:52 -0700 (PDT) In-Reply-To: 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 My bad, didn't realized I wasn't sending email in plain txt. On Sun, Oct 2, 2011 at 2:13 AM, netty hacky wrote: > Hello, > > The issue of re-marking agenda entries has been raised before: > http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00200.html > > I am facing the same problem.=A0 I always do more than one bulk actions o= n the > same set of agenda entries, so having to re-mark them manually has been a > pain.=A0 The org-agenda-bulk-mark-regexp command sort of helped, but I st= ill > prefer the Dired behavior of retaining the mark after action is performed= , > (typing one 'U' is much less keystroke than any manual re-marking). > > Anyway, I put the following piece of code in .emacs to give me the Dired > like behavior.=A0 It seems to work for me.=A0 Since I'm new to Emacs Lisp= and > this is the 2nd day I'm hacking Org-mode code, could anyone help spot > anything I did stupid here that may shoot me in the foot?=A0 Much appreci= ated. > > (eval-after-load 'org-agenda > =A0 '(defadvice org-agenda-bulk-action (around bulk-re-mark > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (&optional arg= ) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 activate) > =A0=A0=A0=A0 "Re-mark entries marked before action." > =A0=A0=A0=A0 (let ((entries (copy-sequence org-agenda-bulk-marked-entries= ))) > =A0=A0=A0=A0=A0=A0 ad-do-it > =A0=A0=A0=A0=A0=A0 (let (pos (cnt 0) (cntskip 0) (msg (current-message))) > =A0=A0=A0=A0=A0=A0=A0=A0 (dolist (e entries) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq pos (text-property-any (point-min) (= point-max) > 'org-hd-marker e)) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (not pos) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq cntskip (1+ cntskip)) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (goto-char pos) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (call-interactively 'org-agenda-bulk= -mark) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (setq cnt (1+ cnt)))) > =A0=A0=A0=A0=A0=A0=A0=A0 (message "%s (%d entries re-marked, %d skipped)"= msg cnt > cntskip))))) > > Cheers, > Net > P.S. I would like to express my sincere gratitude to all who helped make > Org-mode such a beautiful piece of software and a life-changing experienc= e. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re-marking agenda entries, with advice on org-agenda-bulk-action in .emacs Date: Wed, 25 Apr 2012 00:07:38 +0200 Message-ID: <87ty08pyvp.fsf@altern.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMnsZ-0000Wi-Iw for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 18:06:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMnsX-0000rC-To for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 18:06:35 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:49272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMnsX-0000r4-LH for emacs-orgmode@gnu.org; Tue, 24 Apr 2012 18:06:33 -0400 Received: by werj55 with SMTP id j55so959209wer.0 for ; Tue, 24 Apr 2012 15:06:31 -0700 (PDT) In-Reply-To: (netty hacky's message of "Sun, 2 Oct 2011 02:13:38 -0700") 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: netty hacky Cc: emacs-orgmode@gnu.org netty hacky writes: > The issue of re-marking agenda entries has been raised before: > http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00200.html >From latest master, you can (setq org-agenda-persistent-marks t) to get persistent marks. HTH, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Pluim Subject: Re: Re-marking agenda entries, with advice on org-agenda-bulk-action in .emacs Date: Tue, 03 Mar 2015 19:12:04 +0100 Message-ID: References: <87ty08pyvp.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSrIq-0003og-Qd for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 13:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSrIp-0001fO-Oc for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 13:12:20 -0500 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:45450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSrIp-0001fF-HJ for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 13:12:19 -0500 Received: by wivz2 with SMTP id z2so5451921wiv.4 for ; Tue, 03 Mar 2015 10:12:18 -0800 (PST) In-Reply-To: <87ty08pyvp.fsf@altern.org> (Bastien's message of "Wed, 25 Apr 2012 00:07:38 +0200") 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: Bastien Cc: emacs-orgmode@gnu.org Bastien writes: > netty hacky writes: > >> The issue of re-marking agenda entries has been raised before: >> http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00200.html > > From latest master, you can (setq org-agenda-persistent-marks t) to > get persistent marks. Hi, there's a small issue with the texi description of this feature. Fixed as follows: * org.texi (Agenda commands): Correct reference to org-agenda-persistent-marks --- doc/misc/ChangeLog | 5 +++++ doc/misc/org.texi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 448c7f2..c71355e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2015-03-03 Robert Pluim + + * org.texi (Agenda commands): Correct reference to + org-agenda-persistent-marks + 2015-02-25 Tassilo Horn * reftex.texi (Multifile Documents): Document diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 2cb80ab..63eacef 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -8995,7 +8995,7 @@ Bulk action: act on all marked entries in the agenda. This will prompt for another key to select the action to be applied. The prefix arg to @kbd{B} will be passed through to the @kbd{s} and @kbd{d} commands, to bulk-remove these special timestamps. By default, marks are removed after the bulk. If -you want them to persist, set @code{org-agenda-bulk-persistent-marks} to +you want them to persist, set @code{org-agenda-persistent-marks} to @code{t} or hit @kbd{p} at the prompt. @table @kbd -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Re-marking agenda entries, with advice on org-agenda-bulk-action in .emacs Date: Fri, 06 Mar 2015 11:54:06 +0100 Message-ID: <87bnk69z1t.fsf@nicolasgoaziou.fr> References: <87ty08pyvp.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTpsI-0002gD-Vb for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:52:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTpsF-0008Iv-Lp for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:52:58 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:40441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTpsF-0008Gg-Fj for emacs-orgmode@gnu.org; Fri, 06 Mar 2015 05:52:55 -0500 In-Reply-To: (Robert Pluim's message of "Tue, 03 Mar 2015 19:12:04 +0100") 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: Robert Pluim Cc: Bastien , emacs-orgmode@gnu.org Hello, Robert Pluim writes: > Hi, there's a small issue with the texi description of this > feature. Fixed as follows: > > * org.texi (Agenda commands): Correct reference to > org-agenda-persistent-marks Applied. Thank you. Regards, -- Nicolas Goaziou