From: Christopher Dimech <dimech@gmx.com>
To: Jean Louis <bugs@gnu.support>
Cc: help-gnu-emacs@gnu.org
Subject: Re: outline-minor-mode and org-mode capabilities for programming languages
Date: Mon, 10 May 2021 14:32:51 +0200 [thread overview]
Message-ID: <trinity-0dc79f19-7c48-4cb1-96c4-d3be02a5aa8a-1620649971213@3c-app-mailcom-bs03> (raw)
In-Reply-To: <YJkez9qIF1H2LQwf@protected.localdomain>
> 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 "\x03\x04"
>
> 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/
>
>
>
next prev parent reply other threads:[~2021-05-10 12:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-09 8:53 outline-minor-mode and org-mode capabilities for programming languages Christopher Dimech
2021-05-09 9:11 ` Jean Louis
2021-05-09 12:35 ` Christopher Dimech
2021-05-09 12:45 ` Jean Louis
2021-05-09 13:00 ` Christopher Dimech
2021-05-09 16:27 ` Jean Louis
2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-09 17:50 ` Jean Louis
2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-09 19:09 ` Jean Louis
2021-05-10 1:49 ` Christopher Dimech
2021-05-10 6:22 ` Jean Louis
2021-05-10 6:53 ` Christopher Dimech
2021-05-10 7:32 ` Jean Louis
2021-05-10 8:32 ` Christopher Dimech
2021-05-10 9:29 ` Christopher Dimech
2021-05-10 9:31 ` Jean Louis
2021-05-10 10:01 ` Christopher Dimech
2021-05-10 11:43 ` Jean Louis
2021-05-10 12:52 ` Christopher Dimech
2021-05-10 17:05 ` Jean Louis
2021-05-11 2:00 ` Christopher Dimech
2021-05-10 10:27 ` Christopher Dimech
2021-05-10 11:53 ` Jean Louis
2021-05-10 12:32 ` Christopher Dimech [this message]
2021-05-10 16:07 ` Jean Louis
2021-05-11 2:26 ` Christopher Dimech
2021-05-10 8:46 ` Christopher Dimech
2021-05-10 9:15 ` Christopher Dimech
2021-05-10 9:33 ` Jean Louis
2021-05-10 6:08 ` Christopher Dimech
2021-05-10 1:25 ` Christopher Dimech
2021-05-09 13:02 ` Christopher Dimech
2021-05-09 16:34 ` Jean Louis
2021-05-09 14:02 ` Stefan Monnier via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-0dc79f19-7c48-4cb1-96c4-d3be02a5aa8a-1620649971213@3c-app-mailcom-bs03 \
--to=dimech@gmx.com \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).