help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TRAMP and Ruby mode, tabs not being honored


From: Kevin Faulkner
Subject: TRAMP and Ruby mode, tabs not being honored
Date: Wed, 15 Nov 2017 00:17:38 -0500
User-agent: K-9 Mail for Android

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.

-Kevin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]