From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joshua Moore Newsgroups: gmane.emacs.help Subject: Writing a script to add comments to a python file Date: Sun, 15 Jul 2012 16:45:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1342396216 18579 80.91.229.3 (15 Jul 2012 23:50:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2012 23:50:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 16 01:50:16 2012 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 1SqYZq-00054r-Lu for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Jul 2012 01:50:14 +0200 Original-Received: from localhost ([::1]:41518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqYZp-0005ib-Sv for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jul 2012 19:50:13 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 12 Original-NNTP-Posting-Host: 88.65.72.173 Original-X-Trace: posting.google.com 1342395920 16043 127.0.0.1 (15 Jul 2012 23:45:20 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 15 Jul 2012 23:45:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=88.65.72.173; posting-account=PLJK6woAAADT9IrnI_HZYtNofcPPhZOp User-Agent: G2/1.0 Original-Xref: usenet.stanford.edu gnu.emacs.help:193488 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:85872 Archived-At: Hi gnu.emacs.help I've been using the basic features of emacs for a while now, and would like to add my own functions to it. What would be a good way to implement a command that adds a comment symbol (#) to a selected region in a python file? I can read and write a little bit of lisp-like languages, but I don't know how to access the region of selected text, edit the lines or where to save the script. Any help is appreciated. -- Josh