* how to find " on string
@ 2014-09-16 10:57 Renato Pontefice
2014-09-16 12:22 ` sokobania.01
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Renato Pontefice @ 2014-09-16 10:57 UTC (permalink / raw)
To: help-gnu-emacs
ok, with this elisp,
(defun my-working-code ()
"Some really useful thing."
(interactive)
(while (and (not (eobp))
(search-forward "[-" nil 'move))
(skip-chars-forward "A-Z")
(unless (looking-at "-]")
(message "Problem found, please fix and hit C-M-c to continue")
(recursive-edit)))) I can find for all I need to search.
I look for many char that I'm looking for.
I've added some char ( (skip-chars-forward "A-Z_\\(0-9\)"))
I would also look for ", but I can't find the char that indicate that. Wich one is it?
TIA
Renato
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to find " on string
2014-09-16 10:57 how to find " on string Renato Pontefice
@ 2014-09-16 12:22 ` sokobania.01
2014-09-16 12:30 ` Eric Abrahamsen
[not found] ` <mailman.8971.1410870417.1147.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: sokobania.01 @ 2014-09-16 12:22 UTC (permalink / raw)
To: help-gnu-emacs
Just backquote the quote character inside the string like this:
(setq my-str "a string with \"quoted quotes\" and other chars")
(setq a-quote "\"") ; just a quote character
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to find " on string
2014-09-16 10:57 how to find " on string Renato Pontefice
2014-09-16 12:22 ` sokobania.01
@ 2014-09-16 12:30 ` Eric Abrahamsen
[not found] ` <mailman.8971.1410870417.1147.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2014-09-16 12:30 UTC (permalink / raw)
To: help-gnu-emacs
Renato Pontefice <renato.pontefice@gmail.com> writes:
> ok, with this elisp,
>
> (defun my-working-code ()
> "Some really useful thing."
> (interactive)
> (while (and (not (eobp))
> (search-forward "[-" nil 'move))
> (skip-chars-forward "A-Z")
> (unless (looking-at "-]")
> (message "Problem found, please fix and hit C-M-c to continue")
> (recursive-edit)))) I can find for all I need to search.
> I look for many char that I'm looking for.
> I've added some char ( (skip-chars-forward "A-Z_\\(0-9\)"))
>
> I would also look for ", but I can't find the char that indicate that. Wich one is it?
Probably just an escaped double-quote: \"
Also, your skip-chars-forward looks funny, you've double-backslashed the
opening parenthesis but single-backslashed the closing, while according to
the docstring of skip-chars-forward you probably need neither: A-Z0-9_\"
might be all you need. Try that and see.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to find " on string
[not found] ` <mailman.8971.1410870417.1147.help-gnu-emacs@gnu.org>
@ 2014-09-16 13:35 ` Renato Pontefice
2014-09-16 14:27 ` sokobania.01
0 siblings, 1 reply; 6+ messages in thread
From: Renato Pontefice @ 2014-09-16 13:35 UTC (permalink / raw)
To: help-gnu-emacs
Il giorno martedì 16 settembre 2014 14:30:59 UTC+2, Eric Abrahamsen ha scritto:
> Renato Pontefice <renato.pontefice@gmail.com> writes:
>
>
>
> > ok, with this elisp,
>
> >
>
> > (defun my-working-code ()
>
> > "Some really useful thing."
>
> > (interactive)
>
> > (while (and (not (eobp))
>
> > (search-forward "[-" nil 'move))
>
> > (skip-chars-forward "A-Z")
>
> > (unless (looking-at "-]")
>
> > (message "Problem found, please fix and hit C-M-c to continue")
>
> > (recursive-edit)))) I can find for all I need to search.
>
> > I look for many char that I'm looking for.
>
> > I've added some char ( (skip-chars-forward "A-Z_\\(0-9\)"))
>
> >
>
> > I would also look for ", but I can't find the char that indicate that. Wich one is it?
>
>
>
> Probably just an escaped double-quote: \"
>
>
>
> Also, your skip-chars-forward looks funny, you've double-backslashed the
>
> opening parenthesis but single-backslashed the closing, while according to
>
> the docstring of skip-chars-forward you probably need neither: A-Z0-9_\"
>
> might be all you need. Try that and see.
>
>
>
> Eric
nothing works...:-(
maybe I made some mistake.
Can someone add, in thist line of code
(skip-chars-forward "A-Z_\\(0-9\)")
the right char to skip the " (double quote) ?
TIA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to find " on string
2014-09-16 13:35 ` Renato Pontefice
@ 2014-09-16 14:27 ` sokobania.01
2014-09-16 14:54 ` Renato Pontefice
0 siblings, 1 reply; 6+ messages in thread
From: sokobania.01 @ 2014-09-16 14:27 UTC (permalink / raw)
To: help-gnu-emacs
Le mardi 16 septembre 2014 15:35:47 UTC+2, Renato Pontefice a écrit :
> nothing works...:-(
> maybe I made some mistake.
> Can someone add, in thist line of code
> (skip-chars-forward "A-Z_\\(0-9\)")
> the right char to skip the " (double quote) ?
Have you read my previous post?
Have you read Eric Abrahamsen's last post?
Have you tried (skip-chars-forward "A-Z_0-9\"") ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to find " on string
2014-09-16 14:27 ` sokobania.01
@ 2014-09-16 14:54 ` Renato Pontefice
0 siblings, 0 replies; 6+ messages in thread
From: Renato Pontefice @ 2014-09-16 14:54 UTC (permalink / raw)
To: help-gnu-emacs
Il giorno martedì 16 settembre 2014 16:27:44 UTC+2, sokoba...@gmail.com ha scritto:
> Le mardi 16 septembre 2014 15:35:47 UTC+2, Renato Pontefice a écrit :
>
>
>
> > nothing works...:-(
>
> > maybe I made some mistake.
>
> > Can someone add, in thist line of code
>
> > (skip-chars-forward "A-Z_\\(0-9\)")
>
> > the right char to skip the " (double quote) ?
>
>
>
> Have you read my previous post?
>
> Have you read Eric Abrahamsen's last post?
>
>
>
> Have you tried (skip-chars-forward "A-Z_0-9\"") ?
Yes,
I have done all.
MORE I've anderstund what I made wrong. :-(
the character intercepted, was not the ", but another one (it's difficult for me, why. But, trust me, it was another ;-) .
Now, I've understand the error... and all works great!
Thaks to all
Renato
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-16 14:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 10:57 how to find " on string Renato Pontefice
2014-09-16 12:22 ` sokobania.01
2014-09-16 12:30 ` Eric Abrahamsen
[not found] ` <mailman.8971.1410870417.1147.help-gnu-emacs@gnu.org>
2014-09-16 13:35 ` Renato Pontefice
2014-09-16 14:27 ` sokobania.01
2014-09-16 14:54 ` Renato Pontefice
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.