From: Dmitry Gutov <dgutov@yandex.ru>
To: Daniel Doherty <ded-law@ddoherty.net>
Cc: 13200@debbugs.gnu.org
Subject: bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
Date: Sun, 16 Dec 2012 19:30:59 -0100 [thread overview]
Message-ID: <87ehip7n98.fsf@yandex.ru> (raw)
In-Reply-To: <87hanmmf5u.fsf@saturn.i-did-not-set--mail-host-address--so-tickle-me> (Daniel Doherty's message of "Sun, 16 Dec 2012 05:04:29 -0600")
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
Daniel Doherty <ded-law@ddoherty.net> writes:
> I have attached a small file that demonstrates the problem, which
> appears to happen following a here-doc.
Can't reproduce with recent ruby-mode. The version string below shows
you're using an Emacs that's older than even the current stable version
(24.2). Could you try with a version from from emacs24 or trunk?
> In GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
> of 2012-08-17 on saturn
If obtaining the full build is too much trouble, you can download and
evaluate just ruby-mode.el:
http://bzr.savannah.gnu.org/lh/emacs/trunk/files/head:/lisp/progmodes/
(the download buttons are in the rightmost column)
Also please check that you're not using "ruby-mode 1.1" from Marmalade.
Evaluating (find-library-name "ruby-mode") should return a path inside
the Emacs tree.
Attaching your example file after reindenting (C-x h C-M-\).
[-- Attachment #2: test-quote-reindented.rb --]
[-- Type: application/octet-stream, Size: 1585 bytes --]
# -*- mode: ruby -*-
desc 'generate a register from a csv file fetched to the spool'
long_desc <<EOS
Generate a register for the single account matching the ACCOUNT_SPEC
for transactions occurring within the period specified by the
PERIOD_SPEC argument. Unlike the fetch command, the 'generate' command
requires that the ACCOUNT_SPEC match a single account.
EOS
# These lines are indented too far to the right
arg_name 'ACCOUNT_SPEC [PERIOD_SPEC]'
command :generate do |c|
c.action do |global_options,options,args|
Byr.connect_db
if global_options[:ledger]
ledger_name = global_options[:ledger]
else
ledger_name = Byr.default_ledger
end
end
end
# Here, I escape the single quotes inside the here-doc, but that
# screws things up in a different way.
desc 'generate a register from a csv file fetched to the spool'
long_desc <<EOS
Generate a register for the single account matching the ACCOUNT_SPEC
for transactions occurring within the period specified by the
PERIOD_SPEC argument. Unlike the fetch command, the \'generate\' command
requires that the ACCOUNT_SPEC match a single account.
EOS
# These lines are indented too far to the right
arg_name 'ACCOUNT_SPEC [PERIOD_SPEC]'
command :generate do |c|
begin # These lines don't get indented at all
end
# I have hit [TAB] on each of the following lines, so they're confused as well.
c.action do |global_options,options,args|
Byr.connect_db
if global_options[:ledger]
ledger_name = global_options[:ledger]
else
ledger_name = Byr.default_ledger
end
end
end
prev parent reply other threads:[~2012-12-16 20:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-16 11:04 bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs Daniel Doherty
2012-12-16 20:24 ` Glenn Morris
[not found] ` <87a9t6kyho.wl%ded-law@ddoherty.net>
2012-12-22 18:42 ` Glenn Morris
2012-12-23 13:50 ` Stefan Monnier
2012-12-23 14:47 ` Dmitry Gutov
2012-12-23 15:41 ` Stefan Monnier
2012-12-23 16:06 ` Dmitry Gutov
2012-12-24 0:49 ` Stefan Monnier
2012-12-24 2:12 ` Dmitry Gutov
2012-12-24 5:11 ` Stefan Monnier
2012-12-16 20:30 ` Dmitry Gutov [this message]
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=87ehip7n98.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=13200@debbugs.gnu.org \
--cc=ded-law@ddoherty.net \
/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.