From: Julien Danjou <julien@danjou.info>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org
Subject: Re: quoting code blocks in Gnus without Org functions
Date: Fri, 08 Apr 2011 11:40:17 +0200 [thread overview]
Message-ID: <sa3vcypf5dq.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <87aag1rg0a.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 07 Apr 2011 14:57:41 -0500")
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
On Thu, Apr 07 2011, Ted Zlatanov wrote:
> Like this? Or should I say "text" as a fallback?
>
> #+begin_src emacs-lisp
> (defun tzz-copy-region-with-mode-property (beg end)
> (interactive "r")
> (let ((text (buffer-substring beg end))
> (mode (symbol-name major-mode)))
> (with-temp-buffer
> (insert text)
> (goto-char (point-min))
> (insert "#+begin_src"
> (if (string-match "\\(.+\\)-mode" mode)
> (concat " " (match-string 1 mode))
> "")
> "\n")
> (goto-char (point-max))
> (insert "\n"
> "#+end_src"
> "\n")
> (copy-region-as-kill (point-min) (point-max)))))
You do not need a fallback AFAIK, you would just end without any
fontification. :)
> This doesn't syntax-highlight like "lisp" does. So "lisp" is still
> better currently.
It does here.
> Huh, "lisp" is also not highlighted correctly in Gnus. I distinctly
> recall the Emacs Lisp highlighting was applied to some examples you
> posted, Julien. Is my example wrong or have I misconfigured something?
Check `org-src-fontify-natively' value?
--
Julien Danjou
❱ http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2011-04-08 9:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 4:02 draft group weirdness Eric Abrahamsen
2011-04-05 10:48 ` Richard Riley
2011-04-06 0:24 ` Lars Magne Ingebrigtsen
2011-04-06 1:43 ` Eric Abrahamsen
2011-04-06 13:28 ` quoting code blocks in Gnus without Org functions (was: draft group weirdness) Ted Zlatanov
2011-04-06 14:14 ` quoting code blocks in Gnus without Org functions Julien Danjou
2011-04-06 14:21 ` Ted Zlatanov
2011-04-06 14:45 ` Julien Danjou
2011-04-06 16:24 ` Ted Zlatanov
2011-04-07 7:38 ` Julien Danjou
2011-04-07 19:57 ` Ted Zlatanov
2011-04-07 21:20 ` Ted Zlatanov
2011-04-08 5:52 ` Ted Zlatanov
2011-04-08 9:34 ` Balázs Tóth
2011-04-08 9:40 ` Julien Danjou [this message]
2011-04-11 18:47 ` Ted Zlatanov
2011-04-10 15:50 ` draft group weirdness Eric Abrahamsen
2011-04-11 18:39 ` Ted Zlatanov
2011-04-10 15:54 ` Eric Abrahamsen
2011-04-12 16:21 ` Lars Magne Ingebrigtsen
2011-04-12 23:02 ` Eric Abrahamsen
2011-04-12 16:19 ` Lars Magne Ingebrigtsen
2011-05-18 11:39 ` Eric Abrahamsen
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=sa3vcypf5dq.fsf@cigue.easter-eggs.fr \
--to=julien@danjou.info \
--cc=ding@gnus.org \
--cc=tzz@lifelogs.com \
/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.
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 NNTP newsgroup(s).