From: Michael Albinus <michael.albinus@gmx.de>
To: Kevin Faulkner <kondor6c@lazytree.us>
Cc: help-gnu-emacs@gnu.org
Subject: Re: TRAMP and Ruby mode, tabs not being honored
Date: Sun, 19 Nov 2017 11:40:58 +0100 [thread overview]
Message-ID: <87po8emtz9.fsf@gmx.de> (raw)
In-Reply-To: <BB21DB12-F71E-4038-A3A6-B17F772028FF@lazytree.us> (Kevin Faulkner's message of "Wed, 15 Nov 2017 00:17:38 -0500")
Kevin Faulkner <kondor6c@lazytree.us> 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 <tab> (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 <RET> after a block, <TAB> is inserted.
Could you, pls, check this recipe in your environment?
> -Kevin
Best regards, Michael.
next prev parent reply other threads:[~2017-11-19 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171115034048.GA24198@rmail>
2017-11-15 5:17 ` TRAMP and Ruby mode, tabs not being honored Kevin Faulkner
2017-11-19 10:40 ` Michael Albinus [this message]
[not found] ` <20171119235011.GA26859@rmail>
2017-11-20 9:15 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87po8emtz9.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=help-gnu-emacs@gnu.org \
--cc=kondor6c@lazytree.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.