[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz 7e456638a6 75/81: Meta: Move notes to orphan branch
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz 7e456638a6 75/81: Meta: Move notes to orphan branch |
Date: |
Wed, 11 May 2022 17:58:03 -0400 (EDT) |
branch: externals/plz
commit 7e456638a651bab3a814e3ea81742dd917509cbb
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Meta: Move notes to orphan branch
---
.gitignore | 1 +
NOTES.org | 144 +------------------------------------------------------------
2 files changed, 2 insertions(+), 143 deletions(-)
diff --git a/.gitignore b/.gitignore
index 92ae1191e5..e343a998bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.#*
/sandbox/
/.sandbox/
+/worktrees/
diff --git a/NOTES.org b/NOTES.org
deleted file mode 100644
index b09634d6a3..0000000000
--- a/NOTES.org
+++ /dev/null
@@ -1,143 +0,0 @@
-#+TITLE: plz Notes
-
-* Contents
-:PROPERTIES:
-:TOC: :include siblings :depth 1 :ignore this
-:END:
-:CONTENTS:
-- [[#tasks][Tasks]]
-- [[#ideas][Ideas]]
-- [[#api-design][API Design]]
-- [[#references][References]]
- - [[#similar-projects][Similar projects]]
-:END:
-
-* Tasks
-
-** DONE Ensure that secrets are not leaked via command line or temp files
-CLOSED: [2021-08-15 Sun 15:34]
-:LOGBOOK:
-- State "DONE" from "TODO" [2021-08-15 Sun 15:34]
-:END:
-
-e.g. =request.el= can leak secrets and other data via the command line and
[[https://github.com/tkf/emacs-request/blob/431d14343c61bc51a86c9a9e1acb6c26fe9a6298/request.el#L709][leftover
temp files]]. We want to handle this safely.
-
-[2021-08-15 Sun 15:33] Finally figured out how to do this using ~--config~.
It required some trial-and-error, since the curl man page doesn't explain how
to pass request bodies over STDIN after the arguments. But it works!
-
-* Ideas
-
-** TODO Use finalizers to clean up response buffers
-:LOGBOOK:
-- State "TODO" from [2020-10-30 Fri 12:58]
-:END:
-
-+ [[info:elisp#Finalizer%20Type][info:elisp#Finalizer Type]]
-
-This might allow us to avoid or delay putting the response body in a string,
which could improve performance.
-
-** Name
-
-+ =plz=
- - The current name.
-+ =curly=
- - Since the library is based on curl, it wouldn't be a bad idea to have
=curl= in the name, and this isn't too long.
-
-* API Design
-
-** Async
-
-Some sample cases that the API should make easy.
-
-*** Body as string
-
-#+BEGIN_SRC elisp
- (plz-get url
- :with 'body-string
- :then (lambda (body-string)
- (setf something body-string)))
-#+END_SRC
-
-*** Body as buffer
-
-#+BEGIN_SRC elisp
- ;; Decodes body and narrows buffer to it.
- (plz-get url
- :with 'buffer
- :then (lambda (buffer)
- (with-current-buffer buffer
- (setf text (buffer-substring (point-min) (point-max))))))
-#+END_SRC
-
-#+BEGIN_SRC elisp
- ;; Narrows buffer to undecoded body, e.g. for binary files.
- (plz-get url
- :with 'buffer-undecoded ; `buffer-binary'?
- :then (lambda (buffer)
- (with-current-buffer buffer
- (setf binary-content (buffer-substring (point-min)
(point-max))))))
-#+END_SRC
-
-**** Callback with point at body start
-:PROPERTIES:
-:ID: 1795462e-01bc-4f0b-97ab-3c1b2e75485c
-:END:
-
-Assuming that =plz= has already called =decode-coding-region=, this is
straightforward, but the caller shouldn't have to do this extra work.
-
-#+BEGIN_SRC elisp
- (plz-get url
- :then (lambda (buffer)
- (buffer-substring (point) (point-max))))
-#+END_SRC
-
-*** Body parsed with function
-
-#+BEGIN_SRC elisp
- ;; Narrows buffer to body, decodes it, calls callback with result of
`json-read'.
- (plz-get url
- :with #'json-read
- :then (lambda (json)
- (setf something (alist-get 'key json))))
-#+END_SRC
-
-#+BEGIN_SRC elisp
- ;; Narrows buffer to body, decodes it, parses with
- ;; `libxml-parse-html-region', calls callback with DOM.
- (plz-get url
- :with (lambda ()
- (libxml-parse-html-region (point-min) (point-max) url))
- :then (lambda (dom)
- (with-current-buffer (generate-new-buffer "*plz-browse*")
- (shr-insert-document dom))))
-#+END_SRC
-
-*** HTTP response with headers
-
-* References
-:PROPERTIES:
-:TOC: :depth 1
-:END:
-
-** Discussions
-
-***
[[https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01070.html][with-url]]
-
-[2020-12-20 Sun 08:11] At the end of 2016, Lars Ingebrigtsen
[[https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01070.html][proposed]]
a ~with-url~ macro that improves on ~url-retrieve~ and
~url-retrieve-synchronously~. It was
[[https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01220.html][mentioned]]
by David Engster in
[[https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01217.html][this
thread]] from 2020. It looks like it has a nice API. Unfortunately it h [...]
-
-*** TODO Feedback from Chris Wellons
-:PROPERTIES:
-:ID: 975f77fa-5233-4b26-970b-e0d64f2aa950
-:END:
-:LOGBOOK:
-- State "TODO" from [2021-08-20 Fri 05:37]
-:END:
-
-+
[[https://github.com/alphapapa/plz.el/commit/7c27e4bdcd747f0bfc5a6298040739562a941e08#r55075010][Change:
Sync with accept-process-output · alphapapa/plz.el@7c27e4b · GitHub]]
-+
[[https://github.com/alphapapa/plz.el/commit/0a860d94dcbb103d05f3ee006772a568904fa4de#commitcomment-55151841][Tests:
"There be dragons." · alphapapa/plz.el@0a860d9 · GitHub]]
-
-** Similar projects
-
-*** [[https://github.com/ebpa/fetch.el][GitHub - ebpa/fetch.el: A simple HTTP
request library modeled after the web browser API]]
-
-A nice-looking wrapper for =url.el=.
-
diff --git a/NOTES.org b/NOTES.org
new file mode 120000
index 0000000000..37b7534b30
--- /dev/null
+++ b/NOTES.org
@@ -0,0 +1 @@
+worktrees/meta/notes/NOTES.org
\ No newline at end of file
- [elpa] externals/plz b412258c9d 56/81: Add: :timeout argument (curl's --max-time), (continued)
- [elpa] externals/plz b412258c9d 56/81: Add: :timeout argument (curl's --max-time), ELPA Syncer, 2022/05/11
- [elpa] externals/plz 87007fc612 57/81: Add: FIXMEs, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 709a14740f 58/81: Tidy: Docstrings, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 93a2ccaaa8 59/81: Fix: Run curl in temporary-file-directory, ELPA Syncer, 2022/05/11
- [elpa] externals/plz f2176dc56c 60/81: Change/Fix: Avoid command-line arguments, ELPA Syncer, 2022/05/11
- [elpa] externals/plz ac5bc006f3 62/81: Docs: Add readme, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 278391562a 69/81: Docs: Tidy, ELPA Syncer, 2022/05/11
- [elpa] externals/plz a5ccf48d80 70/81: Tests: Add check/error to a test, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 2f48423834 72/81: Docs: Add mascot, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 0b32c64f77 74/81: Notes: Rename file, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 7e456638a6 75/81: Meta: Move notes to orphan branch,
ELPA Syncer <=
- [elpa] externals/plz 69d5bf74f6 77/81: Fix: (plz--coding-system) Alist key, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 1d3efc036c 78/81: Add: (plz) DELETE method, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 9e308f1833 80/81: Meta: Tidy headers, etc. for ELPA, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 9156de9c59 81/81: Release: 0.1, ELPA Syncer, 2022/05/11
- [elpa] externals/plz bca0b3112b 20/81: Tidy, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 2b51ecd6be 27/81: Meta: Add test.yml for GitHub Actions, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 4f74be6565 30/81: Notes: Add idea, ELPA Syncer, 2022/05/11
- [elpa] externals/plz fbdcd69950 09/81: Changes, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 4588884c11 10/81: Changes, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 2c19b7f11d 11/81: Changes, ELPA Syncer, 2022/05/11