From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: how to highlight block end in Python-mode indentation Date: Sat, 20 May 2017 10:49:20 +0200 Message-ID: <87y3trx69b.fsf@fastmail.fm> References: <2d520b33-249a-f112-8ab6-1b89c3c76512@openmailbox.org> <87efvldoqt.fsf@fastmail.fm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1495402027 6638 195.159.176.226 (21 May 2017 21:27:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 21:27:07 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 25.2.4 Cc: help-gnu-emacs@gnu.org To: Krishnakant Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 21 23:27:04 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCYNT-0001dL-6B for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 23:27:03 +0200 Original-Received: from localhost ([::1]:39341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCYNY-0003Ni-On for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 17:27:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCYMp-0003MX-LU for help-gnu-emacs@gnu.org; Sun, 21 May 2017 17:26:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCYMl-0005Tk-NH for help-gnu-emacs@gnu.org; Sun, 21 May 2017 17:26:23 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34325) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCYMl-0005Te-Ik for help-gnu-emacs@gnu.org; Sun, 21 May 2017 17:26:19 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1D8172098C; Sun, 21 May 2017 17:26:19 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 21 May 2017 17:26:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=bpQ98Ex0lcFb/ojkqL 9I7/qNbOSiAvt2/jQ2xNbLWgU=; b=ABtQm6l3gjk4eLA4KQ0QvZPIC7LhJMr88T B1QTBxyJM1Z5wvbnftRIS7epsFia0OB5UIx4YQhjRBHUNb4ZOjQ6SbEAQmzifQNf /1ngP059SDiyhYmyCyxCObONO3DtEWY+D7iyR4eEgWvZ6JliFGQXVcmGd0y6Hbx5 w0gFTXFtHYr8FZ4DFxWqUmuGc8PqskV1JjtR9Cg87HAPGBvp7h4Tw6LskBMFg07b Q0TyI9xNDP1WfKpWmQv/h6GZz0nV2x578KcHVCkUOHBvvvmkdcz4C/ArpKjjnDro OqGA5ND7XXjSlhO/8Juu2bD6M8LyF7QTs6FHKzDXT/p5xZXhvCfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=bpQ98Ex0lcFb/ojkqL9I7/qNbOSiAvt2/jQ2xNbLWgU=; b=D18wbQxB PUSxAD1qxkfmJGQTl3iT+PCJZs+uqoF5TnJti8IuStX00BuMlIExtDr9QCvz7cs8 ylMNUlo9RJcLTE7OywDdUWLcjry9iuRAbMUo85rlY2M0Xw5vbjXNNY5UJPp/stB9 es/hEdR/h/mIdNxPaMbo25nvp9d0UU5od5GMDkZngL0lJENZ+m0lfQsqE7By/Kil efZrUZDN4WyK22gVFcHvsNqkS6SCMJYT6oYGv8DAWCIvZzBjJqPh+UfZ+rNIPpX9 WRDxet+Y7tfyOUVAZ8sBhaHKLfb4hwQkoAKdilJyxm69POOvlEQ7gkUI7k6ShrFz z6dN8Y+btSwWBA== X-ME-Sender: X-Sasl-enc: pLPHVjWwF0r8tvUebGuLYg6V8i5eo2NgkC5D2+WvKCfS 1495401978 Original-Received: from IdeaPad.messagingengine.com (x55b3b73e.dyn.telefonica.de [85.179.183.62]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BF337E59A; Sun, 21 May 2017 17:26:18 -0400 (EDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113117 Archived-At: On Sat, May 20 2017, Krishnakant wrote: > I tryed indent-gide and it sutes perfectly. > Just one question. > How can I have it work for every block and not just for class > and function in > Python? > It is not effective for if, while try: catch etc. > I am sure it can be made to work because the screenshot on the > github page has > it there. Well, the only customisation I have regarding `indent-guide' is this: (setq indent-guide-char "│") And for me, it does work with if and other blocks. Are you sure it doesn't work? Note that indent-guide doesn't show indentation if point is on the line that begins the block. So if you have: ``` def some_fun(arg): print("Hi!") if arg = 1: print("How are you?") elif arg = 2: print("How do you do?") else: print("I don't want to know you.") Now if point is on the line `def...`, no indentation markers are shown. They appear when you move point down. Similarly, if point is on the line `if...`, it doesn't show the indentation of the if block but of the def block. Once you move down to the line `print("How are you?")`, it'll show the indentation of the if block. HTH -- Joost Kremers Life has its moments