From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: help-gnu-emacs@gnu.org
Subject: Re: outorg-edit-as-org and mu4e
Date: Wed, 23 Oct 2013 11:54:42 +0200 [thread overview]
Message-ID: <m2d2mwe2hp.fsf@polytechnique.org> (raw)
In-Reply-To: mailman.4479.1382460147.10748.help-gnu-emacs@gnu.org
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Ok, then its not a bug but just a (slightly) different use case.
Yes.
> I don't use mu4e, actually I never heard of it (is it good?).
I like it. It may not be as full-featured as gnus, but it has reliable links to
messages (even when they are moved around). I could never get the nnregistry to
work reliably for me.
> Could you test these changes and let me know if it works for you? Then I'm
> happy to apply them to outorg, no matter if this version:
>
> #+begin_src emacs-lisp
> (and (derived-mode-p 'message-mode)
> (outorg-prepare-message-mode-buffer-for-editing))
> #+end_src
I tried this and it almost works, since mu4e make the "--text follows this
line--" read only. Here is how I patched outorg.el:
#+BEGIN_SRC diff
Changes from head to working tree
1 file changed, 4 insertions(+), 3 deletions(-)
outorg.el | 7 ++++---
Modified outorg.el
diff --git a/outorg.el b/outorg.el
index 189ddb9..ab3e48d 100644
--- a/outorg.el
+++ b/outorg.el
@@ -469,7 +469,8 @@ headline and out-comments all text below this line - if any."
(goto-char (point-min))
;; (re-search-forward "--text follows this line--" nil 'NOERROR)
(re-search-forward mail-header-separator nil 'NOERROR)
- (replace-match "* \\&")
+ (let ((inhibit-read-only t))
+ (replace-match "* \\&"))
(beginning-of-line)
(let ((start-body (point)))
(comment-region start-body (point-max))
@@ -994,7 +995,7 @@ With ARG, act conditional on the raw value of ARG:
(error "Cannot edit read-only buffer")
(setq inhibit-read-only t)
(setq outorg-code-buffer-read-only-p t)))
- (and (eq major-mode 'message-mode)
+ (and (derived-mode-p 'message-mode)
(outorg-prepare-message-mode-buffer-for-editing))
(and (eq major-mode 'picolisp-mode)
(save-excursion
@@ -1076,7 +1077,7 @@ With ARG, act conditional on the raw value of ARG:
;; (marker-position outorg-code-buffer-point-marker))
(and outorg-code-buffer-read-only-p
(setq inhibit-read-only nil))
- (and (eq major-mode 'message-mode)
+ (and (derived-mode-p 'message-mode)
(outorg-prepare-message-mode-buffer-for-sending))
(and (eq major-mode 'picolisp-mode)
(save-excursion
#+END_SRC
I've made a few tests and things seem to work. I'll keep using it and will
report if something break.
Thanks,
Alan
next prev parent reply other threads:[~2013-10-23 9:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 17:23 contractor resources for emacs extension development ckhan
2013-10-17 18:10 ` Pascal J. Bourguignon
2013-10-17 19:55 ` Marcin Borkowski
2013-10-17 20:01 ` Thorsten Jolitz
2013-10-18 6:08 ` Bastien
2013-10-18 8:00 ` Thorsten Jolitz
[not found] ` <mailman.4210.1382040123.10748.help-gnu-emacs@gnu.org>
2013-10-18 5:39 ` Eric Brown
2013-10-18 7:26 ` Thorsten Jolitz
[not found] ` <mailman.4237.1382081230.10748.help-gnu-emacs@gnu.org>
2013-10-18 11:25 ` Alan Schmitt
2013-10-18 12:06 ` Thorsten Jolitz
[not found] ` <mailman.4249.1382098046.10748.help-gnu-emacs@gnu.org>
2013-10-21 15:23 ` Alan Schmitt
2013-10-21 17:41 ` Thorsten Jolitz
2013-10-23 1:31 ` Eric Abrahamsen
2013-10-23 8:49 ` Thorsten Jolitz
[not found] ` <mailman.4412.1382377300.10748.help-gnu-emacs@gnu.org>
2013-10-22 11:57 ` Alan Schmitt
2013-10-22 12:05 ` outorg-edit-as-org and mu4e (Was: contractor resources for emacs extension development) Alan Schmitt
2013-10-22 16:41 ` outorg-edit-as-org and mu4e Thorsten Jolitz
[not found] ` <mailman.4479.1382460147.10748.help-gnu-emacs@gnu.org>
2013-10-23 9:54 ` Alan Schmitt [this message]
2013-10-23 10:37 ` Thorsten Jolitz
2013-10-18 6:03 ` contractor resources for emacs extension development 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2d2mwe2hp.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.