emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ascii] box


From: Nick Dokos
Subject: Re: [O] [ascii] box
Date: Tue, 9 Apr 2013 18:42:44 -0400




On Tue, Apr 9, 2013 at 5:28 PM, Samuel Wales <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]