all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to quote region into HTML tags?
@ 2003-04-21  9:53 wang yin
  2003-04-21 16:49 ` Jeffery B. Rancier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: wang yin @ 2003-04-21  9:53 UTC (permalink / raw)


Hi,

I want to quote some text in a region into HTML tags.

for example, I want to change

here is some text

into

<H3>here is some text</H3>

How can I do this with HTML mode?
I'm using GNU Emacs.

Thanks.

-- 
Wang Yin
DA Lab, Tsinghua University,
100084
Beijing China

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

* Re: How to quote region into HTML tags?
  2003-04-21  9:53 How to quote region into HTML tags? wang yin
@ 2003-04-21 16:49 ` Jeffery B. Rancier
  2003-04-23 12:26 ` Jesper Harder
  2003-04-24 11:26 ` Stefan Kamphausen
  2 siblings, 0 replies; 7+ messages in thread
From: Jeffery B. Rancier @ 2003-04-21 16:49 UTC (permalink / raw)


wang yin <wy@wangyin.com> writes:

> How can I do this with HTML mode?

Perhaps, URL:http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el might
help you.
-- 

Thanks,
Jeff
,----
| Jeffery B. Rancier
| 
| Softechnics
| a METTLER TOLEDO company
`----

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

* Re: How to quote region into HTML tags?
  2003-04-21  9:53 How to quote region into HTML tags? wang yin
  2003-04-21 16:49 ` Jeffery B. Rancier
@ 2003-04-23 12:26 ` Jesper Harder
  2003-04-23 18:11   ` Kevin Rodgers
  2003-04-24 11:26 ` Stefan Kamphausen
  2 siblings, 1 reply; 7+ messages in thread
From: Jesper Harder @ 2003-04-23 12:26 UTC (permalink / raw)


wang yin <wy@wangyin.com> writes:

> I want to quote some text in a region into HTML tags.
>
> for example, I want to change
>
> here is some text
>
> into
>
> <H3>here is some text</H3>
>
> How can I do this with HTML mode?

It works if you turn on transient mark mode, `M-x transient-mark-mode'.
Then the region will be highlighted, and inserted in the tag when you
use one of HTML mode shortcuts, say, `C-c 3' for <h3>.

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

* Re: How to quote region into HTML tags?
  2003-04-23 12:26 ` Jesper Harder
@ 2003-04-23 18:11   ` Kevin Rodgers
  2003-04-23 22:18     ` Kevin Rodgers
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2003-04-23 18:11 UTC (permalink / raw)


Jesper Harder wrote:

> wang yin <wy@wangyin.com> writes:
>>I want to quote some text in a region into HTML tags.
>>
>>for example, I want to change
>>
>>here is some text
>>
>>into
>>
>><H3>here is some text</H3>
>>
>>How can I do this with HTML mode?
> 
> It works if you turn on transient mark mode, `M-x transient-mark-mode'.
> Then the region will be highlighted, and inserted in the tag when you
> use one of HTML mode shortcuts, say, `C-c 3' for <h3>.

Or even with transient mark mode off, mark the region then `C-u C-c 3'.


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: How to quote region into HTML tags?
  2003-04-23 18:11   ` Kevin Rodgers
@ 2003-04-23 22:18     ` Kevin Rodgers
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2003-04-23 22:18 UTC (permalink / raw)


Kevin Rodgers wrote:

> Or even with transient mark mode off, mark the region then `C-u C-c 3'.

Oops, that's because I had point at the beginning of the region and it had

exactly 4 words.  With transient mode off, you have to move point to the
beginning of the text, and specify the number of words to enclose, e.g.
`M-7 C-c 3' or `C-u 7 C-c 3' or `ESC 7 C-c 3'.

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: How to quote region into HTML tags?
  2003-04-21  9:53 How to quote region into HTML tags? wang yin
  2003-04-21 16:49 ` Jeffery B. Rancier
  2003-04-23 12:26 ` Jesper Harder
@ 2003-04-24 11:26 ` Stefan Kamphausen
  2003-04-24 21:35   ` Martin Stemplinger
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Kamphausen @ 2003-04-24 11:26 UTC (permalink / raw)


Hi,

wang yin <wy@wangyin.com> wrote in message news:<phk7donpmb.fsf@wangyin.com>...
> I want to quote some text in a region into HTML tags.
> 
> for example, I want to change
> 
> here is some text
> 
> into
> 
> <H3>here is some text</H3>
> 
> How can I do this with HTML mode?

Assuming that you use PSGML you can mark the region (using C-spc and
cursor keys) and then type C-c C-r (sgml-tag-region) which asks you
for the tag to use (with completion) and then puts the region in that
tag. I might be that this requires a correct DTD in your document, I
don't know.

Besides the transient mark mentioned in other postings you could also
set sgml-tag-region-if-active to t. Maybe look at info psgml ->Insert
markup where this is all described.

Best Regards
Stefan Kamphausen

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

* Re: How to quote region into HTML tags?
  2003-04-24 11:26 ` Stefan Kamphausen
@ 2003-04-24 21:35   ` Martin Stemplinger
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Stemplinger @ 2003-04-24 21:35 UTC (permalink / raw)


On Do Apr 24 2003 at 13:26, kamphausen@creativepharma.com (Stefan Kamphausen) wrote:

> Assuming that you use PSGML you can mark the region (using C-spc and
> cursor keys) and then type C-c C-r (sgml-tag-region) which asks you
> for the tag to use (with completion) and then puts the region in that
> tag. I might be that this requires a correct DTD in your document, I
> don't know.

Without a correct DTD PSML will reject all choices. 

Regards
Martin

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

end of thread, other threads:[~2003-04-24 21:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-21  9:53 How to quote region into HTML tags? wang yin
2003-04-21 16:49 ` Jeffery B. Rancier
2003-04-23 12:26 ` Jesper Harder
2003-04-23 18:11   ` Kevin Rodgers
2003-04-23 22:18     ` Kevin Rodgers
2003-04-24 11:26 ` Stefan Kamphausen
2003-04-24 21:35   ` Martin Stemplinger

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.