From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#33175: 26.1; match-string Date: Sat, 27 Oct 2018 07:10:16 -0400 Message-ID: <87lg6jk5lz.fsf@gmail.com> References: <5bd44505.1c69fb81.b3aa3.1034@mx.google.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540638550 20056 195.159.176.226 (27 Oct 2018 11:09:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2018 11:09:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 33175@debbugs.gnu.org To: =?UTF-8?Q?=E6=BF=B1=E7=94=B0=E5=92=8C=E6=98=8E?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 13:09:06 2018 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 1gGMSn-00059O-Gm for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 13:09:05 +0200 Original-Received: from localhost ([::1]:36057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGMUt-0004Jf-Rj for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 07:11:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGMUn-0004JY-VZ for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 07:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGMUg-0000gQ-JR for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 07:11:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGMUg-0000gH-Eh for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 07:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGMUg-0003w2-9q for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 07:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2018 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33175 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33175-submit@debbugs.gnu.org id=B33175.154063862615083 (code B ref 33175); Sat, 27 Oct 2018 11:11:02 +0000 Original-Received: (at 33175) by debbugs.gnu.org; 27 Oct 2018 11:10:26 +0000 Original-Received: from localhost ([127.0.0.1]:44648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGMU6-0003v7-HM for submit@debbugs.gnu.org; Sat, 27 Oct 2018 07:10:26 -0400 Original-Received: from mail-it1-f176.google.com ([209.85.166.176]:38542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGMU3-0003ud-1g; Sat, 27 Oct 2018 07:10:23 -0400 Original-Received: by mail-it1-f176.google.com with SMTP id i76-v6so4618250ita.3; Sat, 27 Oct 2018 04:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=eM8NlgI2uzJke2UEU4ksm6zaUwGWVsEwN3bsx5cTbyM=; b=ciMlMgIleF8cGzbvU/p9d1izGQJWmnlGn6DVAzG4olLyciLNjKo4sDqknJtt2Bjock 6V78gqE/VLiHr4Not4ICmI0LYOkD5M4AJkbCcfYv/HYhigs4ZgR8JsH4AtGGg91UkaRb 7naAukt2OvKb520ZF5gEcbWQTxW8MiiHfvWIKKY5SDMp1HOJRsJSVfMIl1Nfdzso5pfn AFTf3AEMrBlzrEKavvT4R9NCLPbqWS3CdcRHsBHBkaTEmN5Y+GECxTne8WV7HXsknFcD cFsXLEL7rnbu0WWmHJPLo6Aq4jH4NDaXq0sBFbbsosj2GTat6KuSpMiALJ+aCrlETlYu Un9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=eM8NlgI2uzJke2UEU4ksm6zaUwGWVsEwN3bsx5cTbyM=; b=FLQgfwpG5MIRfuiMRF/krdZGsTEq1+nxRQMOIs0IVc27a73zk2v2X4IqiQ5IXgjW2I dMlu6j7mZpzFJyvMQhQf7bP3eWEC8roe1NfRD7BQJrjUcFejrr/l+Nti40CuGZmal0iK CpjqoWd7qd9IvCKk32bUzmhlrEf4pTz4EQJnhxIOPlg0qLSXR8JWMMlqF4qE0uWw7lwq Ot5S/Xuqh9Gxtt1Sr9I937Buqu/MIdECknEmsOmO8Oa59+M6hNuwzZL5YW0MslCwoZlM FAh4sCa6Fwv8OSMpsG0O1oh+Iu/HpOOnR8gcDpEjARWLGz2qgiO9lunXfH7moBa/6vZZ z22Q== X-Gm-Message-State: AGRZ1gIGoNw4r/qqbbdVi+arlRn0p2dJ36BCB2EaxpqCvDxGpDAH5X+r 60ElsyVXriAycvvXHkeisvpx1SIM X-Google-Smtp-Source: AJdET5foGaldlsEHf6BlB0l0WZloBNZ3mNtsidMFDBRvShzVzAiPX9iiq70/fjFSFEAUpEXCRKHo/w== X-Received: by 2002:a02:45ca:: with SMTP id o71-v6mr5040641jad.133.1540638617474; Sat, 27 Oct 2018 04:10:17 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id q205-v6sm4565895itc.2.2018.10.27.04.10.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 04:10:16 -0700 (PDT) In-Reply-To: <5bd44505.1c69fb81.b3aa3.1034@mx.google.com> ("=?UTF-8?Q?=E6=BF=B1=E7=94=B0=E5=92=8C=E6=98=8E?="'s message of "Sat, 27 Oct 2018 19:59:16 +0900") 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:151672 Archived-At: tags 33175 notabug close 33175 quit =E6=BF=B1=E7=94=B0=E5=92=8C=E6=98=8E writes: > (progn > (string-match "\\(key[ \t]*\\)=3D \\(.*\\)" (buffer-string)) > (match-string 0)) > > Key =3D 100 > ->#(" > Key =3D 10" 0 1 (fontified t) 1 9 (fontified t)) > > Is not =E2=80=9Ckey =3D 100=E2=80=9D? (match-string NUM &optional STRING) [...] STRING should be given if the last search was by =E2=80=98string-match= =E2=80=99 on STRING. Try this instead: (let ((str (buffer-string))) (string-match "\\(key[ \t]*\\)=3D \\(.*\\)" str) (match-string 0 str))