Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump-to-date commands #56

Open
bepolymathe opened this issue Nov 15, 2019 · 6 comments
Open

Jump-to-date commands #56

bepolymathe opened this issue Nov 15, 2019 · 6 comments

Comments

@bepolymathe
Copy link

First of all, my thanks @alphapapa for this work. It's changing my life!

I just did a research test recorded with the command C-x C-s
It works perfectly but I wonder how to delete a saved search?
Thank you!

@alphapapa
Copy link
Owner

alphapapa commented Nov 16, 2019

First of all, my thanks @alphapapa for this work. It's changing my life!

Thanks for the kind words. I'm glad it's useful to you. If you have any interesting examples of how you're using it, please feel free to share them.

I just did a research test recorded with the command C-x C-s
It works perfectly but I wonder how to delete a saved search?
Thank you!

You can delete views from the customization options, e.g. M-x customize-option RET org-ql-views RET, or by pressing c in the view list sidebar.

@bepolymathe
Copy link
Author

Thank you for that answer. For the moment, I have a rather classic use but I have to take the time to dig a little deeper. I would be interested in a "jump to" option to see all events and tasks on a specific date (like "J" in org-agenda) or an option for tags completion (but maybe it's already possible?).

For the deletion of the search, I had seen the option with "c" but I work with spacemacs and bépo layout (french language). So it doesn't seem to be working. Is it possible to assign this option to another key?

@alphapapa
Copy link
Owner

I would be interested in a "jump to" option to see all events and tasks on a specific date (like "J" in org-agenda)

You can do a search like ts:on=2019-11-16 to see all items with a timestamp on that date. A one-key command to do that for the item at point is a good idea.

or an option for tags completion (but maybe it's already possible?).

I'm not sure exactly what you mean. If you mean completing tags as they are typed, that's a good idea, but since tags are entered as part of a query, I guess that would require a complex query-completion function that would provide completion for each predicate. A good idea for future work, but probably not something I will work on soon. Alternatively, I guess there could be a recursive-edit-style command that completed individual tags in the minibuffer when typing a query; not a bad idea, but a bit complicated, and difficult to expose to the user in a memorable way, so probably not something I'd be keen to do.

For the deletion of the search, I had seen the option with "c" but I work with spacemacs and bépo layout (french language). So it doesn't seem to be working. Is it possible to assign this option to another key?

I can't help you with Spacemacs, sorry. Anyway, it's just a command, org-ql-view-customize, which you can bind to whatever you like. Or you can just M-x customize-option RET org-ql-views RET. Or you could write a new command to prompt you for a view and delete it from the list.

BTW, I'm curious, what is your profile avatar image? I can't quite make out what it's supposed to be. :)

@alphapapa
Copy link
Owner

You can do a search like ts:on=2019-11-16 to see all items with a timestamp on that date. A one-key command to do that for the item at point is a good idea.

BTW, regarding this idea: it would need to be defined more carefully. For example, let's say you do a search for items like todo:TODO priority:A, and you put the point on an item, and then press the "jump" key. How would the command know which day to jump to? An entry might have any number of timestamps on any number of dates; even its planning timestamps (i.e. SCHEDULED, DEADLINE, CLOSED) might be on different dates.

Probably the most obvious action would be to jump to the latest timestamp, which would require parsing all of the timestamps in the entry, sorting them, and then constructing a new query using the date of the latest timestamp. That's easy enough. But what if that's not the date the user wants?

Maybe you can help me think this through. :)

@bepolymathe
Copy link
Author

Hi @alphapapa
First, the most important issue. My profile image refers to a fictional character (theatre and literature) called Ubu(Alfred Jarry). Of course not what you thought!

On the "jump" function my idea is as follows. org-ql-view-sidebar allows you to quickly access essential things. It might be interesting to be able to click on "jump to" which would open a mini-buffer like below. This could allow you to quickly consult your agenda on a given date (during a meeting for example)

image

Nevertheless, the comment you made goes further. It would consist in accessing this date selection function during the request. This would be doubly useful. In this case, it may be necessary to distinguish between the search for a specific date and the search for a period. For example, it might be interesting to jump to entries with a deadline (- 15 days) on a given date. 🤔

@bepolymathe
Copy link
Author

We can also think in terms of use.

  • I am looking for the tasks I have to do on a given date.
  • I am looking for a note taken on a given date.
  • I'm looking for elements related to a tag from a given date.
    etc...

I therefore think that the "jump" function would more easily concern a specific date rather than a period (contrary to what I said earlier).

@alphapapa alphapapa changed the title Delete a saved search Jump-to-date commands Nov 28, 2019
@alphapapa alphapapa added this to the 0.5 milestone Jan 3, 2020
@alphapapa alphapapa modified the milestones: 0.5, 0.6 Nov 20, 2020
@alphapapa alphapapa modified the milestones: 0.6, Future Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants