unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Heime <heimeborgia@protonmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Making Menu Bar with an About Buffer
Date: Fri, 21 Oct 2022 00:09:57 +0300	[thread overview]
Message-ID: <Y1G5JWDlZUpHKiHe@protected.localdomain> (raw)
In-Reply-To: <lDXZHrIj5RWYDo5xCN9YPqR9BCCKqxx17HHv9Et_R6-PDZ_VJ423i_DFXp5U01Kdik-ca23uP7Yv4xWvlNnt7cXtghLL96D00mtcrDQXvVw=@protonmail.com>

* Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-10-17 00:38]:
> Have seen that Emacs has "About Emacs" and "About Gnu". I would like to do the same with a new "Menu Bar"
> called "Gundit" where there is "About Gundit" which prints about Gundit in a dedicated buffer.
> 
> How can this be done?

You define function and add it to menu.

My function below uses about: hyperlinks, it decides what to display.

I have defined "about:" hyperlink in `browse-url-handlers' to be:

   '(("gemini:" . elpher-go)
     ("gopher:" . elpher-handler-go)
     ("about:" . hyperscope-about)
     ("hyperscope:" . hyperscope-go)
     ("e2dk://" . amule-handler)))


Then this function is showing About, it has Hyperlinks underline where
it says about:

(defun hyperscope-about (&rest what)
  (interactive)
  (let* ((what (if (eql 'cons (type-of what))
		   (car what)
		 what))
	 (what (if (null what) "about:hyperscope" what)))
    (cond ((string= what "about:hyperscope") (hyperscope-text-view "
	 ===================================================
	 Hyperscope - Dynamic Knowledge Repository for Emacs
	 ===================================================
                           about:emacs
                           about:emacs-fancy
                           about:hyperscope
"))
	  ((string= what "about:emacs") (about-emacs))
	  ((string= what "about:emacs-fancy") (fancy-about-screen))
	  (t (hyperscope-text-view "Maybe you wish to read about:hyperscope")))))


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



  reply	other threads:[~2022-10-20 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 21:36 Making Menu Bar with an About Buffer Heime via Users list for the GNU Emacs text editor
2022-10-20 21:09 ` Jean Louis [this message]
2022-10-21  3:05   ` Emanuel Berg
2022-10-22 14:05     ` Dr Rainer Woitok
2022-10-24  2:54       ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1G5JWDlZUpHKiHe@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).