Org-contacts and dired+ - org-mode

I have a problem using org-contacts and dired+ in emacs 24.5.1. When org-contacts or dired+ active dired show only filenames without permissions, sizes, owners. When I comment org-contacts or dired+ in my .emacs file everything is fine. May be somebody knows why does it happen and what do I need to do to solve this problem?
Part of my .emacs file:
(require 'org-install)
(add-to-list 'load-path "C:\\Users\\USER\\AppData\\Roaming\\.emacs.d\\org-contacts")
(require 'org-contacts)
(setq org-contacts-files '("M:\\Org\\contacts.org"))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb)
(add-to-list 'load-path "C:\\Users\\USER\\AppData\\Roaming\\.emacs.d\\elpa\\dired+-20151110.921")
(require 'dired+)

I find out that problem is solved then I toggle dired-hide-details-mode (M-x dired-hide-details-mode). And I need to do this every time I start dired+ even then global-dired-hide-details-mode is off (in .emacs).

Related

Getting a no match when trying to install evil from emacs (M-x package-install RET evil [No match]) - how to fix?

I saw this questionn https://emacs.stackexchange.com/questions/45056/how-do-i-install-the-evil-package but I can't decipher how to use it to help me.
I also have the same issue:
M-x package-install RET evil [No match]
I am following the instruction from here https://evil.readthedocs.io/en/latest/overview.html#installation-via-package-el and it says:
M-x package-refresh-contents
M-x package-install RET evil RET
the first one works fine. The second returns and error.
My emacs file is:
(meta_learning) brandomiranda~ ❯ cat .emacs
;; Open .v files with Proof General's Coq mode
(load "~/.emacs.d/lisp/PG/generic/proof-site")
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-dusk)
(when (display-graphic-p)
;; settings for GUI emacs
(add-to-list 'default-frame-alist '(background-color . "#282B35"))
(add-to-list 'default-frame-alist '(foreground-color . "White"))
(set-frame-font "Inconsolata 18" nil t))))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(custom-enabled-themes (quote (wheatgrass))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(load-file (let ((coding-system-for-read 'utf-8))
(shell-command-to-string "agda-mode locate")))
How to fix this?
This doesn't really solve the exact question as asked but at least it install emacs for you:
This worked for me:
Evil
Manual installation worked for me: https://evil.readthedocs.io/en/latest/overview.html#installation-via-package-el
clone evil repo somewhere you know the path, I recommend ~, so run:
git clone --depth 1 https://github.com/emacs-evil/evil.git
then add these line to your .emacs file in ~:
vim .emacs
add:
(add-to-list 'load-path "path/to/evil")
(require 'evil)
(evil-mode 1)
likely:
(add-to-list 'load-path "~/evil")
(require 'evil)
(evil-mode 1)
For me, the issue was that I didn't realize RET indicated return. To be clear, do the following:
M-x
package-install (press "return" or "enter")
evil (press "return" or "enter" again)
That worked.

slime startup in emacs in a splitter windows buffer, how to make it a full window?

Here is my .emacs:
(add-to-list 'load-path "~/Documents/slime/") ; your SLIME directory
(setq inferior-lisp-program "/usr/local/bin/sbcl") ; your Lisp system
(require 'slime-autoloads)
(slime-setup '(slime-fancy slime-asdf slime-banner))
(slime)
Everytime i start emacs, slime started in a split window.
How to make it start in a full window?
Add this to your slime.el or .emacs
(setq pop-up-windows nil)
Add this before you call (slime)
(add-hook 'slime-repl-mode-hook #'delete-other-windows)

Emacs, how to auto turn on flyspell for LaTeX file

I use Emacs only for \LaTeX and python programming. Is there a way to automatically turn on flyspell-mode when I work on a .tex file, and turn on flyspell-prog-mode when I work on a .py file? How can I do this in my .emacs file?
Add those functions to hooks of python-mode and latex-mode
(require 'python)
;; If you use tex-mode
(require 'tex-mode)`
(add-hook 'latex-mode-hook 'flyspell-mode)
;; If you use AUCTeX
(load "auctex.el" nil t t)`
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'python-mode-hook 'flyspell-prog-mode)
Something like this should work.
(setq auto-mode-alist (cons '("\\.tex\\'" . flyspell-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.py\\'" . flyspell-prog-mode) auto-mode-alist))

emacs auto-complete don't work with jde

I want to develop java in emacs. I install ecb, jde and auto-complete extensions. Each one works well without starting others. But when i want to use them together, some problem happened.
auto-complete-mode doesn't auto start with jde, I need to start it by M-x auto-complete-mode. If without jde, auto-complete-mode will auto start
When I manually start the auto-complete-mode in jde, the auto complete is not work well. It just auto complete the word that is appeared.
Here is my .emacs content:
(global-linum-mode 1)
(setq linum-format "%2d| ")
(setq default-tab-width 4)
(setq debug-on-error t)
;;no backup file
(setq make-backup-files nil)
(setq debug-on-error t)
;;auto complete config
(add-to-list 'load-path "D:/emacs-24.1/custom_el/auto-complete-1.3.1")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "D:/emacs-24.1/custom_el/auto-complete-1.3.1/dict")
(ac-config-default)
(setq stack-trace-on-error t)
(add-to-list 'load-path (expand-file-name "D:/emacs-24.1/custom_el/jdee-2.4.0.1/lisp"))
(add-to-list 'load-path (expand-file-name "D:/emacs-24.1/custom_el/cedet-1.1/common"))
(add-to-list 'load-path (expand-file-name "D:/emacs-24.1/custom_el/elib-1.0"))
(add-to-list 'load-path' "d:/emacs-24.1/custom_el/ecb-2.40")
;; Initialize CEDET.
(load-file (expand-file-name "D:/emacs-24.1/custom_el/cedet-1.1/common/cedet.el"))
(load-file (expand-file-name "D:/emacs-24.1/custom_el/ecb-2.40/ecb.el"))
(require 'ecb)
(ecb-activate)
(ecb-byte-compile)
;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line
(setq defer-loading-jde nil)
;; to read:
;;
;; (setq defer-loading-jde t)
;;
(if defer-loading-jde
(progn
(autoload 'jde-mode "jde" "JDE mode." t)
(setq auto-mode-alist
(append
'(("\\.java\\'" . jde-mode))
auto-mode-alist)))
(require 'jde))
;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
(setq c-basic-offset 2))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ecb-options-version "2.40")
'(ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
The version info is :
emacs : 24.1
auto complete : 1.3.1
ecb : 2.40
cedet : 1.1
elib : 1.0
jdee : 2.4.0.1
To auto-start auto-complete-mode with jde-mode, you need to add jde-mode to ac-modes:
(push 'jde-mode ac-modes)
Then you need to add a JDEE-specific source to ac-sources. I'm not sure of the extent of JDEE integration with Semantic, you may be able to use the pre-defined source for it:
(add-hook 'jde-mode-hook (lambda () (push 'ac-source-semantic ac-sources)))
If not, you may need to define a specialized source with ac-define-source. See auto-complete-config.el for examples.

Emacs auto-complete-mode at startup

I just install auto-complete-mode, however everytime I start emacs I have to M-x auto-complete-mode. Is there anyway to have it loaded automatically ?
My .emacs is as follows:
;; auto-complete
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)
Thanks
I think you can do it in various ways. To enable it globally you should use
(global-auto-complete-mode t)
But it uses auto-complete-mode-maybe, which turn AC on only those listed in ac-modes. You can add them manually just like this
(add-to-list 'ac-modes 'sql-mode)
You can make your own list if you wish AC be active only for few modes
(setq ac-modes '(c++-mode sql-mode))
Or rewrite it to have AC everywhere.
(defun auto-complete-mode-maybe ()
"No maybe for you. Only AC!"
(auto-complete-mode 1))
edited:
Autocomplete in minibuffer is bad. I think this will be better.
(defun auto-complete-mode-maybe ()
"No maybe for you. Only AC!"
(unless (minibufferp (current-buffer))
(auto-complete-mode 1)))
I just needed this:
(require 'auto-complete)
(global-auto-complete-mode t)
added to my .emacs.d/init.el file.
I installed auto-complete with the package manager. I'm using Emacs 24.