emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: org-todo-yesterday and 23:59
Date: Fri, 22 Apr 2016 01:48:31 -0500	[thread overview]
Message-ID: <87bn526sw0.fsf@alphapapa.net> (raw)
In-Reply-To: 87fuue6wih.fsf@alphapapa.net

Adam Porter <adam@alphapapa.net> writes:

> Samuel Wales <samologist@gmail.com> writes:
>
>> can org-todo-yesterday be made to use [2016-04-20 Wed] instead of
>> [2016-04-20 Wed 23:59]?
>
> I guess you could add :after advice to the function and remove the time
> from the new timestamp.

Alternatively, maybe you could temporarily either override or advise
`org-time-stamp-format' to always insert a date-only timestamp.  There's
some code here that might help:

http://stackoverflow.com/a/15916937/712624

The crux seems to be the `long' variable here:

#+BEGIN_SRC elisp
(defun org-time-stamp-format (&optional long inactive)
  "Get the right format for a time string."
  (let ((f (if long (cdr org-time-stamp-formats)
	     (car org-time-stamp-formats))))
    (if inactive
	(concat "[" (substring f 1 -1) "]")
      f)))
#+END_SRC

I don't see an easy way to change the argument passed to it by the chain
of functions that ends up calling it.  I'm no expert though, so maybe
I'm missing something obvious.  :)

      reply	other threads:[~2016-04-22  6:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22  1:58 org-todo-yesterday and 23:59 Samuel Wales
2016-04-22  5:30 ` Adam Porter
2016-04-22  6:48   ` Adam Porter [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=87bn526sw0.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --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).