unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* TODO: Major modes should have a menu entry
@ 2022-06-29  6:48 binarydigitz01 via Emacs development discussions.
  2022-06-29 10:25 ` binarydigitz01 via Emacs development discussions.
  0 siblings, 1 reply; 5+ messages in thread
From: binarydigitz01 via Emacs development discussions. @ 2022-06-29  6:48 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]

Hi Everyone!
This is going to be my first contribution to emacs! I would like to do this task, wanted to ask for advice on how to start on this.

[-- Attachment #2: Type: text/html, Size: 591 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* TODO: Major modes should have a menu entry
  2022-06-29  6:48 TODO: Major modes should have a menu entry binarydigitz01 via Emacs development discussions.
@ 2022-06-29 10:25 ` binarydigitz01 via Emacs development discussions.
  2022-06-29 13:20   ` Jean Louis
  0 siblings, 1 reply; 5+ messages in thread
From: binarydigitz01 via Emacs development discussions. @ 2022-06-29 10:25 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Hi Everyone!
This is going to be my first contribution to emacs! I would like to do the "Major modesh should have a menu entry" task, wanted to ask for advice on how to start on this.

------- Original Message -------
On Wednesday, June 29th, 2022 at 12:18, binarydigitz01 <binarydigitz01@proton.me> wrote:

> Hi Everyone!
> This is going to be my first contribution to emacs! I would like to do this task, wanted to ask for advice on how to start on this.

[-- Attachment #2: Type: text/html, Size: 1210 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TODO: Major modes should have a menu entry
  2022-06-29 10:25 ` binarydigitz01 via Emacs development discussions.
@ 2022-06-29 13:20   ` Jean Louis
       [not found]     ` <23kuBCiAL_iJkF9eImYTZYAvr0OrQGfgawBYLn3lcm2rwm0CqlFJPcGs_n9PAJccHlKcs8DL52VP9UmUNjyZJUFXpD3PgIyLja7JUN8iarg=@proton.me>
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Louis @ 2022-06-29 13:20 UTC (permalink / raw)
  To: binarydigitz01; +Cc: emacs-devel@gnu.org

* binarydigitz01 via "Emacs development discussions. <emacs-devel@gnu.org> [2022-06-29 14:12]:
> Hi Everyone!
> This is going to be my first contribution to emacs! I would like to
> do the "Major modesh should have a menu entry" task, wanted to ask
> for advice on how to start on this.

In general major modes are automatically selected. 

To learn how to make menus, you may read or evaluate following
expression: (info "(elisp) Easy Menu")

Here is example on my side for Website Revision System:

(easy-menu-define wrs-menu global-map "Website Revision System Menu"
  (list "WRS"
	["Areas of Website Revision System" wrs-areas t]
	["Search pages" wrs-db-search-pages t]
	["Full text search" wrs-db-full-text-search t]
	["Add category" wrs-add-category t]
	["Manage related pages" wrs-related-pages-management t]
	["WRS Templates" wrs-templates-list t]
	["Generate tag clouds" wrs-tag-cloud-for-missing-ogimage t]
	["Publish region as Emacs Lisp function" wrs-publish-emacs-lisp-function t]
	["Publish WWW area" wrs-publish-area t]))


-- 
Jean

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

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TODO: Major modes should have a menu entry
       [not found]     ` <23kuBCiAL_iJkF9eImYTZYAvr0OrQGfgawBYLn3lcm2rwm0CqlFJPcGs_n9PAJccHlKcs8DL52VP9UmUNjyZJUFXpD3PgIyLja7JUN8iarg=@proton.me>
@ 2022-07-01  6:10       ` Jean Louis
  2022-07-01 12:19         ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Louis @ 2022-07-01  6:10 UTC (permalink / raw)
  To: binarydigitz01; +Cc: emacs-devel

* binarydigitz01 <binarydigitz01@proton.me> [2022-06-29 20:07]:
> Thanks for the reply! I was taking a look, and it seems that
> there are a lot of major modes in emacs, do we have to put them all
> in a menu, or are there any specific ones? etc/TODO doesn't mention
> any details.

Hello,

I propose to you to ask for feedback from people if that is really
necessary and needed and wanted.

Do you find that need from observing how other editors do it?

What makes you personally need that?

Personally, I do not have a need for the menu.

The way I choose major modes is just by letting Emacs decide it for
me when opening a file.

Issue that I have encountered is that when opening a string instead of
a file or string stored in the database, then it becomes difficult for
Emacs to recognize which major mode should be such. In that case I may
be editing HTML with CSS, but text-mode is chosen automatically.

The way how I solved this issue is that for those pieces of text in
the database which have their markup like Markdown, Org, Asciidoctor,
etc. I have a major mode tied to the markup type. So if I open string
of Markdown, then markup type tells to Emacs which major mode and
minor modes to turn on.

There are some strings where I do not have direct relation of string
to markup, so in that case I plan in future to have separate table of
attributes where specific table, specific column, including specific
ID number has specific major mode. 

Recommended reading: (info "(emacs) Major Modes")

-- 
Jean

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

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TODO: Major modes should have a menu entry
  2022-07-01  6:10       ` Jean Louis
@ 2022-07-01 12:19         ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2022-07-01 12:19 UTC (permalink / raw)
  To: binarydigitz01; +Cc: emacs-devel

>> Thanks for the reply! I was taking a look, and it seems that
>> there are a lot of major modes in emacs, do we have to put them all
>> in a menu, or are there any specific ones? etc/TODO doesn't mention
>> any details.

IIUC the bullet point copied in the `Subject:` does not refer to a menu
holding all the major modes, but to the fact that each major mode
should come with its own menu (only visible in those buffers that use
that major mode).

This is already the case for many major modes, but not for all.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-01 12:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29  6:48 TODO: Major modes should have a menu entry binarydigitz01 via Emacs development discussions.
2022-06-29 10:25 ` binarydigitz01 via Emacs development discussions.
2022-06-29 13:20   ` Jean Louis
     [not found]     ` <23kuBCiAL_iJkF9eImYTZYAvr0OrQGfgawBYLn3lcm2rwm0CqlFJPcGs_n9PAJccHlKcs8DL52VP9UmUNjyZJUFXpD3PgIyLja7JUN8iarg=@proton.me>
2022-07-01  6:10       ` Jean Louis
2022-07-01 12:19         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).