emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-mime slightly out of date
Date: Fri, 09 May 2014 09:50:36 +0800	[thread overview]
Message-ID: <87r44367pv.fsf@ericabrahamsen.net> (raw)

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


org-mime still includes a call to `org-export-grab-title-from-buffer',
which doesn't exist any more. The attached patch does the same the
way org-export currently does it (I think).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Update-org-mime-to-current-export-functions.patch --]
[-- Type: text/x-diff, Size: 1298 bytes --]

From c967afb70bd7c9039c09d7c7f22388e1eced30fa Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Thu, 8 May 2014 22:32:01 +0800
Subject: [PATCH] Update org-mime to current export functions

* /contrib/lisp/org-mime.el (org-mime-send-buffer):

This function was using `org-export-grab-title-from-buffer', which no
longer exists.
 contrib/lisp/org-mime.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index b0007ac..5f874d9 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -269,8 +269,10 @@ export that region, otherwise export the entire body."
 (defun org-mime-send-buffer (&optional fmt)
   (run-hooks 'org-mime-send-buffer-hook)
   (let* ((region-p (org-region-active-p))
-	 (subject (org-export-grab-title-from-buffer))
-         (file (buffer-file-name (current-buffer)))
+	 (file (buffer-file-name (current-buffer)))
+	 (subject (if (not file) (buffer-name (buffer-base-buffer))
+		   (file-name-sans-extension
+		    (file-name-nondirectory file))))
          (body-start (or (and region-p (region-beginning))
                          (save-excursion (goto-char (point-min)))))
          (body-end (or (and region-p (region-end)) (point-max)))

             reply	other threads:[~2014-05-09  1:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09  1:50 Eric Abrahamsen [this message]
2014-05-09 12:41 ` [PATCH] org-mime slightly out of date Bastien

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=87r44367pv.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).