From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: TODO: Major modes should have a menu entry Date: Fri, 1 Jul 2022 09:10:44 +0300 Message-ID: References: <5ZOxeerwRS0tyvqmHvGkA5vwknWEua5H2CaxVvk6N5lx0ka58WGkVTt3ifPi106-M0xE7wAE0z7Pq2vs82OWbvql1HSJSSnbNrwX6Ohif1M=@proton.me> <23kuBCiAL_iJkF9eImYTZYAvr0OrQGfgawBYLn3lcm2rwm0CqlFJPcGs_n9PAJccHlKcs8DL52VP9UmUNjyZJUFXpD3PgIyLja7JUN8iarg=@proton.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-05-21) Cc: emacs-devel@gnu.org To: binarydigitz01 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 01 09:06:19 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7AjK-000A8Y-PA for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Jul 2022 09:06:18 +0200 Original-Received: from localhost ([::1]:53608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7AjJ-0006Tg-0N for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Jul 2022 03:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7AiW-0005j5-Vv for emacs-devel@gnu.org; Fri, 01 Jul 2022 03:05:29 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:56679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7AiV-0005ov-1n for emacs-devel@gnu.org; Fri, 01 Jul 2022 03:05:28 -0400 Original-Received: from localhost ([::ffff:154.230.66.106]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000087C4C.0000000062BE9CB3.00005C42; Fri, 01 Jul 2022 00:05:23 -0700 Mail-Followup-To: binarydigitz01 , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <23kuBCiAL_iJkF9eImYTZYAvr0OrQGfgawBYLn3lcm2rwm0CqlFJPcGs_n9PAJccHlKcs8DL52VP9UmUNjyZJUFXpD3PgIyLja7JUN8iarg=@proton.me> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291765 Archived-At: * binarydigitz01 [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/