all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: C K Kashyap <ckkashyap@gmail.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: putting double quotes efficiently
Date: Mon, 3 Jun 2013 13:33:46 +0530	[thread overview]
Message-ID: <CAGdT1goPkbYRAOvJ7iucYY=F2rkUo5P9dv=NURzKUJiNwNP5oA@mail.gmail.com> (raw)
In-Reply-To: <51AC4C03.7050504@easy-emacs.de>

Thanks Andreas,
This works.
Although I'd still like to know how to write custom function that work over
a marked region.
Regards,
Kashyap


On Mon, Jun 3, 2013 at 1:25 PM, Andreas Röhler <
andreas.roehler@easy-emacs.de> wrote:

> Am 03.06.2013 09:26, schrieb Andreas Röhler:
>
>  Am 03.06.2013 07:43, schrieb C K Kashyap:
>>
>>> Hi,
>>> I am looking for a way to transform
>>>
>>> print line1
>>> print line two
>>> print line3
>>>
>>> into
>>>
>>> print "line1";
>>> print "line two";
>>> print "line3";
>>>
>>> most efficiently. For the first quote of each line I place the cursor
>>> before line1 and I set the mark and then move all the way down to just
>>> before line3 and then do a C-x-r-t " <RET>
>>> Then I do a regexp replace to change $ to ";
>>>
>>> I'd like to do better. While at it, can I please also know how I can use
>>> the line range in the mark set mode in user defined function?
>>>
>>> Regards,
>>> Kashyap
>>>
>>>
>> M-x query-replace-regexp
>>
>> ^\([^ ]+\) \(.+\)
>> RET
>> \1 "\2;
>> RET
>>
>>
>>
> resp. with missing " in replace expression
>
>  \1 "\2";
>
>


  reply	other threads:[~2013-06-03  8:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  5:43 putting double quotes efficiently C K Kashyap
2013-06-03  7:26 ` Andreas Röhler
2013-06-03  7:55   ` Andreas Röhler
2013-06-03  8:03     ` C K Kashyap [this message]
2013-06-03  9:10       ` Andreas Röhler
2013-06-03 11:52         ` C K Kashyap
     [not found]       ` <mailman.918.1370250440.22516.help-gnu-emacs@gnu.org>
2013-06-13 14:40         ` narrowing considered harmful (was: putting double quotes efficiently) Stefan Monnier
2013-06-14  3:54           ` narrowing considered harmful Leo Liu
2013-06-14 13:00             ` Stefan Monnier
2013-06-14 16:51               ` Leo Liu
2013-06-15  2:43                 ` Stefan Monnier
2013-06-16 16:42                   ` Leo Liu
2013-06-17 14:56                     ` Stefan Monnier
2013-06-17 15:20                       ` Drew Adams
2013-06-17 16:48                         ` Stefan Monnier
     [not found] <mailman.910.1370238187.22516.help-gnu-emacs@gnu.org>
2013-06-03 15:50 ` putting double quotes efficiently Udyant Wig
2013-06-04 14:52   ` Kevin Rodgers
2013-06-03 17:39 ` Joost Kremers
2013-06-04 12:21   ` C K Kashyap
2013-06-04 12:21     ` C K Kashyap

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='CAGdT1goPkbYRAOvJ7iucYY=F2rkUo5P9dv=NURzKUJiNwNP5oA@mail.gmail.com' \
    --to=ckkashyap@gmail.com \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.