* bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md`
@ 2024-09-28 13:33 tfed--- via Users list for the GNU Emacs text editor
2024-09-28 14:21 ` tfed--- via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 4+ messages in thread
From: tfed--- via Users list for the GNU Emacs text editor @ 2024-09-28 13:33 UTC (permalink / raw)
To: Help Gnu Emacs
Mistook all files that are including `md` two characters in the path,
as a markdown files.
foo.py = opens in python-mode
cmd.py, cmds.py = opened within markdown-mode
--
Sent with Tuta; enjoy secure & ad-free emails:
https://tuta.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md`
2024-09-28 13:33 bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md` tfed--- via Users list for the GNU Emacs text editor
@ 2024-09-28 14:21 ` tfed--- via Users list for the GNU Emacs text editor
2024-09-28 16:44 ` Yuri Khan
2024-09-29 7:13 ` tfed--- via Users list for the GNU Emacs text editor
0 siblings, 2 replies; 4+ messages in thread
From: tfed--- via Users list for the GNU Emacs text editor @ 2024-09-28 14:21 UTC (permalink / raw)
To: Help Gnu Emacs
Nope, it was my mistake...
I've added this extra code into my `.emacs` config:
```el
;; My Extra Code
;; Markdown Mode
(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(setq auto-mode-alist
(cons '("\.md" . markdown-mode) auto-mode-alist))
```
--
Sent with Tuta; enjoy secure & ad-free emails:
https://tuta.com
Sep 28, 2024, 15:33 by tfed@tutamail.com:
> Mistook all files that are including `md` two characters in the path,
> as a markdown files.
>
> foo.py = opens in python-mode
> cmd.py, cmds.py = opened within markdown-mode
>
> --
> Sent with Tuta; enjoy secure & ad-free emails:
> https://tuta.com
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md`
2024-09-28 14:21 ` tfed--- via Users list for the GNU Emacs text editor
@ 2024-09-28 16:44 ` Yuri Khan
2024-09-29 7:13 ` tfed--- via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 4+ messages in thread
From: Yuri Khan @ 2024-09-28 16:44 UTC (permalink / raw)
To: tfed; +Cc: Help Gnu Emacs
On Sat, 28 Sept 2024 at 23:27, tfed--- via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> 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 ‘md’ anywhere in the name, rather than those ending with
the literal ‘.md’.
(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))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md`
2024-09-28 14:21 ` tfed--- via Users list for the GNU Emacs text editor
2024-09-28 16:44 ` Yuri Khan
@ 2024-09-29 7:13 ` tfed--- via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 4+ messages in thread
From: tfed--- via Users list for the GNU Emacs text editor @ 2024-09-29 7:13 UTC (permalink / raw)
To: Help Gnu Emacs
<3 Yup, it works, thanks a lot <3
--
Sent with Tuta; enjoy secure & ad-free emails:
https://tuta.com
Sep 28, 2024, 16:21 by tfed@tutamail.com:
> Nope, it was my mistake...
> I've added this extra code into my `.emacs` config:
>
> ```el
> ;; My Extra Code
>
> ;; Markdown Mode
> (autoload 'markdown-mode "markdown-mode.el"
> "Major mode for editing Markdown files" t)
> (setq auto-mode-alist
> (cons '("\.md" . markdown-mode) auto-mode-alist))
> ```
>
> --
> Sent with Tuta; enjoy secure & ad-free emails:
> https://tuta.com
>
>
> Sep 28, 2024, 15:33 by tfed@tutamail.com:
>
>> Mistook all files that are including `md` two characters in the path,
>> as a markdown files.
>>
>> foo.py = opens in python-mode
>> cmd.py, cmds.py = opened within markdown-mode
>>
>> --
>> Sent with Tuta; enjoy secure & ad-free emails:
>> https://tuta.com
>>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-29 7:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-28 13:33 bug#73530: GNU Emacs 29.4; Opens scripts in Markdown Mode, if the path mentions `md` tfed--- via Users list for the GNU Emacs text editor
2024-09-28 14:21 ` tfed--- via Users list for the GNU Emacs text editor
2024-09-28 16:44 ` Yuri Khan
2024-09-29 7:13 ` tfed--- via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.