[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/beancount 546163fd2c 102/103: flymake-bean-check: Send buf
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/beancount 546163fd2c 102/103: flymake-bean-check: Send buffer contents over stdin |
Date: |
Mon, 29 Apr 2024 15:59:49 -0400 (EDT) |
branch: elpa/beancount
commit 546163fd2ccc007f28812faf5170eb954d3ca979
Author: Illia Ostapyshyn <ilya.ostapyshyn@gmail.com>
Commit: Martin Blais <blais@furius.ca>
flymake-bean-check: Send buffer contents over stdin
---
flymake-bean-check.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/flymake-bean-check.el b/flymake-bean-check.el
index 67d542c035..f4416a4ad2 100644
--- a/flymake-bean-check.el
+++ b/flymake-bean-check.el
@@ -53,6 +53,12 @@
(defvar-local flymake-bean-check-process nil)
+(defun flymake-bean-check-cache-filename (file)
+ "Create the bean-check cache file name for FILE."
+ (let* ((backup-directory-alist (list (cons ".*" temporary-file-directory)))
+ (name (make-backup-file-name-1 file)))
+ (concat name ".~flymake-bean-check~")))
+
;;;###autoload
(defun flymake-bean-check-enable ()
"Enable checking via flymake."
@@ -72,15 +78,17 @@ in the enabled buffer. REPORT-FN is a function."
(when (and flymake-bean-check-process
(process-live-p flymake-bean-check-process))
(kill-process flymake-bean-check-process))
- (let ((source (current-buffer))
- (buffer (generate-new-buffer "*flymake-bean-check*")))
+ (let* ((source (current-buffer))
+ (buffer (generate-new-buffer "*flymake-bean-check*"))
+ (cache-file (flymake-bean-check-cache-filename (buffer-file-name))))
(setq flymake-bean-check-process
(make-process :buffer buffer
:name "flymake-bean-check"
:noquery t
:connection-type 'pipe
:command (list flymake-bean-check-executable
- (expand-file-name (buffer-file-name)))
+ "/dev/stdin"
+ "--cache-filename" cache-file)
:sentinel
(lambda (proc _event)
(when (memq (process-status proc) '(exit signal))
@@ -99,7 +107,9 @@ in the enabled buffer. REPORT-FN is a function."
:error
message)
result)))
(funcall report-fn (nreverse result))))
- (kill-buffer buffer))))))))
+ (kill-buffer buffer))))))
+ (process-send-region flymake-bean-check-process (point-min) (point-max))
+ (process-send-eof flymake-bean-check-process)))
(provide 'flymake-bean-check)
;;; flymake-bean-check.el ends here
- [nongnu] elpa/beancount ea8257881b 084/103: Fix amount alignment on tab key press, (continued)
- [nongnu] elpa/beancount ea8257881b 084/103: Fix amount alignment on tab key press, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount dfd402ef79 101/103: Autocomplete the second account in a pad directive, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount d9ac93fc28 099/103: Enable easy access to old-style keybindings, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 8496f49748 016/103: Fixed #302: Fixed second bug with font-locking for account names (starting with digit)., ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount fd64acdc58 023/103: beancount.el: Restructure completion-at-point, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount d464468aa2 027/103: beancount.el: Add indentation tests, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount d5471cf09f 038/103: beancount.el: Highlight headings when combined with outline-minor-mode, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 615881f379 054/103: beancount.el: Fix beancount-collect to correctly ignore entry at point, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount da9073b124 096/103: Update readme, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 4750bfa470 098/103: Change keybindings to respect Emacs conventions, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 546163fd2c 102/103: flymake-bean-check: Send buffer contents over stdin,
ELPA Syncer <=
- [nongnu] elpa/beancount 9ee4aaa306 009/103: (merge default -> booking), ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 83a046d1dc 010/103: (merge booking -> default), ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount ada0966cdd 012/103: Moved src/python/beancount/... to beancount/..., ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 1da4c88ebb 018/103: Merged in elisp-comment-fixes (pull request #107), ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount ad05238927 022/103: beancount.el: Small simplifications, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount ad26ec2b29 025/103: beancount.el: Add fontification tests, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 8c52ee05ee 030/103: beancount.el: Revamp function to toggle transaction flag, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount 201629317d 032/103: beancount.el: Sort option names alphabetically, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount fa285958d0 033/103: beancount.el: Drop unused function, ELPA Syncer, 2024/04/29
- [nongnu] elpa/beancount d8d95a2f0a 036/103: beancount.el: Small tests cleanup, ELPA Syncer, 2024/04/29