emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: showing lists in agenda, and writing org-agenda to a file
Date: Sat, 12 Jan 2008 10:46:03 -0800	[thread overview]
Message-ID: <18313.2795.692843.87539@erics-mac.local> (raw)
In-Reply-To: <87prwefj7e.fsf@bzg.ath.cx>

Hi Bastien,

Thanks for the code re-write. Here's a link to my org-agenda displayed
on my linux laptop's desktop.

http://picasaweb.google.com/eric.no.spam.please/Screenshots/photo#5154659714810419410

 > > Also, In some cases I would like to display the entire body of a
 > > subtree in my custom org-agenda view.  Specifically subtrees where the
 > > body is a checkbox list...
 > 
 > It's not possible right now.  I wonder if this would be useful.  The
 > purpose of the agenda view is to give you a quick overview of your
 > tasks, not to burden souls with details...

Understandable, my only motivation here was to have the checkbox lists
available on my desktop display, but that can be more easily
accomplished through modification of the functions below, rather than
creating a new agenda view.

Thanks!
Eric

On Monday, January 7, at 02:44, Bastien wrote:
 > Hi Eric,
 > 
 > "Eric Schulte" <schulte.eric@gmail.com> writes:
 > 
 > > I've started using tools to display my org-agenda as part of my
 > > desktop (geektool http://projects.tynsoe.org/en/geektool/ on my Mac,
 > > and conky http://conky.sourceforge.net/ on my linux box).  
 > 
 > Great!  That looks neat.
 > 
 > > In doing so I put together the following little function (below),
 > > which I though I would share in the hope that either someone finds it
 > > useful, or someone has already done this and can share a better method
 > > of accomplishing the same (I'm in the early stages of learning elisp).
 > 
 > Here is a slight rewrite of your code:
 > 
 > ;; Use (current-column)
 > (defun current-line-length ()
 >   "Length of a the line at point."
 >   (save-excursion (end-of-line) (current-column)))
 > 
 > ;; Use (org-write-agenda file)
 > (defun org-agenda-to-file (key file &optional max-line-width)
 >   "Write the `org-agenda' view associated with KEY to FILE.
 > MAX-LINE-WIDTH optionally specifies the maximum line width for
 > the text in the resulting file."
 >   (interactive)
 >   (save-window-excursion
 >     (org-agenda nil key)
 >     (switch-to-buffer "*Org Agenda*")
 >     (org-write-agenda file)
 >     (org-agenda-quit))
 >   (if max-width (put-file-content-in-procustes-bed
 > 		 file max-line-length)))
 > 
 > ;; Use a separate torture function for this
 > (defun put-file-content-in-procustes-bed (file max-line-width)
 >   "Find FILE and cut anything beyond LINE-WIDTH."
 >   (save-window-excursion
 >     (with-temp-buffer
 >       (find-file file)
 >       (kill-rectangle
 >        (point-min) 
 >        (progn (point-max) 
 > 	      (move-to-column max-line-width t)
 > 	      (point)))
 >       (erase-buffer)
 >       (yank-rectangle)
 >       (write-file file))))
 > 
 > Here is what the associated shell script would look like:
 > 
 > --8<---------------cut here---------------start------------->8---
 > #!/bin/bash
 > 
 > /usr/local/bin/emacs-23.0.0 --batch --eval \
 > "(progn (load-file \"~/elisp/testing/org/org.el\") \
 >         (org-agenda-to-file \"a\" \"~/.desktop-display\" 60))"
 > --8<---------------cut here---------------end--------------->8---
 > 
 > BTW, do you have any screenshot showing geektool/conky in action? 
 > 
 > > Also, In some cases I would like to display the entire body of a
 > > subtree in my custom org-agenda view.  Specifically subtrees where the
 > > body is a checkbox list...
 > 
 > It's not possible right now.  I wonder if this would be useful.  The
 > purpose of the agenda view is to give you a quick overview of your
 > tasks, not to burden souls with details...
 > 
 > In agenda mode, you can see the item at point with SPC and you can turn
 > follow mode on -- this will display the subtree at point.
 > 
 > Thanks for the code!
 > 
 > -- 
 > Bastien

      parent reply	other threads:[~2008-01-12 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 22:44 org2hpda now on emacswiki Christian Egli
2008-01-07  1:17 ` showing lists in agenda, and writing org-agenda to a file Eric Schulte
2008-01-07  2:44   ` Bastien
2008-01-07  3:34     ` Bastien
2008-01-12 18:46     ` Eric Schulte [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=18313.2795.692843.87539@erics-mac.local \
    --to=schulte.eric@gmail.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).