* a couple of bugs in bash indentation
@ 2005-11-17 4:31 Nicholas Sushkin
2005-11-21 22:25 ` Stefan Monnier
2005-11-22 17:57 ` Michael Cadilhac
0 siblings, 2 replies; 6+ messages in thread
From: Nicholas Sushkin @ 2005-11-17 4:31 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
Stefan,
I think I found a couple of bugs in the indentation. Is your code also
responsible for the indentation in bash-mode?
The first bug occurs in a case statement with a multiline pattern. The
second bug occurs in a multiline quoted string. See the attached test
cases.
Thanks!
--
Nicholas Sushkin, Senior Software Engineer
Open Finance
[-- Attachment #2: bash-case-stmt-indentation.sh --]
[-- Type: application/x-shellscript, Size: 279 bytes --]
[-- Attachment #3: bash-multiline-argument-indentation.sh --]
[-- Type: application/x-shellscript, Size: 277 bytes --]
[-- Attachment #4: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of bugs in bash indentation
2005-11-17 4:31 a couple of bugs in bash indentation Nicholas Sushkin
@ 2005-11-21 22:25 ` Stefan Monnier
2005-11-22 15:56 ` Richard M. Stallman
2005-11-22 17:57 ` Michael Cadilhac
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2005-11-21 22:25 UTC (permalink / raw)
Cc: emacs-devel
> I think I found a couple of bugs in the indentation. Is your code also
> responsible for the indentation in bash-mode?
Not really, but it does influence it. E.g. it was the cause of the first
bug in mentioned. I believe I've now fixed it.
> function multiline-quote
> {
> echo \
> --arg1 "correct" \
> --arg2 "correct" \
> --multiline "correct
> maybe correct" \
> --aftermultiline "not correct" \
> --allothers "skewed"
> }
This one is still up for grabs. I don't have time to look at it.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of bugs in bash indentation
2005-11-21 22:25 ` Stefan Monnier
@ 2005-11-22 15:56 ` Richard M. Stallman
0 siblings, 0 replies; 6+ messages in thread
From: Richard M. Stallman @ 2005-11-22 15:56 UTC (permalink / raw)
> function multiline-quote
> {
> echo \
> --arg1 "correct" \
> --arg2 "correct" \
> --multiline "correct
> maybe correct" \
> --aftermultiline "not correct" \
> --allothers "skewed"
> }
Does anyone want to fix that indentation bug?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of bugs in bash indentation
2005-11-17 4:31 a couple of bugs in bash indentation Nicholas Sushkin
2005-11-21 22:25 ` Stefan Monnier
@ 2005-11-22 17:57 ` Michael Cadilhac
2005-11-22 19:15 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: Michael Cadilhac @ 2005-11-22 17:57 UTC (permalink / raw)
Cc: Stefan Monnier, emacs-devel
Nicholas Sushkin <nsushkin@openfinance.com> writes:
> [... bugs ...]
I was looking at that when I found that (It could have been fixed
recently, I don't have updated for a week)
echo '\'
echo 'Hoho !'
completely screws the thing. \' doesn't escape the ' in shell AFAIK.
--
Michael Cadilhac, a.k.a. Micha [mika] |
Epita/LRDE promo 2007 | )\._.,--....,'``.
123 av. de Fontainebleau | 08.70.65.13.14 | /. _.. \ _\ (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of bugs in bash indentation
2005-11-22 17:57 ` Michael Cadilhac
@ 2005-11-22 19:15 ` Stefan Monnier
2005-11-23 12:02 ` Michael Cadilhac
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2005-11-22 19:15 UTC (permalink / raw)
Cc: Nicholas Sushkin, emacs-devel
> I was looking at that when I found that (It could have been fixed
> recently, I don't have updated for a week)
> echo '\'
> echo 'Hoho !'
> completely screws the thing. \' doesn't escape the ' in shell AFAIK.
Does the patch below help?
Stefan
--- sh-script.el 21 nov 2005 23:21:26 -0500 1.172
+++ sh-script.el 22 nov 2005 14:15:10 -0500
@@ -1002,6 +1002,8 @@
;; The list of special chars is taken from the single-unix spec
;; of the shell command language (under `quoting') but with `$' removed.
`(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 ,sh-st-symbol)
+ ;; In a '...' the backslash is not escaping.
+ ("\\(\\\\\\)'" 1 ,sh-st-punc)
;; Make sure $@ and @? are correctly recognized as sexps.
("\\$\\([?@]\\)" 1 ,sh-st-symbol)
;; Find HEREDOC starters and add a corresponding rule for the ender.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: a couple of bugs in bash indentation
2005-11-22 19:15 ` Stefan Monnier
@ 2005-11-23 12:02 ` Michael Cadilhac
0 siblings, 0 replies; 6+ messages in thread
From: Michael Cadilhac @ 2005-11-23 12:02 UTC (permalink / raw)
Cc: Nicholas Sushkin, emacs-devel
[-- Attachment #1.1: Type: text/plain, Size: 599 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I was looking at that when I found that (It could have been fixed
>> recently, I don't have updated for a week)
>
>> echo '\'
>> echo 'Hoho !'
>
>> completely screws the thing. \' doesn't escape the ' in shell AFAIK.
>
> Does the patch below help?
Sure it does :-)
--
Michael Cadilhac, a.k.a. Micha [mika] |
Epita/LRDE promo 2007 | )\._.,--....,'``.
123 av. de Fontainebleau | 08.70.65.13.14 | /. _.. \ _\ (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-23 12:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17 4:31 a couple of bugs in bash indentation Nicholas Sushkin
2005-11-21 22:25 ` Stefan Monnier
2005-11-22 15:56 ` Richard M. Stallman
2005-11-22 17:57 ` Michael Cadilhac
2005-11-22 19:15 ` Stefan Monnier
2005-11-23 12:02 ` Michael Cadilhac
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.