From: Kevin Faulkner <kondor6c@lazytree.us>
To: help-gnu-emacs@gnu.org
Subject: TRAMP and Ruby mode, tabs not being honored
Date: Wed, 15 Nov 2017 00:17:38 -0500 [thread overview]
Message-ID: <BB21DB12-F71E-4038-A3A6-B17F772028FF@lazytree.us> (raw)
In-Reply-To: <20171115034048.GA24198@rmail>
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
next parent reply other threads:[~2017-11-15 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171115034048.GA24198@rmail>
2017-11-15 5:17 ` Kevin Faulkner [this message]
2017-11-19 10:40 ` TRAMP and Ruby mode, tabs not being honored Michael Albinus
[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=BB21DB12-F71E-4038-A3A6-B17F772028FF@lazytree.us \
--to=kondor6c@lazytree.us \
--cc=help-gnu-emacs@gnu.org \
/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.