Creating tasks from the commandline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating tasks from the commandline

Philipp Grau
Hello,

sometimes it would be nice to create a task on the commandline e.g.:

emacs -batch -eval='(my-add-task TaskPool "Do the dishes")'

Currently I'm to stupid to write my own expression to do this stuff.
Is there anybody out there, who has already done something like this?

Regards,

Philipp

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Creating tasks from the commandline

Thierry Volpiatto-2
Philipp Grau <[hidden email]> writes:

> Hello,
>
> sometimes it would be nice to create a task on the commandline e.g.:
>
> emacs -batch -eval='(my-add-task TaskPool "Do the dishes")'
>
> Currently I'm to stupid to write my own expression to do this stuff.
> Is there anybody out there, who has already done something like this?
>
> Regards,
>
> Philipp

Hello Philipp, is it what you want?
That work fine here
,----
| emacsclient -e '(planner-create-task "create a script to add task from
| commandline" "2008.06.12")'
`----
it's better to run emacsclient instead of another emacs if you have an
emacs session running of course.
With this command, you can easily create an interactive script to create
a task from command line (use echo and read)
something like:(not tested)

,----
| echo "Title: "
| read title
| echo "Date: "
| read date
| emacsclient -e '(planner-create-task $title $date)'
`----

--
A + Thierry
Pub key: http://pgp.mit.edu

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Creating tasks from the commandline

Thierry Volpiatto-2
In reply to this post by Philipp Grau
Philipp Grau <[hidden email]> writes:

> Hello,
>
> sometimes it would be nice to create a task on the commandline e.g.:
>
> emacs -batch -eval='(my-add-task TaskPool "Do the dishes")'
>
> Currently I'm to stupid to write my own expression to do this stuff.
> Is there anybody out there, who has already done something like this?
>
> Regards,
>
> Philipp

Here the little script that work :)
,----
| #!/bin/bash
|
| echo "Title:\n "
| read TITLE
| echo "Date:\n "
| read DATE
| emacsclient -e "(planner-create-task \"$TITLE\" \"$DATE\")"
`----


--
A + Thierry
Pub key: http://pgp.mit.edu

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss