From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to elegantly and effectively quote org fragments? Date: Fri, 22 May 2015 00:02:07 +0200 Message-ID: <871ti94mjk.fsf@nicolasgoaziou.fr> References: <21853.2216.358897.903242@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvYWC-0002il-4X for emacs-orgmode@gnu.org; Thu, 21 May 2015 18:00:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvYWA-0007pz-Un for emacs-orgmode@gnu.org; Thu, 21 May 2015 18:00:44 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:53033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvYWA-0007pv-Ot for emacs-orgmode@gnu.org; Thu, 21 May 2015 18:00:42 -0400 In-Reply-To: <21853.2216.358897.903242@frac.u-strasbg.fr> (Alain Cochard's message of "Thu, 21 May 2015 00:20:24 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alain.Cochard@unistra.fr Cc: emacs-orgmode@gnu.org Hello, Alain.Cochard@unistra.fr writes: > Sorry if these are easy questions -- I did spend time with the manual, > the FAQ, the list archive, and the web. The best I found is to use an > org SRC block, but I do not find it satisfactory. Plus I cannot even > have it work properly. You can also use a fixed-width area: : * a headline only for the example : ** a subheadline : text > (1) Say I have have this in my org file (star in 1st column): > > * a regular headline: writing org examples > > #+BEGIN_SRC org > ,* a headline only for the example > ,** a subheadline > text > #+END_SRC > > Is it the best that one can do to quote some org code? Since I use > (org-startup-indented t), I would expect to have the corresponding > indentation. I'm not sure to understand. `org-indent-mode' is about virtual indentation, not real one. So, there's no indentation to be inserted. > Also, if not possible to avoid the escaping commas, I would like to at > least have them for each line, not only for the headlines. So I would > like something like this: > > * a regular headline: writing org examples > > #+BEGIN_SRC org > ,* a headline only for the example > , * a subheadline > , text > #+END_SRC > > Is (some of) this at all doable? This is not possible. Escaping rules are explained in (info "(org) Literal examples"), fourth footnote. > (2) Now, if in the org edit buffer I do 'C-c C-d' (org-deadline), > insert a DEADLINE:, and go back to my org file, the block now looks > like: > > #+BEGIN_SRC org > ,* a headline only for the example > ,** a subheadline > DEADLINE: <2015-05-21 Thu> > text > #+END_SRC > > If I do 'M-x org-agenda RET a', I get the following line in the Org > agenda buffer: > > todo: Deadline: a regular headline: writing org examples > > Is this normal? Since the deadline is part of the block, I would > expect no entry in the agenda; I tried to escape the DEADLINE with a > comma, but it does not change anything. So, is there a way to *quote* > a DEADLINE:, i.e., without having an associated entry in the agenda? IIRC, this bug was fixed some months ago on development version. Regards, -- Nicolas Goaziou