From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.bugs Subject: bug#56655: 29.0.50; symbol's function definition is void: reftex-all-used-citation-keys Date: Fri, 22 Jul 2022 15:41:19 +0200 Message-ID: <86fsit5kow.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40356"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: 56655@debbugs.gnu.org To: Melody Y Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 15:44:27 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEsx8-000AJn-GK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 15:44:27 +0200 Original-Received: from localhost ([::1]:52762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEsx7-0006Xe-Cs for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 09:44:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEsvn-0003xk-RE for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEsvm-0004CQ-DT for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEsvm-0003r4-AL for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 09:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arash Esbati Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2022 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56655 X-GNU-PR-Package: emacs Original-Received: via spool by 56655-submit@debbugs.gnu.org id=B56655.165849735414779 (code B ref 56655); Fri, 22 Jul 2022 13:43:02 +0000 Original-Received: (at 56655) by debbugs.gnu.org; 22 Jul 2022 13:42:34 +0000 Original-Received: from localhost ([127.0.0.1]:40460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsvJ-0003qI-O0 for submit@debbugs.gnu.org; Fri, 22 Jul 2022 09:42:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEsvI-0003q5-HN for 56655@debbugs.gnu.org; Fri, 22 Jul 2022 09:42:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEsvD-000400-68; Fri, 22 Jul 2022 09:42:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=KiX4Yj4D4fGAfFMf5UyrRGj5B7qx2PtvW9En4fezyDU=; b=IPC0/+WUHKDDu0tcjM3S kdSkTlRvpn+AyKDoA8Dm4fBlwczLFFKA24kmKyHbUTYeZkERzGfp3nOKgNpTOZ67KgKWNPWneuxSD vfjqAQbW1Cfv8GGw9dc9ZpnnL4PetSJcWasXzT7h9QFhg6001p5tGpCPFCobJqKPXsJ9Kntiwm12v WjVnwQuGNiU7Pe4Z1ZwmsRs/gteLHosWy5sRLA7OJ7y5skqCZTf8J5mfsx2+zfDFnnBT3+Wmu7s93 3NwSCa5a+NGaPdfnjzKsl0Q4P3zFje6/dd+Un90jWl77uNrP1p8U/Kr9mCmYRkODPOA6wxZtVKQ+U zOe0A3rI8NkJdw==; Original-Received: from pd9fb77f7.dip0.t-ipconnect.de ([217.251.119.247]:63550 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEsvC-0003RT-Op; Fri, 22 Jul 2022 09:42:26 -0400 In-Reply-To: (Melody Y.'s message of "Wed, 20 Jul 2022 11:16:07 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237626 Archived-At: Melody Y writes: > When I cite after an escaping symbol, the following citation item can > not be extracted with `reftex-all-used-citation-keys`. For example, > \%\cite{gaoEfficientKnowledgeGraph2019}, the key > `gaoEfficientKnowledgeGraph2019` can't be exported. But if i make > \cite{gaoEfficientKnowledgeGraph2019} to a new line, the export will > work. Is it possible to solve this bug? Thanks for the report. Can you please elaborate what you mean with "after an escaping symbol"? Does your description above apply only to \% or also to other control symbols in TeX? The way I understand the regexp in `reftex-all-used-citation-keys' it should only apply to \%. Can you please try this version of the function and report back if it works? In order to use is, you need to: =E2=80=A2 Copy the code into into scratch buffer =E2=80=A2 Load your .tex file and hit 'C-c [' to make sure that reftex-cit= e.el is loaded =E2=80=A2 Switch to scratch buffer and eval the function, i.e., put cursor after the last parenthesis and hit 'C-x C-e' =E2=80=A2 Switch to your .tex file again and run `reftex-all-used-citation-keys'. --8<---------------cut here---------------start------------->8--- (defun reftex-all-used-citation-keys () (reftex-access-scan-info) (let ((files (reftex-all-document-files)) file keys kk k) (save-current-buffer (while (setq file (pop files)) (set-buffer (reftex-get-file-buffer-force file 'mark)) (save-excursion (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward (concat "\\(?:^\\|\\=3D\\)" "\\(?:[^%\n\r]*?\\(?:\\\\%\\)?[^%\n\r]*?\\)" "\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)" "\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}") nil t) (setq kk (match-string-no-properties 3)) (while (string-match "%.*\n?" kk) (setq kk (replace-match "" t t kk))) (setq kk (split-string kk "[, \t\r\n]+")) (while (setq k (pop kk)) (or (member k keys) (setq keys (cons k keys))))))))) (reftex-kill-temporary-buffers) keys)) --8<---------------cut here---------------end--------------->8--- TIA. Best, Arash