[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: outline-minor-mode and org-mode capabilities for programming languag
From: |
Christopher Dimech |
Subject: |
Re: outline-minor-mode and org-mode capabilities for programming languages |
Date: |
Mon, 10 May 2021 14:32:51 +0200 |
> Sent: Monday, May 10, 2021 at 11:53 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: outline-minor-mode and org-mode capabilities for programming
> languages
>
> * Christopher Dimech <dimech@gmx.com> [2021-05-10 13:28]:
> > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode)
> > (add-hook 'emacs-lisp-mode-hook
> > (lambda ()
> > (outline-minor-mode 1)))
>
> I am not sure why you need to call 2 times, isn't once just enough?
>
> I have tried this:
>
> > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode)
>
> and it works. I try that with this function here, could be
> interesting. It creates new temporary buffers. C-u F5 and I choose the
> favorite mode, and the above hook worked just well.
>
> I think there is no need for second line above.
You are right, have removed the second and do get outline-minor-mode for elisp
files.
> (defvar rcd-temp-buffer-mode-history nil)
>
> (defun rcd-temp-buffer (&optional name mode)
> (interactive "p")
> (let* ((format "*RCD TEMPORARY BUFFER%s%s*")
> (buffer (if name (format format ": " name) (format format "" ""))))
> (switch-to-buffer (generate-new-buffer "*RCD TEMPORARY BUFFER*"))
> (if current-prefix-arg
> (let* ((modes '("adoc-mode" "emacs-lisp-mode" "lisp-mode"
> "markdown-mode"
> "org-mode" "sql-mode" "fundamental-mode" "html-mode"))
> (mode (completing-read "Mode: " modes nil t nil
> 'rcd-temp-buffer-mode-history)))
> (funcall (intern mode)))
> (funcall (intern (or mode "fundamental-mode"))))))
>
> > (highlight-regexp "^;;;;;.*$" 'hi-yellow)
>
> I don't think that is right place to define highlighting. Please first
> verify options of outline-minor-mode-highlight (I did not yet).
>
> > (setq outline-heading-alist
> > '((";; * " . 1) (";; ** " . 2) (";; *** " . 3)) )
> >
> > ((emacs-lisp-mode .
> > ((outline-heading-alist .
> > '( (";; * " . 1)
> > (";; ** " . 2)
> > (";; *** " . 3) ) ))))
> >
> > Still want to ask example code for hon to change the outline-minor-mode
> > keybindings to something else.
>
> I have tried that, does it work on your side? Not on mine, I don't
> know why.
Does not work here either, trying to understand why.
> I have made new prefix: outline-minor-mode-prefix is C-c C-d ""
>
> But TAB works automatically when you set headings.
>
> --
> Jean
>
> Take action in Free Software Foundation campaigns:
> https://www.fsf.org/campaigns
>
> Sign an open letter in support of Richard M. Stallman
> https://stallmansupport.org/
> https://rms-support-letter.github.io/
>
>
>
- Re: outline-minor-mode and org-mode capabilities for programming languages, (continued)
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages,
Christopher Dimech <=
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/10
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/09
- Re: outline-minor-mode and org-mode capabilities for programming languages, Christopher Dimech, 2021/05/09
- Re: outline-minor-mode and org-mode capabilities for programming languages, Jean Louis, 2021/05/09
Re: outline-minor-mode and org-mode capabilities for programming languages, Stefan Monnier, 2021/05/09