Emacs bad auto indent on Debian 9 - emacs

I've installed a fresh Debian 9 Stretch and Emacs GNU Emacs 24.5.1and when i tried to paste a docker-compose.yml from github (raw mode) into a emacs file with or without an extension (yml, conf, etc...) there is no auto indent and this is what I have:
There is my .emacs file
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq c-basic-offset 4)
(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.
'(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120))))
and this is the link to the file https://raw.githubusercontent.com/plexinc/pms-docker/master/docker-compose-bridge.yml.template

as Drew said on his answer : https://emacs.stackexchange.com/a/5941
Disable electric-indent-mode:
(when (fboundp 'electric-indent-mode) (electric-indent-mode -1)) That
works with any Emacs version. This annoyance or shiny-new-feature,
depending on your point of view, was introduced as the default in
Emacs 24.4.

Related

AHK WinWait Memory Usage

I have an ahk script I use to enable the Printer button on a Crystal Reports dialog that for what ever reason is not enabled by default when used in Server 2008 R2. Anyways... the issue I am having is the process when running continues to stack memory each cycle. Its not like I am storing any contents to a variable that happens to not get cleared. What in this process uses memory resources that don't get released and is there anything I can implement to prevent this from happening?
You can see in this listing that the private memory just grows as usage goes on. I ended up having it initiate about 5 times and it went from about 1000k to 2000k.
The top entry is my test version I converted from WinWaitActive that was causing unnecessary CPU usage.
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
58 8 2312 6216 68 0.62 7828 showprinterbutton
55 8 1788 5508 67 32.39 6840 ShowPSPrinter
57 8 1864 6028 79 33.12 7184 ShowPSPrinter
55 8 1396 5084 67 1.29 7604 ShowPSPrinter
55 8 1796 5536 67 36.36 7856 ShowPSPrinter
55 8 1772 5444 67 37.27 9848 ShowPSPrinter
55 8 1740 5424 67 26.33 10300 ShowPSPrinter
55 8 1396 4992 67 0.84 11348 ShowPSPrinter
55 8 1396 5024 67 1.14 11460 ShowPSPrinter
55 8 1736 5604 67 355.93 11676 ShowPSPrinter
55 8 1396 4984 67 1.06 13364 ShowPSPrinter
55 8 1396 5132 67 0.81 13516 ShowPSPrinter
72 9 2048 6500 73 66.36 14072 ShowPSPrinter
55 8 1792 5504 67 59.92 15736 ShowPSPrinter
55 8 1400 4960 67 0.61 16340 ShowPSPrinter
57 8 1496 5848 79 0.98 18516 ShowPSPrinter
57 8 1500 5404 79 0.98 19048 ShowPSPrinter
55 8 1400 5000 67 0.51 22020 ShowPSPrinter
Here is the script contents I have that is then compiled to run as an EXE.
; Version: 1.2
; Dated: 03/31/2015 - Created
; Description: Enable a watch for page setup dialog and activate the print button for crystal reports
; Only allow one instance to run
#SingleInstance force
; Run with out a tray icon
#NoTrayIcon
; Getting loose with not requiring direct title menu values
SetTitleMatchMode, RegEx
; Start active watch for quick post menu
WaitForPS:
WinWait,Page Setup
{
Control,Show,,Button8,Page Setup,(optimize for screen display)
GoSub WaitForPS
}
; End of Script...
Right after the moment the window appears and the loop ran one time, WainWait immediately continues to the next statement because the window already exists, enables the control, and recursively invokes the loop again (gosub), so the code allocated for example 100 stack frames per second thus eventually exhausting the call stack.
Instead use an indefinite loop and before continuing wait for the window to close:
Loop
{
WinWait,Page Setup
Control,Show,,Button8,Page Setup,(optimize for screen display)
WinWaitClose
}

MobileOrg synchronization(pull)

I have just started to use OrgMobile. Its really good about planning day. System is work really good about synchronization Computer to Phone(org-mobile-push) (Computer ----> Dropbox ---->Phone ✔). But when I change something from my phone and when I wanted to synchronize it from phone (org-mobile-pull) (Phone --- > Dropbox ---> Computer ☹) it makes problem.
For ex:
My org file OrgCapture.org (which is added with org-agenda-file-to-front)
#+LAST_MOBILE_CHANGE: 2015-05-21 21:55:50
* TODO from computer 1
:PROPERTIES:
:ID: 348a58d3-243a-41ac-aa9a-ae1bdd403e38
:END:
* TODO from computer 2
:PROPERTIES:
:ID: 7eb71e7f-aa19-4c7c-84ad-76641d1aba19
:END:
I can see that file after push from my phone there is no problem
!! When I add some notes from Android Phone and pull from computer
Messages board
0 new, 1 edits, 0 flags, 1 errors
the file that just affected is flagged.org
* Not on a heading F(edit:addheadıng) [[olp:OrgCapture.org][OrgCapture.org]]
** Old value
** New value
TODO Phone
[2015-05-21 Per 21:54]
** End of edit
In conclusion:
There is no any changes in OrgCapture.org (except #+LAST_MOBILE_CHANGE: 2015-05-21 21:55:50)
If I push again from my computer also everything disappear what I change from phone
Some technical information about my system
My Init file
;; mobileOrg
(require 'org-install)
(require 'org-mobile)
;; Set to the location of your Org files on your local system
(setq org-directory "~/org")
;; Set to the name of the file where new notes will be stored
(setq org-mobile-inbox-for-pull "~/org/flagged.org")
;; Set to <your Dropbox root directory>/MobileOrg.
(setq org-mobile-directory "~/Dropbox/MobileOrg")
(setq org-mobile-files org-agenda-files)
Org version
Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpa # /home/nwpwr/.emacs.d/elpa/org-20150518/)
Stable version 8.2.10 (Oct. 2014)
Also I tried to build from tar.gz nothing changed (Edit: 23.05.2015)
Emacs version
GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.9) of 2015-03-21 on kissel, modified by Debian
Dropbox files
➜ nwpwr#ubuntux ~/Dropbox/MobileOrg ls -la
total 48
drwxrwxr-x 2 nwpwr nwpwr 4096 May 21 21:55 .
drwx------ 5 nwpwr nwpwr 4096 May 21 21:15 ..
-rw-rw-r-- 1 nwpwr nwpwr 1413 May 21 21:53 agendas.org
-rw-rw-r-- 1 nwpwr nwpwr 195 May 21 21:53 checksums.dat
-rw-rw-r-- 1 nwpwr nwpwr 278 May 21 21:53 index.org
-rw-rw-r-- 1 nwpwr nwpwr 0 May 21 21:55 mobileorg.org
-rw-rw-r-- 1 nwpwr nwpwr 333 May 21 21:53 OrgCapture.org
~/org files
drwxrwxr-x 2 nwpwr nwpwr 4096 May 21 21:57 .
drwxr-xr-x 60 nwpwr nwpwr 4096 May 21 22:29 ..
-rw-rw-r-- 1 nwpwr nwpwr 158 May 21 21:57 flagged.org
-rw-rw-r-- 1 nwpwr nwpwr 333 May 21 21:53 OrgCapture.org
If you use still MobileOrg
What is your
Init Defination
Org version
Emacs Version
Link the same problem like me but a little bit old compare this time
https://github.com/matburt/mobileorg-android/issues/93
Official Screencast
What I tried to fix
I tried the same configuration like screencast still the same problem on Ubuntu (Edit: 23.05.2015)
I tried the same configuration like screencast on Debian(virtual machine)(without any config file like init.el) (Edit: 26.05.2015)
I tried the same configuration like screencast on Windows 8.1(with md5sum.exe) Emacs 24.5 (Edit: 26.05.2015)
I download Emacs source code(Ubuntu) with git, and I compiled nothing changes (Edit: 26.05.2015)
http://blog.gabrielsaldana.org/mobileorg-for-android-setup-and-workflow/ (So easy config nobody can make mistake but still doesnt work (Edit: 26.05.2015))
During few month, I used it like just a computer to phone sync, yesterday I tried to TODO ---> DONE it's worked(I dont know why) But still it's not usable I am still waiting miracle (Edit 6: 16.11.2015)
Best Regards
do you set you "org-agenda-files" and "org-mobile-files" ?
this is my config
(setq org-agenda-files (list (concat org-directory "agenda.org")
(concat org-directory "todo.org" )
(concat org-directory "note.org")))
(setq org-mobile-files org-agenda-files)
when i add note from mobile phone, i add it to one of them.
then i can see it on my computer.
this is my config, tests ok under cygwin ( emacs-nox , 24.4.1 ), windows 7 ( emacs 24.3.1) , and debian 8 ( emacs 24.4..)
(setq org-default-notes-file (concat org-directory "capture.org" ))
(setq org-agenda-files (list (concat org-directory "agenda.org")
(concat org-directory "todo.org" )
(concat org-directory "note.org")))
;;Dropbox setup Set to the location of your Org files on your local system
;; Set to <your Dropbox root directory>/MobileOrg.
(setq org-mobile-directory "~/Dropbox/mobileorg/" )
(setq org-mobile-encryption-tempfile (concat org-mobile-directory "orgtmpcrypt") )
(unless (file-exists-p org-mobile-encryption-tempfile)
(shell-command (concat "touch "
org-mobile-encryption-tempfile)))
;; the file "encryption-tempfile " is necessarily, i meet problem without it
(setq org-mobile-files org-agenda-files)
(setq org-mobile-inbox-for-pull (concat org-directory "from-mobile.org"))
(unless (file-exists-p org-mobile-inbox-for-pull)
(shell-command (concat "touch " org-mobile-inbox-for-pull)))
orgzly have problem when org-file be changed both on mobile and pc,it can't sync. but mobileorg have the ability to solve it by use "push" or "pull" handle。
this is my "checksums.dat", you check your file to see is it contain your org files, hope it will help you.
859f3d092e8678a3ead0ed48c0e8db30 index.org
68b329da9893e34099c7d8ad5cb9c940 mobileorg.org
aa3abdc374ae3f86dac84655be2aedd575522af6 note.org
066da2393d463d596fcc8736eb0fdbefd5a713c3 todo.org
4719448682b631282ff7e49494662085909969e0 agenda.org
546dfe5326a496b49f3448d152474683 agendas.org

slime - Process inferior-lisp segmentation fault (core dumped)

Yesterday, I tried slime on my emacs.
After installation and configuration, it works good.
But after some play, today I start it and it throws following error.
I googled but nothing helpful found.
Could anyone give some clue?
OS: centos7
emacs: 24.3
lisp: clisp
slime-mode, slime, slime-company have been installed.
(progn (load "/home/angelo/.emacs.d/elpa/slime-20150402.908/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.4512"))
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8
Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/>
Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010
Type :h and hit Enter for context help.
[1]>
;; Loading file /home/angelo/.emacs.d/elpa/slime-20150402.908/swank-loader.lisp ...
;; Loaded file /home/angelo/.emacs.d/elpa/slime-20150402.908/swank-loader.lisp
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/backend.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/backend.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/xref.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/xref.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/metering.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/metering.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/clisp.fas ...
WARNING: DEFUN/DEFMACRO: redefining function BREAK in
/home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/clisp.fas,
was defined in /home/angelo/tools/clisp-2.49/src/condition.fas
WARNING: Replacing method #<STANDARD-METHOD (#<BUILT-IN-CLASS T>)> in
#<STANDARD-GENERIC-FUNCTION EMACS-INSPECT>
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/clisp.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/gray.fas ...
WARNING: The generic function
#<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN> is being
modified, but has already been called.
WARNING: The generic function
#<STANDARD-GENERIC-FUNCTION STREAM-FORCE-OUTPUT> is being
modified, but has already been called.
WARNING: The generic function
#<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN> is being
modified, but has already been called.
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/gray.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/match.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/match.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/rpc.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/rpc.fas
;; Loading file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/swank.fas ...
;; Loaded file /home/angelo/.slime/fasl/2015-04-02/clisp-2.49-unix-pc386/swank.fas
;; Swank started at port: 51389.
CL-USER>
Process inferior-lisp segmentation fault (core dumped)
Following steps can reproduce the issue:
1. Install slime and slime-mode
2. Run M-x slime in emacs
3. run 'lisp' in slime , (run (+ 2 2) works fine)
4. Above error will display
Currently my solution is to re-install slime.

Emacs: can't open load file for windows.el, possible char encoding error

I am trying to install Windows Mode from here: http://www.emacswiki.org/emacs/WindowsMode and I am having issues with loading the windows.el file upon initialization, where the minibuffer tells me Cannot open load file: windows. After saving the file, I added this to my init file:
(add-to-list 'load-path "~/workspace/emacs/.emacs.d/elisp/windows.el")
(require 'windows)
(win:startup-with-window)
(define-key ctl-x-map "C" 'see-you-again)
And here is where I saved the file:
[lucas#lucas-ThinkPad-W520]~/workspace/emacs/.emacs.d/elisp$ ls -la
total 296
drwxr-xr-x 4 lucas lucas 4096 Apr 20 01:06 .
drwxr-xr-x 14 lucas lucas 4096 Apr 20 01:14 ..
-rw-r--r-- 1 lucas lucas 31502 Mar 29 21:40 multi-term.el
-rw-r--r-- 1 lucas lucas 35201 Apr 20 01:01 revive.el
drwxr-xr-x 3 lucas lucas 4096 Mar 9 14:57 theme-changer
drwxr-xr-x 3 lucas lucas 4096 Mar 29 01:05 themes
-rw-r--r-- 1 lucas lucas 115222 Apr 20 01:06 windows2.el
-rw-r--r-- 1 lucas lucas 96830 Apr 20 01:01 windows.el
I suspect the character encoding, which is listed at the top of the windows.el file (full file on the link) as -*- coding: euc-jp -*-. Initially saving this file gave me an error (see below), prompting me to specify the encoding. I tried saving the file as euc-jp then again as utf-8, but I still get the Cannot open load file... error.
Here is the message that I get when trying to save:
These default coding systems were tried to encode text
in the buffer `windows2.el':
(japanese-iso-8bit-unix (13580 . 65533) (13581 . 65533) (13582
. 65533) (13583 . 65533) (13584 . 65533) (13585 . 65533) (13586
. 65533) (13587 . 65533) (13588 . 65533) (13589 . 65533) (13590
. 65533))
However, each of them encountered characters it couldn't encode:
japanese-iso-8bit-unix cannot encode these: � � � � � � � � � � ...
Click on a character (or switch to this window by `C-x o'
and select the characters by RET) to jump to the place it appears,
where `C-u C-x =' will give information about it.
Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
to remove or modify the problematic characters,
or specify any other coding system (and risk losing
the problematic characters).
utf-8 gb18030 utf-7 utf-16 utf-16be-with-signature
utf-16le-with-signature utf-16be utf-16le iso-2022-7bit utf-8-auto
utf-8-with-signature utf-7-imap utf-8-emacs
Assuming that the encoding is the source of the problem, how can I setup my emacs to be compatible with these encodings?
load-path is a list of directories in which to look for elisp libraries.
Use this:
(add-to-list 'load-path (expand-file-name "~/workspace/emacs/.emacs.d/elisp"))

Can't install scala in emacs - An error occurred while loading `/home/nazar_art/.emacs'

I tried to install Scala accord this Set up for learning Scala with Emacs.
My current OS is Ubuntu 12.04.
I did exactly step by step.
After installation I run Emacs and see next error:
Warning (initialization): An error occurred while loading `/home/nazar_art/.emacs':
File error: Cannot open load file, scala-mode-auto
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
I guessed that it is problem with permission. I change it for scala-mode but without success.
Here is content of ~/.emacs.d:
nazar_art#nazar-desktop:~/.emacs.d$ ls -lg
total 12
drwx------ 2 nazar_art 4096 Oct 10 10:58 auto-save-list
drwxrwxr-x 4 nazar_art 4096 Oct 5 00:12 elpa
drwxrwxrwx 4 nazar_art 4096 Oct 10 10:41 scala-mode
I'm newly at emacs and not sure that can find cause of error follow my intuition.
Any suggestion?
How to solve this trouble?
This worked for me:
Install Scala
sudo apt-get install scala
Get scala-mode
cd ~/git
git clone git://github.com/tuxdna/scala-mode.git
Set up the load-path
(add-to-list 'load-path "~/git/scala-mode")
Require scala-mode-auto
(require 'scala-mode-auto)
Created my first Scala source ~/first.scala. The mode was loaded.
object First {
def main(args: Array[String]) {
println("Test")
}
}
M-x scala-run-scala
Loaded the source with C-c C-l.
Entered First.main(null) in the interpreter. The program ran.