all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Replacing series of characters
@ 2021-07-14  5:48 lisa-asket
  2021-07-14 11:36 ` Eli Zaretskii
  2021-07-25  8:37 ` Vagn Johansen
  0 siblings, 2 replies; 5+ messages in thread
From: lisa-asket @ 2021-07-14  5:48 UTC (permalink / raw)
  To: help-gnu-emacs


I would like to be able to write `;h1` in emacs and be transformed to

`@c h1 *` when in texinfo-mode.  But only if it starts at the beginning

of the line. 



But actually I would like for this to happen in any mode, by replacing

`@c` with the comment label of the particular major mode I am in.




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

* Re: Replacing series of characters
  2021-07-14  5:48 Replacing series of characters lisa-asket
@ 2021-07-14 11:36 ` Eli Zaretskii
  2021-07-14 12:15   ` lisa-asket
  2021-07-25  8:37 ` Vagn Johansen
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-07-14 11:36 UTC (permalink / raw)
  To: help-gnu-emacs

> From: lisa-asket@perso.be
> Date: Wed, 14 Jul 2021 07:48:05 +0200 (CEST)
> 
> I would like to be able to write `;h1` in emacs and be transformed to
> `@c h1 *` when in texinfo-mode.  But only if it starts at the beginning
> of the line. 
> 
> But actually I would like for this to happen in any mode, by replacing
> `@c` with the comment label of the particular major mode I am in.

M-; starts a comment in all major modes, is that what you want?



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

* Replacing series of characters
  2021-07-14 11:36 ` Eli Zaretskii
@ 2021-07-14 12:15   ` lisa-asket
  2021-07-14 12:57     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: lisa-asket @ 2021-07-14 12:15 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Replacing series of characters
Date: 14/07/2021 13:36:31 Europe/Paris

> From: lisa-asket@perso.be
> Date: Wed, 14 Jul 2021 07:48:05 +0200 (CEST)
> 
> I would like to be able to write `;h1` in emacs and be transformed to
> `@c h1 *` when in texinfo-mode.  But only if it starts at the beginning
> of the line. 
> 
> But actually I would like for this to happen in any mode, by replacing
> `@c` with the comment label of the particular major mode I am in.

M-; starts a comment in all major modes, is that what you want?

I want some kind of replacement, because I want to avoid having to press 

the Shift Key frequently to get `@` and `*`.  



I could write `;h1` to get `@c h1 *`, with the number of `*` being defined

by the numeric value preceeding the letter `h`.








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

* Re: Replacing series of characters
  2021-07-14 12:15   ` lisa-asket
@ 2021-07-14 12:57     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2021-07-14 12:57 UTC (permalink / raw)
  To: help-gnu-emacs

> From: lisa-asket@perso.be
> Date: Wed, 14 Jul 2021 14:15:01 +0200 (CEST)
> 
> M-; starts a comment in all major modes, is that what you want?
> 
> I want some kind of replacement, because I want to avoid having to press 
> the Shift Key frequently to get `@` and `*`.  
> 
> I could write `;h1` to get `@c h1 *`, with the number of `*` being defined
> by the numeric value preceeding the letter `h`.

I don't understand: what Shift key?  M-; doesn't require any Shift
keys, and it inserts @c in Texinfo.  So what is the problem?



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

* Re: Replacing series of characters
  2021-07-14  5:48 Replacing series of characters lisa-asket
  2021-07-14 11:36 ` Eli Zaretskii
@ 2021-07-25  8:37 ` Vagn Johansen
  1 sibling, 0 replies; 5+ messages in thread
From: Vagn Johansen @ 2021-07-25  8:37 UTC (permalink / raw)
  To: help-gnu-emacs

lisa-asket@perso.be writes:

> I would like to be able to write `;h1` in emacs and be transformed to
>
> `@c h1 *` when in texinfo-mode.  But only if it starts at the beginning
>
> of the line. 
>

Look into abbrev-mode

-- 
Vagn Johansen




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

end of thread, other threads:[~2021-07-25  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14  5:48 Replacing series of characters lisa-asket
2021-07-14 11:36 ` Eli Zaretskii
2021-07-14 12:15   ` lisa-asket
2021-07-14 12:57     ` Eli Zaretskii
2021-07-25  8:37 ` Vagn Johansen

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.