jeremy-compostella / org-msg

OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
GNU General Public License v3.0
276 stars 56 forks source link

adding courier font command #187

Closed danielgoldin closed 3 months ago

danielgoldin commented 4 months ago

I realize that In am supposed to use org-msg-enforce-css, but I pulled some code off another post and it didn't show up in the email I created.

(defconst org-msg-default-style
  (let* ((font-family '(font-family . "\"Courier\""))
     (font-size '(font-size . "12pt"))
     (font `(,font-family ,font-size))
     (line-height '(line-height . "12pt"))
     (bold '(font-weight . "bold"))
     (theme-color "#0071c5")
     (color `(color . ,theme-color))
     (table `(,@font (margin-top . "0px")))))

(defcustom org-msg-enforce-css org-msg-default-style
  "Define how to handle CSS style:
- list - style definition: see `org-msg-default-style' for
  example.
- string - path to a CSS file: same as t but use this file
  definitions."
  :type '(choice (file :must-match t)
         (list (list symbol symbol
                 (alist :value-type string)))))

I'm a non-programmer who use org-mode to write academic papers. I'm loving org-msg and this is the last tweak I need to make.

danielfleischer commented 3 months ago

Your code is wrong; you are missing the punchline in the let block: (let* ((bunch of definitions)) (punch line)) You defined a bunch of variables and then you return nothing.

Go back to the variable definition and copy everything and then put your own modifications.

jeremy-compostella commented 3 months ago

Copy-paste the entire definition of org-msg-default-style from org-msg.el to your configuration file and rename it to something like my-org-msg-default-style. Then make the changes you want like changing the font name or font size. Then just add a (setq org-msg-enforce-css my-org-msg-default-style) to your configuration file and that should do the trick.

On Tue, Mar 19, 2024 at 2:47 AM Daniel Fleischer @.***> wrote:

Your code is wrong; you are missing the punchline in the let block: (let* ((bunch of definitions)) (punch line)) You defined a bunch of variables and then you return nothing.

Go back to the variable definition and copy everything and then put your own modifications.

— Reply to this email directly, view it on GitHub https://github.com/jeremy-compostella/org-msg/issues/187#issuecomment-2006554538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMACBAASU43H52XEHQ3KALYZACRJAVCNFSM6AAAAABE4OBVJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBWGU2TINJTHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- « Si debugger, c'est supprimer des bugs, alors programmer ne peut être que les ajouter » - Edsger Dijkstra

danielgoldin commented 3 months ago

Worked like a charm. Thank you so much for your help and for creating org-msg.

jeremy-compostella commented 3 months ago

Great ! ☺️