From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#56475: 28.1.50; bibtex-parse-entry disregards @string substitutions Date: Tue, 12 Jul 2022 14:04:55 +0800 Message-ID: <874jzm7to8.fsf@localhost> References: <87let1v3pq.fsf@localhost> <87sfn8ymw7.fsf@gnus.org> <87sfn7po84.fsf@gnu.org> <877d4jpngx.fsf@gnu.org> <87fsj76oxi.fsf@localhost> <871qurnf0d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 56475@debbugs.gnu.org To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 12 08:04:36 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 1oB90c-0000eM-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jul 2022 08:04:34 +0200 Original-Received: from localhost ([::1]:41008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oB90a-0004HT-Iw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jul 2022 02:04:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oB906-0004Fd-Tk for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 02:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oB906-0002nc-KS for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 02:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oB906-0002et-EB for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2022 02:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2022 06:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56475 X-GNU-PR-Package: emacs Original-Received: via spool by 56475-submit@debbugs.gnu.org id=B56475.165760584110212 (code B ref 56475); Tue, 12 Jul 2022 06:04:02 +0000 Original-Received: (at 56475) by debbugs.gnu.org; 12 Jul 2022 06:04:01 +0000 Original-Received: from localhost ([127.0.0.1]:41472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB905-0002ee-1F for submit@debbugs.gnu.org; Tue, 12 Jul 2022 02:04:01 -0400 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:52174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oB902-0002eL-Vr for 56475@debbugs.gnu.org; Tue, 12 Jul 2022 02:03:59 -0400 Original-Received: by mail-pj1-f45.google.com with SMTP id o15so6730035pjh.1 for <56475@debbugs.gnu.org>; Mon, 11 Jul 2022 23:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=Gdt9bauOHb/FfNmo8SZIo9rYBN0eKYsEJ2kBR64NyvA=; b=d54G8Yv2CHCo5J6KN2XtFYy+o0725cdHbR0YESxPjUBr1FB9La6pqynsQXBbh6IIBL FDEgHsUhOv56tdnKLMuhQ9kdObSHyhN2XLWXiUPmDBT9432lZGXTgNhBLV1j6HvMaLun zzORz43kqDIDk8xn9uU5FkGXFwzPdN+tcwMI8GycKMsCcQ6jfkmMoLqR+IGQ8nwxPckl Em9j+2nQJv8OJdBSXHJ7+AUhr+2zVFG9TQPu7c4Gz+dOGZBvt6gyf8JDFMR3+8Tg/siD q8NcRiP26AMK8BKj0W2PlF/AB/O6+K0kUK8ndkqShfc2t220B1/GH5H0cC2UEvXFPVDV 2L5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=Gdt9bauOHb/FfNmo8SZIo9rYBN0eKYsEJ2kBR64NyvA=; b=ynDxzSs8o0swyyBGZXUIukm/El+v5XrxU8k/mXGlMk9HOFAJBelKFcx1LseSTXp37X MWuXc2SVcHM5iCpgDUNZXrkDB41prT+jX/IKyqg6vLoQPQjyKipJbK/yWGm6VuHjuycy 8isQIh9+tpOd+OXcLTQEtnWhIgKVqhOtKBrBgiKOP/PIcPU+3+HoA+MKOpZTdbfwq7Xk yDuypm75RBufU/BDaE/fElV0uskpgilcD4JHzmD5toVH8grBdF0yXpI3PTiQbg76sYeA fHy96j5/V8eGQxr1BZf3wN+cjNB/Y8ocyOdNw1reDg+iAbWCdPhBwlGugQnl6egHHdv4 2FSg== X-Gm-Message-State: AJIora8bItP7JIt9JHCZyraZdfISR4Hht3EAJT6vmNlWj8P2uJQPMPJd Y4WRzIjyNHU1RitnBkdyg38= X-Google-Smtp-Source: AGRyM1twyCXqMdF6GGqcKHQURu119982sbbF6asoIEWt1x62Dh2BJROdzyeH8wyhb4sAVFuj3YUCmA== X-Received: by 2002:a17:902:f381:b0:16b:db6e:aed with SMTP id f1-20020a170902f38100b0016bdb6e0aedmr22385668ple.19.1657605832897; Mon, 11 Jul 2022 23:03:52 -0700 (PDT) Original-Received: from localhost ([157.52.221.140]) by smtp.gmail.com with ESMTPSA id t6-20020a632246000000b0041296135280sm754439pgm.88.2022.07.11.23.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 23:03:52 -0700 (PDT) In-Reply-To: <871qurnf0d.fsf@gnu.org> 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:236741 Archived-At: Roland Winkler writes: >> Thanks for the pointer! >> I tried my reproducer by running >> M-: (let ((bibtex-expand-strings t)) (bibtex-parse-entry)) >> instead of >> M-: (bibtex-parse-entry) >> >> Unfortunately, the journal field is still not substituted. > > The variable bibtex-string-files tells bibtex.el where it can find the > string definitions (which are then stored in the variable > bibtex-strings). This complements bibtex-files that tells bibtex.el > where it can find the BibTeX entries. A command like > bibtex-search-entry searches the entries in the files in bibtex-files. I am wondering why bibtex-string-files is not documented inside the docstring of bibtex-expand-strings. Same for bibtex-expand-strings not being documented in bibtex-parse-entry. As for using bibtex-string-files in my specific scenario, I cannot make it work as well. I tried the following simple test: M-: (let ((bibtex-string-files `(,(buffer-file-name))) (bibtex-expand-strings t)) (bibtex-parse-entry)) The journal field is still not handled: ("journal" . "jgr") Also, note that bibtex-string-files cannot help with situations when the BibTeX buffer does not have an associated file. Best, Ihor