From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Enabling modes Date: Tue, 12 Sep 2017 23:30:27 +0100 Message-ID: <87bmmfturg.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505255487 20797 195.159.176.226 (12 Sep 2017 22:31:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Sep 2017 22:31:27 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nick Helm Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 13 00:31:20 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 1drths-00046e-Ur for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Sep 2017 00:31:01 +0200 Original-Received: from localhost ([::1]:39006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drthx-00067Z-6S for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Sep 2017 18:31:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drthX-00067F-L3 for help-gnu-emacs@gnu.org; Tue, 12 Sep 2017 18:30:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drthU-0000EF-1B for help-gnu-emacs@gnu.org; Tue, 12 Sep 2017 18:30:39 -0400 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:58515) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drthT-0000Ch-R4 for help-gnu-emacs@gnu.org; Tue, 12 Sep 2017 18:30:35 -0400 Original-Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 5EBF998A25 for ; Tue, 12 Sep 2017 22:30:30 +0000 (UTC) Original-Received: (qmail 2959 invoked from network); 12 Sep 2017 22:30:30 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[51.37.105.27]) by 81.17.254.9 with ESMTPSA (AES128-SHA encrypted, authenticated); 12 Sep 2017 22:30:30 -0000 In-Reply-To: (message from Nick Helm on Mon, 11 Sep 2017 14:41:51 +1200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 81.17.249.38 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:114248 Archived-At: Nick Helm writes: > Robert Thorpe writes: ... >> Is that possible? > > You could use mode hooks, but if you'd prefer to turn it off just for > files with a TSV extension you could add an entry to auto-mode-alist. > Something like this in your init should work: > > (global-visual-line-mode) > (add-to-list 'auto-mode-alist '("\.tsv\'" . (lambda () (visual-line-mode -1)))) > > Alternatively, you could use magic-mode-alist to detect the tabbed > format itself, which would work for any extension. That seems like a good idea. BR, Robert Thorpe