From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: thing-at-point: inconsistent behaviour? Date: Thu, 16 Aug 2012 11:48:16 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1345132219 7671 80.91.229.3 (16 Aug 2012 15:50:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Aug 2012 15:50:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 16 17:50:19 2012 Return-path: Envelope-to: geh-help-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 1T22Kt-0001IK-Co for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 17:50:15 +0200 Original-Received: from localhost ([::1]:59749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T22Kq-00078k-9I for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 11:50:12 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 45 Injection-Info: barmar.motzarella.org; posting-host="78fb7125a45724f15e21604c94a7d968"; logging-data="25854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tx//ol5JQ4umavQvwTzjy" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:P0yYhe9JKs7Ar7or0pXMr9yp2fg= Original-Xref: usenet.stanford.edu gnu.emacs.help:194002 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86370 In article , Andreas Röhler wrote: > Am 15.08.2012 21:00, schrieb Raffaele Ricciardi: > > On 08/15/2012 07:34 PM, Barry Margolin wrote: > > > In article , > > > Raffaele Ricciardi wrote: > > > > > >> Hello there, > > >> > > >> the documentation of `thing-at-point' states that such function returns > > >> "the > > >> thing around or next to point". This is not the case with either > > >> (thing-at-point > > >> 'symbol) or (thing-at-point 'sexp), for they both may return the thing > > >> before > > >> point. Try it with the following snippet (! symbolizes the point): > > > > > > Doesn't "next to" include both immediately before and immediately after? > > > > I stand corrected after having consulted a dictionary. Then it is > > (thing-at-point 'list) that is misbehaving. > > > > > hmm, IMHO you was right. Here is the code > > (defun symbol-at-point () > "Return the symbol at point, or nil if none is found." > (let ((thing (thing-at-point 'symbol))) > (if thing (intern thing)))) > > last line don't return the thing as delivered by thing-at-point but the > result of (intern thing) > > that way breaking consistency. That function has nothing to do with the problem he's reporting. It's just an extra utility function that makes use of thing-at-point to return something that may be useful in certain situations. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***