[Top] | [Contents] | [Index] | [ ? ] |
Task-mode is a global minor mode which enables you to effectively do many tasks in the same time. This manual's purpose is to teach you how to use it.
WARNING: Although task-mode is already usable, it is not finished yet. Be warned: I disclaim all responsability for the loss of your work. Even if I think it is becoming stable, if you think you're stuck, there is a chance that C-z Q may save your life.
1. Installation notes | ||
2. Overview | Task-mode in brief. | |
3. Getting Started | A sample session/tutorial to learn how. to use task-mode | |
4. Concepts | ||
5. Customization | ||
6. Copying | Your rights and freedoms. | |
7. Thanks | ||
-- The Detailed Node Listing --- | ||
Overview | ||
2.1 Features | What can you do with task-mode | |
2.2 Coming soon | Task mode is still very young and many new features are planned | |
2.3 Known problems | ||
Getting Started | ||
3.1 Task switching | The basics | |
3.2 Moving buffers beetween tasks | ||
3.3 The task rules | ||
3.4 Using task-mode | ||
Concepts | ||
4.1 Tasks and buffers | ||
4.2 Flying tasks and buffers | ||
4.3 The Window configuration ring | Each task has a window configuration ring | |
Tasks and buffers | ||
4.1.1 Creating tasks | ||
4.1.2 Adding buffers to tasks | ||
4.1.3 Switching beetween tasks | ||
4.1.4 Killing tasks | ||
4.1.5 Changing buffers from tasks | ||
4.1.6 Rules | ||
Customization | ||
5.1 Customizing tasks | You definitely want to do this. | |
5.2 Hooks | ||
5.3 Configuration examples | ||
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You have to put the file task.el in your load-path (for instance
`/usr/share/emacs21/site-lisp'), then put (require 'task)
in your
`.emacs'. Put (task-mode)
in your `.emacs' if you want task-mode to be
permanently activated, else use M-x task-mode.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Task-mode is a global minor mode for emacs which can automatically manage the window configurations for you. It enables you to group your buffer into tasks, and provide practical means to switch between tasks, to add buffers to task, to manage buffers and window configurations into tasks. Although it can seems difficult to use, it isn't, so please try the tutorial (see section 3. Getting Started), and you should quickly become familiar with the 4. Concepts.
2.1 Features | What can you do with task-mode | |
2.2 Coming soon | Task mode is still very young and many new features are planned | |
2.3 Known problems |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here is some of the features currently in task-mode:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
I have a TODO list of more than a hundred lines, but here's some of the main features that should be added one day:
Feel free to send me feature requests! Please tell me if you plan to implement something, so that we can coordinate our work.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
They are beeing treated and will soon be corrected.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter will introduce you to the concepts of task-mode. You will learn how to use it and the important keybindings.
3.1 Task switching | The basics | |
3.2 Moving buffers beetween tasks | ||
3.3 The task rules | ||
3.4 Using task-mode |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Open a new emacs session, load task-mode (M-x load-file RET task.el) and launch task-mode (M-x task-mode)
You should be in front of the *scratch* buffer. You should be able to see a little [Misc] in the modeline. This is the name of the default task.
Open a new buffer, name it a. You can still see the [Misc] in the mode line: newly created buffers are normally added to the current task.
Then create a new task C-z c. Name it "test", for instance.
You should notice that now, a's current task is [test].
Split your screen in two , so that you'll be able to see the window configurations change.
You can quickly switch beetween the two last tasks using C-z
C-z (task-quick-switch
). Try it now, you're back to [Misc].
Now, switch back to buffer a, with C-x b for instance. You're back to your double-windowed screen. Notice that switching task by switching buffers is not done by rebounding C-x b, so you can use any mean to switch between buffers and it will work. (for instance, C-c C-spc which brings you to an ERC buffer will also work, M-x man also, etc...)
Switch to buffer *scratch*. Notice that you don't switch to [Misc]. This is because [Misc] is flying by default.
The third way to switch between task is using task-goto
(C-z g). Now type C-z g RET to return to [Misc].
To see how it can be useful, just create a new buffer foo, and then create another task [bar]. Then try switching beetween a and foo a few times. Try some C-z C-z too.
OK now open a new buffer b in task [test]. Switch to task [bar], and then switch to buffer a. a should be selected in task [test]. Open a buffer c, switch to [bar] and switch to a: a is displayed in the last selected window.
If it does not please you, you can use C-z p to switch back to the previous window-configuration, and then place a where you want.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Now, imagine that finally, buffer c should go in task [bar]. There are three ways to do it:
task-add-buffer-to-current-task
(C-z b), and type c RET.
task-move-current-buffer-to-task
(C-z m), and
type test RET.
task-move-buffer-to-task
, type in the name of the buffer
you want to add, and then the name of the task (so type foo,
then [test]).
Try to play a little with these command. They can occasionnaly be useful if you have mistaken when opening a new buffer. But now you must be thinking, "Hey what pain would it be to select all these buffers, one by one, to place them in the good tasks!". Fortunately, a powerful mechanism is here to do this for you: 3.3 The task rules.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The task rules is the mechanism that will enable you to:
Create a new task [ruletest], and use task-edit-rules
(C-z
e). Use "." as the new rule. Your buffers "a", "b" and "c"
should have been added to your new task!
Now switch to any task, and open any one character buffer. The newly created buffer should belong to to [ruletest].
You can also match major modes and directories.
For a complete enumeration and further explaination on the task rules, see 5.1 Customizing tasks.
If you want that your new buffers are automatically added to the good tasks, you should definitely customize (see section 5. Customization) your set of task and task rules.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Now you should take a look in the 5. Customization. In this chapter is included several initial configurations that will help you use task-mode the way you want, and optimize its use.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.1 Tasks and buffers | ||
4.2 Flying tasks and buffers | ||
4.3 The Window configuration ring | Each task has a window configuration ring |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There is nothing in this section for the moment, please go and see 3. Getting Started.
4.1.1 Creating tasks | ||
4.1.2 Adding buffers to tasks | ||
4.1.3 Switching beetween tasks | ||
4.1.4 Killing tasks | ||
4.1.5 Changing buffers from tasks | ||
4.1.6 Rules |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Information is provided here (see section 3.3 The task rules) and here (see section 5.1 Customizing tasks).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Flying tasks are tasks for which switching to one of its buffer does not switch to task. Flying buffers are buffers in the flying tasks.
Buffer such as *Completion* for instance should always be flying.
See 5. Customization for seeing example of tasks that should be or should not be flying.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
It is working but not very well, so please don't use it for know.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can use M-x customize-group RET task RET to customize task-mode.
5.1 Customizing tasks | You definitely want to do this. | |
5.2 Hooks | ||
5.3 Configuration examples |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The default rules are stored in an association list named task-properties
.
For each task symbol, you have to associate a list which has the following structure:
(KEY1 VALUE1 KEY2 VALUE2 ...)
Here are the possible keys:
:rules
:flying
:add
:persistent
task-switch-buffer-within-task-iswitchb
, the buffers in tasks
marked as persistent are always choices.
:kill-function
task-default-kill-function
is called, which kills all buffers
in the task. For instance, you might want to kill gnus properly, or to
make all buffers flying before the task is killed. This function takes
in argument the task beeing killed.
General advices:
The default is the following:
(setq task-properties '((task-Flying . (:rules nil)) (task-Misc . (:rules "^ ?\\*.*\\*$" :flying t)))) |
Let's look at some typical set of rules:
(setq task-properties '((task-elisp . (:rules ((dir "/home/racin/elisp/") (mode emacs-lisp-mode)))) (task-c . (:rules ((mode c-mode) (mode makefile-mode)))) (task-webdevel . (:rules "^\\(.*\\.xml\\|.*\\.html\\|.*\\.xsl\\|.*\\.css\\)")) (task-Gnus . (:rules (concat "^" (regexp-opt '("*Group*" "*Article*" "*Summary" "*BBDB*" "*mail*" "*reply" "*Resend"))) :kill-function (lambda (task) (gnus-group-exit)))) (task-Flying . (:rules nil)) (task-Misc . (:rules "^ ?\\*.*\\*$" :flying t)))) |
(Of course, you should have a much precise and larger set of rules).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
task-create-hook
Hook called just after a task is manually created with task-create
.
If you need a hook for all newly created task, use task-new-hook
instead.
(Note: this hook is processed after task-new-hook
.)
One of the main use of this hook is to add some buffers to the newly
created task. This task is accessible via task-current
. You
can also use it to put your created task as flying, etc...
task-new-hook
.
This hook is called when a task which did not existed is created. This can occur when
you create a buffer matching a certain rule (see section 4.1.6 Rules), or when you create a task with task-create
.
You can access the current task with task-current
.
task-create
Many hooks can be easily created, so if you need it, just tell me and I'll do.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Here's some way to use task-mode:
(add-hook 'task-create-hook 'task-edit-rules) |
(add-hook 'task-new-hook (lambda (put task-current :flying t))) |
If you have tweaked a little task-mode, please send me your configuration file and I'll put it here!
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
@insertcopying
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
task-switch-buffer-within-task-ido
[Top] | [Contents] | [Index] | [ ? ] |
1. Installation notes
2. Overview
2.1 Features3. Getting Started
2.2 Coming soon
2.3 Known problems
3.1 Task switching4. Concepts
3.2 Moving buffers beetween tasks
3.3 The task rules
3.4 Using task-mode
4.1 Tasks and buffers5. Customization
4.1.1 Creating tasks4.2 Flying tasks and buffers
4.1.2 Adding buffers to tasks
4.1.3 Switching beetween tasks
4.1.4 Killing tasks
4.1.5 Changing buffers from tasks
4.1.6 Rules
4.3 The Window configuration ring
5.1 Customizing tasks6. Copying
5.2 Hooks
5.3 Configuration examples
7. Thanks
[Top] | [Contents] | [Index] | [ ? ] |
1. Installation notes
2. Overview
3. Getting Started
4. Concepts
5. Customization
6. Copying
7. Thanks
[Top] | [Contents] | [Index] | [ ? ] |
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ < ] | Back | previous section in reading order | 1.2.2 |
[ > ] | Forward | next section in reading order | 1.2.4 |
[ << ] | FastBack | beginning of this chapter or previous chapter | 1 |
[ Up ] | Up | up section | 1.2 |
[ >> ] | FastForward | next chapter | 2 |
[Top] | Top | cover (top) of document | |
[Contents] | Contents | table of contents | |
[Index] | Index | concept index | |
[ ? ] | About | this page |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure: