I want to implement Autofocus system in org-mode using agenda views. Autofocus is a time-management system, where you write tasks in a lined notebook with 25-35 lines on a page and you don't start working on the next page until you processed the current page.
By default agenda collects all todos and throws them in a buffer altogether. I want to break these todos by blocks of 20 tasks, for example, so i can process one batch of 20 tasks, then another batch, and so on.
How can i do it? Any solution from using org-mode built-in trick to some emacs lisp snippet is appreciated.
I don't see this going the same way as the agenda usually goes, i.e. chronology, so I don't think there are meant-to-be ways to do that. What comes to my mind, though, is defining your batches with tags (: in the agenda to set tags, say on the first 20), then filtering by tags (/ SPC to filter on tags of the current line).
The first idea I had was basically the same with priorities : S-<up> in the agenda to set them, but then filtering by priority is described here on the mailing list, but doesn't seem that easy.
From the documentation, org-agenda-max-todos and org-agenda-max-entries might be what you are looking for.
Note: I have never used them. I came across these a while ago
Related
I have some custom completions in my ST3 user directory.
When I start typing, the autocomplete suggestions show up from my completions just fine. However, this gets in the way of completions which are in the buffer.
e.g.
Say I have the word 'prime-squares' in my current file buffer.
Now somewhere else in the file, I start to type 'pri..' and all I see are suggestions from my completions files. And not until I almost type the full word 'prime-square..' does the autocomplete suggestion for 'prime-squares' show up.
Which completely defeats the purpose of autocomplete.
Please note that autocomplete suggestions run out after say typing 'prime-..', and yet the suggestion 'prime-squares' doesn't show up until I've typed some more.
Is there a way to set weights for suggestions?
Or set them up in such a way, that the matching words in the current file always show up first, along with any other suggestions from completions files at the bottom?
As far as I'm aware there's way to weight the order in which the completions in the auto-complete popup are presented. This seems to be confirmed by the section on Completions in the Unofficial Docs, which say:
These are the sources for completions the user can control, in the order they are prioritized:
1. Snippets
2. API-injected completions via on_query_completions()
3. Completions files
Additionally, the following completions are folded into the final list:
4. Words in the buffer
That said, some quick testing seems to indicate that the presence of even a single completion with a trigger that matches words in the buffer stops those words from appearing in the completions list.
As seen here, without any completions both words that start with co and words that start with di will cause words from the buffer to appear in the completions list. Introducing a completion with a trigger that contains the text disjoin stops those matching buffer words from appearing, although the other words still do.
As far as I can see, it's doing that by design, as I haven't been able to determine any setting that may get around that. If that's the case you may need to make a feature request or check if someone has logged this as an issue already, as it may also be a bug.
Admittedly I don't use completions a lot, so there may be some way around this that I'm unaware of.
Basically what I'm trying to accomplish is rapid manual sorting of lots of notes and snippets of text.
What I would like to it mark a set of registers, (basically headlines in org-mode) for example
1-Tasks 2-Inbox, 3-Reference, 4-Someday
Then I want to highlight bits of a messy notes file, invoke a function, and have it kill the selection, yank it to one of the marks, and then return to the place i was before to process more snippets. So far I know I need to use:
(evil-paste-after COUNT &optional REGISTER YANK-HANDLER)
but not sure exactly how to structure the function.
It sounds like you want to use org-refile with some custom targets?
I want to have something like this:
A list of buffer is display
As I select a buffer in the list, it's content is display immediately.
The list can be in minibuffer (preferred) or in a separate window
Is there a plug in for this?
Finally found what I wanted (although a bit differed from what I wanted, but it got the essential feature right): https://github.com/martinp26/cycbuf
It automatically display buffers with a list of buffer as the cursor move at a buffer name. Customize variable cycbuf-clear-delay to adjust the time the buffer list is toggled; after exceeding the delay, the buffer list is automatically turned off and the buffer is picked.
^x^b displays a list of buffers, then you can click on one. Is that what you want?
There are several alternatives. For discussion on these, see for example http://www.emacswiki.org/emacs/ControlTABbufferCycling
There's many options. Some are:
to display a list of buffers: ibuffer is an option http://www.emacswiki.org/emacs/IbufferMode
to have the list in the minibuffer: ido-switch-buffer http://wikemacs.org/index.php/Ido#Virtual_Buffers or you can use helm's interface http://wikemacs.org/index.php/Helm
The EmacsWiki pages cited in the other answers (so far) are a subset of the wiki's main page for this topic, which is where you should start.
(That wiki page is also a good place for other answers, which do not cite EmacsWiki, to update. ;-) )
I'm tinkering about switching my IDE to emacs. (I'm still an emacs newbie.)
The problem is that I customized my IDE quite well and I'd regret to leave my helpers behind.
Let me explain:
Shows the current open files/buffers, allows fast switching with a hotkey (C-1, C-2, ...)
Shows the most recent texts on the "clipboard" or inserted by complete (no. 4), text insertable with a hotkey (C-b 1, C-b 2, ...) Last inserted shown in bold, insertable with C-`
The last inserted complete (no. 4) text, insertable with M-`
Autocomplete-ish list, gathered from all open files, regardless of their type with some magical logic. text insertable with a hotkey (M-1, M-2, ...)
I guess emacs has such features, but I'm a visual type I'd like to see what I have available.
Of course actual hotkeys don't matter much, but as you see having all that info visible makes it easy to hit the spot with the least keypresses.
My pain is that there is a plethora of emacs extensions providing various features, checking all seems to take a lifetime.
My question is:
are there any emacs extensions to achieve similar looks and behavour?
as I'm a programmer, which extensions could I take as a base to assemble something like this?
Thanks!
Elaborating a bit more:
I’m a python dev, so most of the code I’m writing is python. Add some HTML JS CSS XML to the picture.
One important thing is that completion needs to work across filetype boundaries, because python / HTML(template) / XML(config) / doctest identifiers are cross-referenced. It’s a huge pain with some IDEs that completion works only for python filetypes.
I have a lot of same named files but in different folders, like init.py, configure.zcml, etc. It seems to be a pain to switch between those by filename.
Better said that’s a list of recently inserted text. To be reused by the fewest keys as possible. Usually when coding I’m reusing the same identifiers/whatever within the same task. So it’s handy to have them listed instead having to retype the starting x chars to get completion again.
Usually best use of this feature is when changing/refactoring code. Like adding one more extra feature and the identifier is needed several times over the place.
TL;DR
Learn keyboard macros. Learn yasnippet.
Autocomplete mode is probably similar to what you have.
Get acquainted with emacs kill-ring before trying to change it, it wants to be your friend. Then you'll know what to look for when you DO want to change it.
Long Version
Shows the current open files/buffers, allows fast switching with a hotkey (C-1, C-2, ...)
You have three options for this.
My personal preference is to have all source files open at all times. So I don't need a visual list of open buffers. Whenever I want to switch to a file I hit C-= (which I've bound to iswitchb-buffer) and type a couple of unique letters. It's common to constantly switch between the same two buffers so I also bound C-backspace to previous-buffer.
Another option I can recommend is tabbar. It's not exactly like your setup, but it displays a list of open buffers (just like webpages in a browser) and it has functions for cycling through the tabs, so it shouldn't be hard to reproduce your C-number key bindings.
You could use speedbar or ecb. They would be the most similar to your current visual configuration, but I'd argue the other options are more efficient.
Shows the most recent texts on the "clipboard" or inserted by complete (no. 4), text insertable with a hotkey (C-b 1, C-b 2, ...) Last inserted shown in bold, insertable with...
I see you've sort of mixed the clipboard with completion history. When it comes to emacs, yasnippet and autocomplete are just so good you're better off going with them for completion (see below).
Emacs clipboard is called the kill-ring. I'm sure you know of C-y and M-y, so you can always recover anything you've cut in the past. Unfortunately, I don't know of any packages that constantly display the kill ring or allow you to yank a specific part of it (though that shouldn't be too hard to write), but at least you know what to search for (kill-ring).
The last inserted complete (no. 4) text, insertable with M-`
I'll be honest, I don't see that much use in this. If you have to repetitively insert text, you should learn keyboard macros. In fact, you should learn keyboard macros anyway, they're the first reason I got hooked to emacs.
Autocomplete-ish list, gathered from all open files, regardless of their type with some magical logic. text insertable with a hotkey (M-1, M-2, ...)
Emacs had many great completion options. In your case, the best one is probably autocomplete-mode. It pops-up completion options (much like your separate completions window), and I think it allows for quick selection of a specific option (like your M-number shortcuts). Also it has several different ways of deciding which completions to offer you (it calls them "sources") and one of them is to gather from all buffers.
In addition to that you have yasnippet, and I couldn't possibly recommend it enough. Seriously. Learning to use it and writing your own snippets will change the way you write code. You'll become a mage whose fingers produce pages of code flowing through your screen in blazing speeds. Use yasnippet!
Once you have it configured, every 3 or 4 keys you press will generate a line (or more) of code for you.
After all that, if you still miss something from your previous editor you'll write it yourself. :-)
Your setup looks exactly like https://github.com/emacsmirror/ecb.
To me at least, since I don't use side-bars:)
You should take a look at the extension speedbar. I have installed this extension, but I rarely use it even for a very large project.
The documentation of org-agenda-sorting-strategy is quite vague when describing the two following sorting strategy. It specifies only how the tags are ordered between done and not done, but does not say anything about how the tags are ordered inside both classes:
todo-state-up Sort by todo state, tasks that are done last.
todo-state-down Sort by todo state, tasks that are done first.
If I list all tasks using a simple agenda command as the following
("z" "TEST" tags-todo ""
(
(org-agenda-sorting-strategy '(todo-state-up)) ;; Sort by todo state, tasks that are done last.
)
)
the (todo) tasks are displayed in the order MAYB TODO NEXT ACTF PAUS WAIT, which does not correspond either to the alphabetical order, neither to the order in my org-todo-keywords:
(sequence "ACTF(a!)" "PAUS(p#)" "WAIT(w#)" "NEXT(n!)" "MAYB(m!)" "TODO(t!)"
"|"
"DONE(d#)" "CANC(c#)"
)
(sequence "KNOW(k#/!)" )
I will get around and program my own org-agenda-cmp-user-defined function to order according to the position of the todo-keyword in org-todo-keywords, but I am surprised that todo-state-up does not already corresponds to this (and I am not feel proficient enough in LISP to dive in the code of org-mode yet).
(I am using Org-mode version 7.7 (release_7.7.615.g02c26.dirty) on GNU Emacs 23.3.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-04-01)
Actually, after restarting org-mode with the new value of org-todo-keywords, it turns out that todo-state-up does use the order of org-todo-keywords.
So I have my display of tasks ordered by todo-keywords now, which really simplifies the writing of agenda shortcuts, and tremendously speed-up their execution (one single instruction as opposed to one per keyword).
Yay!
I ran into this exact same confusion, and restarting still didn't fix the problem. What I realized eventually was that I had TODO cycling order further customized using #+SEQ_TODO:, which was overriding the order of my global org-todo-keywords variable.