From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eNwSIPAeq2OFvwAAbAwnHQ (envelope-from ) for ; Tue, 27 Dec 2022 17:36:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UPMyIPAeq2PcxQAA9RJhRA (envelope-from ) for ; Tue, 27 Dec 2022 17:36:00 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3C48215C41 for ; Tue, 27 Dec 2022 17:36:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pACv2-00080H-CL; Tue, 27 Dec 2022 11:35:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pACux-0007y1-Iy for emacs-orgmode@gnu.org; Tue, 27 Dec 2022 11:35:11 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pACuv-0006Y5-M9 for emacs-orgmode@gnu.org; Tue, 27 Dec 2022 11:35:07 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CB180240246 for ; Tue, 27 Dec 2022 17:35:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672158903; bh=XclW/5HKELqxMY5C48ZXP4QdFAc5itYL4bAJqUs83AQ=; h=From:To:Cc:Subject:Date:From; b=bvxme7iGk80dti2txEENzpmmSApbQaQ9k/Z4ZcpKbY4jMyULlPwm6GPyuukTSDoSu llOdFQB+lqs4RmgHTQXI3Gqutk2kwqX5zuQi1YxBS9OTY8msMtJLGf/c3p22lzxDSA wmczMRq24j8vhPHhOD292IsNyabXpfd3MvVOGjpQp0UcFK86qD15e4YN3w9QvV6uZa 2yyIl5S5Jzapc+czPJmdlqMGEUQXQeGx6//Og3u7cW/gRRYQWOKkPF1QaCpUNkkvYe ruVDq2TIcP0V4xiWqUHOCWWThXfo4i/GOje+vKpR2v+sMNUXC4WkT5e+vEnfpWLmqv 6+PSdC1Dh3Mlg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NhKxz0VT5z9rxH; Tue, 27 Dec 2022 17:35:03 +0100 (CET) From: Ihor Radchenko To: Sterling Hooten Cc: emacs-orgmode@gnu.org Subject: Re: [FR] Please add writing to existing heading in org-bibtex In-Reply-To: <76ED509D-E464-4B3E-B751-B233340B2E94@gmail.com> References: <76ED509D-E464-4B3E-B751-B233340B2E94@gmail.com> Date: Tue, 27 Dec 2022 16:34:55 +0000 Message-ID: <87cz8424b4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672158960; a=rsa-sha256; cv=none; b=EGWHqxHqU9eDY8JCOd5eP1z/PVru3jkBIo47QIEt9GWdRhmaeKsKniLn9penO66/9q2xcG tcjN6OXh0vEjaNbCf0Zj4jITbDdxhy/+rkrSeZqgtKx5x2Gb+wNqU0J3g67nxQ0QovkMjk 537w09N52BeaJ58ka9l3Ydx1viaovby7bbaC5kYr3O2R7D3h4/hFKH1AONgYsK0Y51oyX9 lRIeE/3lWhzER0vEtC5JuiQvGI32x11RsIPaHjYDeXUeptYPUO/QwVqblFTVxAlOXvMu8C hWNhCwgkkT7eIlNJnqiNIwom/loFLIZubUgrfkmFZjyIurGAnhBY25NsABdkOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bvxme7iG; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672158960; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OGocHGOCSW38UES0wDkN7K2CWgK3dNRXLnAGMfw+Ecs=; b=qJKJilZT8MLBXlGcTdGXb6nypkSQPKPXzhfAwnAjptmo/3wApUTBFWyTvU5L0vdodm9l2q 69fzePOdpGNogkGmH7Ds6UGPHbdeloyPqRntmxDlpYAWAUS+KL69WKJ19FMNdZs7/BOVoO 4Q+DpbJ/LCskZ9mZIj+EkL05IKlTxIqOqNtuMv2iUmgDdoEJXwmWot3O3qp1kUEMZusZ3g PXc9sY41zBBqLnU76vcyIaEgvrZtCYKy3i7PtK3UlqgwzsggczmAYa/MRR/Kw1llUgT0QU IpeYwWx/Bi7jFF8L0JnEVBohXW8vcpuEGZ0e+s39tnZDpj0PaWs+S0xmrzgNrQ== X-Spam-Score: -9.57 X-Migadu-Queue-Id: 3C48215C41 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bvxme7iG; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -9.57 X-TUID: xjzQwk+rlq6n Sterling Hooten writes: > The default behavior of org-bibtex-write is to insert a new > heading with the bibliographic data in the properties. But an > alternative workflow would just update the properties of the heading at > point, rather than creating a new one. The below patch is a simple > implementation I=E2=80=99ve been using for a month. Would it be possible = to > integrate this upstream? Yes. It will make sense. > -(defun org-bibtex-write () > - "Insert a heading built from the first element of `org-bibtex-entries'= ." > +(defun org-bibtex-write (&optional no-new) > + "Insert a heading built from the first element of `org-bibtex-entries'= . With non-nil optional NO-NEW write to heading at point instead of creatin= g new." Please put the second sentence on a separate line. By convention, first line is a short description of the command and should not exceed 80 symbols. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tip= s.html Also, it will be a good idea to write heading at point when the command is called with prefix argument (C-u). > + ;; SWH 2022-11-22 changes to allow for writing heading at point instea= d of inserting new. Please prepare a proper patch with CHANGELOG entry. This comment is not how we make changes in Org. See https://orgmode.org/worg/org-contribute.html#first-patch > (interactive) You can change the interactive form to allow prefix argument. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interac= tive.html --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at