* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
@ 2012-12-16 11:04 Daniel Doherty
2012-12-16 20:24 ` Glenn Morris
2012-12-16 20:30 ` Dmitry Gutov
0 siblings, 2 replies; 11+ messages in thread
From: Daniel Doherty @ 2012-12-16 11:04 UTC (permalink / raw)
To: 13200
[-- Attachment #1: Type: text/plain, Size: 174 bytes --]
==================================================================
I have attached a small file that demonstrates the problem, which
appears to happen following a here-doc.
[-- Attachment #2: Test Ruby File --]
[-- Type: application/x-ruby, Size: 1605 bytes --]
[-- Attachment #3: Type: text/plain, Size: 3523 bytes --]
==================================================================
In GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
of 2012-08-17 on saturn
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Ruby
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-x C-f t e s t <tab> - q u <tab> <return> C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n <up> <tab>
<tab> <down> <tab> <down> <tab> <down> <tab> <down>
<tab> <down> <tab> <down> <tab> <down> <tab> <down>
<tab> <down> <down> <down> <down> <down> <down> <tab>
<down> <down> <down> <down> <down> <down> <tab> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <tab> <left> C-a <tab> <up> <tab> <up> <tab>
<up> <tab> <down> <down> <down> <tab> <down> <tab>
<down> <down> <up> <tab> <up> <up> <up> <tab> <up>
<tab> <down> <down> <down> <down> <down> <tab> <tab>
<down> <tab> <down> <tab> <down> <tab> <down> <tab>
<down> <tab> <down> <tab> <down> <tab> <tab> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <down> C-e
<return> # SPC I SPC h a v e SPC t <backspace> h i
t SPC [ T A B ] SPC o n SPC e a c h SPC o f SPC t h
e SPC f o l l o w i n g SPC l i n e s , SPC <backspace>
<backspace> , SPC s o SPC t h e y ' r e SPC c o n f
u s e d SPC a s SPC w e l l . <return> <backspace>
C-a C-x C-s M-x r e p o r t - e m a <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
ruby-indent-to: invalid nest [2 times]
Saving file /home/ded/test-quote.rb...
Wrote /home/ded/test-quote.rb
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils ruby-mode help-mode easymenu view time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
--
====================================================
Daniel E. Doherty
Law Offices of Daniel E. Doherty
7300 W. 110th Street, Suite 930
Overland Park, KS 66210
913.338.7182 (Phone)
913.338.7164 (FAX)
ded-law@ddoherty.net
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
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-16 20:30 ` Dmitry Gutov
1 sibling, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2012-12-16 20:24 UTC (permalink / raw)
To: Daniel Doherty; +Cc: 13200
Daniel Doherty wrote:
> I have attached a small file that demonstrates the problem, which
> appears to happen following a here-doc.
Thanks for the report. It seems to work fine in the 24.2.91 pretest for
the upcoming 24.3 release. Maybe you could give it a try:
http://alpha.gnu.org/gnu/emacs/pretest/
> In GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
This is an old development snapshot. There is no reason to still be
using that.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
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
@ 2012-12-16 20:30 ` Dmitry Gutov
1 sibling, 0 replies; 11+ messages in thread
From: Dmitry Gutov @ 2012-12-16 20:30 UTC (permalink / raw)
To: Daniel Doherty; +Cc: 13200
[-- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
[not found] ` <87a9t6kyho.wl%ded-law@ddoherty.net>
@ 2012-12-22 18:42 ` Glenn Morris
2012-12-23 13:50 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2012-12-22 18:42 UTC (permalink / raw)
To: 13200-done
Version: 24.3
Daniel E. Doherty wrote (on Sat, 22 Dec 2012 at 07:28 -0600):
> Yes. Thanks, I uninstalled the elpa version and updated my emacs via
> git, and all is good.
Thanks for letting us know.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-22 18:42 ` Glenn Morris
@ 2012-12-23 13:50 ` Stefan Monnier
2012-12-23 14:47 ` Dmitry Gutov
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-12-23 13:50 UTC (permalink / raw)
To: 13200; +Cc: ded-law
>> Yes. Thanks, I uninstalled the elpa version and updated my emacs via
>> git, and all is good.
package.el should be able to ignore your "out of date" elpa version if
the bundled version is more recent, so it should work even if you don't
uninstall the elpa version.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-23 13:50 ` Stefan Monnier
@ 2012-12-23 14:47 ` Dmitry Gutov
2012-12-23 15:41 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Gutov @ 2012-12-23 14:47 UTC (permalink / raw)
To: Stefan Monnier; +Cc: ded-law, 13200
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Yes. Thanks, I uninstalled the elpa version and updated my emacs via
>>> git, and all is good.
>
> package.el should be able to ignore your "out of date" elpa version if
> the bundled version is more recent, so it should work even if you don't
> uninstall the elpa version.
By ignore, do you mean it won't show up in the list of packages
available to install?
The person who uploaded ruby-mode to Tom Tromey's ELPA (it's also
present in Marmalade) independently raised the package version to 1.1,
so it's higher than the bundled version.
Do you think we should bump it to 1.2?
--Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-23 14:47 ` Dmitry Gutov
@ 2012-12-23 15:41 ` Stefan Monnier
2012-12-23 16:06 ` Dmitry Gutov
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-12-23 15:41 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: ded-law, 13200
>> package.el should be able to ignore your "out of date" elpa version if
>> the bundled version is more recent, so it should work even if you don't
>> uninstall the elpa version.
> By ignore, do you mean it won't show up in the list of packages
> available to install?
No, I mean it should not be added to load-path during startup.
> The person who uploaded ruby-mode to Tom Tromey's ELPA (it's also
> present in Marmalade) independently raised the package version to 1.1,
> so it's higher than the bundled version.
Ah!
> Do you think we should bump it to 1.2?
Depends. Is it a fork?
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-23 15:41 ` Stefan Monnier
@ 2012-12-23 16:06 ` Dmitry Gutov
2012-12-24 0:49 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Gutov @ 2012-12-23 16:06 UTC (permalink / raw)
To: Stefan Monnier; +Cc: ded-law, 13200
On 23.12.2012 19:41, Stefan Monnier wrote:
>>> package.el should be able to ignore your "out of date" elpa version if
>>> the bundled version is more recent, so it should work even if you don't
>>> uninstall the elpa version.
>> By ignore, do you mean it won't show up in the list of packages
>> available to install?
>
> No, I mean it should not be added to load-path during startup.
That may add to the confusion in this case. "I installed ruby-mode 1.1,
but it didn't do anything!", or something.
>> The person who uploaded ruby-mode to Tom Tromey's ELPA (it's also
>> present in Marmalade) independently raised the package version to 1.1,
>> so it's higher than the bundled version.
>
> Ah!
Also, a few Ruby-related packages (rinari, rspec-mode) were set to
depend on this version, but that's rectified now.
>> Do you think we should bump it to 1.2?
>
> Depends. Is it a fork?
I meant, bump the version of the bundled ruby-mode.
The "ruby-mode 1.1" doesn't contain any substantial changes, AFAICT, so
there's nothing to merge. But it is present in both Marmalade and the
original ELPA.
I opened an issue at the repo of the Marmalade uploader
(https://github.com/resure/ruby-mode/issues/1), and if that doesn't
result in anything, I'll escalate to the current Marmalade maintainer.
There's no issue tracker for Tromey's archive. Maybe I should email him
directly, instead.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-23 16:06 ` Dmitry Gutov
@ 2012-12-24 0:49 ` Stefan Monnier
2012-12-24 2:12 ` Dmitry Gutov
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-12-24 0:49 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: ded-law, 13200
>>>> package.el should be able to ignore your "out of date" elpa version if
>>>> the bundled version is more recent, so it should work even if you don't
>>>> uninstall the elpa version.
>>> By ignore, do you mean it won't show up in the list of packages
>>> available to install?
>> No, I mean it should not be added to load-path during startup.
> That may add to the confusion in this case. "I installed ruby-mode 1.1, but
> it didn't do anything!", or something.
No, because package.el wouldn't let you install 1.1 when you have 1.2
bundled (at least, not without warning you).
So this would only cause the downloaded package to be suddenly
superseded by the bundled package when you upgrade Emacs, which is The
Right Thing To Do.
>>> Do you think we should bump it to 1.2?
>> Depends. Is it a fork?
> I meant, bump the version of the bundled ruby-mode.
I understand this. But the question still stands: is the bundled
version really a more up-to-date version, or do we have a fork and there
are good reasons why someone would want to use the ELPA version over the
built-in one?
> The "ruby-mode 1.1" doesn't contain any substantial changes, AFAICT, so
> there's nothing to merge. But it is present in both Marmalade and the
> original ELPA.
Sounds like it's not a fork. So we should bump our version accordingly.
> I opened an issue at the repo of the Marmalade uploader
> (https://github.com/resure/ruby-mode/issues/1), and if that doesn't result
> in anything, I'll escalate to the current Marmalade maintainer.
I'm not sure that there's a problem on their side. They also cater to
older Emacsen.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-24 0:49 ` Stefan Monnier
@ 2012-12-24 2:12 ` Dmitry Gutov
2012-12-24 5:11 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Gutov @ 2012-12-24 2:12 UTC (permalink / raw)
To: Stefan Monnier; +Cc: ded-law, 13200
On 24.12.2012 4:49, Stefan Monnier wrote:
>>>>> package.el should be able to ignore your "out of date" elpa version if
>>>>> the bundled version is more recent, so it should work even if you don't
>>>>> uninstall the elpa version.
>>>> By ignore, do you mean it won't show up in the list of packages
>>>> available to install?
>>> No, I mean it should not be added to load-path during startup.
>> That may add to the confusion in this case. "I installed ruby-mode 1.1, but
>> it didn't do anything!", or something.
>
> No, because package.el wouldn't let you install 1.1 when you have 1.2
> bundled (at least, not without warning you).
>
> So this would only cause the downloaded package to be suddenly
> superseded by the bundled package when you upgrade Emacs, which is The
> Right Thing To Do.
I see. That's good, then.
>>>> Do you think we should bump it to 1.2?
>>> Depends. Is it a fork?
>> I meant, bump the version of the bundled ruby-mode.
>
> I understand this. But the question still stands: is the bundled
> version really a more up-to-date version, or do we have a fork and there
> are good reasons why someone would want to use the ELPA version over the
> built-in one?
>
>> The "ruby-mode 1.1" doesn't contain any substantial changes, AFAICT, so
>> there's nothing to merge. But it is present in both Marmalade and the
>> original ELPA.
>
> Sounds like it's not a fork. So we should bump our version accordingly.
May I do the bump in emacs24?
>> I opened an issue at the repo of the Marmalade uploader
>> (https://github.com/resure/ruby-mode/issues/1), and if that doesn't result
>> in anything, I'll escalate to the current Marmalade maintainer.
>
> I'm not sure that there's a problem on their side. They also cater to
> older Emacsen.
You may be right.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#13200: 24.1.50; Ruby Mode Indentation after Here Docs
2012-12-24 2:12 ` Dmitry Gutov
@ 2012-12-24 5:11 ` Stefan Monnier
0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2012-12-24 5:11 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: ded-law, 13200
>> Sounds like it's not a fork. So we should bump our version accordingly.
> May I do the bump in emacs24?
Sure,
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-12-24 5:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.