[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive a14d14d61a 5/9: Fix: Set buffer-modified-p in b
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive a14d14d61a 5/9: Fix: Set buffer-modified-p in buffers for deleted hyperdrive files |
Date: |
Thu, 12 Oct 2023 16:00:56 -0400 (EDT) |
branch: elpa/hyperdrive
commit a14d14d61a3a85869fbf529c942c35e2e757c75e
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Fix: Set buffer-modified-p in buffers for deleted hyperdrive files
This is an attempt to fix <https://todo.sr.ht/~ushin/ushin/138>.
---
hyperdrive.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hyperdrive.el b/hyperdrive.el
index fa076ab0d4..c3b54c6aa6 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -390,6 +390,15 @@ directory. Otherwise, or with universal prefix argument
(setf (hyperdrive-entry-version nonexistent-entry)
(string-to-number etag))
(hyperdrive--fill-latest-version (hyperdrive-entry-hyperdrive
entry) headers)
(hyperdrive-update-nonexistent-version-range
nonexistent-entry))
+ ;; Since there's no way for `hyperdrive--write-contents' to run
when
+ ;; `buffer-modified-p' returns nil, this is a workaround to
ensure that
+ ;; `save-buffer' re-saves files after they've been deleted.
+ (dolist (buf (match-buffers (lambda (buf deleted-entry)
+ (when-let ((current-entry
(buffer-local-value hyperdrive-current-entry buf)))
+ (hyperdrive-entry-equal-p
current-entry deleted-entry)))
+ nil entry))
+ (with-current-buffer buf
+ (set-buffer-modified-p t)))
(funcall then response)))
:else else))
- [nongnu] elpa/hyperdrive updated (1d911fee7f -> 5d3d0cf953), ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive 3fc0e5b366 2/9: Docs: Document double left click behavior, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive db5695f5de 6/9: Fix: (hyperdrive-delete) buffer-local-value call, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive 167bbb4a36 4/9: Docs: Change wording of hyperdrive-menu section, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive c94885e52b 7/9: Change: (hyperdrive--buffer-visiting-entry-p) Rename, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive a14d14d61a 5/9: Fix: Set buffer-modified-p in buffers for deleted hyperdrive files,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 5d3d0cf953 9/9: Merge branch 'deleted-buffer-modified-p', ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive da8f663513 3/9: Docs: Document menu bar, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive d158584d74 8/9: Change: (hyperdrive--clean-buffer) Also compare versions, ELPA Syncer, 2023/10/12
- [nongnu] elpa/hyperdrive 04c8475ea3 1/9: Change: Bind double-mouse-1 click to open file at point, ELPA Syncer, 2023/10/12