From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Sauer Subject: Re: Re: [Orgmode] Startup page Date: Thu, 17 Mar 2011 17:17:42 -0500 Message-ID: References: <7A1717E3-E36E-490D-9432-A10B06DD7CE2@khinsen.fastmail.net> <15877.1300293916@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015174766f8b11377049eb50710 Return-path: Received: from [140.186.70.92] (port=56817 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0LVr-0001U7-J1 for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 18:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0LVo-0005kL-Ii for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 18:17:47 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:65496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0LVo-0005js-Ap for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 18:17:44 -0400 Received: by eyh6 with SMTP id 6so870142eyh.0 for ; Thu, 17 Mar 2011 15:17:43 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Filippo A. Salustri" Cc: emacs-orgmode@gnu.org --0015174766f8b11377049eb50710 Content-Type: text/plain; charset=ISO-8859-1 Sigh, at times it's the small things that you miss that bite you in the foot. (defun org-dblock-write:recently-modified (params) (insert (mapconcat (lambda (arg) (concat "[[file:" arg "][" arg "]]" )) (split-string (shell-command-to-string "ls -t /cygdrive/c/Dropbox/org *.org | head -10")) "\n"))) (org-agenda nil "a") (delete-other-windows) (split-window-horizontally) (find-file "/cygdrive/c/Dropbox/org/Refile.org") I forgot (delete-other-windows), I don't know if it the default behavior but my agenda opens up 1/2 height and I have to run C-x 1 to make it full screen after C-c a a . . .now to get my next dynamic block function (another thread to be started) working and I will have my weekly agenda on one side of the screen. On the tother I will have recently modified files on the other, needing filed captures and Unscheduled TODO items. Thanks for all the help everyone has thrown my way. I am going to look at Filippos' code to see if I can even make this a bit more elegant. Matt On Thu, Mar 17, 2011 at 5:52 AM, Filippo A. Salustri wrote: > Here's what I do: > (let ((initial-buffer (current-buffer)) > (agenda-window (selected-window)) > right-window) > ;; We're still in the root window. > (set-frame-size (selected-frame) 162 50) ; resize the aquamacs > window. > (org-agenda nil "0") > (tabbar-close-tab ; close *scratch* tab. > (tabbar-get-tab (get-buffer "*scratch*") > (tabbar-current-tabset))) > (setq right-window (split-window-horizontally 80)) ; make the right > window. > (select-window right-window) > ;; whatever buffer we started in, make it appear in the right side. > (switch-to-buffer initial-buffer) > (select-window agenda-window) ; go back to the agenda. > ) > > The call to org-agenda is just a custom block view. > I end up with the agenda on the left, and some initial, other buffer on the > right. No scratch or anything else visible. > Seems to work for me. > > Cheers. > Fil > > On 17 March 2011 06:34, Matthew Sauer wrote: > >> No, that still gives me the scratch buffer over the top and the the two >> windows I want down below. When I had the startup page activated it would >> override one of the two buffers that I had selected but for some reason the >> scratch buffer is dividing the screen horizontally and place itself over the >> top of the two buffers I open at the end of .emacs >> >> Going to have to look at some of the emacs documentation. What I am >> trying to create is a bit of elisp magic that will open the agenda on the >> right buffer and my refile.org (with everything I have captured that >> needs sent to a home and some dblocks with recently opened items and maybe >> another one with my unscheduled todo's. >> >> Matthew >> >> On Wed, Mar 16, 2011 at 11:45 AM, Nick Dokos wrote: >> >>> Matthew Sauer wrote: >>> >>> > Okay, so I have been working on some ideas for a customization file for >>> startup, an org-agenda, >>> > recently modified and maybe unscheduled todo's . . accessible via a >>> function key and at startup. >>> > Kind of a "home screen". I have it working fine when I run the code >>> but my problem is that when I >>> > have it run in .emacs on startup it comes up (agenda on the right and >>> my other chosen buffer on the >>> > left (last code in my .emacs to be run) and then the screen is split >>> horizontal and the scratch >>> > buffer opens on the top. For me this isn't the desired behavior, >>> didn't know if anyone knew how to >>> > turn off emacs opening into a file or if I should move this code to >>> another location because emacs >>> > is running something to open that after it goes through .emacs??? or >>> is that just a behavior that >>> > is going to occur? >>> > >>> >>> Add >>> >>> (setq inhibit-splash-screen t) >>> >>> to your .emacs and see if that solves your problem. You might also need >>> one >>> of the packages that can restore a saved window configuration on startup >>> if you have complicated goings-on. >>> >>> Nick >>> >> >> > > > -- > Filippo A. Salustri, Ph.D., P.Eng. > Mechanical and Industrial Engineering > Ryerson University > 350 Victoria St, Toronto, ON > M5B 2K3, Canada > Tel: 416/979-5000 ext 7749 > Fax: 416/979-5265 > Email: salustri@ryerson.ca > http://deseng.ryerson.ca/~fil/ > --0015174766f8b11377049eb50710 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sigh, at times it's the small things that you miss that bite you in the= foot.

(defun org-dblock-write:recently-modified (p= arams)
=A0(insert (mapconcat (lambda (arg) (concat "[[file:&= quot; arg "][" arg "]]" )) (split-string (shell-command= -to-string "ls -t
/cygdrive/c/Dropbox/org *.org | head -10")) "\n")))
(org-agenda nil "a")
(delete-other-windows)
(split-window-horizontally)
(find-file "/cygdrive/c/Dr= opbox/org/Refile.org")


I forgot (delete-other-windows), I don&#= 39;t know if it the default behavior but my agenda opens up 1/2 height and = I have to run C-x 1 =A0to make it full screen after C-c a a =A0 =A0. . .now= to get my next dynamic block function (another thread to be started) worki= ng and I will have my weekly agenda on one side of the screen. =A0On the to= ther I will have recently modified files on the other, needing filed captur= es and Unscheduled TODO items. =A0

Thanks for all the help everyone has thrown my way. =A0= I am going to look at Filippos' code to see if I can even make this a b= it more elegant.

Matt

On Thu, Mar 17, 2011 at 5:52 AM, Filippo A. Salustri <= salustri@ryerson.ca> w= rote:
Here's what I do:
(let ((initial-buffer (current-buffer))
=A0=A0 =A0 =A0 =A0 =A0(agenda-window (selected-window))
=A0= =A0 =A0 =A0 =A0 =A0right-window)
=A0=A0 =A0 =A0;; We're still= in the root window.
=A0=A0 =A0 =A0(set-frame-size (selected-frame) 162 50) ; resize the aquamac= s window.
=A0=A0 =A0 =A0(org-agenda nil "0")
= =A0=A0 =A0 =A0(tabbar-close-tab =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ; close *sc= ratch* tab.
=A0=A0 =A0 =A0 (tabbar-get-tab (get-buffer "*scr= atch*")
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (tabbar-current-tabset)= ))
=A0=A0 =A0 =A0(setq right-window (split-window-horizontally 80= )) ; make the right window.
=A0=A0 =A0 =A0(select-window right-wi= ndow)
=A0=A0 =A0 =A0;; whatever buffer we started in, make it app= ear in the right side.
=A0=A0 =A0 =A0(switch-to-buffer initial-buffer)
=A0=A0 =A0 = =A0(select-window agenda-window) ; go back to the agenda.
=A0=A0 = =A0 =A0)

The call to org-agenda is just a custom b= lock view.
I end up with the agenda on the left, and some initial, other buffer on the= right. =A0No scratch or anything else visible.
Seems to work for= me.

Cheers.
Fil

On 17 March 2011 06:34, Matthew Sauer <improv.philosophy@gmail.c= om> wrote:
No, that still gives me the scratch buffer over the top and the the two win= dows I want down below. =A0When I had the startup page activated it would o= verride one of the two buffers that I had selected but for some reason the = scratch buffer is dividing the screen horizontally and place itself over th= e top of the two buffers I open at the end of .emacs

Going to have to look at some of the emacs documentation. = =A0 What I am trying to create is a bit of elisp magic that will open the a= genda on the right buffer and my refile.org (with everything I have captured that needs sent to a = home and some dblocks with recently opened items and maybe another one with= my unscheduled todo's.

Matthew

On Wed, Mar 1= 6, 2011 at 11:45 AM, Nick Dokos <nicholas.dokos@hp.com> = wrote:
Matthew Sauer <improv.philosophy@gmail.com> wrote:

> Okay, so I have been working on some ideas for a customization file fo= r startup, an org-agenda,
> recently modified and maybe unscheduled todo's . . accessible via = a function key and at startup.=A0
> Kind of a "home screen".=A0=A0 I have it working fine when I= run the code but my problem is that when I
> have it run in .emacs on startup it comes up (agenda on the right and = my other chosen buffer on the
> left (last code in my .emacs to be run) and then the screen is split h= orizontal and the scratch
> buffer opens on the top.=A0 For me this isn't the desired behavior= , didn't know if anyone knew how to
> turn off emacs opening into a file or if I should move this code to an= other location because emacs
> is running something to open that after it goes through .emacs???=A0 o= r is that just a behavior that
> is going to occur?
> =A0

Add

=A0(setq inhibit-splash-screen t)

to your .emacs and see if that solves your problem. You might also need one=
of the packages that can restore a saved window configuration on startup if you have complicated goings-on.

Nick




--
Filippo A. = Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson= University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
E= mail: salustri@rye= rson.ca
http://deseng.ryerson.ca/~fil/

--0015174766f8b11377049eb50710--