emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* a window with my agenda at all times
@ 2011-06-26 15:53 D M German
  2011-06-27 16:42 ` Bastien
  2011-06-27 17:29 ` Eric S Fraga
  0 siblings, 2 replies; 7+ messages in thread
From: D M German @ 2011-06-26 15:53 UTC (permalink / raw)
  To: emacs-orgmode


Hi everybody,

I struggle to keep (in emacs) a window with the agenda at all times. If
anybody has any pointers on how to get a window or a frame to "stick" at
all times with the contents of a frame, and basically be ignored from
any window-related command (split, kill, etc), I would be grateful.

For a long time I have wanted a sticky window that keeps this
information. Like a sticky note on my desktop (think a widget in
Android). 

I wrote a small program in qt that simply monitors a file and displays
it. Nothing more. It does the work for me, and maybe somebody else will
find it useful. It relies on exporting the agenda as html every time the
org file is modified, and then this little program displays the html
file. The window manager is responsible of removing decorations, making
it sticky, and placing it in same place always.

Here is a screenshot (see window to the bottom right). The decorations
are removed by the window manager:

http://turingmachine.org/hacking/org-mode/orgdisplay.png

Here is the code. As I said, very, very simple, but maybe somebody will
find if useful.

http://turingmachine.org/hacking/org-mode/


--
Daniel M. German                  
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

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

* Re: a window with my agenda at all times
  2011-06-26 15:53 a window with my agenda at all times D M German
@ 2011-06-27 16:42 ` Bastien
  2011-06-27 17:34   ` dmg
  2011-06-27 17:29 ` Eric S Fraga
  1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2011-06-27 16:42 UTC (permalink / raw)
  To: dmg; +Cc: emacs-orgmode

Hi Mr German,

D M German <dmg@uvic.ca> writes:

> For a long time I have wanted a sticky window that keeps this
> information. Like a sticky note on my desktop (think a widget in
> Android). 

I would use a new frame:

C-x 5 2 ; create a new frame
C-c a a ; create a new agenda

Note that new restrictions in agenda buffers, or new calls 
to agenda commands will update this "agenda frame".  But at 
least you have one single frame for one single task: display
the agenda.

> http://turingmachine.org/hacking/org-mode/

Nice - could you mention it on Worg? 

  http://orgmode.org/worg/org-hacks.html

Thanks!

-- 
 Bastien

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

* Re: a window with my agenda at all times
  2011-06-26 15:53 a window with my agenda at all times D M German
  2011-06-27 16:42 ` Bastien
@ 2011-06-27 17:29 ` Eric S Fraga
  2011-06-27 18:38   ` dmg
  2011-06-27 18:47   ` D M German
  1 sibling, 2 replies; 7+ messages in thread
From: Eric S Fraga @ 2011-06-27 17:29 UTC (permalink / raw)
  To: dmg; +Cc: emacs-orgmode

D M German <dmg@uvic.ca> writes:

> Hi everybody,
>
> I struggle to keep (in emacs) a window with the agenda at all times. If
> anybody has any pointers on how to get a window or a frame to "stick" at
> all times with the contents of a frame, and basically be ignored from
> any window-related command (split, kill, etc), I would be grateful.
>
> For a long time I have wanted a sticky window that keeps this
> information. Like a sticky note on my desktop (think a widget in
> Android). 

I can't answer your question directly but I have done this in the past
by using /conky/ to display the contents of a file (updating
automatically) where the file is created by Emacs to consist of the
output of the agenda command.  This elisp snippet writes out the agenda
to a specified file (untested):

--8<---------------cut here---------------start------------->8---
    (save-window-excursion
      (org-batch-agenda "a")
      (org-write-agenda "some-file-name"))
--8<---------------cut here---------------end--------------->8---

In conky, you can use the /head/ directive to output a specified number
of lines.

Conky can write to the root window (i.e. the screen) or to a window.
The former works better, in my opinion, but this may depend on the
window manager you use.

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.461.g6d18)

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

* Re: a window with my agenda at all times
  2011-06-27 16:42 ` Bastien
@ 2011-06-27 17:34   ` dmg
  0 siblings, 0 replies; 7+ messages in thread
From: dmg @ 2011-06-27 17:34 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Mon, Jun 27, 2011 at 12:42 PM, Bastien <bzg@altern.org> wrote:
> Hi Mr German,
>
> D M German <dmg@uvic.ca> writes:
>
>> For a long time I have wanted a sticky window that keeps this
>> information. Like a sticky note on my desktop (think a widget in
>> Android).
>
> I would use a new frame:
>
> C-x 5 2 ; create a new frame
> C-c a a ; create a new agenda

I used to that too, but the new frame gets on the way, and it is
difficult to control its placement and
window decorations using the window manager.


> Nice - could you mention it on Worg?
>
>  http://orgmode.org/worg/org-hacks.html

I will


>
> Thanks!
>
> --
>  Bastien
>



-- 
--dmg

---
Daniel M. German
http://turingmachine.org

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

* Re: a window with my agenda at all times
  2011-06-27 17:29 ` Eric S Fraga
@ 2011-06-27 18:38   ` dmg
  2011-06-28  9:44     ` Bastien
  2011-06-27 18:47   ` D M German
  1 sibling, 1 reply; 7+ messages in thread
From: dmg @ 2011-06-27 18:38 UTC (permalink / raw)
  To: emacs-orgmode

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

here is a patch worg (org-hacks.org) describing the hack.

Hopefully somebody with write access to can commit it.

--dmg

[-- Attachment #2: hack.diff --]
[-- Type: text/x-patch, Size: 1334 bytes --]

diff --git a/org-hacks.org b/org-hacks.org
index 024eaf3..19b67c9 100644
--- a/org-hacks.org
+++ b/org-hacks.org
@@ -2259,3 +2259,30 @@ position in the track.
 
 See the file [[file:code/elisp/org-player.el][org-player.el]]
 
+** Under X11 Keep a window with the current agenda items at all time
+
+I struggle to keep (in emacs) a window with the agenda at all times.
+For a long time I have wanted a sticky window that keeps this
+information, and then use my window manager to place it and remove its
+decorations (I can also force its placement in the stack: top always,
+for example).
+
+I wrote a small program in qt that simply monitors an HTML file and
+displays it. Nothing more. It does the work for me, and maybe somebody
+else will find it useful. It relies on exporting the agenda as HTML
+every time the org file is saved, and then this little program
+displays the html file. The window manager is responsible of removing
+decorations, making it sticky, and placing it in same place always.
+
+Here is a screenshot (see window to the bottom right). The decorations
+are removed by the window manager:
+
+http://turingmachine.org/hacking/org-mode/orgdisplay.png
+
+Here is the code. As I said, very, very simple, but maybe somebody will
+find if useful.
+
+http://turingmachine.org/hacking/org-mode/
+
+--daniel german
+

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

* Re: a window with my agenda at all times
  2011-06-27 17:29 ` Eric S Fraga
  2011-06-27 18:38   ` dmg
@ 2011-06-27 18:47   ` D M German
  1 sibling, 0 replies; 7+ messages in thread
From: D M German @ 2011-06-27 18:47 UTC (permalink / raw)
  To: emacs-orgmode


Hi Erick,

 Eric> D M German <dmg@uvic.ca> writes:
 >> Hi everybody,
 >> 
 >> I struggle to keep (in emacs) a window with the agenda at all times. If
 >> anybody has any pointers on how to get a window or a frame to "stick" at
 >> all times with the contents of a frame, and basically be ignored from
 >> any window-related command (split, kill, etc), I would be grateful.
 >> 
 >> For a long time I have wanted a sticky window that keeps this
 >> information. Like a sticky note on my desktop (think a widget in
 >> Android). 

 Eric> I can't answer your question directly but I have done this in the past
 Eric> by using /conky/ to display the contents of a file (updating
 Eric> automatically) where the file is created by Emacs to consist of the
 Eric> output of the agenda command.  This elisp snippet writes out the agenda
 Eric> to a specified file (untested):

    (save-window-excursion
      (org-batch-agenda "a")
      (org-write-agenda "some-file-name"))

I do something similar, but in the "after-save-hook"

(defun dmg-org-update-agenda-file (&optional force)
  (interactive)
  (save-excursion
    (save-window-excursion
      (let ((file "/tmp/agenda.html"))
        (org-agenda-list)
        (org-write-agenda file)))))


 Eric> In conky, you can use the /head/ directive to output a specified number
 Eric> of lines.

 Eric> Conky can write to the root window (i.e. the screen) or to a window.
 Eric> The former works better, in my opinion, but this may depend on the
 Eric> window manager you use.

Thanks for the hint. Sometimes the problem is knowing the name of a tool.

I though about doing something like this, but I wanted rendering in
HTML. Searching on the Internet I found an alternative that does HTML (gtk-desktop-info).

https://code.launchpad.net/~m-buck/+junk/gtk-desktop-info

I think at the end it is a matter of taste. With my utility a window is
created with scrollbars if the agenda is too large.

But it seems to be making a difference to me, which is what matters ;)

--dmg

 Eric> HTH,
 Eric> eric

 Eric> -- 
 Eric> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 Eric> : using Org-mode version 7.5 (release_7.5.461.g6d18)


-- 
--
Daniel M. German                  
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

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

* Re: a window with my agenda at all times
  2011-06-27 18:38   ` dmg
@ 2011-06-28  9:44     ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2011-06-28  9:44 UTC (permalink / raw)
  To: dmg; +Cc: emacs-orgmode

dmg <dmg@uvic.ca> writes:

> here is a patch worg (org-hacks.org) describing the hack.
>
> Hopefully somebody with write access to can commit it.

Applied, thanks.

-- 
 Bastien

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

end of thread, other threads:[~2011-06-28  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-26 15:53 a window with my agenda at all times D M German
2011-06-27 16:42 ` Bastien
2011-06-27 17:34   ` dmg
2011-06-27 17:29 ` Eric S Fraga
2011-06-27 18:38   ` dmg
2011-06-28  9:44     ` Bastien
2011-06-27 18:47   ` D M German

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