From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: how to insert this? Date: Sat, 24 Nov 2007 12:31:27 -0800 Message-ID: References: <877ik7sav8.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195936451 15108 80.91.229.12 (24 Nov 2007 20:34:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2007 20:34:11 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 24 21:34:18 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iw1ha-00068S-L7 for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 21:34:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iw1hM-0002bj-0Z for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Nov 2007 15:33:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iw1h2-0002XP-J9 for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 15:33:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iw1gz-0002RL-DA for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 15:33:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iw1gz-0002RC-9k for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 15:33:33 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iw1gy-000590-Sh for help-gnu-emacs@gnu.org; Sat, 24 Nov 2007 15:33:33 -0500 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id lAOKWWLE007589 for ; Sat, 24 Nov 2007 14:32:32 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id lAOGwIvw023980 for ; Sat, 24 Nov 2007 13:32:31 -0700 Original-Received: from 141.144.88.84 by acsmt350.oracle.com with ESMTP id 3384627671195936283; Sat, 24 Nov 2007 12:31:23 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <877ik7sav8.fsf@gnu.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49484 Archived-At: > > Hey, I have see many times lines such as: > > --8<---------------cut here---------------start------------->8--- > > how to do so? > > You can insert it with M-x message-mark-inserted-region RET or > message-mark-insert-file, are functions in message.el. If you just want to insert it, then you don't need the message marking done by `message-*'. Here are two ways to do what you request: 1. Put the text in a file `cut', then use `C-x i cut' (command `insert-file'). 2. Put the text in a string, then use a command that calls `insert' to insert it: (defcustom cut-string "--8<---------------cut here---------------start------------->8---\n" "My cut string" :type 'string) (defun insert-cut-string () "Insert `cut-string'." (interactive) (insert cut-string)) If you use this a lot, #2 might be handier. You can bind `insert-cut-string' to a key. Learn to fish. Some ways to find out about things like this yourself: 1. Use `C-u C-h a insert RET'. You will see all functions whose names contain `insert', including `insert-file' and `insert'. To see only names that begin with `insert', use `C-u C-h a ^insert RET'. 2. Use `C-h f insert TAB TAB'. You will see all functions whose names start with `insert', including `insert-file' and `insert'. Unlike `C-h a', you don't see any descriptions, however, and you will not know which are commands (interactive functions). 3. Use `i' in the Emacs manual (or the Elisp manual), then `insert TAB TAB'. You will see all index entries related to `insert'. But that is less helpful in this particular case.