From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wA9eMfQbJmDQVAAA0tVLHw (envelope-from ) for ; Fri, 12 Feb 2021 06:11:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ULsXLfQbJmDWEgAAB5/wlQ (envelope-from ) for ; Fri, 12 Feb 2021 06:11:00 +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 5A5E29403D2 for ; Fri, 12 Feb 2021 06:11:00 +0000 (UTC) Received: from localhost ([::1]:40806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lARfP-0008R9-CU for larch@yhetil.org; Fri, 12 Feb 2021 01:10:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAReV-0008Qy-BR for Emacs-orgmode@gnu.org; Fri, 12 Feb 2021 01:10:04 -0500 Received: from out0.migadu.com ([94.23.1.103]:40103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAReS-0003uk-V9 for Emacs-orgmode@gnu.org; Fri, 12 Feb 2021 01:10:03 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1613110197; h=from:from: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; bh=9CWQ6bBl78gGxW6nyHVBdz/JRVDTorUA4ZAodnOPipg=; b=YQDi+xBFTQrCUiITQW9TgjBV6oMPa2JcsBJ3/qN3UVpnlKwGvCvJDyO+ujZbsQmg86fTul lV8N0BOvJrftKri024Hs+kelKIyxpj1/bTPuNqTJYpqex5XNKs7dFcy4FkmQrL23eAhqwQ K6sMfZf0h8fl1Mpblid/7iua+UBFfGueP44Q5ei+IigfhhSRo3RpGjvtWJBIaW/sbvmUcu a39eWZf7l+ghYnCdqA6M0LGKTSpnbMDjpdtVp63486jlL/XxASQNJd+h7WbaxDu40Dmat4 LepqgghodmQWzM5egaMGcKPQrlnN/ihslgPUcSAlALCBM0mnDchnBVNhGtogvQ== From: Kyle Meyer To: arozbiz@gmail.com Subject: Re: How to open ID links in a new window? In-Reply-To: References: Date: Fri, 12 Feb 2021 01:09:55 -0500 Message-ID: <87blcp95qk.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=94.23.1.103; envelope-from=kyle@kyleam.com; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=YQDi+xBF; dmarc=none; 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-Migadu-Queue-Id: 5A5E29403D2 X-Spam-Score: -1.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: fzHF2QdkS6zp arozbiz@gmail.com writes: > I would like to open ID links [[id:...]] in a new window. I can make file > links [[file:...]] open in a new window by running (add-to-list > 'org-link-frame-setup '(file . find-file-other-window)), but this doesn't > seem to affect the behavior of ID links. Here's the full definition of org-id-open: (defun org-id-open (id _) "Go to the entry with id ID." (org-mark-ring-push) (let ((m (org-id-find id 'marker)) cmd) (unless m (error "Cannot find entry with ID \"%s\"" id)) ;; Use a buffer-switching command in analogy to finding files (setq cmd (or (cdr (assq <1> (cdr (assq 'file org-link-frame-setup)) '((find-file . switch-to-buffer) (find-file-other-window . switch-to-buffer-other-window) (find-file-other-frame . switch-to-buffer-other-frame)))) 'switch-to-buffer-other-window)) <2> (if (not (equal (current-buffer) (marker-buffer m))) (funcall cmd (marker-buffer m))) (goto-char m) (move-marker m nil) (org-show-context))) So org-id-open does look at org-link-frame-setup (<1>), though that's only in effect when the target isn't in the current buffer (<2>). Are you observing the behavior you describe when the target is in another buffer?