* << in shell-script mode
@ 2015-10-17 2:43 Chris F.A. Johnson
2015-10-17 5:57 ` Barry Margolin
0 siblings, 1 reply; 9+ messages in thread
From: Chris F.A. Johnson @ 2015-10-17 2:43 UTC (permalink / raw)
To: help-gnu-emacs
How do I prevent emacs from inserting a here document:
<<EOF
EOF
whenever I type <<
?
--
Chris F.A. Johnson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
2015-10-17 2:43 << in shell-script mode Chris F.A. Johnson
@ 2015-10-17 5:57 ` Barry Margolin
2015-10-17 6:03 ` Chris F.A. Johnson
0 siblings, 1 reply; 9+ messages in thread
From: Barry Margolin @ 2015-10-17 5:57 UTC (permalink / raw)
To: help-gnu-emacs
In article <p7p8fc-2dm.ln1@chris.tor>,
"Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
> How do I prevent emacs from inserting a here document:
> <<EOF
>
> EOF
> whenever I type <<
> ?
Type C-q before the second < to insert it literally.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
2015-10-17 5:57 ` Barry Margolin
@ 2015-10-17 6:03 ` Chris F.A. Johnson
2015-10-17 11:09 ` Andy Moreton
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Chris F.A. Johnson @ 2015-10-17 6:03 UTC (permalink / raw)
To: help-gnu-emacs
On 2015-10-17, Barry Margolin wrote:
> In article <p7p8fc-2dm.ln1@chris.tor>,
> "Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
>
>> How do I prevent emacs from inserting a here document:
>> <<EOF
>>
>> EOF
>> whenever I type <<
>> ?
>
> Type C-q before the second < to insert it literally.
Why should I have to do that?
--
Chris F.A. Johnson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
2015-10-17 6:03 ` Chris F.A. Johnson
@ 2015-10-17 11:09 ` Andy Moreton
2015-10-19 14:23 ` Doug Lewan
[not found] ` <mailman.501.1445080190.7904.help-gnu-emacs@gnu.org>
2015-10-18 3:59 ` Barry Margolin
2 siblings, 1 reply; 9+ messages in thread
From: Andy Moreton @ 2015-10-17 11:09 UTC (permalink / raw)
To: help-gnu-emacs
On Sat 17 Oct 2015, Chris F.A. Johnson wrote:
> On 2015-10-17, Barry Margolin wrote:
>> In article <p7p8fc-2dm.ln1@chris.tor>,
>> "Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
>>
>>> How do I prevent emacs from inserting a here document:
>>> <<EOF
>>>
>>> EOF
>>> whenever I type <<
>>> ?
>>
>> Type C-q before the second < to insert it literally.
>
> Why should I have to do that?
This is controlled by sh-electric-here-document-mode, so disable
that minor mode to disable the automatic here document insertion.
AndyM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
[not found] ` <mailman.501.1445080190.7904.help-gnu-emacs@gnu.org>
@ 2015-10-17 21:22 ` Chris F.A. Johnson
0 siblings, 0 replies; 9+ messages in thread
From: Chris F.A. Johnson @ 2015-10-17 21:22 UTC (permalink / raw)
To: help-gnu-emacs
On 2015-10-17, Andy Moreton wrote:
> On Sat 17 Oct 2015, Chris F.A. Johnson wrote:
>
>> On 2015-10-17, Barry Margolin wrote:
>>> In article <p7p8fc-2dm.ln1@chris.tor>,
>>> "Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
>>>
>>>> How do I prevent emacs from inserting a here document:
>>>> <<EOF
>>>>
>>>> EOF
>>>> whenever I type <<
>>>> ?
>>>
>>> Type C-q before the second < to insert it literally.
>>
>> Why should I have to do that?
>
> This is controlled by sh-electric-here-document-mode, so disable
> that minor mode to disable the automatic here document insertion.
Perfect. Thanks very much.
--
Chris F.A. Johnson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
2015-10-17 6:03 ` Chris F.A. Johnson
2015-10-17 11:09 ` Andy Moreton
[not found] ` <mailman.501.1445080190.7904.help-gnu-emacs@gnu.org>
@ 2015-10-18 3:59 ` Barry Margolin
2 siblings, 0 replies; 9+ messages in thread
From: Barry Margolin @ 2015-10-18 3:59 UTC (permalink / raw)
To: help-gnu-emacs
In article <pu49fc-gq5.ln1@chris.tor>,
"Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
> On 2015-10-17, Barry Margolin wrote:
> > In article <p7p8fc-2dm.ln1@chris.tor>,
> > "Chris F.A. Johnson" <cfajohnson@cfaj.ca> wrote:
> >
> >> How do I prevent emacs from inserting a here document:
> >> <<EOF
> >>
> >> EOF
> >> whenever I type <<
> >> ?
> >
> > Type C-q before the second < to insert it literally.
>
> Why should I have to do that?
I assumed you just wanted to disable it only in the rare cases where
you're typing << that isn't the beginning of a here-doc. If you want to
disable it totally, the other answer says how.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: << in shell-script mode
2015-10-17 11:09 ` Andy Moreton
@ 2015-10-19 14:23 ` Doug Lewan
2015-10-19 20:27 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Doug Lewan @ 2015-10-19 14:23 UTC (permalink / raw)
To: Andy Moreton, help-gnu-emacs@gnu.org
Mr. Moreton's answer is the right one. Here's how I do it in my .emacs:
(eval-after-load "sh-script"
'(add-hook 'sh-mode-hook '(lambda () (sh-electric-here-document-mode 0))))
--
,Doug
Douglas Lewan
Shubert Ticketing
(201) 994-4335
Nonfirstorderizability. It's a thing.
> -----Original Message-----
> On
> Behalf Of Andy Moreton
> Sent: Saturday, 2015 October 17 07:09
> Subject: Re: << in shell-script mode
>
> On Sat 17 Oct 2015, Chris F.A. Johnson wrote:
>
> > On 2015-10-17, Barry Margolin wrote:
> >> In article <p7p8fc-2dm.ln1 @ chris.tor>,
> >> "Chris F.A. Johnson" wrote:
> >>
> >>> How do I prevent emacs from inserting a here document:
> >>> <<EOF
> >>>
> >>> EOF
> >>> whenever I type <<
> >>> ?
> >>
> >> Type C-q before the second < to insert it literally.
> >
> > Why should I have to do that?
>
> This is controlled by sh-electric-here-document-mode, so disable
> that minor mode to disable the automatic here document insertion.
>
> AndyM
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: << in shell-script mode
2015-10-19 14:23 ` Doug Lewan
@ 2015-10-19 20:27 ` Stefan Monnier
2015-10-19 20:45 ` Doug Lewan
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2015-10-19 20:27 UTC (permalink / raw)
To: help-gnu-emacs
> Mr. Moreton's answer is the right one. Here's how I do it in my .emacs:
> (eval-after-load "sh-script"
> '(add-hook 'sh-mode-hook '(lambda () (sh-electric-here-document-mode 0))))
^^^^^^^^
Please don't quote your lambdas.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: << in shell-script mode
2015-10-19 20:27 ` Stefan Monnier
@ 2015-10-19 20:45 ` Doug Lewan
0 siblings, 0 replies; 9+ messages in thread
From: Doug Lewan @ 2015-10-19 20:45 UTC (permalink / raw)
To: Stefan Monnier, help-gnu-emacs@gnu.org
Good catch. That much a much younger lisp programmer. I've already registered that as a bug.
--
,Doug
Douglas Lewan
Shubert Ticketing
(201) 994-4335
Nonfirstorderizability. It's a thing.
> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Stefan Monnier
> Sent: Monday, 2015 October 19 16:27
> To: help-gnu-emacs@gnu.org
> Subject: Re: << in shell-script mode
>
> > Mr. Moreton's answer is the right one. Here's how I do it in my
> .emacs:
> > (eval-after-load "sh-script"
> > '(add-hook 'sh-mode-hook '(lambda () (sh-electric-here-document-
> mode 0))))
> ^^^^^^^^
> Please don't quote your lambdas.
>
>
> Stefan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-10-19 20:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-17 2:43 << in shell-script mode Chris F.A. Johnson
2015-10-17 5:57 ` Barry Margolin
2015-10-17 6:03 ` Chris F.A. Johnson
2015-10-17 11:09 ` Andy Moreton
2015-10-19 14:23 ` Doug Lewan
2015-10-19 20:27 ` Stefan Monnier
2015-10-19 20:45 ` Doug Lewan
[not found] ` <mailman.501.1445080190.7904.help-gnu-emacs@gnu.org>
2015-10-17 21:22 ` Chris F.A. Johnson
2015-10-18 3:59 ` Barry Margolin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).