Closed bitic closed 5 months ago
Just a quick response:
(Filtering)
In the summary buffer, C-u f s RET
can be used to exclude items that match the specified REGEXP in their summaries. (@Emacs101, is this feature written in the current tutorial? Also, we need to use C-u 10 M-x howm-view-filter-by-around RET
instead of C-u 10 f A RET
to specify the range.)
Since typing this out every time would be tedious, we might want to consider adding a "custom filter" feature.
Or, maybe using C-c , t
first for the todo list and then f s RET John RET
for filtering?
(Coloring)
The variable howm-user-font-lock-keywords
exists, but it's not ideal to require users to set it up individually for such a basic feature.
Sorry that I don't have time for a more detailed reply right now.
I believe it is on pages 42-43.
Oh, sorry. I overlooked it.
Hi,
I also overlooked pages 42-43.
After reading your very useful comments, my conclusion is that the correct flow is to use C-c , t
to obtain the list of tasks and then filter useing f s RET John
. That works very well because the tasks that are done are very distinct, because of the coloring, and they are all at the bottom, with the active tasks on the top.
This works for me very well.
However, my question is why I could not find this option by myself.
If I type 'f', the possible completions are:
Possible completions are: Around Region contents date mtime name reminder summary uniq
The "s" option is not present in this list.
Am I missing something?
It is "s"ummary, actually. :)
f s RET
is equivalent to f s SPC RET
, f s TAB RET
, or f summary RET
.
True: "You can also filter search results. As you remember, to the right of the blue column with the numeric file name is an excerpt with the search word highlighted. The excerpt includes the line in which the word is located. You can narrow your search results further, asking for other words that occur within the same line (say, Socrates and Plato)." from the tutorial.
I just read the docs more carefully.
@bitic Thanks for bringing this up. I need to add a few sentences about "s for summary" and stuff like that to the tutorial :)
I have one further question.
I love keywords, because they allow me to have different keywords that perform the same search. For example:
= <<< My New Project <<< MNP
But when I filter tasks with f s RET MNP
this will only search tasks with "MNP" and not tasks with "My New Project".
Would it be possible to filter tasks by keyword in a way that all equivalent keywords are searched at the same time?
A more cumbersome solution would be:
C-c , s MNP RET
C-u f s \]\.
This would show all lines with MNP or "My New Project" and they would filter out done or cancelled tasks.
But it is a little bit cumbersome.
Any ideas?
Could you test f7c0b6a (or the following code in ~/.emacs.el
)? You can use f k RET
, which recognizes aliases. If everything works well, I'll include it in the next release.
(setq howm-view-filter-methods
'(("name" . howm-view-filter-by-name)
("summary" . howm-view-filter-by-summary)
("keyword" . howm-view-filter-by-keyword-in-summary)
("Keyword-in-contents" . howm-view-filter-by-keyword-in-contents)
("mtime" . howm-view-filter-by-mtime)
; ("ctime" . howm-view-filter-by-ctime) ;; needless
("date" . howm-view-filter-by-date)
("reminder" . howm-view-filter-by-reminder)
("contents" . howm-view-filter-by-contents)
("Region" . howm-view-filter-by-region)
("Around" . howm-view-filter-by-around)
("uniq" . howm-view-filter-uniq)
))
(defun howm-view-filter-by-keyword-in-summary (&optional remove-p keyword)
(interactive "P")
(howm-view-filter-by-keyword-general #'howm-view-filter-by-summary
remove-p keyword))
(defun howm-view-filter-by-keyword-in-contents (&optional remove-p keyword)
(interactive "P")
(howm-view-filter-by-keyword-general #'howm-view-filter-by-contents
remove-p keyword))
(defun howm-view-filter-by-keyword-general (f &optional remove-p keyword)
(let* ((k (or keyword (howm-completing-read-keyword)))
(aliases (if (howm-support-aliases-p)
(howm-keyword-aliases k)
k))
(regexp (if (listp aliases)
(mapconcat 'regexp-quote aliases "\\|")
(regexp-quote aliases)))
(howm-view-use-grep nil)) ;; necessary for "\\|"
(funcall f remove-p regexp)))
I added this to my init.el and it works as intended.
I'm using GNU Emacs 27.1 and howm version 20241014.1050.
Thanks!
How often are the releases published to melpa?
I'll merge this patch into the main branch in a week or so, and MELPA should be updated shortly after. Please let me know if you run into any issues.
merged.
@bitic, please let me know if you prefer a different option of the "thx" line in ChangeLog, like FULL NAME san (FOO at BAR.BAZ)
for example.
https://github.com/kaorahi/howm/blob/03ea5b02eea256a41bbac764932a80111ee2693f/ChangeLog#L8
You can use my name "Pere Quintana".
updated. thx again for suggesting this feature.
https://github.com/kaorahi/howm/blob/a76a174f8e745725bd5c1e3a774e77088d0032ae/ChangeLog#L8
I'm not sure why MELPA hasn't updated yet. If the delay becomes too long, I can bump the version number to prompt an update.
Hi, I'm using howm to organize my work life. It works very well. I use keywords a lot. For example, if I have tasks deferred to my colleague John, I will add the word "John" to the task. When I meet with John I want to check all the pending tasks related to him. For this purpose, I do a search "C-c , s John" and this lists all the lines with the word John. I would like to have a toggle that would hide all the tasks that are done or cancelled ([YYYY-MM-DD].). How could I do this? Also, it would be great to have tasks with the same colors in searches as they have in the notes or the main menu. Would this be possible? Thanks!