From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md` Date: Sat, 28 Sep 2024 23:44:39 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4002"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: tfed@tutamail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 28 18:45:29 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1suaZV-0000sX-8c for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 28 Sep 2024 18:45:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suaYz-0000ti-Kd; Sat, 28 Sep 2024 12:44:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suaYw-0000tV-Qj for help-gnu-emacs@gnu.org; Sat, 28 Sep 2024 12:44:54 -0400 Original-Received: from mail-vs1-xe2e.google.com ([2607:f8b0:4864:20::e2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1suaYu-0007rZ-Mn for help-gnu-emacs@gnu.org; Sat, 28 Sep 2024 12:44:54 -0400 Original-Received: by mail-vs1-xe2e.google.com with SMTP id ada2fe7eead31-4a39e7b38e1so667107137.2 for ; Sat, 28 Sep 2024 09:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727541890; x=1728146690; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dEEubUlIS0iNVseC9XkTMfTnpUe5tKMo/VYuD4/gVos=; b=Y3dmyT6t+GLFGlkXMP5/yS0WNnVV8ZR8sFn+mpPDsntAx/bZ4KXeRop9+zFdX62l8j g6FpfbrxTGmyW5wLFQTwzqIuF3Qre5FI4vvK5o2M4YZ3Tz5rha2iebNTvFyQivoNTs4J ZBvSs08tAxUQ2lpR/pW6lf+9CaLmNgxSzD6COg37rcU24WsFn7H+GoxCoAdXLWPtAOoq +FOGwv6K82tSNkOPrMPkbb4MO08l7M/E0DWogTLNmVXkepBh+yVn7fBwbM53/6ldyiGz NhxZkGn2x9VEqMNDY0yaNVH6991I8HN2XTm8vdt8nKqnXjCYIlRaWNUivTIAp+n7vrTO JFiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727541890; x=1728146690; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dEEubUlIS0iNVseC9XkTMfTnpUe5tKMo/VYuD4/gVos=; b=Pz63v6ZtZiwiqgU/LcWXdmX1Abed3UQDEnM63nheOJDo9mBC4zpkd+gmRrS5eOEVh3 XIaYwPLQg2uOT1WfxV6SxedNzogcOHnKalBMVdps9ruP3BiVXw5LxaSAY5EbYjGApiWq q0Q0Yvvfbrk0yUW4xtx16+nozO0UvKwXmUNTvy5boScJw86dXAyT5V9+ABdiR6XQbrWk vPcL/x/G/9pkC9s8tIMGSDJyXxw07zc4o54fh6oPaH0F0GMHijLTmmDt926YiDkVS00d vYL5owB3rNCWJBLYK0CK1NXizl1a8xFgZl4jXkwDgIUUSsmLnbE6uSzads2inKl2G2LK 0fgw== X-Gm-Message-State: AOJu0YwY+vKiE1r2JWi1sA282jNBj8eEeipWznl5nte9XxB9fKEtPpu6 bU9WTF4r5KdR9IdTIjC32F3HHWVqPd7oIAE3pfNMwAwYes//wSv0F3DPyOGoz3LFdx+z9aC6eiZ f/7vyhHDJIAIruxE8aVLXMwxbUnawTp3QCh0= X-Google-Smtp-Source: AGHT+IEbKuMdVwS2hhDu5NNy9yZUCZxAkqThTjd09Kh9wNOlj3N0Yx2wDpmshbvsr0WgTPHWr1Wy3+JpDAqtFpLj5Yk= X-Received: by 2002:a05:6102:3f4c:b0:49d:433b:a5f9 with SMTP id ada2fe7eead31-4a2c579c556mr5868634137.0.1727541890339; Sat, 28 Sep 2024 09:44:50 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e2e; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148089 Archived-At: On Sat, 28 Sept 2024 at 23:27, tfed--- via Users list for the GNU Emacs text editor wrote: > > Nope, it was my mistake... > > I've added this extra code into my `.emacs` config: > > (setq auto-mode-alist > (cons '("\.md" . markdown-mode) auto-mode-alist)) Yeah, you forgot to (1) double-escape the dot (one backslash for regex syntax, another for string literal syntax), and (2) anchor to the end of file name. So your regex matches any files that have any character followed by =E2=80=98md=E2=80=99 anywhere in the name, rather than those en= ding with the literal =E2=80=98.md=E2=80=99. (setq auto-mode-alist (cons '("\\.md\\'" . markdown-mode) auto-mode-alist)) Also that can be shortened to: (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))