* forward/backward word with case sensitivity
@ 2009-07-28 7:16 Kiwon Um
2009-07-28 7:37 ` Thierry Volpiatto
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Kiwon Um @ 2009-07-28 7:16 UTC (permalink / raw)
To: help-gnu-emacs
Hello, there.
I'm wondering how to use the case sensitive buffer editing in buffer.
For example, in the kill-word function (M-d), how I can set it to kill
up to the final lower case, not space, comma, etc. as follows:
testFunction()
^ (Here, M-d)
Function()
Please give me an advice...
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
2009-07-28 7:16 forward/backward word with case sensitivity Kiwon Um
@ 2009-07-28 7:37 ` Thierry Volpiatto
[not found] ` <mailman.3306.1248767060.2239.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2009-07-28 7:37 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Kiwon Um <um.kiwon@gmail.com> writes:
> Hello, there.
>
> I'm wondering how to use the case sensitive buffer editing in buffer.
> For example, in the kill-word function (M-d), how I can set it to kill
> up to the final lower case, not space, comma, etc. as follows:
> testFunction()
> ^ (Here, M-d)
> Function()
M-z ==> F
,----[ C-h f zap-to-char RET ]
| zap-to-char is an interactive compiled Lisp function in `simple.el'.
|
| It is bound to M-z.
|
| (zap-to-char arg char)
|
| Kill up to and including argth occurrence of char.
| Case is ignored if `case-fold-search' is non-nil in the current buffer.
| Goes backward if arg is negative; error if char not found.
|
| ===*===*===*===*===*===*===*===*===*===*===
`----
> Please give me an advice...
> Thanks.
>
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
[not found] ` <mailman.3306.1248767060.2239.help-gnu-emacs@gnu.org>
@ 2009-07-28 8:01 ` Kiwon Um
0 siblings, 0 replies; 8+ messages in thread
From: Kiwon Um @ 2009-07-28 8:01 UTC (permalink / raw)
To: help-gnu-emacs
Thanks for your reply.
On 7월28일, 오후4시37분, Thierry Volpiatto <thierry.volpia...@gmail.com>
wrote:
> Hi,
>
> Kiwon Um <um.ki...@gmail.com> writes:
> > Hello, there.
>
> > I'm wondering how to use the case sensitive buffer editing in buffer.
> > For example, in the kill-word function (M-d), how I can set it to kill
> > up to the final lower case, not space, comma, etc. as follows:
> > testFunction()
> > ^ (Here, M-d)
> > Function()
>
> M-z ==> F
>
But this doesn't seem to be the final solution. I just want to work
with case sensitive editing: forward word, backward word, kill word,
etc. not only for special cases.
What I really want to do is that making emacs sensitive to cases in
word recognition. ;)
> ,----[ C-h f zap-to-char RET ]
> | zap-to-char is an interactive compiled Lisp function in `simple.el'.
> |
> | It is bound to M-z.
> |
> | (zap-to-char arg char)
> |
> | Kill up to and including argth occurrence of char.
> | Case is ignored if `case-fold-search' is non-nil in the current buffer.
> | Goes backward if arg is negative; error if char not found.
> |
> | ===*===*===*===*===*===*===*===*===*===*===
> `----
>
> > Please give me an advice...
> > Thanks.
>
> --
> A + Thierry Volpiatto
> Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
2009-07-28 7:16 forward/backward word with case sensitivity Kiwon Um
2009-07-28 7:37 ` Thierry Volpiatto
[not found] ` <mailman.3306.1248767060.2239.help-gnu-emacs@gnu.org>
@ 2009-07-28 8:27 ` Anselm Helbig
2009-07-28 9:00 ` Thierry Volpiatto
` (2 more replies)
2009-07-28 10:21 ` Elena
3 siblings, 3 replies; 8+ messages in thread
From: Anselm Helbig @ 2009-07-28 8:27 UTC (permalink / raw)
To: help-gnu-emacs
Hi!
> I'm wondering how to use the case sensitive buffer editing in buffer.
> For example, in the kill-word function (M-d), how I can set it to kill
> up to the final lower case, not space, comma, etc. as follows:
> testFunction()
> ^ (Here, M-d)
> Function()
I'm using c-subword-mode with ruby, to this end I've got this line in
my .emacs:
(add-hook 'ruby-mode-hook (lambda () (c-subword-mode 1)))
You can try it out yourself with M-x subword-mode. This doesn't only
affect `kill-word' but changes emacs notion about what a word is in
the current buffer, so `forward-word' and `backward-word' are affected
as well.
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
2009-07-28 8:27 ` Anselm Helbig
@ 2009-07-28 9:00 ` Thierry Volpiatto
2009-07-28 9:25 ` Kiwon Um
[not found] ` <mailman.3312.1248772055.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2009-07-28 9:00 UTC (permalink / raw)
To: help-gnu-emacs
Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
> Hi!
>
>> I'm wondering how to use the case sensitive buffer editing in buffer.
>> For example, in the kill-word function (M-d), how I can set it to kill
>> up to the final lower case, not space, comma, etc. as follows:
>> testFunction()
>> ^ (Here, M-d)
>> Function()
>
> I'm using c-subword-mode with ruby, to this end I've got this line in
> my .emacs:
>
> (add-hook 'ruby-mode-hook (lambda () (c-subword-mode 1)))
>
> You can try it out yourself with M-x subword-mode. This doesn't only
> affect `kill-word' but changes emacs notion about what a word is in
> the current buffer, so `forward-word' and `backward-word' are affected
> as well.
>
> HTH,
You can also write your own functions:
Something like that... (should be better, i wrote that on the fly)
,----
| (defun tv-delete-forward-to-first-upper-case ()
| (interactive)
| (let ((case-fold-search nil)
| (beg (point))
| end)
| (while (not (looking-at "[A-Z]")) (forward-char 1))
| (setq end (point))
| (delete-region beg end)))
`----
> Anselm
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
2009-07-28 8:27 ` Anselm Helbig
2009-07-28 9:00 ` Thierry Volpiatto
@ 2009-07-28 9:25 ` Kiwon Um
[not found] ` <mailman.3312.1248772055.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Kiwon Um @ 2009-07-28 9:25 UTC (permalink / raw)
To: help-gnu-emacs
On 7월28일, 오후5시27분, Anselm Helbig <anselm.helbig
+news2...@googlemail.com> wrote:
> Hi!
>
> > I'm wondering how to use the case sensitive buffer editing in buffer.
> > For example, in the kill-word function (M-d), how I can set it to kill
> > up to the final lower case, not space, comma, etc. as follows:
> > testFunction()
> > ^ (Here, M-d)
> > Function()
>
> I'm using c-subword-mode with ruby, to this end I've got this line in
> my .emacs:
>
> (add-hook 'ruby-mode-hook (lambda () (c-subword-mode 1)))
>
> You can try it out yourself with M-x subword-mode. This doesn't only
> affect `kill-word' but changes emacs notion about what a word is in
> the current buffer, so `forward-word' and `backward-word' are affected
> as well.
>
> HTH,
>
> Anselm
>
> --
> Anselm Helbig
> mailto:anselm.helbig+news2...@googlemail.com
Great! This mode is really what I wanted. Thanks. :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
[not found] ` <mailman.3312.1248772055.2239.help-gnu-emacs@gnu.org>
@ 2009-07-28 9:27 ` Kiwon Um
0 siblings, 0 replies; 8+ messages in thread
From: Kiwon Um @ 2009-07-28 9:27 UTC (permalink / raw)
To: help-gnu-emacs
On 7월28일, 오후6시00분, Thierry Volpiatto <thierry.volpia...@gmail.com>
wrote:
> Anselm Helbig <anselm.helbig+news2...@googlemail.com> writes:
> > Hi!
>
> >> I'm wondering how to use the case sensitive buffer editing in buffer.
> >> For example, in the kill-word function (M-d), how I can set it to kill
> >> up to the final lower case, not space, comma, etc. as follows:
> >> testFunction()
> >> ^ (Here, M-d)
> >> Function()
>
> > I'm using c-subword-mode with ruby, to this end I've got this line in
> > my .emacs:
>
> > (add-hook 'ruby-mode-hook (lambda () (c-subword-mode 1)))
>
> > You can try it out yourself with M-x subword-mode. This doesn't only
> > affect `kill-word' but changes emacs notion about what a word is in
> > the current buffer, so `forward-word' and `backward-word' are affected
> > as well.
>
> > HTH,
>
> You can also write your own functions:
>
> Something like that... (should be better, i wrote that on the fly)
>
> ,----
> | (defun tv-delete-forward-to-first-upper-case ()
> | (interactive)
> | (let ((case-fold-search nil)
> | (beg (point))
> | end)
> | (while (not (looking-at "[A-Z]")) (forward-char 1))
> | (setq end (point))
> | (delete-region beg end)))
> `----
>
> > Anselm
>
> --
> A + Thierry Volpiatto
> Location: Saint-Cyr-Sur-Mer - France
You made a good function! Really thanks for your effort. :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: forward/backward word with case sensitivity
2009-07-28 7:16 forward/backward word with case sensitivity Kiwon Um
` (2 preceding siblings ...)
2009-07-28 8:27 ` Anselm Helbig
@ 2009-07-28 10:21 ` Elena
3 siblings, 0 replies; 8+ messages in thread
From: Elena @ 2009-07-28 10:21 UTC (permalink / raw)
To: help-gnu-emacs
On 28 Lug, 07:16, Kiwon Um <um.ki...@gmail.com> wrote:
> Hello, there.
>
> I'm wondering how to use the case sensitive buffer editing in buffer.
> For example, in the kill-word function (M-d), how I can set it to kill
> up to the final lower case, not space, comma, etc. as follows:
> testFunction()
> ^ (Here, M-d)
> Function()
>
> Please give me an advice...
> Thanks.
http://www.emacswiki.org/emacs/CamelCase
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-28 10:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 7:16 forward/backward word with case sensitivity Kiwon Um
2009-07-28 7:37 ` Thierry Volpiatto
[not found] ` <mailman.3306.1248767060.2239.help-gnu-emacs@gnu.org>
2009-07-28 8:01 ` Kiwon Um
2009-07-28 8:27 ` Anselm Helbig
2009-07-28 9:00 ` Thierry Volpiatto
2009-07-28 9:25 ` Kiwon Um
[not found] ` <mailman.3312.1248772055.2239.help-gnu-emacs@gnu.org>
2009-07-28 9:27 ` Kiwon Um
2009-07-28 10:21 ` Elena
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).