From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#25357: 25.1; Doc for `cursor-sensor-mode' (and modes generally) Date: Wed, 4 Jan 2017 13:02:42 -0800 (PST) Message-ID: References: <9ad8b225-73da-4533-a676-b0f8e84e54ca@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1483563795 28000 195.159.176.226 (4 Jan 2017 21:03:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2017 21:03:15 +0000 (UTC) Cc: 25357@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 04 22:03:10 2017 Return-path: Envelope-to: geb-bug-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 1cOsiB-0006NP-6P for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jan 2017 22:03:07 +0100 Original-Received: from localhost ([::1]:42149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOsiF-0006az-9X for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jan 2017 16:03:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOsi8-0006ar-0N for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 16:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOsi6-0001nc-Sa for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 16:03:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cOsi6-0001nY-Q0 for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 16:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cOsi6-0000Fd-3I for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 16:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jan 2017 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25357 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25357-submit@debbugs.gnu.org id=B25357.1483563778946 (code B ref 25357); Wed, 04 Jan 2017 21:03:02 +0000 Original-Received: (at 25357) by debbugs.gnu.org; 4 Jan 2017 21:02:58 +0000 Original-Received: from localhost ([127.0.0.1]:41498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOsi1-0000FC-QK for submit@debbugs.gnu.org; Wed, 04 Jan 2017 16:02:58 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:30256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOshy-0000Ev-DZ for 25357@debbugs.gnu.org; Wed, 04 Jan 2017 16:02:56 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v04L2k0e010513 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 Jan 2017 21:02:47 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v04L2kND014028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 Jan 2017 21:02:46 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v04L2iih006144; Wed, 4 Jan 2017 21:02:45 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127758 Archived-At: > > 2. (This bug) The manuals should document how to turn on/off a major mo= de > > using Lisp. Please retitle this bug appropriately. >=20 > `(emacs) Major Modes' says >=20 > You can explicitly select a new major mode by using an M-x > command. Take the name of the mode and add -mode to get the name of > the command to select that mode (e.g., M-x lisp-mode enters Lisp > mode). >=20 > Do you really think it's necessary to explain here how evaluating > (foo-mode) is equivalent to running M-x foo-mode? Yes, absolutely I do. And how to turn it OFF using Lisp. Yes, the answer is to just turn on some other major mode. But how are users to know that if we don't tell them? http://emacs.stackexchange.com/q/29813/105 > `(elisp) Major Modes' says >=20 > Major modes specialize Emacs for editing particular kinds of text. > Each buffer has one major mode at a time. Every major mode is > associated with a major mode command, whose name should end in > =E2=80=98-mode=E2=80=99. This command takes care of switching to that mod= e in the > current buffer I even think it would help to emphasize that "one" - not zero. IOW, you cannot turn off a major mode without turning on another one. > Do you really think it's necessary to explain how to call a command > from elisp here? The first hit in the index for `command' gives >=20 > command >=20 > An object which can be invoked via the command-execute primitive, > usually due to the user typing in a key sequence bound to that > command. See Interactive Call. A command is usually a function; if the > function is written in Lisp, it is made into a command by an > interactive form in the function definition (see Defining Commands). > Commands that are functions can also be called from Lisp expressions, > just like other functions. Yes, I do think it's necessary - see above. It is sufficient to explain this once (in each manual, I think - or at least cross-reference the Elisp explanation from the Emacs manual). I don't think it is ever really explained anywhere. And the way minor and major modes work in this regard is quite different. There is always some major mode that is "on" - only one at a time. There can be many minor modes that are on at the same time. It will already help a lot if the doc strings of modes make clear whether a mode is a major or a minor mode.