emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* tags-todo agenda: Show scheduling info
@ 2019-11-02 17:00 Nathan Neff
  2019-11-02 19:28 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Neff @ 2019-11-02 17:00 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello all,

I'm having trouble with simply trying to show any scheduling information
about a heading in a tags-todo search.

Can someone point me to how to do this?

I thought that I define a custom agenda command like this:

(setq org-agenda-custom-commands '(
    ("p" "Foo" tags-todo "+foo"
     (
(org-agenda-prefix-format "Hello World %s")
 (org-agenda-remove-times-when-in-prefix nil)
(org-agenda-todo-ignore-with-date nil)))))


And have data like this:

* todo Something            :foo:
SCHEDULED: <2019-11-02 Sat>

I want my agenda view to show that this entry is scheduled.  However, all I
get is this:

Hello World Something                                  :foo:

From the documentation for org-agenda-prefix-format it seems that %s should
do the trick, right?  I've even tried tinkering with
org-agenda-remove-times-when-in-prefix.

Any ideas?

Thanks,
--Nate

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

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

* Re: tags-todo agenda: Show scheduling info
  2019-11-02 17:00 tags-todo agenda: Show scheduling info Nathan Neff
@ 2019-11-02 19:28 ` Samuel Wales
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2019-11-02 19:28 UTC (permalink / raw)
  To: Nathan Neff; +Cc: emacs-orgmode

the following will not work for you due to dependencies.

has worked for me for many years.

puts ! in agenda prefix if schedule or deadline.  if it is agenda
agenda [timestamp agenda, daily/weekly agenda] it requires closed
also.

(with-eval-after-load 'org-agenda
  ;; bangify agenda prefix

  (cl-loop
   for entry in org-agenda-prefix-format
   do
   ;; remove colon from category
   (alpha-asetf (cdr entry)
                (replace-regexp-in-string ":" "" it))
   ;; add !
   (alpha-asetf
    (cdr entry)
    (replace-regexp-in-string
     "%i "
     (concat "%i%"
             ;; (setq entry '(agenda . " %i hi"))
             (format "%s" `(alpha-org-agenda-prefix-bangify
                            ,(when (eq (car entry) 'agenda)
                                   '(quote and-closed)))))
     it)))
  (defun alpha-org-agenda-prefix-bangify (&optional and-closed)
    "If and-closed, require that it also be closed.
Useful for agenda agenda where most things are scheduled or
deadlined thus would be pointlessly bangified."
    ;; (looking-back-at
    (if (and (or (not and-closed)
                 (alpha-org-entry-get "CLOSED"))
             (or (alpha-org-entry-get "SCHEDULED")
                 (alpha-org-entry-get "DEADLINE")))
        "!"
      " ")))

-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

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

end of thread, other threads:[~2019-11-02 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-02 17:00 tags-todo agenda: Show scheduling info Nathan Neff
2019-11-02 19:28 ` Samuel Wales

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