From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Undesired interactive call of major mode command Date: Tue, 25 Nov 2014 22:58:17 +0100 Message-ID: <87oarvt01y.fsf@rosalinde.fritz.box> References: <87lhn3gvq8.fsf@rosalinde.fritz.box> <87ppceop33.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416952731 21611 80.91.229.3 (25 Nov 2014 21:58:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 21:58:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 25 22:58:44 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XtO88-0005wl-AG for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2014 22:58:40 +0100 Original-Received: from localhost ([::1]:59671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtO87-000311-Uh for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2014 16:58:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtO7z-00030v-3v for emacs-devel@gnu.org; Tue, 25 Nov 2014 16:58:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtO7t-0006Ad-6s for emacs-devel@gnu.org; Tue, 25 Nov 2014 16:58:31 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:51650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtO7s-00069F-UB for emacs-devel@gnu.org; Tue, 25 Nov 2014 16:58:25 -0500 Original-Received: from rosalinde.fritz.box ([89.245.100.6]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M70Td-1Y5Xga3pwL-00woUE; Tue, 25 Nov 2014 22:58:18 +0100 In-Reply-To: (Stefan Monnier's message of "Sun, 23 Nov 2014 22:56:16 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:O7GM0DI3OjnRy3jKZCfcMWtFU6Jla/xIQHXkX//U17P6EkQzN5a TVSe1ANZ+ps69oEbqZN+r426Gk/YsEffF+WgRESF2RrwKv2Tts3jfoWgKOJpITXvzgTfh0f nigrrnaJb6CO6623jwsRv4ivszA+0bAymJub5U+SDvTV9uEM0RFu2IA+66S537BfqjS+FY7 3ZyUWG+/8kZ9lYgIUa52A== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.19 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178276 Archived-At: On Sun, 23 Nov 2014 22:56:16 -0500 Stefan Monnier wrote: >> - If you call todo-mode in an empty non-file buffer, you get the error >> (wrong-type-argument arrayp nil) because todo-mode calls >> (file-truename (buffer-file-name)) (this was the error of bug#19112). > > Signaling such an error is indeed a bug here. Better emit a message. Ok. >> - If you call todo-mode in a non-empty buffer (whether or not it is >> visiting a file (except a Todo mode file, of course), you get the >> Todo mode error "Invalid or missing todo-categories sexp", because the >> buffer text does not conform to the Todo mode file format. > > That's probably OK. > >> - If you call todo-mode in a buffer visiting an empty file, you get no >> error, but since the buffer is then in Todo mode, if you invoke any >> Todo mode command you'll get an error, again because of the invalid >> file format for Todo mode. > > Of course, an alternative might be to move some of the code outside of > todo-mode to some other function. Sorry, I don't follow you; what code? Steve Berman