From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 7yJkOKK7RV+bNwAA0tVLHw (envelope-from ) for ; Wed, 26 Aug 2020 01:32:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ENCRM6K7RV9rNQAAbx9fmQ (envelope-from ) for ; Wed, 26 Aug 2020 01:32:18 +0000 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 507269404E0 for ; Wed, 26 Aug 2020 01:32:18 +0000 (UTC) Received: from localhost ([::1]:33136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAkIR-0002kd-QG for larch@yhetil.org; Tue, 25 Aug 2020 21:32:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAkI3-0002kW-0v for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 21:31:51 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:54652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAkI0-0001UK-KT for emacs-orgmode@gnu.org; Tue, 25 Aug 2020 21:31:50 -0400 Received: by mail-pj1-x1031.google.com with SMTP id mt12so120365pjb.4 for ; Tue, 25 Aug 2020 18:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=4fLZLe/tCplhnRyTpm0l492GLOHFOtQRIsgfu/lDNk4=; b=i7GEccTZXVsAIdBS6/4xav/WTnFIdqD9rQdTD+taHLzcedtJdV5FrjidYDMJuLSY3F EjqYeOotac41QlQcnnf0MPZZGui906J/PSso6XI7Tg+lvjN2iSJvAHiPmibpWTxj5JPW qaD1WMWyGYlRlRL2zvZionfPluRQe2NkqLbqGpksbjuk4XXQW3KILN86NsEnVOl2mcaK /ZX9KY8QJFjqvpoxBEOT7b0/TkII77obivFgK9tkkCXMAcn3EIV644QAB7klLYJlokyY eXesL+UHS9aAntVTyJTDMDbMXgV62WzQUw1yLowmypZv7xYE+xMeIOBU3OyYlU7aFgo8 KjAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=4fLZLe/tCplhnRyTpm0l492GLOHFOtQRIsgfu/lDNk4=; b=CaCC3JxjHVUQFn8OMk7frgvOZRrB6dy7IPwaL1JoWfykdGR9g58C1yzVye6B4EJUyG fsd5t4SlmxObi/TbGEXi5W2nCso8ecuJxZ5/oWsl4eMrHRnEu7Ylhmrymt5oLfEP+QOT rlMdSKnAsnnzdQIFQE7A1pswT9MbKDJdrG8SQK9aB4qSo2Qa9mPbp1+L04ZnRwfKLXbP 7nzDRBwDB2EYKw/FZmPNy0LeBlMmEYsWPY5Y+Pd7O47d/WFRivR4n/j+fw5yqnXe1Y6t NVDIcAdFS2x8nLv6Rn32HSUzR6TlE/VADiEX/a2dS14U1YtVClx5xoreXwAW4/sCQJes hurQ== X-Gm-Message-State: AOAM532y1MGRlk+xIoJYspxXWrCiIXzNUHMYB29ginmUAws4rjvw+apd QAIR41P1WKPYlUpBaisXTaE= X-Google-Smtp-Source: ABdhPJwuRem963N0Bx3gWiww6vsNHQF9Y3Agcq+hfVJelrPdxj0ZhaKO1ieGlN6ogtEObwyUwgnAOA== X-Received: by 2002:a17:90a:6a05:: with SMTP id t5mr3684527pjj.26.1598405506661; Tue, 25 Aug 2020 18:31:46 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id h193sm362534pgc.42.2020.08.25.18.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 18:31:45 -0700 (PDT) From: Ihor Radchenko To: D , emacs-orgmode@gnu.org Subject: Re: org-forward-heading-same-level and the invisible-ok argument In-Reply-To: References: Date: Wed, 26 Aug 2020 09:30:49 +0800 Message-ID: <87a6yi42ie.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1031.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=i7GEccTZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: Kb8gPTYba2ir > So I thought it is best to ask *why* the >navigation commands take invisibility into account the way they do, >and whether you guys have a suggestion that may be more elegant than >the approach I came up? I guess it is simply because nobody though that the leading stars can be hidden via fontification. I think the whole issue can be fixed by changing the call to org-invisible-p inside org-forward-heading-same-level. org-invisible-p has an optional third argument to ignore text hidden via fontification. You can try to make a patch for org-forward-heading-same-level and similar commands adding that third argument. Best, Ihor D writes: > Hi, > > I am currently thinking about how to have > org-forward-heading-same-level and its sister command work together > with a setting of my minor mode org-superstar-mode. The issue that > arises is that when my mode renders the leading stars of a headline > invisible, org-forward-heading-same-level considers the partially > invisible headlines fully invisible, and hence only works correctly > for single-asterisk headlines. > > The solution I considered is making two interactive commands that > simply call org-forward-heading-same-level with invisible-ok set to t > and overshadow the bindings (C-c C-f and > ). The downside to this is of > course is the intrusive nature of it, and I am concerned about side > effects I may be overlooking. So I thought it is best to ask *why* the > navigation commands take invisibility into account the way they do, > and whether you guys have a suggestion that may be more elegant than > the approach I came up? > > Cheers, > D.