emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ement 30dda747af: Change/Fix: (-room-send-file) Pass fi


From: ELPA Syncer
Subject: [elpa] externals/ement 30dda747af: Change/Fix: (-room-send-file) Pass filename for upload
Date: Wed, 14 Jun 2023 09:58:14 -0400 (EDT)

branch: externals/ement
commit 30dda747afb965871db2e7864a69727c9ac6c4cf
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Change/Fix: (-room-send-file) Pass filename for upload
    
    Rather than file contents.  Requires plz v0.6, which was just tagged
    and should be on ELPA soon.
    
    Thanks to <@welkinsl:matrix.org> for reporting.
---
 README.org    | 1 +
 ement-room.el | 6 +-----
 ement.el      | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/README.org b/README.org
index cc6b05977f..3af5b0872b 100644
--- a/README.org
+++ b/README.org
@@ -318,6 +318,7 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 + Don't reinitialize ~ement-room-list-mode~ when room list buffer is 
refreshed.  ([[https://github.com/alphapapa/ement.el/issues/146][#146]].  
Thanks to [[https://github.com/treed][Ted Reed]] for reporting.)
 + Don't fetch old events when scrolling to the bottom of a room buffer (only 
when scrolling to the top).  (Thanks to [[https://github.com/Stebalien][Steven 
Allen]].)
 + Minor improvements to auto-detection of homeserver URIs.  (See 
[[https://github.com/alphapapa/ement.el/issues/24#issuecomment-1569518713][#24]].
  Thanks to [[https://github.com/phil-s][Phil Sainty]].)
++ Uploading of certain filetypes (e.g. Emacs would decompress some archives 
before uploading).  Thanks to ~@welkinsl:matrix.org~ for reporting.
 
 ** 0.9.3
 
diff --git a/ement-room.el b/ement-room.el
index 3d300f167b..eaaf3ae17b 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -1227,11 +1227,7 @@ otherwise use current room."
     (pcase-let* ((filename (file-name-nondirectory file))
                  (extension (or (file-name-extension file) ""))
                  (mime-type (mailcap-extension-to-mime extension))
-                 (data (with-temp-buffer
-                         ;; NOTE: Using (set-buffer-multibyte nil) doesn't
-                         ;; seem to be necessary, but I don't know why not.
-                         (insert-file-contents file)
-                         (buffer-string)))
+                 (data `(file ,file))
                  (size (length data)))
       (ement-upload session :data data :filename filename :content-type 
mime-type
         :then (lambda (data)
diff --git a/ement.el b/ement.el
index 33340258d5..ff12526a3f 100644
--- a/ement.el
+++ b/ement.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Adam Porter <adam@alphapapa.net>
 ;; URL: https://github.com/alphapapa/ement.el
 ;; Version: 0.10-pre
-;; Package-Requires: ((emacs "27.1") (map "2.1") (persist "0.5") (plz "0.2") 
(taxy "0.10") (taxy-magit-section "0.12.1") (svg-lib "0.2.5") (transient 
"0.3.7"))
+;; Package-Requires: ((emacs "27.1") (map "2.1") (persist "0.5") (plz "0.6") 
(taxy "0.10") (taxy-magit-section "0.12.1") (svg-lib "0.2.5") (transient 
"0.3.7"))
 ;; Keywords: comm
 
 ;; This program is free software; you can redistribute it and/or modify



reply via email to

[Prev in Thread] Current Thread [Next in Thread]