[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz f7357edb4e 2/9: Merge: v0.9.1
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz f7357edb4e 2/9: Merge: v0.9.1 |
Date: |
Fri, 16 Aug 2024 18:58:38 -0400 (EDT) |
branch: externals/plz
commit f7357edb4e4111a3d602c21185f319772e831229
Merge: 5008920318 c579f039ff
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Merge: v0.9.1
---
README.org | 8 +++++++-
plz.el | 15 +++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 5e40920a33..3181c1c58e 100644
--- a/README.org
+++ b/README.org
@@ -125,7 +125,7 @@ Synchronously download a JPEG file, then create an Emacs
image object from the d
- ~string~ to pass the response body as a decoded string.
- ~response~ to pass a ~plz-response~ structure.
- ~file~ to pass a temporary filename to which the response body has been
saved without decoding.
- - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response
body to it without decoding. ~FILENAME~ must be a non-existent file; if it
exists, it will not be overwritten, and an error will be signaled.
+ - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response
body to it without decoding. ~FILENAME~ must be a non-existent file; if it
exists, it will not be overwritten, and an error will be signaled. ~FILENAME~
is passed through ~expand-file-name~, which see.
- A function, which is called in the response buffer with it narrowed to
the response body (suitable for, e.g. ~json-read~).
If ~DECODE~ is non-nil, the response body is decoded automatically. For
binary content, it should be nil. When ~AS~ is ~binary~, ~DECODE~ is
automatically set to nil.
@@ -192,6 +192,12 @@ You may also clear a queue with ~plz-clear~, which cancels
any active or queued
Nothing new yet.
+** 0.9.1
+
+*Fixes*
+
++ Expand filenames when downloading to files (which was already applied to
filenames passed for uploading). (Thanks to
[[https://github.com/josephmturner][Joseph Turner]].)
+
** 0.9
*Compatibility*
diff --git a/plz.el b/plz.el
index 7d5246ca5d..c3316dd481 100644
--- a/plz.el
+++ b/plz.el
@@ -359,7 +359,8 @@ It may be:
- `(file FILENAME)' to pass FILENAME after having saved the
response body to it without decoding. FILENAME must be a
non-existent file; if it exists, it will not be overwritten,
- and an error will be signaled.
+ and an error will be signaled. FILENAME is passed through
+ `expand-file-name', which see.
- A function, which is called in the response buffer with it
narrowed to the response body (suitable for, e.g. `json-read').
@@ -454,7 +455,9 @@ into the process buffer.
(`(file ,(and (pred stringp)
as-filename))
(when (file-exists-p
as-filename)
(error "File exists, will
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name'
because curl doesn't
+ ;; expand, e.g. "~" into
"/home/...".
+ (setf filename
(expand-file-name as-filename))
(list (cons "--output"
filename))))))
((or 'put 'post)
(append (list (cons "--dump-header" "-")
@@ -466,7 +469,9 @@ into the process buffer.
(`(file ,(and (pred stringp)
as-filename))
(when (file-exists-p
as-filename)
(error "File exists, will
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name'
because curl doesn't
+ ;; expand, e.g. "~" into
"/home/...".
+ (setf filename
(expand-file-name as-filename))
(list (cons "--output"
filename))))
(list
;; It appears that this must be
the last argument
@@ -487,7 +492,9 @@ into the process buffer.
(`(file ,(and (pred stringp)
as-filename))
(when (file-exists-p
as-filename)
(error "File exists, will
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name'
because curl doesn't
+ ;; expand, e.g. "~" into
"/home/...".
+ (setf filename
(expand-file-name as-filename))
(list (cons "--output"
filename))))))
('head
(list (cons "--head" "")
- [elpa] externals/plz updated (399ad3e1aa -> 9fb22d84d9), ELPA Syncer, 2024/08/16
- [elpa] externals/plz f7357edb4e 2/9: Merge: v0.9.1,
ELPA Syncer <=
- [elpa] externals/plz 8ddabbb5a9 5/9: Merge: Create missing subdirectories when downloading to a file, ELPA Syncer, 2024/08/16
- [elpa] externals/plz a91994aae9 6/9: Tidy: (plz) Consolidate --request argument, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 56b930559c 3/9: Fix: (plz) Create empty directories when outputting to a file, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 60c8e3fe16 8/9: Tests: (plz-head-temp-file) Add, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 9fb22d84d9 9/9: Merge: Consolidate curl argument logic, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 570eae7fe4 7/9: Tidy: (plz) Consolidate duplicate (pcase as ...) forms, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 5008920318 1/9: Meta: v0.10-pre, ELPA Syncer, 2024/08/16
- [elpa] externals/plz 99202f2149 4/9: Docs: Update changelog, ELPA Syncer, 2024/08/16