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 0L7YCylgNmPTNAAAbAwnHQ (envelope-from ) for ; Fri, 30 Sep 2022 05:19:05 +0200 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 +E1EDClgNmN9MAEA9RJhRA (envelope-from ) for ; Fri, 30 Sep 2022 05:19:05 +0200 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 D0B46822D for ; Fri, 30 Sep 2022 05:19:04 +0200 (CEST) Received: from localhost ([::1]:40572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oe6YK-0007Mk-3C for larch@yhetil.org; Thu, 29 Sep 2022 23:19:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oe6Xn-0007MO-HH for emacs-orgmode@gnu.org; Thu, 29 Sep 2022 23:18:32 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:34398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oe6Xl-0007IU-Qo for emacs-orgmode@gnu.org; Thu, 29 Sep 2022 23:18:31 -0400 Received: by mail-pf1-x434.google.com with SMTP id e68so3126238pfe.1 for ; Thu, 29 Sep 2022 20:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=eW8u6WcFy76m+S/jKKgKbyG7KzXRrRY4tfY9Uk8y2sM=; b=UI6vMdvmtMds9UC8f0arQ33I5/71tzwBW1Hzqo2FpryQOWVK3KVJ0W4qdyoX6VHClr B8i6xsMlUbVZJ36UPthwJe70DtfYHPq0s34KFAo7/10PMaUbRLHz+9dwYamuyl1/CpnH +iN91itx3RmtvXmzm0cERuozyYL2YiE9y/S0z9qARgppoUbym/Xjtwl3sEuThQGQnO9W 8qERU8Ycx4/BZZyh1DkVeiAlFSXEMRCdxnI2HWinxxIERfqGfsu0AacFj6bf12ZWNqAy tgnZbYGzwQBmDA0wtUNRItzfyixLx8oU2Ui32rgBRsaJEtE8c787C+feIpfZdG4gUC3x C2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=eW8u6WcFy76m+S/jKKgKbyG7KzXRrRY4tfY9Uk8y2sM=; b=fb62ErX5ztCSr2uYYOa/q8jvV1afkRZpY6mVdgjswda6vdnPJ67DnX65a4iH+y+TBm EoTi18ViruZ6sOqbUAzCDJzT9SpjsE/oDkVMSNU9pfpd8pD1/YowyN9c1i81eLl49D5b KoMRQ1PsxwDH/1poN1GZKIvHMijc0TcF6xvwqWze40QzuG3YsnvWDYu4tXQDkkiFlIcW sY7LYqToVM0kUuyP5HDRu2YiVqOyMVnIm2CK/ATY+gF0V9szh8JWOatryGBHGLOnOj5n g4vDUC6+lTfvDdKv8ua2NckN1oauzqOiIcgq+RaCIYIFbcUHFujVP+kdKQODrULIJgR7 I54Q== X-Gm-Message-State: ACrzQf1BdIPZdDZg8A8K4aGB5cf9SE6Qlds0GCtTTE+dUOV9ssS5+mGj OqgGK4egNhFOdRMgAGLjCM8= X-Google-Smtp-Source: AMsMyM4UyI61mZ+iOk1qoqH2PQ/bvSxQ/wzgHcUIS5XvULvnJkaq05Kzae5RPQpBNSDATloh4LmStg== X-Received: by 2002:a63:e64a:0:b0:439:a99a:47a0 with SMTP id p10-20020a63e64a000000b00439a99a47a0mr5874502pgj.593.1664507907668; Thu, 29 Sep 2022 20:18:27 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id x9-20020aa79409000000b0053e80618a23sm469869pfo.34.2022.09.29.20.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 20:18:26 -0700 (PDT) From: Ihor Radchenko To: "Christopher M. Miles" Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH 2-v1] New: auto display inline images under subtree when `org-cycle'. In-Reply-To: <63353c69.370a0220.67788.e8a1SMTPIN_ADDED_BROKEN@mx.google.com> References: <631d472b.c80a0220.2b4b2.bf86SMTPIN_ADDED_BROKEN@mx.google.com> <87h71ew0m0.fsf@localhost> <631e92ee.050a0220.f9c18.92f5SMTPIN_ADDED_BROKEN@mx.google.com> <87y1uovp9w.fsf@localhost> <631fe1c9.050a0220.3ab2b.3f52SMTPIN_ADDED_BROKEN@mx.google.com> <87bkrhwc42.fsf@localhost> <6322b0a8.050a0220.59bb8.6923SMTPIN_ADDED_BROKEN@mx.google.com> <87y1uluir1.fsf@localhost> <6322f5ad.c80a0220.5e936.823eSMTPIN_ADDED_BROKEN@mx.google.com> <878rmesf64.fsf@localhost> <6329c8b0.050a0220.412d.0a6cSMTPIN_ADDED_BROKEN@mx.google.com> <87tu51xivh.fsf@localhost> <633454e3.050a0220.7278b.1fa5SMTPIN_ADDED_BROKEN@mx.google.com> <87y1u298yn.fsf@localhost> <63353c69.370a0220.67788.e8a1SMTPIN_ADDED_BROKEN@mx.google.com> Date: Fri, 30 Sep 2022 11:19:20 +0800 Message-ID: <87o7ux4khz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=yantar92@gmail.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664507944; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eW8u6WcFy76m+S/jKKgKbyG7KzXRrRY4tfY9Uk8y2sM=; b=LGK+oziiPudrFdMSX3xfGJQSi9Go1KiGs1p9YC5N4tgNntZfVZrPSBeYlaGxCAZM1NmcPZ nCFRYY6eYUyuq2tsz0xcRbfE5HkhmS9Iuj3yJ7cW1eZThcIqaiHVMfKbykAS7ZDpzyX4H1 o0iePzQg7ElX81u03Jzq+a1XEmC2DRqtsnx4HReDBEwKDbQVMVU2UG7Ye+6VG3MbOJG87J pzLtaGsvLkBIWmka6psrmRScrK0Nj6g9VF84Ng5xauygezuMCXrdPjPgstnDDw6jYRA+Cm DxER6tL4IATgGvqqgqGhJ8vqirpAzQqvghHl4jeC+kEcsoBQ9f8s+OvjSCyl8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664507944; a=rsa-sha256; cv=none; b=iBn2YlbyF0fcgETz60FuD5ozJKTqZDm7QjqEsacPcXOnbB33L/3Tf1Z2iYVFH80NAUQ8aK PL3cQkKUfkaFtpC40dGSuFhXNAx5amo2+QKx+95EPzN9YACkfLydewS+em1OCCRFz9SkdM Hdp8y8w5TTgnZy32/EwOuFEHQeL/xrUBJSNdUmrnTn1njPkeqIvbZM59sJTGQlyCF3kphm xX08ww52DUwllE0ir4y901LvQVgm/fovP30ga6VUFddzxGLQ26l1PAK0GKUeGf/WeOEVnX bOvqlpNigT6BDlrhQap8509B4KnQkysSB8Jx0JpT0tUcRAIux9ATylh/oC5J2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UI6vMdvm; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -6.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UI6vMdvm; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: D0B46822D X-Spam-Score: -6.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: f64Wbf2t+s0y "Christopher M. Miles" writes: > Ihor Radchenko writes: > > I got a new problem in patch, the (point-max) in function > ~org-cycle-display-inline-images~ SOMETIMES return EOF error instead of > correct max point value when org-cycle `state' is ~'folded~. I can't > find out what caused this even using Edebug. Do you have any clue? Maybe because the 'folded branch in that function is not wrapped into `save-restriction'? >> You are providing both hook and a customization. It is redundant. Users >> can already remove the hook when desired. > > I mock this style from a very similar existing hook function > ~org-cycle-hide-archived-subtrees~ and custom variable > ~org-cycle-open-archived-trees~. I think removing a hook function from > ~org-cycle-hook~ is a way, but not as convenient as defcustom option. > (P.S: I think users prefer this defcustom customization style.) I see your point. I agree that having a variable is better and also leaves an option to introduce in-buffer setting for this. Let's leave the hook part for now - if we want to alter it, we may need to re-consider all the default hooks. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92