unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: znavko@disroot.org
To: "zimoun" <zimon.toutoune@gmail.com>, "help-guix" <help-guix@gnu.org>
Subject: Re: How to configure emacs for editing config.scm again?
Date: Fri, 01 Jan 2021 21:36:18 +0000	[thread overview]
Message-ID: <41e44e604d2cadd692064399d56195a3@disroot.org> (raw)
In-Reply-To: <86mtylhez4.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2498 bytes --]

Hi! guile-studio has two windows with guile command-line shell, 
that is too much for my tiny wish.

I finally made config with two things I wished:
1) auto parentheses completion
2) highlight parentheses.

When the first task was not so difficult, as instructions here 
were exact:
https://www.emacswiki.org/emacs/ParEdit

For guix I installed emacs-paredit:

# guix install emacs-paredit

and added some lines into /root/.emacs

(Want to note that my /root/.emacs.d/init.el did not do
any sense I do not know its features in guix, need always 
to use ~/.emacs)

Then the solution of the second task laid through 
ugly page, where everything not works at all!!
https://www.emacswiki.org/emacs/HighlightParentheses

"highlight-parentheses is part of ELPA that goes with
emacs out of the box since 24-th version" said there.
Not works with the error that highlight-parentheses-mode is unknown.

Also I downloaded highlight-parentheses.el from the link on that page 
and tried to include it into .emacs. "Not for you in this life!" was the
true main idea of all those recommendations.

But in happy end I found "Show Paren Mode":
https://www.emacswiki.org/emacs/ShowParenMode
that works nice with only lines in my .emacs and also some color editing.

I attach my .emacs
# cp ~/.emacs /home/bob/znavko-.emacs

This line:

(setq show-paren-style 'expression)

highlights the whole expression with grey color:

(set-face-background 'show-paren-match "#efefef")

I do that just for editing my system's config.scm
for experiments with sudo. 
I'd wish "Perfect Installation" section
in the Guix Manual includes more about emacs config.

Thanks.


December 10, 2020 3:19 PM, "zimoun" <zimon.toutoune@gmail.com> wrote:

> Hi,
> 
> On Thu, 03 Dec 2020 at 18:55, znavko@disroot.org wrote:
> 
>> I want emacs brushes my code making indents and auto-completing it closing parentheses.
>> It does not do nothing now. Only highlights it.
>> 
>> Could you please tell how to force emacs work deeply with my code :)
>> for it becomes wonderful for further copy-pasting here in Guix Help :)) ??
> 
> Maybe you could give a look at the experimental package guile-studio.
> Maybe it is the kind of out-of-the-box setup you want. I do not know.
> 
> I am not convinced that a copy/pasting Emacs setup is the right
> direction, since the Emacs philosophy is the very opposite: make the
> tool corresponding to your own needs.
> 
> HTH,
> simon

[-- Attachment #2: znavko-emacs-show-paren-mode.jpg --]
[-- Type: image/jpeg, Size: 186508 bytes --]

[-- Attachment #3: znavko-.emacs --]
[-- Type: application/octet-stream, Size: 828 bytes --]

     (setq inhibit-startup-screen t)

;(show-paren-mode t) ;; enable show paren mode

;(setq show-paren-style 'expression) ;; highlight whole expression

    (show-paren-mode 1)
    (setq show-paren-delay 0)
    (setq show-paren-style 'expression)

    (require 'paren)
    (set-face-background 'show-paren-match "#efefef")



    (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
    (add-hook 'emacs-lisp-mode-hook       #'enable-paredit-mode)
    (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
    (add-hook 'ielm-mode-hook             #'enable-paredit-mode)
    (add-hook 'lisp-mode-hook             #'enable-paredit-mode)
    (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
    (add-hook 'scheme-mode-hook           #'enable-paredit-mode)



      parent reply	other threads:[~2021-01-01 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 13:16 How to configure emacs for editing config.scm again? znavko--- via
2020-11-29 21:36 ` zimoun
2020-12-03 18:55 ` znavko
2020-12-03 19:40   ` Jérémy Korwin-Zmijowski
2020-12-10 15:12   ` zimoun
2021-01-01 21:36   ` znavko [this message]

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41e44e604d2cadd692064399d56195a3@disroot.org \
    --to=znavko@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).