help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: desirability of boxquote-style snippets for helping new users


From: Tassilo Horn
Subject: Re: desirability of boxquote-style snippets for helping new users
Date: Fri, 16 Jan 2009 10:56:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Samuel Wales" <address@hidden> writes:

Hi Samuel,

> While an experienced user can figure out rectangle commands or write a
> command to unpack the quote, new users and users who can't type much
> might skip using the code to avoid having to do that.  And a very new
> user could actually stick the whole thing in .emacs and wonder why it
> doesn't work.  It adds to the burden of fixing a problem or meeting a
> need in emacs without providing much benefit.  Even a few keystrokes
> can do that.
>
> Perhaps quotes of code, in all packages like boxquote, could by
> default get fancy only on the lines precediing and following.
>
> What do you think?

I think the best you can do is: Use boxquote for citations of
key/function/variable/info docs, but for code use

--8<---------------cut here---------------start------------->8---
(defun foo (a b)
  (if (> a b)
      (* a b)
    (foo (foo (- b a) a) (- a b))))
--8<---------------cut here---------------end--------------->8---

which is

,----[ C-h k C-c M-m ]
| C-c M-m runs the command message-mark-inserted-region, which is an interactive
| compiled Lisp function in `message.el'.
| 
| It is bound to C-c M-m, <menu-bar> <Message> <Insert Region Marked>.
| 
| (message-mark-inserted-region beg end &optional verbatim)
| 
| Mark some region in the current article with enclosing tags.
| See `message-mark-insert-begin' and `message-mark-insert-end'.
| If verbatim, use slrn style verbatim marks ("#v+" and "#v-").
`----

That's highlighted by gnus (and some other readers), too, and you can
simply copy & paste it somewhere.  It even tells you where to cut! ;-)

Bye,
Tassilo
-- 
In an average living room there are 1,242 objects RMS could use to write
an OS, including the room itself.





reply via email to

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