all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How do I search for symbols such as \253 in Emacs
@ 2012-11-06 11:23 acomber
  2012-11-06 11:47 ` Peter Dyballa
  2012-11-06 12:09 ` Jambunathan K
  0 siblings, 2 replies; 6+ messages in thread
From: acomber @ 2012-11-06 11:23 UTC (permalink / raw)
  To: Help-gnu-emacs

I see the symbols as \253 (or whatever) in Emacs.  But if I try to search for
\253 (backslash then enter 253 it never finds them.  But if I cut and yank
one of the symbols it works.  The trouble is the file I have is huge and
finding these symbols is hard - even though I know what they are.  I just
can't enter them to search.

How do I search for these?




--
View this message in context: http://emacs.1067599.n5.nabble.com/How-do-I-search-for-symbols-such-as-253-in-Emacs-tp268928.html
Sent from the Emacs - Help mailing list archive at Nabble.com.



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

* Re: How do I search for symbols such as \253 in Emacs
  2012-11-06 11:23 How do I search for symbols such as \253 in Emacs acomber
@ 2012-11-06 11:47 ` Peter Dyballa
  2012-11-06 18:19   ` Oleksandr Gavenko
       [not found]   ` <mailman.12407.1352225988.855.help-gnu-emacs@gnu.org>
  2012-11-06 12:09 ` Jambunathan K
  1 sibling, 2 replies; 6+ messages in thread
From: Peter Dyballa @ 2012-11-06 11:47 UTC (permalink / raw)
  To: acomber; +Cc: Help-gnu-emacs


Am 06.11.2012 um 12:23 schrieb acomber:

> How do I search for these?

Try: C-s C-q 2 5 3 RET! Before you can check the setting of the variable read-quoted-char-radix. It should be by default 8, but can also be set to 10 or 16. Depending on that variable's setting you'll have to input the value in octal, decimal, or hexadecimal notation.

--
Greetings

  Pete

Spam will be a thing of the past in two years' time.
				– Bill Gates, Jan 2004




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

* Re: How do I search for symbols such as \253 in Emacs
  2012-11-06 11:23 How do I search for symbols such as \253 in Emacs acomber
  2012-11-06 11:47 ` Peter Dyballa
@ 2012-11-06 12:09 ` Jambunathan K
  1 sibling, 0 replies; 6+ messages in thread
From: Jambunathan K @ 2012-11-06 12:09 UTC (permalink / raw)
  To: acomber; +Cc: Help-gnu-emacs

acomber <deedexy@gmail.com> writes:

> I see the symbols as \253 (or whatever) in Emacs.  But if I try to search for
> \253 (backslash then enter 253 it never finds them.  But if I cut and yank
> one of the symbols it works.  The trouble is the file I have is huge and
> finding these symbols is hard - even though I know what they are.  I just
> can't enter them to search.
>
> How do I search for these?

It is difficult to remember codepoints, ain't it? May be use recursive
minibuffers with ucs-insert?

See http://irreal.org/blog/?p=1327

> --
> View this message in context: http://emacs.1067599.n5.nabble.com/How-do-I-search-for-symbols-such-as-253-in-Emacs-tp268928.html
> Sent from the Emacs - Help mailing list archive at Nabble.com.
>
>

-- 



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

* Re: How do I search for symbols such as \253 in Emacs
  2012-11-06 11:47 ` Peter Dyballa
@ 2012-11-06 18:19   ` Oleksandr Gavenko
       [not found]   ` <mailman.12407.1352225988.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Oleksandr Gavenko @ 2012-11-06 18:19 UTC (permalink / raw)
  To: help-gnu-emacs

On 2012-11-06, Peter Dyballa wrote:

> Am 06.11.2012 um 12:23 schrieb acomber:
>
>> How do I search for these?
>
> Try: C-s C-q 2 5 3 RET! Before you can check the setting of the variable
> read-quoted-char-radix. It should be by default 8, but can also be set to 10
> or 16. Depending on that variable's setting you'll have to input the value in
> octal, decimal, or hexadecimal notation.
>
Great answer. I make this settings 4 years ago while searching about Unicode:

  http://article.gmane.org/gmane.emacs.help/32463/match=read+quoted+char+radix
                 Re: insert unicode

-- 
Best regards!




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

* Re: How do I search for symbols such as \253 in Emacs
       [not found]   ` <mailman.12407.1352225988.855.help-gnu-emacs@gnu.org>
@ 2012-11-06 20:24     ` Peter
  2012-11-06 21:22       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Peter @ 2012-11-06 20:24 UTC (permalink / raw)
  To: gnu.emacs.help; +Cc: help-gnu-emacs

I wrote this many years ago when I first picked up Emacs. As I come across new characters I just add to the list with the expected replacement string. I tried to keep track of what the character looked like in the comment beside it. The replacement strings are for text files which I am converting to LaTeX files (which is typically where I run across this problem), so you might want to change some of the replacements to better suit your application.

Hope this helps,
Peter

(defun fix-latin-1-chars ()
  (interactive)
  (let ((change-list '((?\x005397c  "``")  ; “
                       (?\xc "")           ; Page Feed character
                      (?\x005397d  "''")   ; ”
                      (?\x2019  "'")    ; ’
                      (?\x201c  "''")   ; ”
                      (?\x201d  "''")   ; ”
                      (?\x2014  "--")   ; —
                      (?\x2026  " \\ldots ")   ; —
                      (?\x0053974  "--")   ; —
                      (?\x0053979  "'")    ; ’
                      (?\x81     "'")
                      (?\x2018     "'")
                      (?\x2019     "'")
                      (?\x201A     ".")
                      (?\x2022     ".")
                      (?\x8b4      "'")    ; ´
                      (?\x53979    "'")
                      (?\x00539a6  " ")    ; …
                      (?\x0053978  "`")    ; ‘
                      (?\x0053973  "--")   ; –
                      (?\x2013  "--")   ; –
                      (?\x8b7  "*")        ; ·
                      (?\x004e647  "*")    ; 
                      (?\x004e6a0  "*")    ; 
                      (?\x8bd  ".5")       ; ½
                      (?\x8a1  " ")        ; ¡
                      (?\x8a7  " ")        ; §
                      (?\x8a8  " ")        ; ¨
                      (?\x0053973  "-")    ; –
                      (?\x0053c39  "*")    ; ∙
                      (?\x26  "and")       ; &
                      (?\x004e657  "*")    ; 
                      (?\x004e5f1  "*")    ; 
                      (?\x004e648  "*")    ; 
                      (?\x004f070  "*")    ; 
                      (?\x004e5ca  "*")    ; 
                      (?\x004e5f6  "*")    ; 
                      (?\x004e678  "*")    ; 
                      (?\xf0a8 "*")        ; 
                      (?\xf0b7 "*")        ; 
                      (?\xf0fc "*")        ; 
                      (?\x0053972  "*")    ; ‒
                      (?\x8d8  "*")        ; Ø
                      (?\x004e5aa  "*")    ; 
                      (?\x8b6 " ")         ; ¶
                      (?\x4f95f "")        ; 
                      (?\x539a0 "")        ; †
                      (?\x5397e "")
                      (?\xfeff "")
                      (?\x00539a2  "*")))  ; •
        (search-for)
        (start-point (point))
        (buffer-limit (point-max)))
    (dolist (item change-list)
      (setq search-for (make-string 1 (car item)))
      (goto-char start-point)
      (while (re-search-forward search-for buffer-limit t)
        (delete-char -1)
        (insert (car (cdr item)))))))



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

* Re: How do I search for symbols such as \253 in Emacs
  2012-11-06 20:24     ` Peter
@ 2012-11-06 21:22       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2012-11-06 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 6 Nov 2012 12:24:15 -0800 (PST)
> From: Peter <peter.milliken@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> I wrote this many years ago when I first picked up Emacs. As I come across new characters I just add to the list with the expected replacement string. I tried to keep track of what the character looked like in the comment beside it. The replacement strings are for text files which I am converting to LaTeX files (which is typically where I run across this problem), so you might want to change some of the replacements to better suit your application.

Some of the codepoints in your list are no longer correct: they
correspond to the internal representation of characters used by Emacs
before v23.1.  Caveat emptor!



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

end of thread, other threads:[~2012-11-06 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 11:23 How do I search for symbols such as \253 in Emacs acomber
2012-11-06 11:47 ` Peter Dyballa
2012-11-06 18:19   ` Oleksandr Gavenko
     [not found]   ` <mailman.12407.1352225988.855.help-gnu-emacs@gnu.org>
2012-11-06 20:24     ` Peter
2012-11-06 21:22       ` Eli Zaretskii
2012-11-06 12:09 ` Jambunathan K

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.