From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "R. Diez" Newsgroups: gmane.emacs.help Subject: Re: Indenting with the tab key like everyone else Date: Tue, 16 Jul 2019 09:23:53 +0200 Message-ID: <930e1fdf-f50a-9280-b45f-2a05fd5ae7c8@yahoo.de> References: <1019418503.3900238.1559510385829.ref@mail.yahoo.com> <1019418503.3900238.1559510385829@mail.yahoo.com> <87blzegehi.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> <4deddc97-3a92-c350-01b0-75d47f1077fa@yahoo.de> <87ef3abcnk.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="177166"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Cc: "help-gnu-emacs@gnu.org" To: YUE Daian Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 16 09:24:07 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hnHok-000jwQ-M5 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 09:24:06 +0200 Original-Received: from localhost ([::1]:45860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnHog-0005XD-Gp for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jul 2019 03:24:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44758) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnHod-0005Wv-2K for help-gnu-emacs@gnu.org; Tue, 16 Jul 2019 03:23:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnHob-0000Xk-N6 for help-gnu-emacs@gnu.org; Tue, 16 Jul 2019 03:23:59 -0400 Original-Received: from sonic312-27.consmr.mail.ir2.yahoo.com ([77.238.178.98]:39791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnHob-0000VA-9o for help-gnu-emacs@gnu.org; Tue, 16 Jul 2019 03:23:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1563261834; bh=/7Vxerj8JtI+O2v2147d0tUEj9x0CYYPYxHzkuWF/R4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=ZIZt5IiQNubSQM14FF1O/TuMpuJQ9R0gnIuaDtk/aCbmETu+DN2tO7UZf2gK9kqr4Kp/g5fqU4kfFnhzlNrMLmE2INDpYmyeuhicLEYvNVTPYJNBRaF4aC6OOYG4zZEB+JXvBIDLzkrUIbQJ8YNljh9s8zqvhxEde5hPhILCpv44Zs9kNC6byWtZI8O3sFAp2hWO5Fqawv9pp6YP448q88kES8ppZarzw0O6gy1SFb9nIMu5EEtvR/PeQp/JaNR0vxbPEf74WVXVCRbNs6S0/0USfhTXUhTlERloP6u7TOyM4jbDZ8lEUXfTP5CKgAyhwY+pbt387u4dce3nktkEdA== X-YMail-OSG: N.1cPKQVM1lC63jJZvxYBJq6RxN2j1tdI5kW7YJoh7DNgqA_Y8CiUit0TqlQmnA 0a_qGtfz6GozKP0nRCIrVyxZEU5OgSWILf6C1ETnoh6flavoX4KnTQBnVVInsrxpWaqtPKlZmoBU NvkplrkA7pqL_aFsbQZs37qcxFsr3lzSjLtgchYXSDScYcVIU4ABWTKFjpKZx89qkZ13HrECd3f4 qRYgOeQ_m9UuPabLegbCMJBu_RzCSkP6AwKo85yBqbffS0QtTVFAzix.GjCqGa.ZBHbcYpQooIIS 4SJ_NCMkrrSJkzPejYJ.4lyKlq1W2PkTxOvNgW.CrvVV3mutcE_toci5bJdbNe1scX_fbpD3S_hE kX10DjkLJM2YwmhbmMCNja_esaT2LAUgYacN4nO1DsoD1xNFk4z19uxZnY68SMKk9_QIKV5hyfCi FSPcgsa.MJNjxEpYTijjSXfsqvy4QRsxKG7HBWi9iI_a09UBRB3BvG8zR_MGcrp.GsaXFjyYvevJ K_EHzddyKvskSPG3aG7DCWHdWS3E2q7LyHltRs6_7rrBPKzxICPNI24iWpDOnQSm8htNByhAVeVY vpa03zqExvfLfJ.9A_DvMhVITMRGagzTwYTtjsVcLDzXI7XcihdoGUgcfNUqYB2Qp7HkqRlFOq1V KxSiYIFW9v..lTRHFIgW6KH9lE36BK3pqmoc2fuAzS_Nlr6I7lmMKYomwPjckGlBE3V_u2NoYF4c V.0PixKYWmVnMS08Zin8oKs3z8lsfRApdX86NKMb.8hr.bhTlcckS_sPD390ef8Xizb.yBjfAIOe Bvs0zVi0bih1yWlCeptd.y_43LyTI1ei5CNPQs9_w0 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Tue, 16 Jul 2019 07:23:54 +0000 Original-Received: by smtp425.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID eb75edd3246f66bf16f4c516c2b5f684; Tue, 16 Jul 2019 07:23:54 +0000 (UTC) In-Reply-To: <87ef3abcnk.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.178.98 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:121178 Archived-At: > I am not sure what you really want to do exactly. There are some tips I > thought of based on the code: > [...] After much fighting with Emacs, I think I narrowed the problem down to a weird side-effect of calling (use-region-p). I have written this routine for test purposes. I would be interested to know if you can reproduce it on your Emacs. ; This routine lets you test the surprising side-effect of calling (use-region-p). ; ; Before calling this routine, select a few text lines by going to the beginning of a line ; (column 0) and pressing Shift + a few times. The lines will be highlighted. ; ; Then call this routine interactively a few times in a row. The lines will indent one character at a time. ; The first time, the highlighting will disappear, but the selection will somehow stay, so that ; further calls will still indent the same lines. ; ; After the test above, change "(if t" below to "(if (use-region-p)", and repeat the test. ; The first time, the text will indent one character, but the second call will not indent anymore, ; because the selection is completely lost. (defun indentation-test nil "" (interactive) (if t ; (if (use-region-p) (indent-rigidly (region-beginning) (region-end) 1) (message "Skipping because there is no selection.") ) ) Best regards, rdiez