* How can I get attachments to stick and actually be sent with an email using 27.0.91?
@ 2020-06-18 17:13 Sharon Kimble
2020-06-18 17:16 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Sharon Kimble @ 2020-06-18 17:13 UTC (permalink / raw)
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I've just spent a frustrating 20 minutes trying to attach a pdf file to
an email to be sent with the email itself. I've tried attaching a file,
attaching a buffer, and also attaching an external pdf file. None of
them were successful, so how can I do it please?
Thanks
Sharon.
- --
Debian 10.2, fluxbox 1.3.7, emacs 27.0.91, org 9.3.7
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAl7roLYbHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbzFgP/RAHkvlQuPIwLO2atihQ
1pQEZw5On/XkaazC+71lJ6MGxpf3USyTZD8m1VCb2OxUStp+5iPnLU7zD+vMamE6
2hjtqixf4fcPGsGIwrzM1Sbl0zqIk1hocKVnTBqmsvSYsNvPk03Ps85wO+0Ba96P
R8Ld81xrj43ZfOv2FyDopvnKCiwISVHNST79T9BCOzyLSUsb0QVc3VsdUQ/nls+i
3Xuoh4Gm/yk6Lg1T+iWcydfDoWGz8k4PLc2psD76TBDS/k0Dl7IsXhV6aoaLHMUx
QkI2CaFK7PUTQGFit1fsUMpwFb27sXtlJfMlpFXfay/tZ0qI6g0vZ6vJ/EFg3UAG
1BKpY++qAKZGOnLjF4OB9cB6BFn7PFMjlLOgnHlP/aEvsgtLa1pLVzBOiVCeR0xD
9dsJy306THX7UKTSvtoSqyExlN4IUKVUIlgJl7zJfu8Ao0br+q68UFMpI/0LeEC6
NYcbOhQOOSGGGc7qWf6umv8y4S3LKcrlELp5xOrIGNPMr+eYV42TL/rsQJhcfB22
119AKJ/ngOcJZgRsQldB63+cgCT6GMejqqoX61H4RTo4fohKjt0yFrfIrzXxEO82
KzB2Q3XnRJbLsmNJw0tgs7/ml5cAJkBzlOS2TuY/sjtWvrd741sTjfajfL2ThNw2
O4j7acVmVdokWC/TSeqcAXVt
=jQmg
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I get attachments to stick and actually be sent with an email using 27.0.91?
2020-06-18 17:13 How can I get attachments to stick and actually be sent with an email using 27.0.91? Sharon Kimble
@ 2020-06-18 17:16 ` Stefan Monnier
2020-06-18 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stefan Monnier @ 2020-06-18 17:16 UTC (permalink / raw)
To: help-gnu-emacs
> I've just spent a frustrating 20 minutes trying to attach a pdf file to
> an email to be sent with the email itself. I've tried attaching a file,
> attaching a buffer, and also attaching an external pdf file. None of
> them were successful, so how can I do it please?
I do
M-x *-att-fil RET
which completes to `mml-attach-file`.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I get attachments to stick and actually be sent with an email using 27.0.91?
2020-06-18 17:16 ` Stefan Monnier
@ 2020-06-18 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-06-20 11:40 ` Sharon Kimble
2020-06-20 11:53 ` Sharon Kimble
2 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2020-06-18 18:00 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier wrote:
>> I've just spent a frustrating 20 minutes trying to
>> attach a pdf file to an email to be sent with the
>> email itself. I've tried attaching a file,
>> attaching a buffer, and also attaching an external
>> pdf file. None of them were successful, so how can
>> I do it please?
>
> I do
>
> M-x *-att-fil RET
>
> which completes to `mml-attach-file`.
Yes, that's C-c C-a.
Don't mess with the inserted data, just send
the message.
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I get attachments to stick and actually be sent with an email using 27.0.91?
2020-06-18 17:16 ` Stefan Monnier
2020-06-18 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2020-06-20 11:40 ` Sharon Kimble
2020-06-20 11:53 ` Sharon Kimble
2 siblings, 0 replies; 6+ messages in thread
From: Sharon Kimble @ 2020-06-20 11:40 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I've just spent a frustrating 20 minutes trying to attach a pdf file to
>> an email to be sent with the email itself. I've tried attaching a file,
>> attaching a buffer, and also attaching an external pdf file. None of
>> them were successful, so how can I do it please?
>
> I do
>
> M-x *-att-fil RET
>
> which completes to `mml-attach-file`.
>
Thanks Stefan.
I've been trying this again and I've now got an error report which says -
- --8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-function mm-substring-no-properties)
(mm-substring-no-properties file)
(mml-insert-empty-tag 'part 'type type 'filename (mm-substring-no-properties file) 'disposition (or disposition "attachment") 'description description)
(let ((head (if (and (message-in-body-p) (not mml-attach-files-at-end)) nil (point)))) (if (or head mml-attach-files-at-end) (goto-char (point-max))) (mml-insert-empty-tag 'part 'type type 'filename (mm-substring-no-properties file) 'disposition (or disposition "attachment") 'description description) (or (eq mail-user-agent 'message-user-agent) (setq mail-encode-mml t)) (if (or head mml-attach-files-at-end) (progn (if (pos-visible-in-window-p) nil (message "The file \"%s\" has been attached at the end of the ..." (file-name-nondirectory file))) (goto-char head))))
mml-attach-file("/home/boudiccas/.emacs.d/attachments/land-registry..." "application/pdf" "charge 1" "attachment")
funcall-interactively(mml-attach-file "/home/boudiccas/.emacs.d/attachments/land-registry..." "application/pdf" "charge 1" "attachment")
call-interactively(mml-attach-file nil nil)
command-execute(mml-attach-file)
- --8<---------------cut here---------------end--------------->8---
So how can I get round this please, as my lisp knowledge or/and skills could easily be bettered by a goldfish?
Thanks
Sharon.
- --
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 10.2, fluxbox 1.3.7, emacs 27.0.91, org 9.3.7
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAl7t9aYbHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbOQEQAMUEcttm9/+DNVtDX5l7
M7IAu0wccGC7ni9/b7CtUSd0/rRa+RTitc66jsdaoWjTJqw0NkIphJsenWD9wV6Q
SdnSEUmkxabZDR16sMgtCK0B50+jh/SOTqtgKch9ql85gGs1RHmGLJD8JhUmAIgl
RfDlhyxswJtyv6TUuxTEyLYNzibsesgNpFKZcTSef1MHN61utn3apMn/Tik6l7dZ
tXQpjIQqXJUMXJf1KyzU//cXPGjLT7c6HDTK4mPzE8iKAlkEZp2XpPlxDQyhvUYJ
ElWMY+GnDfES494K/xk87QXU+t+5C9KEjJm4UL4hB9IjfAl+LWMH6fwYS0QRjEJF
R1ybqs5LnZVQm/Pp9A8W7lWwoTD3Vamb6YoGrrLx12Q1tyOjd0aIQ7dpxMyMfL0D
rRXW63gueDa97ovNCEeZ8Nz+P5T2evSMdqbFm2bCL+0qfiDaMQyPHB2S/9i3cdyO
BOgRhB9SgjfG3II3dYs7BnJ6tBHCNXpRGbVSVGqo8Q76cYIo/yuztVCmJKIOqfrz
+T0IWv1ao/73hIChKDxmwvYUoF+VKIN6ESxHkS00GfBW3qFkNUHUYk+U9Z0LETHa
TmCC/zIa4ts8VowHBdRF6ma48Qbhlrpz1bGsBeFdn9f96IWfNOVvpSh9r4ke+4Gh
jCdVfKfwJChly7sz7Ae+1BFP
=QMXX
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I get attachments to stick and actually be sent with an email using 27.0.91?
2020-06-18 17:16 ` Stefan Monnier
2020-06-18 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-06-20 11:40 ` Sharon Kimble
@ 2020-06-20 11:53 ` Sharon Kimble
2020-06-20 16:53 ` Stefan Monnier
2 siblings, 1 reply; 6+ messages in thread
From: Sharon Kimble @ 2020-06-20 11:53 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I've just spent a frustrating 20 minutes trying to attach a pdf file to
>> an email to be sent with the email itself. I've tried attaching a file,
>> attaching a buffer, and also attaching an external pdf file. None of
>> them were successful, so how can I do it please?
>
> I do
>
> M-x *-att-fil RET
>
> which completes to `mml-attach-file`.
>
And searching for 'mm-substring-no-properties' in my config turns up this
- --8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(setq mml-attach-files-at-end t)
(defun mml-attach-file (file &optional type description disposition)
"Attach a file to the outgoing MIME message.
The file is not inserted or encoded until you send the message with
`\\[message-send-and-exit]' or `\\[message-send]' in Message mode,
or `\\[mail-send-and-exit]' or `\\[mail-send]' in Mail mode.
FILE is the name of the file to attach. TYPE is its
content-type, a string of the form \"type/subtype\". DESCRIPTION
is a one-line description of the attachment. The DISPOSITION
specifies how the attachment is intended to be displayed. It can
be either \"inline\" (displayed automatically within the message
body) or \"attachment\" (separate from the body)."
(interactive
(let* ((file (mml-minibuffer-read-file "Attach file: "))
(type (mml-minibuffer-read-type file))
(description (mml-minibuffer-read-description))
(disposition (mml-minibuffer-read-disposition type nil file)))
(list file type description disposition)))
;; If in the message header, attach at the end and leave point unchanged.
(let ((head (unless (and (message-in-body-p) (not mml-attach-files-at-end)) (point))))
(if (or head mml-attach-files-at-end) (goto-char (point-max)))
(mml-insert-empty-tag 'part
'type type
;; icicles redefines read-file-name and returns a
;; string w/ text properties :-/
'filename (mm-substring-no-properties file)
'disposition (or disposition "attachment")
'description description)
;; When using Mail mode, make sure it does the mime encoding
;; when you send the message.
(or (eq mail-user-agent 'message-user-agent)
(setq mail-encode-mml t))
(when (or head mml-attach-files-at-end)
(unless (pos-visible-in-window-p)
(message "The file \"%s\" has been attached at the end of the message"
(file-name-nondirectory file)))
(goto-char head))))
#+end_src
[2015-03-27 Fri 16:34]
https://groups.google.com/forum/#!msg/gnu.emacs.gnus/4hzShoQEff4/9-CjUhEkLFMJ
- --8<---------------cut here---------------end--------------->8---
Now that code worked in emacs-26, but its failing in emacs-27.0.91. And,
being as that code has been in use since March 2015 it may well be past
its use-by-date!
So can anyone help me out please?
Thanks
Sharon.
- --
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk
Debian 10.2, fluxbox 1.3.7, emacs 27.0.91, org 9.3.7
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAl7t+M0bHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbaMMP/27JG5GCC1kpulHzk/zU
sSzXRuFQSLTr/Ek+3a0+h0ea0r93ZDhN5Rbp0J9MoGJIcdBta3XScOrDJlfbf2rC
OElENchupvTZGpBNQDsMke+MzNvjiIDWPHyAAnb9iuqLQyjaQE1qz4/2QuLlE39x
zUmVC/pvXAc9xDxvJLi/RzYa5xGGmy8QIL4+IHXbNeNDhw4MR6s6e9WrtudjWqfE
ZGXAsWhKWMmQy80uTQYSps+tSyVOYW7zYWVrQV1z5Bc9tAW6H4VPQ1YQLIBOQL0Z
gH6SqP+Evb7ZXI1fsd0PPtM/sCMhonLgC9zFLb9KF0TFXxYIATMr1br39x7wAIPr
GGr6QWgJPlmwjBYhuX8QM2ON4raSExaQjB2wFsa7RQ8tdrbWVBO3INMj8FSPXU5z
ikkb4i4Ep9Qsee/lGuKO6h+dntw1LPDypIqf28+rQFlxvdy0tWNosTffarO1LAle
jC1kJAGHXyVidC1P792rDlsMQnU/ZG5wMYVMOzjeSpLNA2zdiZAJe+jrYYL1Tna5
Dvz40GpHhHqXlD0QBDkinmvl0VjzddSzKCYbpfcytKzeu3hDGtw7JdP2GhRbSvfD
eJFxZwhGB53H4SSfkK1cGdMgSJef7d6IRZYaA1EgxuJ461+hDNAtf+ubtBRxH8Dy
ufDalfvbU4FtUo2GUYmEZa2n
=rZcf
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-20 16:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-18 17:13 How can I get attachments to stick and actually be sent with an email using 27.0.91? Sharon Kimble
2020-06-18 17:16 ` Stefan Monnier
2020-06-18 18:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-06-20 11:40 ` Sharon Kimble
2020-06-20 11:53 ` Sharon Kimble
2020-06-20 16:53 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).