From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Adding hypertlink buttons Date: Tue, 30 Oct 2018 12:44:06 +0700 Message-ID: References: <9da059a8-fc31-4fc2-bd3d-ebe727526dbe@googlegroups.com> <395a5039-1efe-4b06-a77f-e2e98b099983@googlegroups.com> <7527e6ac-383a-4a19-b706-ff1ecd72c227@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540878182 19015 195.159.176.226 (30 Oct 2018 05:43:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 05:43:02 +0000 (UTC) Cc: help-gnu-emacs To: Davin Pearson Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 06:42:57 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHMnp-0004q0-QS for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Oct 2018 06:42:57 +0100 Original-Received: from localhost ([::1]:50935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHMpw-0001rb-6e for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Oct 2018 01:45:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHMpF-0001q6-Ql for help-gnu-emacs@gnu.org; Tue, 30 Oct 2018 01:44:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHMpB-0005vs-Io for help-gnu-emacs@gnu.org; Tue, 30 Oct 2018 01:44:23 -0400 Original-Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:46359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHMpA-0005tm-G9 for help-gnu-emacs@gnu.org; Tue, 30 Oct 2018 01:44:21 -0400 Original-Received: by mail-oi1-x22b.google.com with SMTP id k64-v6so9316727oia.13 for ; Mon, 29 Oct 2018 22:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0RuPxVOlQipQ1ROMy4m5eeHZqqoaiKg6IdXFCWHEse8=; b=i1pVhR6Yef2fr0v+pHuuWZqzyjgMW6Gy/33KKjUts1QO8/BIHamHiEgD6Ud9NVnOFJ 6esA51uX20YaTpD9auLDAl3iqpBrq81UzkiSxAPgWN7uYGtiQT90jpGA7qogTn+wjBgO N1RGptChYGrKQoy+nwcJsN/ZbBz9SsITvzn++vzgOw3Teo1/ZKWUBu8eA1SjPiq4DzDl Xoo5FGwGvV9dPGnX6dbHQpkfrVmsLYja5h1c6K2GQFhUNCSZXx2FWWrK7BNQvCkXYBas iovkcSn5zKY0KYixU568qt1oAi/Ur1aed0o5kq2msm0MJBC0kTRz6yScjBV2e/nFPrGI K1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0RuPxVOlQipQ1ROMy4m5eeHZqqoaiKg6IdXFCWHEse8=; b=aAPZMkFvtesQovk9Bgnqth+gYv/DkRLRpOBB8xTO4Xj2GXAAW6j9qAi3gS2aScVDpf XzfVGCFSiELebtf9qbVl/90hgLz8BX7By9sti22gaWwZ/qHxI5lu1G6VTNT0sGIObb3/ hPZvV3wraQ9vM85+NdT/0aPLt6uxRoyDqvJGkyXcVTqd7Z9usdZpcnyHBGq/wwA9iyJA dw2bpTBNfIs7Byg7WEmNt2+QosJXqed4h+o1xHe+V2/dc1Jn9n3O9ZlUiPdEC2tdo41K cQUn4c8nBZbEQ/KKCSKvkaO4GUMomOhU1VVlLTiW51N1iazaj/KydI5mmqzO6GjvlOKl bq6A== X-Gm-Message-State: AGRZ1gKkYGr3KdkrvXH0UpXld0X/RHtDSKdjwuhSrzfmbji6klaWFHas GDC9KFu2wlgNim/IdP/CX4FfSHmYtimGQ6u+swk= X-Google-Smtp-Source: AJdET5fBB1VsQ09ZK25LZ7CAzd9wvjMF2YE07dHmgRCbhKIZ/n+Y1E4E4uQAsxdqlGxW5kRDS2ssRKpIqfhHO83I57w= X-Received: by 2002:aca:5e83:: with SMTP id s125-v6mr9659532oib.134.1540878257692; Mon, 29 Oct 2018 22:44:17 -0700 (PDT) In-Reply-To: <7527e6ac-383a-4a19-b706-ff1ecd72c227@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118495 Archived-At: On Tue, Oct 30, 2018 at 10:40 AM Davin Pearson wr= ote: > When I execute the following command > > (display-splash-screen nil) > > It comes up with a screen of hyperlinks. By default Emacs > shows the splash screen with an extra image and a hyperlink button > that takes your Web browser to gnu.org, although I have turned > this feature off and I cannot remember what command to use to > re-enable a fancy splash screen. > > It seems that font lock should be used to add a hyperlink to > your Elisp code. Since you know what function does what you want, and you approximately know the thing to look for, what is stopping you from reading the code of that function looking for that thing? Specifically, the buffer text of the startup screen is built by function =E2=80=98fancy-splash-insert=E2=80=99 in startup.el, from data in = variable =E2=80=98fancy-startup-text=E2=80=99 in the same file. What it=E2=80=99s doing is invoke =E2=80=98insert-button=E2=80=99, with the= property 'face specifying 'link (in addition to the current face), 'help-echo setting a description string displayed in the echo area when point is within the button, 'follow-link to make it clickable with the mouse, and 'action specifying a lambda function that invokes =E2=80=98browse-url=E2=80= =99 with the appropriate link address. You could create a button with its 'action set to a function that does something else, such as visiting a specific file and moving point to a specific position.