emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <cdominik@newartisans.com>
To: emacs-orgmode@gnu.org
Subject: [Accepted] [Orgmode, 1/4] Rename org-agenda-today to org-today.
Date: Wed,  1 Dec 2010 00:48:41 +0100 (CET)	[thread overview]
Message-ID: <20101130234841.5FECD796223@carsten-dominiks-macbook-pro.local> (raw)
In-Reply-To: 1291040314-1884-1-git-send-email-julien@danjou.info

Patch 416 (http://patchwork.newartisans.com/patch/416/) is now "Accepted".

Maintainer comment: No comment

This relates to the following submission:

http://mid.gmane.org/%3C1291040314-1884-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode,1/4] Rename org-agenda-today to org-today.
> Date: Mon, 29 Nov 2010 19:18:31 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 416
> Message-Id: <1291040314-1884-1-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> Signed-off-by: Julien Danjou <julien@danjou.info>
> 
> ---
> lisp/org-agenda.el |   18 ++++++------------
>  lisp/org.el        |    6 ++++++
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 48856c9..aee7ca7 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -3208,7 +3208,7 @@ dates."
>  					 org-timeline-show-empty-dates))
>  	 (org-deadline-warning-days 0)
>  	 (org-agenda-only-exact-dates t)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
>  	 (past t)
>  	 args
>  	 s e rtn d emptyp)
> @@ -3285,7 +3285,7 @@ When EMPTY is non-nil, also include days without any entries."
>  	     (if inactive org-ts-regexp-both org-ts-regexp)))
>  	 dates dates1 date day day1 day2 ts1 ts2)
>      (if force-today
> -	(setq dates (list (org-agenda-today))))
> +	(setq dates (list (org-today))))
>      (save-excursion
>        (goto-char beg)
>        (while (re-search-forward re end t)
> @@ -3396,7 +3396,7 @@ given in `org-agenda-start-on-weekday'."
>  	      org-agenda-start-on-weekday nil))
>  	 (thefiles (org-agenda-files nil 'ifmode))
>  	 (files thefiles)
> -	 (today (org-agenda-today))
> +	 (today (org-today))
>  	 (sd (or start-day today))
>  	 (start (if (or (null org-agenda-start-on-weekday)
>  			(< org-agenda-ndays 7))
> @@ -3839,7 +3839,7 @@ for a keyword.  A numeric prefix directly selects the Nth keyword in
>    (org-set-sorting-strategy 'todo)
>    (org-prepare-agenda "TODO")
>    (if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil))
> -  (let* ((today (org-agenda-today))
> +  (let* ((today (org-today))
>  	 (date (calendar-gregorian-from-absolute today))
>  	 (kwds org-todo-keywords-for-agenda)
>  	 (completion-ignore-case t)
> @@ -7956,7 +7956,7 @@ belonging to the \"Work\" category."
>    (let* ((cnt 0) ; count added events
>  	 (org-agenda-new-buffers nil)
>  	 (org-deadline-warning-days 0)
> -	 ;; Do not use `org-agenda-today' here because appt only takes
> +	 ;; Do not use `org-today' here because appt only takes
>  	 ;; time and without date as argument, so it may pass wrong
>  	 ;; information otherwise
>  	 (today (org-date-to-gregorian
> @@ -7999,15 +7999,9 @@ belonging to the \"Work\" category."
>  	(message "No event to add")
>        (message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
>  
> -(defun org-agenda-today ()
> -  "Return today date, considering `org-extend-today-until'."
> -  (time-to-days
> -   (time-subtract (current-time)
> -		  (list 0 (* 3600 org-extend-today-until) 0))))
> -
>  (defun org-agenda-todayp (date)
>    "Does DATE mean today, when considering `org-extend-today-until'?"
> -  (let ((today (org-agenda-today))
> +  (let ((today (org-today))
>  	(date (if (and date (listp date)) (calendar-absolute-from-gregorian date)
>  		date)))
>      (eq date today)))
> diff --git a/lisp/org.el b/lisp/org.el
> index 873b294..6c4c433 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4798,6 +4798,12 @@ The following commands are available:
>  		       (nthcdr 2 time))))
>      (current-time)))
>  
> +(defun org-today ()
> +  "Return today date, considering `org-extend-today-until'."
> +  (time-to-days
> +   (time-subtract (current-time)
> +		  (list 0 (* 3600 org-extend-today-until) 0))))
> +
>  ;;;; Font-Lock stuff, including the activators
>  
>  (defvar org-mouse-map (make-sparse-keymap))
> 

      parent reply	other threads:[~2010-12-02 13:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
2010-11-30 23:49   ` [Accepted] [Orgmode,2/4] " Carsten Dominik
2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
2010-11-30 23:50   ` [Accepted] [Orgmode,3/4] " Carsten Dominik
2010-11-29 14:18 ` [PATCH 4/4] org: use org-today in habits auto repeat Julien Danjou
2010-11-30 23:49   ` [Accepted] [Orgmode, " Carsten Dominik
2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
2010-11-30  9:06   ` Julien Danjou
2010-11-30 23:50     ` Carsten Dominik
2010-12-01 13:26     ` Bernt Hansen
2010-11-30 23:48 ` Carsten Dominik [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101130234841.5FECD796223@carsten-dominiks-macbook-pro.local \
    --to=cdominik@newartisans.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 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).