unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el
@ 2020-12-29 17:54 znavko--- via
  2021-01-01 15:38 ` znavko
  2021-01-04 16:16 ` Alex Kost
  0 siblings, 2 replies; 3+ messages in thread
From: znavko--- via @ 2020-12-29 17:54 UTC (permalink / raw)
  To: help-guix

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

Hello! I plan to type some russian translations for guix manual sometimes again.

I still have undergraduate level of emacs and have annoying ignorance of how to configure emacs.

For example this line can hide "Welcome" frame:
(setq inhibit-startup-screen t)

I placed it into ~/.emacs.d/.init.el where I have placed my po-mode lines and they works.
But exactly this line does not work. I have po-mode in emacs but I still have "Welcome" window.

I placed this line "(setq inhibit-startup-screen t)" to ~/.emacs and I finally got "Welcome" window away.

My next step is russian spell check. Need to have some basics of how to deal with this great instrument!

Can you advice some good tutorials for better understanding emacs?

[-- Attachment #2: .init.el --]
[-- Type: application/octet-stream, Size: 1020 bytes --]

# one window mode
     (setq inhibit-startup-screen t)


     (defun po-wrap ()
       "Filter current po-mode buffer through `msgcat' tool to wrap all lines."
       (interactive)
       (if (eq major-mode 'po-mode)
           (let ((tmp-file (make-temp-file "po-wrap."))
     	    (tmp-buf (generate-new-buffer "*temp*")))
     	(unwind-protect
     	    (progn
     	      (write-region (point-min) (point-max) tmp-file nil 1)
     	      (if (zerop
     		   (call-process
     		    "msgcat" nil tmp-buf t (shell-quote-argument tmp-file)))
     		  (let ((saved (point))
     			(inhibit-read-only t))
     		    (delete-region (point-min) (point-max))
     		    (insert-buffer tmp-buf)
     		    (goto-char (min saved (point-max))))
     		(with-current-buffer tmp-buf
     		  (error (buffer-string)))))
     	  (kill-buffer tmp-buf)
     	  (delete-file tmp-file)))))


    (add-hook 'po-subedit-mode-hook '(lambda () (longlines-mode 1)))
    (add-hook 'po-subedit-exit-hook '(lambda () (longlines-mode 0)))



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el
  2020-12-29 17:54 Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el znavko--- via
@ 2021-01-01 15:38 ` znavko
  2021-01-04 16:16 ` Alex Kost
  1 sibling, 0 replies; 3+ messages in thread
From: znavko @ 2021-01-01 15:38 UTC (permalink / raw)
  To: znavko--- via

Hello! Sorry, that is commented line starting with number sign '#' but it should be semi-colon ";"


December 31, 2020 4:57 PM, "znavko--- via" <help-guix@gnu.org> wrote:

> Hello! I plan to type some russian translations for guix manual sometimes again.
> 
> I still have undergraduate level of emacs and have annoying ignorance of how to configure emacs.
> 
> For example this line can hide "Welcome" frame:
> (setq inhibit-startup-screen t)
> 
> I placed it into ~/.emacs.d/.init.el where I have placed my po-mode lines and they works.
> But exactly this line does not work. I have po-mode in emacs but I still have "Welcome" window.
> 
> I placed this line "(setq inhibit-startup-screen t)" to ~/.emacs and I finally got "Welcome" window
> away.
> 
> My next step is russian spell check. Need to have some basics of how to deal with this great
> instrument!
> 
> Can you advice some good tutorials for better understanding emacs?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el
  2020-12-29 17:54 Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el znavko--- via
  2021-01-01 15:38 ` znavko
@ 2021-01-04 16:16 ` Alex Kost
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Kost @ 2021-01-04 16:16 UTC (permalink / raw)
  To: znavko--- via

znavko--- via (2020-12-29 17:54 +0000) wrote:

[...]
> My next step is russian spell check. Need to have some basics of how to deal with this great instrument!

Here is my configuration:

1. I installed "aspell", "aspell-dict-en", and "aspell-dict-ru" packages.

2. I put the following into my ~/.bash_profile:
   (Perhaps, this step is not needed: I don't know if it is
   auto-configured by Guix nowadays; it was not in the past)

    aspell_dir="<my-guix-profile>/lib/aspell"
    if [ -d $aspell_dir ]; then
        export ASPELL_CONF="dict-dir $aspell_dir"
    fi

3. Now, you should be able to select "ru-..." languages after
   "M-x ispell-change-dictionary".
   You can even set it as default in your emacs config like this:

   (with-eval-after-load 'ispell
     (ispell-change-dictionary "ru-yeyo" 'global))

4. Finally, you can use commands like "ispell-word" (bound to "M-$") or
   "ispell-region".

-- 
Alex


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-04 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 17:54 Why Emacs config file disables Welcome message only if this line places to .emacs but not in .emacs.d/init.el znavko--- via
2021-01-01 15:38 ` znavko
2021-01-04 16:16 ` Alex Kost

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).