From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78422 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.gnus.general Subject: Re: quoting code blocks in Gnus without Org functions Date: Fri, 08 Apr 2011 11:40:17 +0200 Message-ID: References: <87hbadqran.fsf@ericabrahamsen.net> <87sjtw40jh.fsf@ericabrahamsen.net> <87ipurqzjr.fsf_-_@lifelogs.com> <87sjtvpiju.fsf@lifelogs.com> <87fwpvpcti.fsf@lifelogs.com> <878vvm7bp3.fsf@keller.adm.naquadah.org> <87aag1rg0a.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1302255711 17468 80.91.229.12 (8 Apr 2011 09:41:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 09:41:51 +0000 (UTC) Cc: ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M26725@lists.math.uh.edu Fri Apr 08 11:41:42 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q88CD-0004XS-J6 for ding-account@gmane.org; Fri, 08 Apr 2011 11:41:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q88BA-0004CL-H0; Fri, 08 Apr 2011 04:40:36 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q88B9-0004C7-3H for ding@lists.math.uh.edu; Fri, 08 Apr 2011 04:40:35 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q88B6-0004ZJ-Ro for ding@lists.math.uh.edu; Fri, 08 Apr 2011 04:40:34 -0500 Original-Received: from prometheus.naquadah.org ([212.85.154.174] helo=mx1.naquadah.org) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q88B5-0004Bd-Dk for ding@gnus.org; Fri, 08 Apr 2011 11:40:31 +0200 Original-Received: from cigue.easter-eggs.fr (coquelicot-a.easter-eggs.com [82.235.59.105]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id 7777B5C0F1; Fri, 8 Apr 2011 11:40:23 +0200 (CEST) Mail-Followup-To: Ted Zlatanov , ding@gnus.org In-Reply-To: <87aag1rg0a.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 07 Apr 2011 14:57:41 -0500") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78422 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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? =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJNntgBAAoJEGEbqVCLeKXCcIEP+QGONGUK85xjwUqSi782KzTw vWtY615NYKkVEbkfdYA1WPNoLXc5YIAU7L2woa7qYikPFXHOAA9WMDW7CxAw/Dg2 yDsapydojRTbLzmFkPf8g4xGnWkI89eKer5atpL4NE3vSUUJSsyX3BhlbEE/kSv8 5H62O62TyRfgQhi2AAAhuV7a2fSrryrcDkRF/WTSWNb9Us621GOBCQgTPNT+hziF vRIx2tImMt9QQwRfzQI+1jf17O5gYkTBLkw7fkCKyfSJzoA05rUntmHXklHo9/7g AaCy54w4iBlx684ZC431TjySolUm3B4ZIuVouk8YTDox+5ywPunNkMTEbnSiogTS 751fUeb2Pa/LPr9eJOWE1l7ycP31XkLII9MqV6uzjjgrS37yP+XyvCx6IZ6/TE6b 6wLwkk29pYURp6fimPID9pGFcxrh5aFf92oA0/RyofO7zulLsJANYPXdPEphnALl fEDS0IIuoOf0Y0JFgZj52UscP7f5xgzZ+cI/i0kheiI5LwSnmjdDhsOPAxz8JQ/M urrANJv2XUg/djvfsdrA30KDlE3csWxDf689W1d6CtuUKiu8eq8PCPLeg0pYFVBz K7xhCcuND2z6Ot+NNv5u4MHK6AjNIx9UGsMchouoH/QCiuMhRy0BVwncHa5gz75I vN+8GW6MfmuBqWzL874R =ogdj -----END PGP SIGNATURE----- --=-=-=--