unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Glyn Millington <glyn.millington@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Email "cut here" code snippets
Date: Thu, 29 Jan 2015 13:30:34 +0000	[thread overview]
Message-ID: <87egqdogsl.fsf@nowhere.org> (raw)
In-Reply-To: 87wq45u6yx.fsf@gmail.com

torys.anderson@gmail.com (Tory S. Anderson) writes:

> I use GNUs and notice that some people include "---8<-- cut here" type
> snippets, which are specially formatted in my view. Where can I find
> this behavior documented, and is there a predefined shortcut for
> inserting these? I haven't spotted anything on it in the GNUs manual or
> online searches.

I have had this in my init.el/.emacs for ever!  It's not mine and I can't
remember where it came from but it works



;;;; SCISSORS
(defvar scissors "8<------"
  "string to insert in \\[scissors]")

(defun scissors ()
  "Insert a line of SCISSORS in the buffer"
  (interactive)
  (or (bolp) (beginning-of-line 2))
  (while (<= (current-column) (- (or fill-column 70) (length scissors)))
    (insert scissors))
  (newline))

(bind-key "s-s" 'scissors)


hth


Glyn




  parent reply	other threads:[~2015-01-29 13:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 12:06 Email "cut here" code snippets Tory S. Anderson
2015-01-29 13:26 ` Rainer M Krug
     [not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs@gnu.org>
     [not found]   ` <mailman.18902.1422538022.1147.help-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-01-29 13:28     ` Sebastien Vauban
2015-01-29 13:30 ` Glyn Millington [this message]
2015-01-30 22:01   ` Grant Rettke
2015-01-29 13:46 ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egqdogsl.fsf@nowhere.org \
    --to=glyn.millington@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).