MobileOrg synchronization(pull) - emacs

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

Related

Emacs bad auto indent on Debian 9

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.

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.

Sort files in dired by full path

I am using find-name-dired to find multiple instances of files that all have the same name (call it foo.txt) but in different directories. I want the files listed by alphabetical order of file path. However, they're listed in what looks like a random order. Neither dired-sort-menu nor dired-sort-chiesa will sort the output of find-name-dired, even though it will work on other dired buffers (whose format looks very similar). If I write the contents of the dired buffer to a file, I'm able to open a shell and submit the file to a sort command in the shell that uses the 9th field (the path) as a key. This produces output that looks right, but of course it's no longer a dired buffer.
Is there a way that I can
read in that externally sorted file and open it in dired "mode" (analogous to compilation mode),
sort the output of find-name-dired while still in dired mode, or
produce output from find-name-dired that's sorted the way I want from the beginning?
UPDATE:
Just to make things a bit more concrete, here's the current buffer:
/home/afrankel/Documents/emacs_test/:
find . \( -iname foo.txt \) -exec ls -ld \{\} \;
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 a/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 b/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 d/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 c/z/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 c/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 f/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 e/foo.txt
find finished at Fri Nov 30 17:00:41
Pressing "s" (which would sort most dired buffers) gives the error "Cannot sort this dired buffer".
I want the buffer to look like this:
/home/afrankel/Documents/emacs_test/:
find . \( -iname foo.txt \) -exec ls -ld \{\} \;
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 a/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 b/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 c/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 c/z/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 d/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 e/foo.txt
-rw-r--r-- 1 afrankel users 4 Nov 30 16:59 f/foo.txt
find finished at Fri Nov 30 17:00:41
When you type s in a "normal" Dired buffer, Dired doesn't actually sort the buffer. What it does is to change the value of dired-actual-switches so that it does (or doesn't) contain the -t option ("sort by modification time") and then call revert-buffer which re-runs ls with the new options. This obviously doesn't work in a Dired buffer produced by running find.
What you need to do instead is to arrange to run find with the -s option:
-s Cause find to traverse the file hierarchies in lexicographical
order, i.e., alphabetical order within each directory.
which you can do (for all find-dired commands) by evaluating
(setq find-program "find -s")
Okay, I figured out how to do it using defadvice to automatically change the value of find-ls-option while I'm executing my new wrapper function (find-name-dired-sorted) and then to change it back to its original value.
(defadvice find-name-dired (around find-name-dired-around)
"Advice: Sort output by path name."
(let ((find-ls-option (list "-exec ls -ld {} \\; |sort --key=9")))
ad-do-it))
(defun find-name-dired-sorted (dir pattern)
"Sort the output of find-name-dired by path name."
(interactive
"DFind-name (directory): \nsFind-name (filename wildcard): ")
(ad-activate 'find-name-dired)
(find-name-dired dir pattern)
(ad-deactivate 'find-name-dired))
Here's one way to do it manually via a temporary change to the configuration:
Run M-x customize-group find-dired.
Change the contents of the field "Find Ls Option" . It should initially read "-exec ls -ld {} \;". Append text to make it read "-exec ls -ld {} \; |sort --key=9". (In other words, sort by field 9, which is the full path treated as a single string.)
Set the option for the current session only.
UPDATE: It's better to do use defadvice, as I did in my other (later) answer.