emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: patch for BIDI support for org-mime.el
Date: Sun, 29 Mar 2015 19:00:38 +0200	[thread overview]
Message-ID: <87r3s7rb61.fsf@mat.ucm.es> (raw)

[-- Attachment #1: Type: text/plain, Size: 102 bytes --]


Attached you find a very small patch which adds BIDI support to org-mime.el
basically it adds

[-- Attachment #2: Type: text/html, Size: 59 bytes --]

[-- Attachment #3: Type: text/html, Size: 628 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: org-mime-bidi.patch --]
[-- Type: text/x-diff, Size: 1414 bytes --]

diff -u /home/oub/.emacs.d/elpa/org-plus-contrib-20130703/org-mime-org.el /home/oub/.emacs.d/elpa/org-plus-contrib-20130703/org-mime.el
--- /home/oub/.emacs.d/elpa/org-plus-contrib-20130703/org-mime-org.el	2015-03-13 20:14:17.000000000 +0100
+++ /home/oub/.emacs.d/elpa/org-plus-contrib-20130703/org-mime.el	2015-03-29 18:55:08.733572911 +0200
@@ -147,6 +147,12 @@
     ('vm "?")))
+(defvar org-mime-bidi-support nil
+  "*Variable which controls the support for RTL BIDI. Default is
+  nil. It is recommendable to change this variable, once you
+  change, via `set-input-method' to a BIDI language.")
 (defun org-mime-multipart (plain html &optional images)
   "Markup a multipart/alternative with text/plain and text/html alternatives.
 If the html portion of the message includes images wrap the html
@@ -155,10 +161,12 @@
     ('mml (concat "<#multipart type=alternative><#part type=text/plain>"
 		  (when images "<#multipart type=related>")
-		  "<#part type=text/html>"
+		  (if   org-mime-bidi-support ;add BIDI support
+		      "<#part type=text/html>\n<html style=\"direction: rtl\;\">"
+		    "<#part type=text/html>")
-		  (when images "<#/multipart>\n")
+		  (when images "</html>\n<#/multipart>\n")
     ('semi (concat
             "--" "<<alternative>>-{\n"

Diff finished.  Sun Mar 29 18:55:27 2015

             reply	other threads:[~2015-03-29 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-29 17:00 Uwe Brauer [this message]
2015-03-29 19:07 ` Dotan Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3s7rb61.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).