Giter VIP home page Giter VIP logo

Comments (14)

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

Sorry for the delay.

It took a little time to sort out some weird incompatibility in bbdb, but I got there

Could you share some details ? Perhaps some improvement in org-msg could help.

All well and good...except: whereas gnus usually signs my messages with pgp, with org-msg, I get this line literally at the top of my HTMLified mail:...

Do you mind sharing you gnus configuration so that I can experiment ?

Regards,
Jeremy

from org-msg.

ndw avatar ndw commented on June 19, 2024

Alas, I cannot reproduce the bbdb issue. I fixed it by adding org-msg-edit-mode for gnus:

(defconst bbdb-mua-mode-alist
  '((vm vm-mode vm-virtual-mode vm-summary-mode vm-presentation-mode)
    (gnus gnus-summary-mode gnus-article-mode gnus-tree-mode org-msg-edit-mode)
    (rmail rmail-mode rmail-summary-mode)
    (mh mhe-mode mhe-summary-mode mh-folder-mode)
    (mu4e mu4e-view-mode)
    (wl wl-summary-mode wl-draft-mode mime-view-mode)
    (message message-mode mu4e-compose-mode notmuch-message-mode)
    (mail mail-mode)))

But when I remove that fix, the problem doesn't recur. :-(

I'll email my config to you. Unfortunately, my gnus config is the work of 25 years and so it's a bit...messy.

from org-msg.

ndw avatar ndw commented on June 19, 2024

Sent. It occurred to me that it might be the order of hooks in gnus-message-setup-hook, but reversing them didn't have any effect.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

I looked at your configuration to understand better how you enable the encryption. I think I figured out a way to make it work with a simple patch in org-msg. I pushed that patch to the experimental branch. Could you give it a try ?

Regarding bbdb, the org-msg-mode function adds org-msg-edit-mode to list if bbdb has been loaded.

Regards,
Jeremy

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

Any update ?

Regards,
Jeremy

from org-msg.

ndw avatar ndw commented on June 19, 2024

Sorry. Have been on my honeymoon and am now traveling. Will attempt to grab the experimental branch and try it before I get on a plane tomorrow. Otherwise, over the weekend.

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

ok, no rush.

from org-msg.

ndw avatar ndw commented on June 19, 2024

Ok. I gave it a try. It's an improvement, but it's still problematic.

It looks like an empty, or nearly empty, text/plain entity has been signed, but the main text/html one has not.

From: Norman Walsh <[email protected]>
To: [email protected]
Subject: Testing again (again)
Date: Fri, 17 Jan 2020 21:52:26 +0000
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Lines: 69
Xref: hackmatack.local misc:350921

--=-=-=
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h=
ead><!-- 2020-01-17 Fri 21:52 --><meta http-equiv=3D"Content-Type" content=
=3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D=
device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org m=
ode"/><meta name=3D"author" content=3D"Norman Walsh"/></head><body>
<div style=3D"font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt=
;" id=3D"content">
<p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei=
ght:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
Hi <b>Norm</b>,
</p>

<p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei=
ght:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
This one should be signed!
</p>



<p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei=
ght:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
Regards,
</p>

<div style=3D"font-family:&quot;Arial&quot;;font-size:10pt;margin-bottom:20=
px;font-family:&quot;Arial&quot;;font-size:10pt;line-height:11pt;">
<p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei=
ght:11pt;font-size:10pt;font-family:&quot;Arial&quot;;max-width:100ch;">
=E2=80=93 <b>Jeremy</b> <br/><i>One Emacs to rule them all</i>
</p>

</div>
</div>
</body></html>
--=-=-=
Content-Type: multipart/signed; boundary="==-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"

--==-=-=
Content-Type: text/plain


--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1ury//rzuvqf7fN/hVWfHhJMAHkFAl4iLJoACgkQhVWfHhJM
AHn23xAAgW2R7rBF1y146WPBwb+LnKkhN0W/cUtO6DknrMVgXWG+SCZNSteVJw7f
E+Acp+NCyhbVyXD7J5FIZSdns326Soi90cc5+Nn5XrlZlpUJpxKiKKLuUPnval9y
bIh8hkGycSlxRNvy/H03QScmZFYnNKIsc70J05t9zfpJd763wGBoA7zsNd23EDY8
eOKIrVoF3uWrjRqN0LgBk0KJjgdflfuluOihlB6UEJa3VcJlDxDQumAM2Iz1gvcc
6GdK+rKDYd8p5ZQ7k2s41ltBl60zomgVeiiJDQLCrr/crPJpBbCthLmgGWUY25OG
RZemaNaPO0uH0CSsyNqjKyLYuiODDZlLABzUNdkVlCycWF2fYaVneHpp79wVUhpE
jqbAZcKE4f527/bPxC4UVzmwh5mOQUKGEFwlWBtTF/S3pRCdVsPLw3JACMHvNzBU
cvLJ6WAI2sVtCdHkT33n5Oz6FoVnZDUN/3suSXibu8XY3skcZ90Q7B7+P7yUbLHI
O+muA3kkdUjJv2IW8k4J2QdOEUJ9OnS+P1JjHNQnBTlHMs6GXFogozLMTOGmJrCb
swF1+rU/NyO6F9OdPMJ5Lp1/sqd8QqCwMyshsrWGbLq5MYax8hjrOIxJKBcXKzUz
JponY3VgkAudnQsCQDyg1wzqn8waL0gcbSWC8B4ix3uxl65PHhg=
=/yaC
-----END PGP SIGNATURE-----
--==-=-=--

--=-=-=--

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

I have been able to reproduce locally and fix an order issue. It works for me.

However, it breaks the HTML inline images and the attachment features. This is probably going to be a little bit more painful to make this part work as this is mostly handled outside of org-msg.

Regards,
Jeremy

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

I pushed the update to the experimental branch. Could you please test it ? As I said it works to send or reply in HTML. However, features like inline images or attachment are broken. This is not going to be easy to fixed because this is a limitation of the mml package.

I'll have to come up with a solution but this is going to take a while.

Regards,
Jeremy

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

If you evaluate the following version of mml-generate-mime + use the experimental branch, it should work. This is a PoC/hack, I need to implement a recursive solution for mml-generate-mime and submit a patch.

(defun mml-generate-mime (&optional multipart-type)
  "Generate a MIME message based on the current MML document.
MULTIPART-TYPE defaults to \"mixed\", but can also
be \"related\" or \"alternate\"."
  (let ((cont (mml-parse))
	(mml-multipart-number mml-multipart-number)
	(options message-options))
    (if (not cont)
	nil
      (when (and (consp (car cont))
		 (= (length cont) 1)
		 (fboundp 'libxml-parse-html-region)
		 (equal (cdr (assq 'type (car cont))) "text/html"))
	(setq cont (mml-expand-html-into-multipart-related (car cont))))
      (when (and (consp (car cont))
		 (= (length cont) 1)
		 (fboundp 'libxml-parse-html-region)
		 (equal (cdr (assq 'type (assq 'part (car cont)))) "text/html"))
	(let ((res (mml-expand-html-into-multipart-related (assq 'part (car cont))))
	      (html-part (assq 'part (car cont))))
	  (setq cont (nconc (assq-delete-all 'part (car cont)) (list res)))))
      (prog1
	  (with-temp-buffer
	    (set-buffer-multibyte nil)
	    (setq message-options options)
	    (cond
	     ((and (consp (car cont))
		   (= (length cont) 1))
	      (mml-generate-mime-1 (car cont)))
	     ((eq (car cont) 'multipart)
	      (mml-generate-mime-1 cont))
	     (t
	      (mml-generate-mime-1
	       (nconc (list 'multipart (cons 'type (or multipart-type "mixed")))
		      cont))))
	    (setq options message-options)
	    (buffer-string))
	(setq message-options options)))))

Regards,
Jeremy

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Did you get a change to give it a try ?

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Hi Norman Walsh,

I implemented a better change for mml, created a patch and submitted it to the bug-gnu-emacs
mailing list.

https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-01/msg01040.html

Could you check that this patch + the latest experimental branch work for you too ?

Thanks,
Jeremy

from org-msg.

jeremy-compostella avatar jeremy-compostella commented on June 19, 2024

Did you try with the new patches ? Can I close the ticket ?

from org-msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.