From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: TRAMP and Ruby mode, tabs not being honored Date: Sun, 19 Nov 2017 11:40:58 +0100 Message-ID: <87po8emtz9.fsf@gmx.de> References: <20171115034048.GA24198@rmail> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511088104 10766 195.159.176.226 (19 Nov 2017 10:41:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Nov 2017 10:41:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Kevin Faulkner Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 19 11:41:38 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 1eGN2d-0002Hc-Gx for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Nov 2017 11:41:35 +0100 Original-Received: from localhost ([::1]:52546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGN2k-0007cj-Uw for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Nov 2017 05:41:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGN2B-0007ca-8v for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 05:41:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGN28-0002SE-4j for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 05:41:07 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:53074) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGN27-0002Pd-Qt for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 05:41:04 -0500 Original-Received: from detlef.gmx.de ([213.220.156.4]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MFtf4-1eMQlG0E8E-00Ewvx; Sun, 19 Nov 2017 11:41:00 +0100 In-Reply-To: (Kevin Faulkner's message of "Wed, 15 Nov 2017 00:17:38 -0500") X-Provags-ID: V03:K0:oRieHkh05/yqMMgXBn8F1lQ91e8N1Q21BS2vpRNVetX7qmpyL1s Yt/G5xPMpvd/hxOjSIyUH327dBoQGojhSIyHyohVzs4IMl7kFYG3jNXn+KGlEsYI4TOLlmc 8cRUPSEg2I9sL7C6aiNBR8eFuJ9YxpO2OrlcFRXaWU+hE04JNpqbmQNDIv8uiuG+P4AqjsS kU+9K1pP9qxgO0vejerMA== X-UI-Out-Filterresults: notjunk:1;V01:K0:3KkMWl30+wM=:zegAXqBGDvqnslqK2JKzr2 SSf+rM6ErG5817srdZnWTyfDi0TtyWM4Z17iAMfNO8Vk9N/W/5uU6dutcPrz6qCt/FfDGMTTf pKeiddESQU98CfpU/qQAnRjEM1Wwmo9NqJAndKiyHXfJ+LCmTBT17FSE3RENeMQNpju5PUpYB ZK/H/7raPY2t1s1DY0JY3JxditNoFaAexhy7qSTma59+qNcFIJ4ubI7T5hQFAjDd7R9Tg4eF2 h2WdssXEwFJNjF69LAqXnhbPuX7QYjldKeypPh4wMKn6h79eoAq+iMv0wn/iK3rCO95qWKM1p R7F+tanNqcSBQiIidTVy2g3HFh2Zq7comOru2Hg8GPIFU+LS5q2d241oWMxJaoSViEubZeHbA qiXBuB3btJ4No+HXc/VuwujJK7046DsfP0AqLy6wrZamdfwzYimZLhGW3twTiSvb3VkVPaIsm yTP8ro4n4PLahVCpIohdlvQ4zQ6x57p+Fhqpt0tZi41pDzEcb0rGgBTTUd4hL2k0q9YmgqBW0 34bqfVSB3c6Dc3ueFEi8SQO6z8HTH84lJ26dGbYUDFQEluM+pkvUz84iiHJUgDjpVDV13Zpiq iprYzadZtK97DFT+7pa77DLMw38G1A3JKiqWCzjkUvUILBB28HLeOytVIvy92BL+X3Uxhzy8y 2KItbJ+Ml9Vk1AXjcEAY0zGi+a0Sy3EhvX+DFkSwI+FEvZn+aD2Kw6myYpagiFc1BF8uU3GuE TRntWJPGalb1jXOU15wIqtdFaiekKi7S9b64RoQZYpV4n58ZwmFCqIdeUtxmNnGB++SMNCIM X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 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:114976 Archived-At: Kevin Faulkner writes: Hi Kevin, > Hello, I tried to resolve this issue on freenode at #emacs, we made some > progress but we were not able to reach a resolution in TRAMP mode. > > The problem I have is that over TRAMP mode while editing a chef (Ruby > .rb) file remotely, I enter Ruby mode by nature of editing that file. > When I try make a new block and press (or just press return from > the new block) it inserts two spaces. When I am editing previously > written lines/blocks, I can press tab and it will be a tab character. My > company mandates tabs (despite my best efforts to change that) in this > repository. While on IRC I added the hook which seems to work > (suggestion found here: https://stackoverflow.com/a/38901225/9903). It > changed the behavior locally (a tab is a tab), but not over TRAMP, which > is what I'm really looking to achieve. I have made a .dir-locals file > and tried many variations on the options but it generally looks like > this: > ```:: > ( > (setq indent-tabs-mode t) > (ruby-mode . ((indent-tabs-mode . t) > (add-hook 'ruby-mode-hook (lambda () > (setq indent-tabs-mode t) > (setq tab-width 2))) > (tab-width . 3)))) > ::``` > I know for a fact that the dir-locals file is being read and respected > because I can change the tab-width to be crazy like 10 and it works. > I would prefer not to make a secondary script to change the spaces into > tabs, because I feel this is a configuration/user issue. I can include > my .emacs (init) file, if you like, I don't have anything too extreme > included but here is part of it: > ```:: > '(bmkp-last-as-first-bookmark-file "/home/kfaulkne/.emacs.d/bookmarks") > '(custom-enabled-themes (quote (misterioso))) > '(enable-remote-dir-locals t) > '(package-selected-packages > (quote > (dired+ elscreen bookmark+ org-notebook async-await magit leanote > elpy dokuwiki-mode dokuwiki))) > '(safe-local-variable-values (quote ((ruby-indent-tabs-mode . t)))) > ;;This was because I kept adding various options I had kept finding. > '(tramp-default-method "sshx")) > ::``` > Please excuse any inefficiencies, I have I have tried diligently in vain > for a full day and I hope that I might get this resolved. Thank you all > for your time. I have tried to reproduce the problem with the most simple configuration. I have written a file ~/tmp/foo.el: --8<---------------cut here---------------start------------->8--- (setq indent-tabs-mode t tab-width 3) (add-hook 'ruby-mode-hook (lambda () (setq indent-tabs-mode t tab-width 2))) --8<---------------cut here---------------end--------------->8--- Then I have opened Emacs 27 with a test ruby file, simulating the sshx method: $ ~/src/emacs/src/emacs -Q -l ~/tmp/foo.el -l tramp /sshx::~/tmp/estcall.rb When I edit estcall.rb, and press after a block, is inserted. Could you, pls, check this recipe in your environment? > -Kevin Best regards, Michael.