all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs capitalizing every word in replacement  how to prevent
@ 2022-11-24 12:25 John Covici
  2022-11-24 12:53 ` tomas
  0 siblings, 1 reply; 7+ messages in thread
From: John Covici @ 2022-11-24 12:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hi.  I have a shell script like this
JawMuscles1
followed by other similar names.

I wanted to replace each item in the file like this:

Replace regexp (default ^.*$ → cd jawstemp; unzip ../\&.zip;mkdir
../\&;mv * ..\&;cd ..

but Emacs capitalized every word in the replaced lines, including all
the commands -- it replaced  unzip with Unzip etc.

I have never seen this before.  The file is type shellscript.

How to prevent this?

Thanks for any suggestions.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 12:25 emacs capitalizing every word in replacement how to prevent John Covici
@ 2022-11-24 12:53 ` tomas
  2022-11-24 13:42   ` John Covici
  0 siblings, 1 reply; 7+ messages in thread
From: tomas @ 2022-11-24 12:53 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

On Thu, Nov 24, 2022 at 07:25:56AM -0500, John Covici wrote:
> Hi.  I have a shell script like this
> JawMuscles1
> followed by other similar names.
> 
> I wanted to replace each item in the file like this:
> 
> Replace regexp (default ^.*$ → cd jawstemp; unzip ../\&.zip;mkdir
> ../\&;mv * ..\&;cd ..
> 
> but Emacs capitalized every word in the replaced lines, including all
> the commands -- it replaced  unzip with Unzip etc.
> 
> I have never seen this before.  The file is type shellscript.
> 
> How to prevent this?

Try to set the variable `case-replace' to nil. Cf the section
"Replace Command and Lax Matches" in the Emacs manual for a
more detailed story.

You can set this variable's value via the Customize interface.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 12:53 ` tomas
@ 2022-11-24 13:42   ` John Covici
  2022-11-24 14:00     ` John Covici
  2022-11-24 14:02     ` tomas
  0 siblings, 2 replies; 7+ messages in thread
From: John Covici @ 2022-11-24 13:42 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

Where in the customization do I go to find this one?

On Thu, 24 Nov 2022 07:53:52 -0500,
<tomas@tuxteam.de> wrote:
> 
> [1  <text/plain; utf-8 (quoted-printable)>]
> On Thu, Nov 24, 2022 at 07:25:56AM -0500, John Covici wrote:
> > Hi.  I have a shell script like this
> > JawMuscles1
> > followed by other similar names.
> > 
> > I wanted to replace each item in the file like this:
> > 
> > Replace regexp (default ^.*$ → cd jawstemp; unzip ../\&.zip;mkdir
> > ../\&;mv * ..\&;cd ..
> > 
> > but Emacs capitalized every word in the replaced lines, including all
> > the commands -- it replaced  unzip with Unzip etc.
> > 
> > I have never seen this before.  The file is type shellscript.
> > 
> > How to prevent this?
> 
> Try to set the variable `case-replace' to nil. Cf the section
> "Replace Command and Lax Matches" in the Emacs manual for a
> more detailed story.
> 
> You can set this variable's value via the Customize interface.
> 
> Cheers
> -- 
> t
> [2 signature.asc <application/pgp-signature (7bit)>]
> No public key for 05C82CF57AD1DA46 created at 2022-11-24T07:53:46-0500 using DSA

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 13:42   ` John Covici
@ 2022-11-24 14:00     ` John Covici
  2022-11-24 14:12       ` tomas
  2022-11-24 14:02     ` tomas
  1 sibling, 1 reply; 7+ messages in thread
From: John Covici @ 2022-11-24 14:00 UTC (permalink / raw)
  To: covici; +Cc: tomas, help-gnu-emacs

I  looked up case-replace and it was concerned with preserving case in
replacements.  In my example case was actually changed in the
replacement string, so how would this apply?

On Thu, 24 Nov 2022 08:42:15 -0500,
John Covici wrote:
> 
> Where in the customization do I go to find this one?
> 
> On Thu, 24 Nov 2022 07:53:52 -0500,
> <tomas@tuxteam.de> wrote:
> > 
> > [1  <text/plain; utf-8 (quoted-printable)>]
> > On Thu, Nov 24, 2022 at 07:25:56AM -0500, John Covici wrote:
> > > Hi.  I have a shell script like this
> > > JawMuscles1
> > > followed by other similar names.
> > > 
> > > I wanted to replace each item in the file like this:
> > > 
> > > Replace regexp (default ^.*$ → cd jawstemp; unzip ../\&.zip;mkdir
> > > ../\&;mv * ..\&;cd ..
> > > 
> > > but Emacs capitalized every word in the replaced lines, including all
> > > the commands -- it replaced  unzip with Unzip etc.
> > > 
> > > I have never seen this before.  The file is type shellscript.
> > > 
> > > How to prevent this?
> > 
> > Try to set the variable `case-replace' to nil. Cf the section
> > "Replace Command and Lax Matches" in the Emacs manual for a
> > more detailed story.
> > 
> > You can set this variable's value via the Customize interface.
> > 
> > Cheers
> > -- 
> > t
> > [2 signature.asc <application/pgp-signature (7bit)>]
> > No public key for 05C82CF57AD1DA46 created at 2022-11-24T07:53:46-0500 using DSA
> 
> -- 
> Your life is like a penny.  You're going to lose it.  The question is:
> How do
> you spend it?
> 
>          John Covici wb2una
>          covici@ccs.covici.com
> 

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 13:42   ` John Covici
  2022-11-24 14:00     ` John Covici
@ 2022-11-24 14:02     ` tomas
  1 sibling, 0 replies; 7+ messages in thread
From: tomas @ 2022-11-24 14:02 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: John Covici

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

On Thu, Nov 24, 2022 at 08:42:15AM -0500, John Covici wrote:

[on case-replace; please, don't top post, pretty please]

M-x customize-variable [RET] case-replace [RET]

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 14:00     ` John Covici
@ 2022-11-24 14:12       ` tomas
  2022-11-24 14:18         ` John Covici
  0 siblings, 1 reply; 7+ messages in thread
From: tomas @ 2022-11-24 14:12 UTC (permalink / raw)
  To: John Covici; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

On Thu, Nov 24, 2022 at 09:00:01AM -0500, John Covici wrote:
> I  looked up case-replace and it was concerned with preserving case in
> replacements.  In my example case was actually changed in the
> replacement string, so how would this apply?

Try it out if you don't believe me :)

[NOTE] "preserving case" is a relative term: obviously the documenter's
POV is "the other" wrt you.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs capitalizing every word in replacement  how to prevent
  2022-11-24 14:12       ` tomas
@ 2022-11-24 14:18         ` John Covici
  0 siblings, 0 replies; 7+ messages in thread
From: John Covici @ 2022-11-24 14:18 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

Yes, it did work, thanks all for your replies.

On Thu, 24 Nov 2022 09:12:43 -0500,
tomas@tuxteam.de wrote:
> 
> [1  <text/plain; utf-8 (quoted-printable)>]
> On Thu, Nov 24, 2022 at 09:00:01AM -0500, John Covici wrote:
> > I  looked up case-replace and it was concerned with preserving case in
> > replacements.  In my example case was actually changed in the
> > replacement string, so how would this apply?
> 
> Try it out if you don't believe me :)
> 
> [NOTE] "preserving case" is a relative term: obviously the documenter's
> POV is "the other" wrt you.
> 
> Cheers
> -- 
> t
> [2 signature.asc <application/pgp-signature (7bit)>]
> No public key for 05C82CF57AD1DA46 created at 2022-11-24T09:12:37-0500 using DSA

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici wb2una
         covici@ccs.covici.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-24 14:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 12:25 emacs capitalizing every word in replacement how to prevent John Covici
2022-11-24 12:53 ` tomas
2022-11-24 13:42   ` John Covici
2022-11-24 14:00     ` John Covici
2022-11-24 14:12       ` tomas
2022-11-24 14:18         ` John Covici
2022-11-24 14:02     ` tomas

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.