From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [ascii] box Date: Tue, 9 Apr 2013 18:42:44 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae934123d9dbebb04d9f545d9 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPhFY-00062K-6s for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:42:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPhFV-0000l2-Ls for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:42:48 -0400 Received: from mail-ie0-x22e.google.com ([2607:f8b0:4001:c03::22e]:39988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPhFV-0000ky-Fm for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 18:42:45 -0400 Received: by mail-ie0-f174.google.com with SMTP id aq17so9259514iec.33 for ; Tue, 09 Apr 2013 15:42:45 -0700 (PDT) In-Reply-To: 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: Samuel Wales Cc: Org Mode --14dae934123d9dbebb04d9f545d9 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Apr 9, 2013 at 5:28 PM, Samuel Wales wrote: > ASCII boxes for blocks might be more convenient for the > reader if they do not have any characters to the left of the > code. > > #+BEGIN_SRC emacs-lisp > (defun code-for-copy-and-paste () > (makes newcomer use rectangle or unboxing commands :()) > #+END_SRC > > Maybe output like this instead: > > ,---------- > code > `---------- > > I use message-mark-inserted-region to mark code in email: --8<---------------cut here---------------start------------->8--- #+name: r-with-ggplot2 #+begin_src R :results output graphics :var tbl=foo :file foo-output.png :width 400 :height 300 library(ggplot2) res <- ggplot(tbl, aes(a_foo_var)) res + geom_histogram(aes(y=..density..)) + geom_density(weight=2) + xlab("A foo variable") #+end_src --8<---------------cut here---------------end--------------->8--- That allows easy cut-and-paste. I use boxquote-region for documentation etc that I don't expect the reader to cut and paste. They are bound to C-c m and C-c q resp. using this initialization code: --8<---------------cut here---------------start------------->8--- (define-key mode-specific-map [?q] 'boxquote-region) (define-key mode-specific-map [?m] 'message-mark-inserted-region) --8<---------------cut here---------------end--------------->8--- Nick --14dae934123d9dbebb04d9f545d9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Tue, Apr 9, 2013 at 5:28 PM, Samuel Wales <sam= ologist@gmail.com> wrote:
ASCII boxes for blocks might be more convenient for the reader if they do not have any characters to the left of the
code.

#+BEGIN_SRC emacs-lisp
=A0 (defun code-for-copy-and-paste ()
=A0 =A0 (makes newcomer use rectangle or unboxing commands :())
#+END_SRC

Maybe output like this instead:

,----------
code
`----------

=A0
I use message-mark-inserted-region t= o mark code in email:

--8<---------------cut here--------------= -start------------->8---
#+name: r-with-ggplot2
#+begin_= src R :results output graphics :var tbl=3Dfoo :file foo-output.png :width 4= 00 :height 300
=A0 library(ggplot2)
=A0 res = <- ggplot(tbl, aes(a_foo_var))
= =A0 res + geom_histogram(aes(y=3D..de= nsity..)) +
=A0 geom= _density(weight=3D2) + xlab("A foo variable")
#+end_src
--8<---------------cut here-------= --------end--------------->8---

That allows easy cut-and-paste. I use boxquote-region for documentation etc= that I don't expect the reader to cut and paste.

They are bound to C-c m and C-c q resp. using this initialization code:

--8<---------------cut here-= --------------start------------->8---
(define-key mode-specific-map [?= q] 'boxquote-region)
(define-key mode-specific-map [?m] 'message-mark-inserted-region)<= /font>
--8<---------------cut here---------------end--------------->8---=

Nick
--14dae934123d9dbebb04d9f545d9--