[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/beancount 0f1e33067e 100/103: Fix a bug where `beancount-a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/beancount 0f1e33067e 100/103: Fix a bug where `beancount-accounts` was read from the minibuffer |
Date: |
Mon, 29 Apr 2024 15:59:49 -0400 (EDT) |
branch: elpa/beancount
commit 0f1e33067e5032382f425b5280169f50aa7dd497
Author: Dave Churchill <dave@ninthcuriosity.com>
Commit: Martin Blais <blais@furius.ca>
Fix a bug where `beancount-accounts` was read from the minibuffer
Based on `completion-table-dynamic`, this sets the current buffer to
the beancount buffer when doing completion in the minibuffer so the
buffer-local `beancount-accounts` can be read.
---
beancount.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/beancount.el b/beancount.el
index b6b89df717..b94f7cfab5 100644
--- a/beancount.el
+++ b/beancount.el
@@ -573,10 +573,13 @@ With an argument move to the previous non cleared
transaction."
(defun beancount-account-completion-table (string pred action)
(if (eq action 'metadata) '(metadata (category . beancount-account))
- (if (null beancount-accounts)
- (setq beancount-accounts
- (sort (beancount-collect beancount-account-regexp 0) #'string<)))
- (complete-with-action action beancount-accounts string pred)))
+ (with-current-buffer (let ((win (minibuffer-selected-window)))
+ (if (window-live-p win) (window-buffer win)
+ (current-buffer)))
+ (if (null beancount-accounts)
+ (setq beancount-accounts
+ (sort (beancount-collect beancount-account-regexp 0)
#'string<)))
+ (complete-with-action action beancount-accounts string pred))))
;; Default to substring completion for beancount accounts.
(defconst beancount--completion-overrides
- [nongnu] elpa/beancount d560451fda 071/103: Use beancount-level-N faces instead of org-level-N, (continued)
- [nongnu] elpa/beancount d560451fda 071/103: Use beancount-level-N faces instead of org-level-N, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount bde2d6c499 089/103: Add function to jump to previous transaction, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount c77e340ed2 003/103: ., ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount e8a5bce28c 086/103: Fix typo in beancount-number-alignment-column docstring, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 72956f0f0e 097/103: Change sign of prefix argument for `beancount-insert-date`, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 7a0ef01d1f 066/103: Add command to open file with fava, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount aab2a23f15 074/103: Fix headlines fontification test, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 519bfd868f 093/103: (Merge remote-tracking branch 'github/main'), ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 687775da63 088/103: Minor refactoring of region commands (with no expected functionality changes)., ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 94bae42833 091/103: Extend CI to run tests on Emacs 28 too, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 0f1e33067e 100/103: Fix a bug where `beancount-accounts` was read from the minibuffer,
ELPA Syncer <=
- [nongnu] elpa/beancount 763a8d3fe4 095/103: Add docstrings, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 3ef6031332 078/103: Fix headlines fontification and two minor cleanups, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount ec4b299edf 028/103: beancount.el: Bring back outline folding functionality, ELPA Syncer, 2024/04/29