* [ascii] box
@ 2013-04-09 21:28 Samuel Wales
2013-04-09 22:42 ` Nick Dokos
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2013-04-09 21:28 UTC (permalink / raw)
To: emacs-orgmode
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
`----------
Thanks.
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY
can get it. There is NO hope without action. This means YOU.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ascii] box
2013-04-09 21:28 [ascii] box Samuel Wales
@ 2013-04-09 22:42 ` Nick Dokos
2013-04-09 23:02 ` Samuel Wales
2013-04-09 23:03 ` Thorsten Jolitz
0 siblings, 2 replies; 4+ messages in thread
From: Nick Dokos @ 2013-04-09 22:42 UTC (permalink / raw)
To: Samuel Wales; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Tue, Apr 9, 2013 at 5:28 PM, Samuel Wales <samologist@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
> (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
[-- Attachment #2: Type: text/html, Size: 3549 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ascii] box
2013-04-09 22:42 ` Nick Dokos
@ 2013-04-09 23:02 ` Samuel Wales
2013-04-09 23:03 ` Thorsten Jolitz
1 sibling, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2013-04-09 23:02 UTC (permalink / raw)
To: Nick Dokos; +Cc: Org Mode
Hi Nick,
Yes, those are good. I like the style. However, in Org, the same
document can be used for more than one backend, so it is more
convenient to export to ASCII. If a lot of people use it, a lot of
newcomers will have to manually delete characters.
Samuel
On 4/9/13, Nick Dokos <ndokos@gmail.com> wrote:
> --8<---------------cut here---------------start------------->8---
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY
can get it. There is NO hope without action. This means YOU.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ascii] box
2013-04-09 22:42 ` Nick Dokos
2013-04-09 23:02 ` Samuel Wales
@ 2013-04-09 23:03 ` Thorsten Jolitz
1 sibling, 0 replies; 4+ messages in thread
From: Thorsten Jolitz @ 2013-04-09 23:03 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> 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---
Cool, I've seen this sometimes but did not know how its produced. And
although I like the looks of boxquoted regions better, they are really
not so good for URLs, keybindings for .emacs and other stuff that will be
copied.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-09 23:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 21:28 [ascii] box Samuel Wales
2013-04-09 22:42 ` Nick Dokos
2013-04-09 23:02 ` Samuel Wales
2013-04-09 23:03 ` Thorsten Jolitz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).