From mboxrd@z Thu Jan 1 00:00:00 1970 From: S.P.Tseng Subject: Re: [bug]x2 #+BEGIN_EXAMPLE can not work and #+BEGIN_SRC indent error Date: Sun, 03 Aug 2008 20:04:49 +0800 Message-ID: <851w16e23i.fsf@modprobe.cn> References: <85fxpqecss.fsf@modprobe.cn> <87hca65kmo.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KPcNH-0004EG-Kz for emacs-orgmode@gnu.org; Sun, 03 Aug 2008 08:07:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KPcNF-0004Dw-S1 for emacs-orgmode@gnu.org; Sun, 03 Aug 2008 08:07:47 -0400 Received: from [199.232.76.173] (port=37387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPcNF-0004Dt-N8 for emacs-orgmode@gnu.org; Sun, 03 Aug 2008 08:07:45 -0400 Received: from main.gmane.org ([80.91.229.2]:47559 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KPcNF-0006KK-G4 for emacs-orgmode@gnu.org; Sun, 03 Aug 2008 08:07:45 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KPcN9-00018h-I0 for emacs-orgmode@gnu.org; Sun, 03 Aug 2008 12:07:41 +0000 Received: from 222.215.39.11 ([222.215.39.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Aug 2008 12:07:39 +0000 Received: from deftsp by 222.215.39.11 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Aug 2008 12:07:39 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bernt Hansen writes: > S.P.Tseng writes: > >> 2. Press tab at the line "Exclusive or.", indent error. >> #+BEGIN_SRC emacs-lisp >> (defun org-xor (a b) >> "Exclusive or." >> (if a (not b) b)) >> #+END_SRC > > Switch to the appropriate mode first with C-c ' anywhere inside the SRC > block and then indent works fine. You switch back to org-mode with > another C-c ' In fact I want to stop org-mode treat [[xxxx.xx][xxxx]] as link with #+BEGIN_EXAMPLE and #+END_EXAMPLE just like ":". > > I don't think it's reasonable that org-mode should know all of the > indentation requirements for all other modes. I do not mean org-mode should know all of the indentation requirements for all other modes. I think the code between #+BEGIN_SRC and #+END_SRC is better to stop indent when I press Tab in them. Then I can use follow code two indent the whole buffer. ,---- | (defun iwb () | "indent whole buffer" | (interactive) | (delete-trailing-whitespace) | (indent-region (point-min) (point-max) nil) | (untabify (point-min) (point-max))) `---- For the moment, If I use the function iwb to indent the whole buffer, the indent of the code between #+BEGIN_SRC and #+END_SRC will be destroy.