From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#12692: 24.1; thing-at-point in temp buffer Date: Sat, 20 Oct 2012 22:05:13 -0400 Message-ID: <003918fuli.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1350785131 3729 80.91.229.3 (21 Oct 2012 02:05:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Oct 2012 02:05:31 +0000 (UTC) Cc: 12692@debbugs.gnu.org To: Jerome Truong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 21 04:05:39 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TPkv2-0004Ap-QY for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Oct 2012 04:05:36 +0200 Original-Received: from localhost ([::1]:59961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPkuv-00051f-Bn for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Oct 2012 22:05:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPkus-00050p-3m for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2012 22:05:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPkur-00076g-4B for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2012 22:05:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPkur-00076c-0t for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2012 22:05:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TPkwQ-0002Y1-Sk for bug-gnu-emacs@gnu.org; Sat, 20 Oct 2012 22:07:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Oct 2012 02:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12692 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12692-submit@debbugs.gnu.org id=B12692.13507852219784 (code B ref 12692); Sun, 21 Oct 2012 02:07:02 +0000 Original-Received: (at 12692) by debbugs.gnu.org; 21 Oct 2012 02:07:01 +0000 Original-Received: from localhost ([127.0.0.1]:53669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPkwO-0002Xg-5y for submit@debbugs.gnu.org; Sat, 20 Oct 2012 22:07:01 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:46190 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TPkwH-0002XQ-4w; Sat, 20 Oct 2012 22:06:54 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TPkuf-0003Sv-No; Sat, 20 Oct 2012 22:05:13 -0400 X-Spook: radar CNCIS investigation John Kerry SWAT South Africa X-Ran: -0-*JLf42Ia3*NJi@mt&#@&nB>7s+Wv.:crN;^BVgfE@}'8-0aXx}5'$`lFV%;oo7#bdS" X-Hue: black X-Attribution: GM In-Reply-To: (Jerome Truong's message of "Sat, 20 Oct 2012 13:24:29 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65808 Archived-At: tags 12692 notabug close 12692 stop Jerome Truong wrote: > Why does the following return the whole string "this.is.an.example": > > (thing-at-point 'symbol)this.is.an.example > ^ > | > eval at point here > > but using a temp buffer only returns "this": > > (let ((type 'symbol) > (string "this.is.an.example")) > (with-temp-buffer > (insert string) > (goto-char 1) > (let ((thing (thing-at-point type))) > (message "%s" thing)))) Depends on the syntax table in use. Replace your second example with (let ((type 'symbol) (string "this.is.an.example")) (with-temp-buffer (insert string) (goto-char 1) (with-syntax-table emacs-lisp-mode-syntax-table (let ((thing (thing-at-point type))) (message "%s" thing))))) HTH; maybe try help-gnu-emacs first next time?