From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Python Mode, managing and converting TABS Date: Wed, 28 May 2014 11:13:45 -0800 Organization: AkWebsoft Message-ID: <20140528191345.GB25191@mail.akwebsoft.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1401307183 1974 80.91.229.3 (28 May 2014 19:59:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2014 19:59:43 +0000 (UTC) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 28 21:59:37 2014 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 1Wpk0Y-0000eH-JW for geh-help-gnu-emacs@m.gmane.org; Wed, 28 May 2014 21:59:30 +0200 Original-Received: from localhost ([::1]:44606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpk0Y-0007on-0s for geh-help-gnu-emacs@m.gmane.org; Wed, 28 May 2014 15:59:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpjs7-0002fK-UZ for Help-gnu-emacs@gnu.org; Wed, 28 May 2014 15:50:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpjs2-00081p-TG for Help-gnu-emacs@gnu.org; Wed, 28 May 2014 15:50:47 -0400 Original-Received: from 191-232-4-64.mtaonline.net ([64.4.232.191]:47847 helo=tj49.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpjs2-00081Y-Jp for Help-gnu-emacs@gnu.org; Wed, 28 May 2014 15:50:42 -0400 Original-Received: by tj49.com (Postfix, from userid 1000) id 428CA1231E5; Wed, 28 May 2014 11:13:45 -0800 (AKDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-Mailman-Approved-At: Wed, 28 May 2014 15:59:20 -0400 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:97916 Archived-At: I'm currently using GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10 on Ubuntu 12.04, but expect to have to also use --no-window-system ("console mode") on occassion. I have used emacs extensively in the distant past (up 'til 2008), so am re-acquainting myself with the system. I have much legacy python code that has "hard tabs" and to meet the python style guides, will have to be converted to "soft tabs". I.E. TAB => " " I also need to configure emacs so that TAB (or Ctrl-i) inserts four spaces instead of the TAB character. I currently have this in my .emacs [code] (add-hook 'python-mode-hook '(lambda () (turn-on-font-lock) (setq default-tab-width 4) (setq tab-width 4) (imenu-add-menubar-index) (setq imenu-sort-function 'imenu--sort-by-name))) [/code] I'd welcome any and all advice, pointers to previous discussion would are solicited. thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com, http://www.tj49.com