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 EJMQJI2HmWMQZwAAbAwnHQ (envelope-from ) for ; Wed, 14 Dec 2022 09:21:33 +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 aE4gJI2HmWOQsAAA9RJhRA (envelope-from ) for ; Wed, 14 Dec 2022 09:21:33 +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 57E5E3472 for ; Wed, 14 Dec 2022 09:21:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5Mln-0002nB-7p; Wed, 14 Dec 2022 03:05:39 -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 1p5Mle-0002d1-B0 for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 03:05:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5MlZ-0005Ds-28 for emacs-orgmode@gnu.org; Wed, 14 Dec 2022 03:05:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ACB93240029 for ; Wed, 14 Dec 2022 09:05:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671005122; bh=Lpb+F/3atueVj29SHOWmkjfJvihT8K7KMpZaHx8Wv/w=; h=From:To:Cc:Subject:Date:From; b=a5FVoAXLqvpHjjM1X0eH/TgB8nBFBDMwuHJwO/Q8Iy1uVxYcw+VGG0kPARmZr7P7/ wDwHTNu+y1/EAEH/8FTbghH+GdsqkZ1KLu0SAx5iCAnqOF9TlCUn1/VdIobrrH8Nah yiB37eE4DVLK8wUTy8rcAcEleGrTcWv3xdGor932/Ev/96gTcaBtu6shxs+LT+lrX8 RnfIHknnQncJRAVnldPvTsDEamOy/8GkwiKTgMdOVyRZNDH9aVkeKKjaKmrNBr17e7 wf42O5ikWXLkEMtcVnY7r/VrpcH6a94B6hnzvdP7Sa2RMImB1lqSYWcL7ziA6gRyq/ UDxLJHpx0GVaA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NX7Fs0xLLz9rxD; Wed, 14 Dec 2022 09:05:20 +0100 (CET) From: Ihor Radchenko To: Matt Lundin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-mouse.el breaks org-open-at-point In-Reply-To: <87k02v5ls8.fsf@fastmail.fm> References: <87pmcqsjrv.fsf@fastmail.fm> <87r0x6l1qg.fsf@localhost> <87k02v5ls8.fsf@fastmail.fm> Date: Wed, 14 Dec 2022 08:05:19 +0000 Message-ID: <87zgbqqukg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671006093; 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=czEWC7xbuG7GClFCJaDNm0EPV3DxOOySODBG8MK1CqY=; b=aXrN4JPXWcTe7e/yIQjRJBh9j+eQcpGUBGzStxNTFe0QYkcNC3AcnJAbDVjIJ4AH5G9xUG 43qxomWziagvgNYvLRQbxGY5leOHzaDmWcRYYM7ipXWFYGaA4T5dh3zfuTUGuA0sHQZbU0 g9lUrj9rGANxvi5wIn1CDS0zamucgMP306lHhn/b2xm24stOEZ20OUj4DeJzHewLmmYSNC rZ+3mPalDlLaxSEYCBZU1/r1jPatKpMVtJbUUzLBwrGyEEWDLN0h8fEKKOG0vXbYNIDiOo n8XlbkNrEwipznoL1FhCxztXAi7ODWpIPi+OghiLdtf/X4FwiHVe2d4EDY7NLQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=a5FVoAXL; 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-Seal: i=1; s=key1; d=yhetil.org; t=1671006093; a=rsa-sha256; cv=none; b=qGlpxIivTWQX7SFuqseJmazWr0xMzdBts7+Vo+lNj4A+84eeLRu7HMLtF8ZzEPJ0Eogih8 FCU62iySJBSR1wtoZZJHIqMluNA2tlhGpeZmfwMBhby1Auvhg0vcceFwedeGRNvw4qemtH UBbGvjy23raXE0IUQf062PEJ+FcnUFvmeY7sz64fTNAHSHLROVtoQL7EhMAFTobkx5RVcW w+aDG/wRxMOSjcZ3gqyYm75lGMxq54+5rv3YdQ1O31VGTtx2+sWVIpMghsTGWLj3RLUe68 aYJtH1C2io+PHGhPxfMjBlEQ9IUOZrfMCCArU+hrdMwcb7BYXNsoxPlvlxgPWQ== X-Migadu-Spam-Score: -4.37 X-Spam-Score: -4.37 X-Migadu-Queue-Id: 57E5E3472 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=a5FVoAXL; 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-TUID: tFUluDDEUZad Matt Lundin writes: >> Patches welcome! >> >> I think we need to modify `org-open-at-mouse' directly instead of >> using advice. > > I can give this a try. > > The advice in org-mouse.el currently does the following: > > - cycles when on headline > - toggles checkbox when on checkbox > - cycles plain lists when on a list item > > Would it make any sense to make this part of the default behavior or > org-open-at-mouse? Not really. These advised extras do not really belong to "opening" links. We usually use "action" (C-c C-c) for toggling staff and "cycling" (TAB) to cycle staff. It's just that "clicking" falls into "open" paradigm in Emacs, but users also expect "toggle" and "switch state" as in other applications. > If not, I think I can make it dependent on the value of > org-mouse-features, thus giving user the option of turning off the extra > mouse click behavior via that variable (as a workaround to avoid > undesired side effects of calling interactive help). This would be a > temporary workaround until the org-mouse is converted to a global minor > mode. I think we can do the following: 1. Introduce new `org-open-at-mouse-first-hook' hook that will be run by `org-open-at-mouse' before calling `org-open-at-point'. 2. Introduce `org-mouse-features' as you suggested. 3. Make org-mouse.el add appropriate hooks into `org-open-at-mouse-first-hook' according to the value of `org-mouse-features'. The default should keep the current behaviour for `org-open-at-mouse'. 4. The new variables are to be documented in etc/ORG-NEWS 5. Ideally, we can convert org-mouse.el to global minor mode immediately and turn it on when org-mouse.el is loaded. Then, moving to side effect-free loading will be simply a question of removing a single statement from org-mouse.el. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at