From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: A TAB operation reform question. Date: Mon, 10 Oct 2022 17:49:26 +0200 Message-ID: References: <87tu4blmf0.fsf@laptop.lockywolf.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Vladimir Nikishkin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 10 17:57:37 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohv9s-0000XE-9F for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 17:57:36 +0200 Original-Received: from localhost ([::1]:42138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohv9q-0001ct-Ns for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 11:57:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohv23-0002Nk-OQ for help-gnu-emacs@gnu.org; Mon, 10 Oct 2022 11:49:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:40605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohv20-00020m-LP for help-gnu-emacs@gnu.org; Mon, 10 Oct 2022 11:49:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1665416966; bh=VxdwojzsxvJ76wRfAEAGNAFveL4s2fPTvJ5oiwqHbbo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=e25xGlLM5cVc0z6dKMVd/ya5Nc0B/T+VpGHwOP9Eqw6eVIYYCUtX5txl65PKIdPV7 9H+iFw5BetEjkbhdgY+A6tFuWyPqcqTyxekbkkJJ4PaYeErW1V5UAy1f/SWlQbnFi3 2QLdEuAFZRMirfjLcm2fRb1BqsBU/H4Vk7EdxbiU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Mon, 10 Oct 2022 17:49:26 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87tu4blmf0.fsf@laptop.lockywolf.net> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:yvKpNb3o8ZFUPH9133TcKImdXcElyfUabiMHHv4JUlNMRrVVB4jG9myS2apvnpnso7GgI 85cmMa9znwSkHjcDEhM9/oGna3aizayZLGakExOkpttETg8IfeAuA9BRrmwWAj/tPuy486++PSLb WZ9KHHJ8FCJ3G8KvTjOm1C08nBrIc/ctktCGYYi+P/BT365ZnwW22F5UmM0xIRkRRt2FXjiNJQFx 1bHKSOYtUTo9QU+GGSB8SUB9DJkwrqQRTnDrXYgonKh0CvDFPv7iZsYaSJayYzlYxldB6knl3BL4 rw= X-UI-Out-Filterresults: notjunk:1;V03:K0:qfzq+ce/52k=:09WlPZQYETHhX4fgyw009K TcWgmH5tB6whwmpSMtP3LUkoGGmFyNHe52tCzaBGsoVJTgtbUikaz+u/d65KOROndjHJYT/vA HRE9ywouOOT4kkjB8Tll8guS4OQjj0a+9T5jbvbC/LnHdgUuRe0lJiPeCq7w2LXi9Qq2M7J4o vF5lSYr526oAmBy8dL6244meaFMUg2b2am43I7wire12a8E/BLQ9VBiezPpPyF2cPp8+vbvnb 4aLiBqrNs6uFf8lTkIsKo5jg/tJ+hXh+Uhg/7sZ8V+Mj5yU6UkOmpyUTa+BbEUiVEg3+/2kJ0 5gEowVa05UazAfwbZY6vZVL7ZYaofNCUN9JtvFGWbeVmvRaTm+IfMIPtUiGHBb1SmBSvEt77A IxCbBW791u7klqn79/I8LE2J2ppxKORK00aQxLKdIpmczoRRlDP6WPv6jbYsSkje7kLda1nFH LkA5IX2XSeWkprAwpmpr4FIQAetYfSw4gtXKL8ijdLR6iFAxSBzIqmpWFlpgKufrQimH51qD+ xz+dBUAv9hQg4iR90dLeMEBorCQFbf8svHwzf2acIMLCrTtodXJFhpk+y3EthvSxAJ4GCRQ6Q qAXq8OVSiOpNluKuNyvXexuBi9Jnfp8XHiSA8mYeIMHDxdI5KDegCBh2hTg2KlKvyMR1SXXOZ axHafBN3Emd8Xzki626VRh2DfMD5eSJEPRw6qe4IE7e5H9gKT/8utB7IUqIrNWXQT+UFTY2z/ bwVI/AFXdLm0nz10B7SHqJEO67nLec77osAgbJuDGdL+uRLMiqJfJFKOkS0Ycw8kvdFj/tVY Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139798 Archived-At: > Sent: Tuesday, October 11, 2022 at 3:03 AM > From: "Vladimir Nikishkin" > To: help-gnu-emacs@gnu.org > Subject: A TAB operation reform question. > > Hello, Emacs users and developers > > I would like to ask if a reform to the way TAB (C-i) works has been > considered? And if "yes", then how hard would it be to implement it? > > The motivation is the following: > > The way TAB works at the moment is peculiar. I have also experienced TAB peculiar as per your description. > There is this "indent-for-tab-command", which either indents, or inserts > a tab-character, or completes... unless "tab-always-indent" is set to > some special value, but there are mode-specific > modename-tab-always-indent, but they are also sometimes ignored. Also, > org-mode overrides it with "org-cycle", and perhaps, other modes do too. > Also, "tab" is considered to be "the place somehow close to completion > functions", so M-C-i=3D=3DM-TAB is "ispell-complete-word", and a lot of > other packages try to make their completion somehow close to TAB. > > This looks a bit like a mess, partly because TAB is almost universally > seen as a "dwim" entry point, but it is not officially so in Emacs. > > Could there be an alternative protocol? Could TAB be make a DWIM entry > point "officially"? > > In particular, could it be possible to make a "hard-switch" variable > "tab-always-inserts-tab", which would be the opposite of > "tab-always-indent", but simpler, and it would be possible to override > it in the major modes, thus making "c-tab-always-indent" unnecessary. > > If tab-always-inserts-tab is set to nil, TAB (for example) would be > looking in some customizable list of functions, say > "tab-dwim-list-functions", and run each function until some does not > return non-nil. The default list could be something like > (indent-if-possible indent-comment-if-possible hs-fold-if-possible > complete-if-possible insert-tab). > Using TAB with a prefix-argument would always insert a TAB. (which would > be an exception to the rule "default prefix argument is 4", but I think > it would be understandable.). > > This way, instead of rebinding tab to org-cycle, org-mode could prepend > "org-cycle" to this list, or make it the only member of the list, but > this would still allow the users to plug in custom dwim functions > further into the list, such as ispell-word (not completion), jump > between table cells, and such. > > -- > Your sincerely, > Vladimir Nikishkin (MiEr, lockywolf) > (Laptop) > >