emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* using org-mode and screen
@ 2008-01-27 23:41 Andrew Hyatt
  2008-02-03  8:22 ` Carsten Dominik
  2008-02-05 10:24 ` Rick Moynihan
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Hyatt @ 2008-01-27 23:41 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2198 bytes --]

Hi everyone,
I use org-mode religiously these days.  I blogged about my use here (
http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please excuse
the fact that when I wrote this I didn't know about the existing org-mode
functionality to jump to the current clock).

I generally have a problem of integrating the work I do in the shell with
the tasks in org-mode.   Plus, I often need access to the shells at home I
started from work.  I thought I'd combine these problems into a little
org-mode extension that ties screen and org-mode together, via ansi-term.

For these to work, you have to load ansi-term, which my hack is based on.

If there's enough interest, I'll make a real .el file out of this.

The general idea is that you start a task in which all the work will take
place in a shell.  This usually is not a leaf-task for me, but usually the
parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
will prompt for the name of a session.  Give it a name, and it will insert a
link.  Open the link at any time to go the screen session containing your
work!

It works pretty well for me.  The only problem is that I often run emacs in
a screen session itself, and I can never get scrolling to work right in
screen-in-screen.

(defun ash-org-screen-buffer-name (name)

  "Returns the buffer name corresponding to the screen name given."

  (concat "*screen " name "*"))



(defun ash-org-screen-helper (name arg)

  ;; Pick the name of the new buffer.

  (let ((term-ansi-buffer-name (generate-new-buffer-name
(ash-org-screen-buffer-name name))))
    (setq term-ansi-buffer-name

          (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen" nil

                               arg name))



    (set-buffer term-ansi-buffer-name)

    (term-mode)

    (term-char-mode)



    (term-set-escape-char ?\C-x)

    term-ansi-buffer-name))



(defun ash-org-screen (name)

  "Start a screen session with name"

  (interactive "MScreen name: ")



  (save-excursion

    (ash-org-screen-helper name "-S"))

  (insert-string (concat "[[screen:" name "]]")))

And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s\")") to
org-link-abbrev-alist.

[-- Attachment #1.2: Type: text/html, Size: 9378 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: using org-mode and screen
  2008-01-27 23:41 using org-mode and screen Andrew Hyatt
@ 2008-02-03  8:22 ` Carsten Dominik
  2008-02-03 20:20   ` Andrew Hyatt
  2008-02-05 10:24 ` Rick Moynihan
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-02-03  8:22 UTC (permalink / raw)
  To: Andrew Hyatt; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2696 bytes --]

Well, Andrew,

if you write an extension, I will put it into the CONTRIB directory of  
the distribution.

- Carsten

On Jan 28, 2008, at 12:41 AM, Andrew Hyatt wrote:

> Hi everyone,
>
> I use org-mode religiously these days.  I blogged about my use here (http://technical-dresese.blogspot.com/2007/08/org-mode.html 
> ) (please excuse the fact that when I wrote this I didn't know about  
> the existing org-mode functionality to jump to the current clock).
>
> I generally have a problem of integrating the work I do in the shell  
> with the tasks in org-mode.   Plus, I often need access to the  
> shells at home I started from work.  I thought I'd combine these  
> problems into a little org-mode extension that ties screen and org- 
> mode together, via ansi-term.
>
> For these to work, you have to load ansi-term, which my hack is  
> based on.
>
> If there's enough interest, I'll make a real .el file out of this.
>
> The general idea is that you start a task in which all the work will  
> take place in a shell.  This usually is not a leaf-task for me, but  
> usually the parent of a leaf task.  From a task in your org-file, M- 
> x ash-org-screen will prompt for the name of a session.  Give it a  
> name, and it will insert a link.  Open the link at any time to go  
> the screen session containing your work!
>
> It works pretty well for me.  The only problem is that I often run  
> emacs in a screen session itself, and I can never get scrolling to  
> work right in screen-in-screen.
>
> (defun ash-org-screen-buffer-name (name)
>   "Returns the buffer name corresponding to the screen name given."
>   (concat "*screen " name "*"))
>
> (defun ash-org-screen-helper (name arg)
>   ;; Pick the name of the new buffer.
>   (let ((term-ansi-buffer-name (generate-new-buffer-name (ash-org- 
> screen-buffer-name name))))
>     (setq term-ansi-buffer-name
>           (term-ansi-make-term term-ansi-buffer-name "/usr/bin/ 
> screen" nil
>                                arg name))
>
>     (set-buffer term-ansi-buffer-name)
>     (term-mode)
>     (term-char-mode)
>
>     (term-set-escape-char ?\C-x)
>     term-ansi-buffer-name))
>
> (defun ash-org-screen (name)
>   "Start a screen session with name"
>   (interactive "MScreen name: ")
>
>   (save-excursion
>     (ash-org-screen-helper name "-S"))
>   (insert-string (concat "[[screen:" name "]]")))
>
> And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s 
> \")") to org-link-abbrev-alist.
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 10082 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: using org-mode and screen
  2008-02-03  8:22 ` Carsten Dominik
@ 2008-02-03 20:20   ` Andrew Hyatt
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Hyatt @ 2008-02-03 20:20 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3076 bytes --]

Cool.  I'll send something along to you when I package it up...
On Feb 3, 2008 3:22 AM, Carsten Dominik <dominik@science.uva.nl> wrote:

> Well, Andrew,
> if you write an extension, I will put it into the CONTRIB directory of the
> distribution.
>
> - Carsten
>
> On Jan 28, 2008, at 12:41 AM, Andrew Hyatt wrote:
>
> Hi everyone,
> I use org-mode religiously these days.  I blogged about my use here (
> http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please
> excuse the fact that when I wrote this I didn't know about the existing
> org-mode functionality to jump to the current clock).
>
> I generally have a problem of integrating the work I do in the shell with
> the tasks in org-mode.   Plus, I often need access to the shells at home I
> started from work.  I thought I'd combine these problems into a little
> org-mode extension that ties screen and org-mode together, via ansi-term.
>
> For these to work, you have to load ansi-term, which my hack is based on.
>
>
> If there's enough interest, I'll make a real .el file out of this.
>
> The general idea is that you start a task in which all the work will take
> place in a shell.  This usually is not a leaf-task for me, but usually the
> parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
> will prompt for the name of a session.  Give it a name, and it will insert a
> link.  Open the link at any time to go the screen session containing your
> work!
>
> It works pretty well for me.  The only problem is that I often run emacs
> in a screen session itself, and I can never get scrolling to work right in
> screen-in-screen.
>
> (defun ash-org-screen-buffer-name (name)
>
>   "Returns the buffer name corresponding to the screen name given."
>
>   (concat "*screen " name "*"))
>
>
>
> (defun ash-org-screen-helper (name arg)
>
>   ;; Pick the name of the new buffer.
>
>   (let ((term-ansi-buffer-name (generate-new-buffer-name
> (ash-org-screen-buffer-name name))))
>     (setq term-ansi-buffer-name
>
>           (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen" nil
>
>                                arg name))
>
>
>
>     (set-buffer term-ansi-buffer-name)
>
>     (term-mode)
>
>     (term-char-mode)
>
>
>
>     (term-set-escape-char ?\C-x)
>
>     term-ansi-buffer-name))
>
>
>
> (defun ash-org-screen (name)
>
>   "Start a screen session with name"
>
>   (interactive "MScreen name: ")
>
>
>
>   (save-excursion
>
>     (ash-org-screen-helper name "-S"))
>
>   (insert-string (concat "[[screen:" name "]]")))
>
> And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s\")")
> to org-link-abbrev-alist.
>  _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

[-- Attachment #1.2: Type: text/html, Size: 10666 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: using org-mode and screen
  2008-01-27 23:41 using org-mode and screen Andrew Hyatt
  2008-02-03  8:22 ` Carsten Dominik
@ 2008-02-05 10:24 ` Rick Moynihan
  2008-02-06 16:35   ` Andrew Hyatt
  1 sibling, 1 reply; 5+ messages in thread
From: Rick Moynihan @ 2008-02-05 10:24 UTC (permalink / raw)
  To: Andrew Hyatt; +Cc: emacs-orgmode

If you're using gnu screen primarily for it's detach capability then you 
  may want to consider 'dtach', which is pretty much just the feature of 
screen.  Consequently it has less keybindings etc, and is more 
compatible with various programs.  I've not really used it with emacs, 
but you might consider it unless you use screens other features.

R.

Andrew Hyatt wrote:
> Hi everyone,
> I use org-mode religiously these days.  I blogged about my use here (
> http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please excuse
> the fact that when I wrote this I didn't know about the existing org-mode
> functionality to jump to the current clock).
> 
> I generally have a problem of integrating the work I do in the shell with
> the tasks in org-mode.   Plus, I often need access to the shells at home I
> started from work.  I thought I'd combine these problems into a little
> org-mode extension that ties screen and org-mode together, via ansi-term.
> 
> For these to work, you have to load ansi-term, which my hack is based on.
> 
> If there's enough interest, I'll make a real .el file out of this.
> 
> The general idea is that you start a task in which all the work will take
> place in a shell.  This usually is not a leaf-task for me, but usually the
> parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
> will prompt for the name of a session.  Give it a name, and it will insert a
> link.  Open the link at any time to go the screen session containing your
> work!
> 
> It works pretty well for me.  The only problem is that I often run emacs in
> a screen session itself, and I can never get scrolling to work right in
> screen-in-screen.
> 
> (defun ash-org-screen-buffer-name (name)
> 
>   "Returns the buffer name corresponding to the screen name given."
> 
>   (concat "*screen " name "*"))
> 
> 
> 
> (defun ash-org-screen-helper (name arg)
> 
>   ;; Pick the name of the new buffer.
> 
>   (let ((term-ansi-buffer-name (generate-new-buffer-name
> (ash-org-screen-buffer-name name))))
>     (setq term-ansi-buffer-name
> 
>           (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen" nil
> 
>                                arg name))
> 
> 
> 
>     (set-buffer term-ansi-buffer-name)
> 
>     (term-mode)
> 
>     (term-char-mode)
> 
> 
> 
>     (term-set-escape-char ?\C-x)
> 
>     term-ansi-buffer-name))
> 
> 
> 
> (defun ash-org-screen (name)
> 
>   "Start a screen session with name"
> 
>   (interactive "MScreen name: ")
> 
> 
> 
>   (save-excursion
> 
>     (ash-org-screen-helper name "-S"))
> 
>   (insert-string (concat "[[screen:" name "]]")))
> 
> And don't forget to add ("screen" . "elisp:(ash-org-goto-screen \"%s\")") to
> org-link-abbrev-alist.

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

* Re: using org-mode and screen
  2008-02-05 10:24 ` Rick Moynihan
@ 2008-02-06 16:35   ` Andrew Hyatt
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Hyatt @ 2008-02-06 16:35 UTC (permalink / raw)
  To: Rick Moynihan; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3321 bytes --]

Thanks for the suggestion.  Sounds promising, but on the other hand screen
is on all unix distributions I know of, but dtach is harder to find.

On Feb 5, 2008 5:24 AM, Rick Moynihan <rick@calicojack.co.uk> wrote:

> If you're using gnu screen primarily for it's detach capability then you
>  may want to consider 'dtach', which is pretty much just the feature of
> screen.  Consequently it has less keybindings etc, and is more
> compatible with various programs.  I've not really used it with emacs,
> but you might consider it unless you use screens other features.
>
> R.
>
> Andrew Hyatt wrote:
> > Hi everyone,
> > I use org-mode religiously these days.  I blogged about my use here (
> > http://technical-dresese.blogspot.com/2007/08/org-mode.html) (please
> excuse
> > the fact that when I wrote this I didn't know about the existing
> org-mode
> > functionality to jump to the current clock).
> >
> > I generally have a problem of integrating the work I do in the shell
> with
> > the tasks in org-mode.   Plus, I often need access to the shells at home
> I
> > started from work.  I thought I'd combine these problems into a little
> > org-mode extension that ties screen and org-mode together, via
> ansi-term.
> >
> > For these to work, you have to load ansi-term, which my hack is based
> on.
> >
> > If there's enough interest, I'll make a real .el file out of this.
> >
> > The general idea is that you start a task in which all the work will
> take
> > place in a shell.  This usually is not a leaf-task for me, but usually
> the
> > parent of a leaf task.  From a task in your org-file, M-x ash-org-screen
> > will prompt for the name of a session.  Give it a name, and it will
> insert a
> > link.  Open the link at any time to go the screen session containing
> your
> > work!
> >
> > It works pretty well for me.  The only problem is that I often run emacs
> in
> > a screen session itself, and I can never get scrolling to work right in
> > screen-in-screen.
> >
> > (defun ash-org-screen-buffer-name (name)
> >
> >   "Returns the buffer name corresponding to the screen name given."
> >
> >   (concat "*screen " name "*"))
> >
> >
> >
> > (defun ash-org-screen-helper (name arg)
> >
> >   ;; Pick the name of the new buffer.
> >
> >   (let ((term-ansi-buffer-name (generate-new-buffer-name
> > (ash-org-screen-buffer-name name))))
> >     (setq term-ansi-buffer-name
> >
> >           (term-ansi-make-term term-ansi-buffer-name "/usr/bin/screen"
> nil
> >
> >                                arg name))
> >
> >
> >
> >     (set-buffer term-ansi-buffer-name)
> >
> >     (term-mode)
> >
> >     (term-char-mode)
> >
> >
> >
> >     (term-set-escape-char ?\C-x)
> >
> >     term-ansi-buffer-name))
> >
> >
> >
> > (defun ash-org-screen (name)
> >
> >   "Start a screen session with name"
> >
> >   (interactive "MScreen name: ")
> >
> >
> >
> >   (save-excursion
> >
> >     (ash-org-screen-helper name "-S"))
> >
> >   (insert-string (concat "[[screen:" name "]]")))
> >
> > And don't forget to add ("screen" . "elisp:(ash-org-goto-screen
> \"%s\")") to
> > org-link-abbrev-alist.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 4631 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2008-02-06 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-27 23:41 using org-mode and screen Andrew Hyatt
2008-02-03  8:22 ` Carsten Dominik
2008-02-03 20:20   ` Andrew Hyatt
2008-02-05 10:24 ` Rick Moynihan
2008-02-06 16:35   ` Andrew Hyatt

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