Commit graph

104 commits

Author SHA1 Message Date
Adam Porter
ef40a25b05 Change: (org-ql-view--link-store) Convert queries to strings
See #147.
2020-11-11 19:52:24 -06:00
Adam Porter
07d21e57c0 Tidy 2020-11-11 19:52:24 -06:00
Adam Porter
bfd4d462a0 Add/Change/Fix: Storing links to containing buffer or files
This feels too complicated, but I don't see a way around it, short of
redesigning all of the argument expansion/contraction, which might end
up in the same place, anyway.

See #147.
2020-11-11 19:52:24 -06:00
Adam Porter
8102d7a8ee Fix: (org-ql-view--format-element)
Actually, really fix it this time.

Fixes #150.  Thanks to @tpeacock19 for reporting.
2020-11-11 18:11:24 -06:00
Adam Porter
168041f0df Comment: Add FIXME 2020-11-11 04:24:34 -06:00
Adam Porter
78fd672cc7 Fix: (org-ql-view--format-element) Get tags from marker buffer
Fixes bug introduced in 359a280d11.

Fixes #150.  Thanks to @tpeacock19 for reporting.
2020-11-11 00:23:17 -06:00
Adam Porter
23e73addcf Fix: (-view--link-store, -view--link-open) Types, current-buffer
This is regrettably complicated.  Maybe someday Elsa will help...

Fixes #147 (again).  Thanks to @tpeacock19 for reporting.
2020-11-10 20:35:32 -06:00
Adam Porter
60b457eea4 Fix: (org-ql-view.el) Compiler warnings 2020-11-10 19:43:48 -06:00
Adam Porter
93f60ad478 Fix: (org-ql-view--link-store) Handle single filenames
Fixes #147.  Thanks to @tpeacock19 for reporting.
2020-11-10 19:42:12 -06:00
Adam Porter
364dfabca4 Add: (org-ql-view-ask-unsafe-links) 2020-11-10 19:42:12 -06:00
Adam Porter
5d563809e2 Change: (-view--link-open, -view--link-store) Links to views of files
Fixes #147.  Thanks to @tpeacock19 for reporting.
2020-11-10 18:27:33 -06:00
Adam Porter
1b43a88d32 Fix: (org-ql-view--link-store) Check buffers-files only when needed
See #147.  Thanks to @tpeacock19 for reporting.
2020-11-10 17:45:27 -06:00
Adam Porter
6d5ce97dc7 Fix: Byte-compile warnings 2020-11-10 04:14:01 -06:00
Adam Porter
992f3c2675 Add: Link support 2020-11-10 02:02:55 -06:00
Adam Porter
359a280d11 Change/Fix: (org-ql-view--format-element) Use org-ql--tags-at
Use org-ql--tags-at instead of org-get-tags/org-get-tags-at.  This
uses our cache, which should improve performance, and it obviates the
function alias for Org versions before 9.3 (which occasionally
misbehaves, e.g. if Org is reloaded).
2020-11-08 18:05:27 -06:00
Adam Porter
94be07244c Fix: (org-ql-view-refresh) Rename buffer uniquely
This is sort of a workaround or preventative measure as much as it is
a fix.  It seemed to be necessary when I was testing bookmark
loading in org-sidebar.
2020-11-05 11:21:33 -06:00
Adam Porter
028c25c106 Fix: (-view--bookmark-make-record) Replace buffers with filenames 2020-11-02 21:35:42 -06:00
Adam Porter
e5b4cd1065 Add: Bookmark support 2020-11-02 20:18:34 -06:00
Adam Porter
57708e6cc1 Change: (-view--plist, -view-save) Factor out plist code
In preparation for bookmark support.
2020-11-02 20:12:31 -06:00
Adam Porter
f4d7399e67 Fix: (org-ql-view--contract-buffers-files) Only compare to function
If the org-agenda-files variable points to a file pointing to a list
of agenda files, it shouldn't be compared to.  We should only compare
to the value returned by the org-agenda-files function.

Fixes #104.  Thanks to @gdindi for reporting.
2020-04-07 12:06:57 -05:00
Adam Porter
d55c01d2ae Merge: 0.4.4 2020-03-15 15:04:29 -05:00
Adam Porter
4fef5b089f Fix/Revert: Don't derive a new mode; check a variable in refresh
Using a different major mode in org-ql-view buffers causes some Org Agenda
remote commands to not work, because they test whether the major mode
is org-agenda-mode.  Even though these remote commands are not
guaranteed to work, it was not intended to break them now, so this
restores compatibility with them.

Fixes #102.  Thanks to Alois Janíček (@aloisjanicek) for reporting.

This reverts commit ba7d4a2e82.

Released as 0.4.4.
2020-03-15 15:02:52 -05:00
Adam Porter
5bc4a4a825 Merge: 0.4.3 2020-03-14 14:08:53 -05:00
Adam Porter
ba7d4a2e82 Add/Fix: org-ql-view-mode, and check when refreshing
Use a derived major mode for org-ql-view buffers, and ensure that mode
is active when calling org-ql-view-refresh, to avoid interfering with
buffers in other modes if the user calls the command by accident.

See
<b87156f2bb>.
Thanks to Alois Janíček (@AloisJanicek) for discovering the bug.

Released as 0.4.3.
2020-03-14 14:06:42 -05:00
Adam Porter
1688774ddd Change: (org-ql-view--header-line-format) Use keyword args 2020-03-09 17:40:41 -05:00
Adam Porter
f7d8b8c78c Fix: (org-ql-view-map) Bind q to bury-buffer
Because org-agenda-quit isn't useful in org-ql-view buffers.
2020-03-09 13:31:56 -05:00
Adam Porter
996d648560 Fix: (org-ql-view--contract-buffers-files) Handle org-agenda-files 2020-03-08 11:14:13 -05:00
Adam Porter
3349c1d07a Change: (org-ql-view-map) Also bind "g" to refresh
I keep hitting "g" and nothing seems to happen, because it runs the
org-agenda refresh command, which doesn't do anything in org-ql-view
buffers.  This must be happening to other people too.  So let's fix
that.
2020-03-08 11:05:38 -05:00
Adam Porter
8aac3b6100 Fix: (org-ql-view-map) Use set-keymap-parent 2020-03-08 11:05:20 -05:00
Adam Porter
20f3ce747c Fix: (org-ql-view--contract-buffers-files) Single file/buffer
This fixes the bug for now, but it needs to be tested more carefully.
And now the view dispatcher has a minor bug when changing the list of
buffers-files sometimes that requires pressing it more than once to
get the prompt; not sure if related to this.
2020-03-02 00:23:35 -06:00
Adam Porter
132173b36e Fix: (org-ql-view) Require crm
Fixes #98.  Thanks to @bepolymathe for reporting.
2020-03-02 00:22:41 -06:00
Adam Porter
fc91bdd483 Add/Change: (org-ql-view--contract-buffers-files), etc.
When offering completion of org-ql-view-buffers-files, and when
formatting it in the header line, use the "contracted" form when
possible (i.e. show "org-agenda-files" instead of a list of all the
expanded agenda file filenames).

Fixes #95.  Thanks to Kilian Sprotte (@kisp) for suggesting.
2020-02-27 20:03:25 -06:00
Adam Porter
a459204e78 Change: (view--complete-sort) Separate with spaces, not comma 2020-02-26 19:57:16 -06:00
Adam Porter
60d1bd1f97 Merge: 0.4.2 2020-02-26 19:15:52 -06:00
Adam Porter
4b1e253ee9 Fix: (org-ql-view--add-todo-face) Always return to-do keyword
Even when org-done-keywords-for-agenda is nil.  I'm not sure when this
was broken, but the logic was wrong in this function, and this is the
intended behavior, so this is a bug fix.

Released as 0.4.2.
2020-02-26 19:11:40 -06:00
Adam Porter
b601a1e777 Update: (org-ql-view-save) Require map 2.0 and use map-elt
I upgrade to map.el 2.0 (from ELPA) locally, which deprecates this
TESTFN argument.
2020-02-10 09:12:46 -06:00
Adam Porter
6e3c0d3c68 Add: Transient view dispatcher 2020-02-10 09:11:59 -06:00
Adam Porter
843564ad8c Add: (org-ql-views) Dangling tasks view 2020-01-22 23:34:34 -06:00
Adam Porter
b8a4a53983 Change: (org-ql-views/Stuck projects) Use descendants, not children 2020-01-22 23:24:54 -06:00
Adam Porter
6beada4912 Change: (org-ql-views) Mouseover text, view names 2020-01-22 17:02:44 -06:00
Adam Porter
610b1179c6 Add: (org-ql-view-sidebar-sort-views) 2020-01-22 17:01:03 -06:00
Adam Porter
b7a33170a1 Fix: (org-ql-view--buffer) Set buffer-read-only
Fixes #72.  Thanks to @xeijin.
2020-01-19 00:04:14 -06:00
Adam Porter
0a7e4f349f Add: (org-ql-view-refresh) Message on refresh
Closes #71.  Thanks to @xeijin.

Squashed commit of the following:

commit edac9c6960
Author: Adam Porter <adam@alphapapa.net>
Date:   Sat Jan 18 20:24:28 2020 -0600

    Adjust message, indentation, add changelog entry

commit 6a263e34ff
Author: xeijin <xeijin@users.noreply.github.com>
Date:   Fri Jan 3 19:08:10 2020 +0000

    removing view title

commit fc37e3f146
Author: xeijin <xeijin@users.noreply.github.com>
Date:   Mon Dec 9 22:47:00 2019 +0000

    confirmation message for org-ql-view-refresh

    In keeping with the message displayed by `g` when refreshing an
    org-agenda buffer - if nothing has changed in an `org-ql` buffer
    it can sometimes be difficult to determine if the refresh took
    place at all.
2020-01-18 20:34:13 -06:00
Adam Porter
9d15f503ba Tidy: Use alternatives to map-put
Emacs 27 marks map-put as obsolete and renames it to map-put!, which
causes byte-compilation warnings (sigh...isn't that the definition of
useless churn?).  Of course, map-put! doesn't exist in Emacs 26, so we
can't just use that.  I'm beginning to think that it will never be
possible to make the linting clean.
2020-01-08 12:58:52 -06:00
Adam Porter
19833cbbec Tidy: Docstrings 2020-01-03 06:57:54 -06:00
Yiming Chen
6004ab98da Fix: (view--add-todo-face) Bind org-done-keywords
org-get-todo-face uses org-done-keywords, which is a buffer-local
variable, so it may be nil in the context that
org-ql-view--add-todo-face is called.  See,
e.g. org-agenda-highlight-todo, which does the same thing.

Thanks to Yiming Chen (@dsdshcym).
2020-01-03 03:45:20 -06:00
Adam Porter
c238ebcc97 Add: org-ql-view--format-query
Used to e.g. make timestamp objects in query human readable for
display in view headers.
2019-12-29 17:37:15 -06:00
Adam Porter
d3272cdd8b Add: (view--display) Insert newline at end of buffer
Prevents end-of-buffer from scrolling the window horizontally.

Fixes #50.  Thanks to @xeijin for suggesting.
2019-11-05 15:41:15 -06:00
Adam Porter
d5c26b7f60 Merge: 0.3.2 2019-10-19 02:01:13 -05:00
Adam Porter
43b94dd4a8 Fix: (org-ql-views) Beginning/end-of-week timestamp times 2019-10-19 01:08:44 -05:00