From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.help Subject: Making line prefixes invisible to a mode? Date: Fri, 05 Jul 2013 21:55:30 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1373054418 26774 80.91.229.3 (5 Jul 2013 20:00:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 20:00:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 05 22:00:20 2013 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 1UvCB1-0004Ny-S4 for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jul 2013 22:00:19 +0200 Original-Received: from localhost ([::1]:43772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvCB1-0001T9-53 for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jul 2013 16:00:19 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-X-Trace: individual.net 4TB50heq2l63UHcTkt4FkATUMJRm7ws8aqlJhcGuCCzv3q7VfC Cancel-Lock: sha1:KsNQIFS8yJC5ubXZshUawIeSc+c= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 Original-Xref: usenet.stanford.edu gnu.emacs.help:199700 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:91967 Archived-At: Hello everyone, Emacs supports multiple major modes by means of indirect buffers. This feature is useful - among other things - to edit comments in source code. However, when editing a block of line-comments, the line-comment prefix is seen by the alternative major mode as a part of the buffer (unless such mode is a specialized mode, of course). Narrowing can't work, either, because you can't narrow to a rectangle, can you? Therefore, is it possible to make a mode "believe" that each line starts after the line comment prefix? I have an alternative solution in mind*, but I'd like to know whether a direct way to achieve this is available. Thank you. *: Such solution would involve narrowing to a comment block and then stripping the line prefix, only to add it again before widening.