all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "MarkS." <throaway@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: How to really escape a double quote?
Date: Thu, 24 Feb 2011 15:54:43 -0800 (PST)	[thread overview]
Message-ID: <d348944b-2889-4669-9f65-e0be7ff4ed27@o14g2000prb.googlegroups.com> (raw)

This is a two part question, but both parts are looking for how to
escape a double quote AND have it work with Emacs.

I was looking for a way to make Emacs delete inside of delimiters the
way Vim does. I found some code that some nice person had written. The
key search line is like:

  (skip-chars-backward "^(<[“") (setq p1 (point))

but there's no double quote, which is what I need most often. I looked
up Emacs/lisp documentation on-line, and it said that I could escape a
double-quote with a slash. So I tried changing the line to:

  (skip-chars-backward "\"^(<[“") (setq p1 (point))

But when I run the code, it can't find the escaped double quote. It
seems to ignore it.

So, how do I get code like this to recognize an escaped quote mark?

The other part of the question is, how do I get a key mapping that
uses double quotes?

I tried

  (global-set-key "\c-x\"" 'delete-stuff)

but this gave me all sorts of errors. However, if I activate global-
set-key interactively, I can set control-x " and it works to activate
the function. So there must be some way to make emacs recognize double
quotes in a key-mapping.

Thanks!



             reply	other threads:[~2011-02-24 23:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 23:54 MarkS. [this message]
2011-02-25  0:00 ` How to really escape a double quote? David Kastrup
2011-02-25  0:05   ` MarkS.
2011-02-26  2:05     ` Le Wang
     [not found]     ` <mailman.0.1298685964.28733.help-gnu-emacs@gnu.org>
2011-02-26  4:04       ` MarkS.
2011-02-26  5:10         ` Le Wang
2011-02-26  8:55   ` Kevin Rodgers
     [not found]   ` <mailman.18.1298710549.28733.help-gnu-emacs@gnu.org>
2011-02-26  9:00     ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d348944b-2889-4669-9f65-e0be7ff4ed27@o14g2000prb.googlegroups.com \
    --to=throaway@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.