From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Grant Rettke Newsgroups: gmane.emacs.help Subject: Re: Email "cut here" code snippets Date: Fri, 30 Jan 2015 16:01:59 -0600 Message-ID: References: <87wq45u6yx.fsf@gmail.com> <87egqdogsl.fsf@nowhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1422655337 9699 80.91.229.3 (30 Jan 2015 22:02:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 22:02:17 +0000 (UTC) Cc: Emacs Help To: glyn.millington@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 30 23:02:14 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YHJdl-0007LJ-Ti for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jan 2015 23:02:14 +0100 Original-Received: from localhost ([::1]:38899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHJdl-00022d-13 for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jan 2015 17:02:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHJda-00022W-5X for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 17:02:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHJdY-0001jJ-V2 for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 17:02:02 -0500 Original-Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:33579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHJdY-0001jF-OG for help-gnu-emacs@gnu.org; Fri, 30 Jan 2015 17:02:00 -0500 Original-Received: by mail-wi0-f181.google.com with SMTP id fb4so5225142wid.2 for ; Fri, 30 Jan 2015 14:01:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=CuS/WeAHCtw1XaGaCe++7Md9litE7/GebmE4daXuhyU=; b=BsJPTB6ejmLyMtm17MysRI34DPfTUEJqFmUiphkxRlguFeFUVX0AW14JD/htr7E3DU w6XgZHzshtQrRUMst6W74AwcWTltTVf1MCHwjttcO56MiFAksOZRSxTNIfYbX3mRQA9l hL5un1hxydgbo8tyKcb8FAA3JGGNihVHm1x10vrqIH7Zw7Ml1bakFYudil8fQBXVfh8B +cyp3r4q+8c0Ut5+95pQ2IXwrstwRCb7/Oood0HdYHroDYM33J4XPJu4DCT9VMn/dMW/ +v7uVNXoRgbqqtJWXCQ/AYxYRJvqhMTlDmrM/6nWoaUWbxLlk2Gvk2WqH6gMN2B5JY6J KcrA== X-Received: by 10.180.12.227 with SMTP id b3mr1632652wic.11.1422655319378; Fri, 30 Jan 2015 14:01:59 -0800 (PST) Original-Received: by 10.27.9.16 with HTTP; Fri, 30 Jan 2015 14:01:59 -0800 (PST) In-Reply-To: <87egqdogsl.fsf@nowhere.org> X-Google-Sender-Auth: 0nUtxPCPWnJfzuQia_TVcU6DuVU X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102385 Archived-At: Me, too. (defun gcr/chs () "Insert opening \"cut here start\" snippet." (interactive) (insert "--8<---------------cut here---------------start------------->8--= -")) (defun gcr/che () "Insert closing \"cut here end\" snippet." (interactive) (insert "--8<---------------cut here---------------end--------------->8--= -")) One more person confesses and one of us will turn it into a package. On Thu, Jan 29, 2015 at 7:30 AM, Glyn Millington wrote: > 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 (<=3D (current-column) (- (or fill-column 70) (length scissors))= ) > (insert scissors)) > (newline)) > > (bind-key "s-s" 'scissors) > > > hth > > > Glyn > > --=20 Grant Rettke gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) =E2=80=9CLife has become immeasurably better since I have been forced to st= op taking it seriously.=E2=80=9D --Thompson