From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#21391: 24.5; `thing-at-point' returns error when called with arguments 'number t) Date: Thu, 13 Oct 2016 16:00:01 +0900 (JST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1476342095 2239 195.159.176.226 (13 Oct 2016 07:01:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2016 07:01:35 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Tino Calancha To: 21391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 13 09:01:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bua0x-0006PG-5v for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Oct 2016 09:01:15 +0200 Original-Received: from localhost ([::1]:38043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bua0v-0001Y0-Sw for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Oct 2016 03:01:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bua0o-0001Xt-KP for bug-gnu-emacs@gnu.org; Thu, 13 Oct 2016 03:01:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bua0k-00051W-Nj for bug-gnu-emacs@gnu.org; Thu, 13 Oct 2016 03:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bua0k-00051Q-KX for bug-gnu-emacs@gnu.org; Thu, 13 Oct 2016 03:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bua0k-0000in-EI for bug-gnu-emacs@gnu.org; Thu, 13 Oct 2016 03:01:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Oct 2016 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21391-submit@debbugs.gnu.org id=B21391.147634201231855 (code B ref 21391); Thu, 13 Oct 2016 07:01:02 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 13 Oct 2016 07:00:12 +0000 Original-Received: from localhost ([127.0.0.1]:53680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buZzv-0008HX-S7 for submit@debbugs.gnu.org; Thu, 13 Oct 2016 03:00:12 -0400 Original-Received: from mail-pa0-f68.google.com ([209.85.220.68]:36448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buZzt-000895-Qn for 21391@debbugs.gnu.org; Thu, 13 Oct 2016 03:00:10 -0400 Original-Received: by mail-pa0-f68.google.com with SMTP id os4so298497pac.3 for <21391@debbugs.gnu.org>; Thu, 13 Oct 2016 00:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:user-agent:mime-version; bh=u0Ky/eDk1+SdI+TAwiwT1ZFIeyHNECMivuhCyQbzhpM=; b=xNV5O6U+OjiBwm47xEyMK30XFKsnofxzqMexlkg7bLDdNOP35V7cdF9QTgbft9Ji5R JLm+RQdDmD8V3vDyN4pKRSRmBrMdp9du/emH80Y1CFA3L56uBccg1qPD/D5yLHdhI3kX LOoMMaucmcv0LC3rYYy/kdB8ZGhVx8obcMhiSYV2NU0GujgRRQLDrG2OpRW2mSxAEhNF FuELkGVHiMUPUVZngEHve5aHyB/S5WKFVxvsazYk5bTPYQMieDEp//43YtQMa2r2g8WD +gon8JRBmgcyMan+INJr2OaVDHXzD1N7xUcq/Yxok7CJKMSOUZZD7t757qc/jU7RWW+e KMbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:user-agent :mime-version; bh=u0Ky/eDk1+SdI+TAwiwT1ZFIeyHNECMivuhCyQbzhpM=; b=PRitFGzPZNCU1kWchKbV8H469VN+6v+OdIyde3wP/Sq+I9LcWqZUfrWUyPa72U9fyh PBhQ5z7w0Q2oWyY5o8ax4NwkfvuwN1IDfOBgT/YaART09yvuti90fVXJNUJ5wTqKJrEb INAwIi2wv63+Y6ZCUZ1phj6T7Al6auYDmmy7uw0AaV8+lkSkv01UfjKYQNwUH4kp8BLH v3+IaCcEjhi3qv8LBdtt1vrfoKT1ToPwreL3JmRV8fO3cliDEqKSMsDRKgt9FQQsFU80 AgVYk+LOlPfA6rTTeyyTtlEt4DRRuhqhZVmJzX3m4afaFXAcqTWIsUjw3UAoVlH2tOA/ K3cw== X-Gm-Message-State: AA6/9Rm9F6yC3YZtAK86dWijtfUvR4GXl+rishHnjQRkx5HfOr8uclM3tGKsYs2g4M/OOg== X-Received: by 10.66.152.200 with SMTP id va8mr6621310pab.12.1476342004278; Thu, 13 Oct 2016 00:00:04 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id l2sm16726275pav.7.2016.10.13.00.00.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 00:00:03 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:124426 Archived-At: Using `sequencep' looks too general here: `set-text-properties' justs accepts as arg OBJECT an string or a buffer. The case of interest for this function seems when text satisfy `stringp'. We might want to do in the future (or some 3rd party code) something like: (put 'list 'thing-at-point 'list-at-point) In that case, 'text' would satisfy `listp', so it would satisfy `sequencep' as well: we would then call `set-text-properties' with arg OBJECT being a list, which signals an error. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 346ce0fcf3665ebfb24303763e2372551b33a1ae Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Thu, 13 Oct 2016 15:45:02 +0900 Subject: [PATCH] thing-at-point: Delete text properties only if text is a string * lisp/thingatpt.el (thing-at-point): Delete text properties only when text is an string (Bug#21391). --- lisp/thingatpt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 6d1014b..2fd51e6 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -145,7 +145,7 @@ thing-at-point (let ((bounds (bounds-of-thing-at-point thing))) (when bounds (buffer-substring (car bounds) (cdr bounds))))))) - (when (and text no-properties (sequencep text)) + (when (and text no-properties (stringp text)) (set-text-properties 0 (length text) nil text)) text)) -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.16 (x86_64-pc-linux-gnu, GTK+ Version 3.22.1) of 2016-10-13 built on calancha-pc Repository revision: 1dd54e3eef7543720eff161457677a35fae2435c