can't list files on samsung galaxy tab 10.1 #6

Open
coloquio opened this Issue Sep 5, 2012 · 9 comments

Comments

Projects
None yet
6 participants
@coloquio

coloquio commented Sep 5, 2012

how am I supposed to understand this message when I ask to open home directory:
"listing directory failed but 'access file' worked.
btw which I assume the home directory corresponds to /data/data/com.zielm.emacs but it's nowhere to be found in my device.

@zielmicha

This comment has been minimized.

Show comment
Hide comment
@zielmicha

zielmicha Sep 5, 2012

Owner

HOME=/sdcard/emacs Check if it exists and if it is readable by group sdcard.
You will be able to access /data/data/com.zielm.emacs only if you are root. If it doesn't exist there is something wrong with your system.

Owner

zielmicha commented Sep 5, 2012

HOME=/sdcard/emacs Check if it exists and if it is readable by group sdcard.
You will be able to access /data/data/com.zielm.emacs only if you are root. If it doesn't exist there is something wrong with your system.

@coloquio

This comment has been minimized.

Show comment
Hide comment
@coloquio

coloquio Sep 5, 2012

thanks.
Indeed I can write to sdcard/emacs, although the default prompt to C-x C-f is directory
/data/data/com.zielm.emacs which can only be accessed as root.

Is there any option in emacs to initiate the session as a root user (su)

Should I write a .emacs configuration file to the root or will it work from sdcard?

coloquio commented Sep 5, 2012

thanks.
Indeed I can write to sdcard/emacs, although the default prompt to C-x C-f is directory
/data/data/com.zielm.emacs which can only be accessed as root.

Is there any option in emacs to initiate the session as a root user (su)

Should I write a .emacs configuration file to the root or will it work from sdcard?

@zielmicha

This comment has been minimized.

Show comment
Hide comment
@zielmicha

zielmicha Sep 5, 2012

Owner

It will work from sdcard, but you should be able to access /data/data/com.zielm.emacs from normal session. If you can't, reinstall.

It is possible to run emacs as root. Run emacs, type C-x C-c su RET emacs RET

Owner

zielmicha commented Sep 5, 2012

It will work from sdcard, but you should be able to access /data/data/com.zielm.emacs from normal session. If you can't, reinstall.

It is possible to run emacs as root. Run emacs, type C-x C-c su RET emacs RET

@rgardler

This comment has been minimized.

Show comment
Hide comment
@rgardler

rgardler Sep 9, 2012

I see this problem trying to list files in any directory, not just home (also Galaxy Note 10.1).

I tried to run emacs as root but su is not found.

Happy to help you debug, but I'll need a little guidance.

rgardler commented Sep 9, 2012

I see this problem trying to list files in any directory, not just home (also Galaxy Note 10.1).

I tried to run emacs as root but su is not found.

Happy to help you debug, but I'll need a little guidance.

@juan-g

This comment has been minimized.

Show comment
Hide comment
@juan-g

juan-g Dec 10, 2012

Not only on Samsung. On HTC, I also get the error:

Listing directory failed but `access file' worked

when trying to list files in any directory, for example using C-x C-f to visit a directory with Dired.

To debug this, I added the following to my /sdcard/emacs/.emacs init file:

(setq debug-on-error t)

It seems Dired is using "ls -la", but on Android that doesn't work, and it probably should be "ls -l", so I tried:

(setq dired-listing-switches "-l")

This changed -la to -l, which should work, but I'm still getting that error.

There is probably some other problem with Dired on Android.

On the other hand, "M-x eshell" seems to be working well, like in the Emacs app screenshot on Google Play.

juan-g commented Dec 10, 2012

Not only on Samsung. On HTC, I also get the error:

Listing directory failed but `access file' worked

when trying to list files in any directory, for example using C-x C-f to visit a directory with Dired.

To debug this, I added the following to my /sdcard/emacs/.emacs init file:

(setq debug-on-error t)

It seems Dired is using "ls -la", but on Android that doesn't work, and it probably should be "ls -l", so I tried:

(setq dired-listing-switches "-l")

This changed -la to -l, which should work, but I'm still getting that error.

There is probably some other problem with Dired on Android.

On the other hand, "M-x eshell" seems to be working well, like in the Emacs app screenshot on Google Play.

@juan-g

This comment has been minimized.

Show comment
Hide comment
@juan-g

juan-g Dec 11, 2012

Until someone figures out a correct configuration for Dired on Android, although we can't use C-x C-f to visit directories by invoking Dired, at least C-x C-f works to visit files and for tab completion.

An additional possibility is an Org-mode file such as Files.org, as a place to collect links to frequently used files. We can use link abbreviations for absolute paths with something like the following example for the /sdcard/emacs/.emacs init file:

;; Link abbreviations
(setq org-link-abbrev-alist
'(("org" . "file:/sdcard/Org/%s.org")
("doc" . "file+sys:/sdcard/My Documents/%s")))

In this way, we can write -in Files.org, or any Org documents- links to files like Work.org, anyfile.pdf, etc.:

[[org:Work][Work]]
[[doc:anyfile.pdf]]

To quickly open the list of file links, we can assign for example the F8 key to Files.org, in the .emacs file:

(global-set-key [(f8)]
  '(lambda ()
    (interactive)
    (find-file "/sdcard/Org/Files.org"))) 

juan-g commented Dec 11, 2012

Until someone figures out a correct configuration for Dired on Android, although we can't use C-x C-f to visit directories by invoking Dired, at least C-x C-f works to visit files and for tab completion.

An additional possibility is an Org-mode file such as Files.org, as a place to collect links to frequently used files. We can use link abbreviations for absolute paths with something like the following example for the /sdcard/emacs/.emacs init file:

;; Link abbreviations
(setq org-link-abbrev-alist
'(("org" . "file:/sdcard/Org/%s.org")
("doc" . "file+sys:/sdcard/My Documents/%s")))

In this way, we can write -in Files.org, or any Org documents- links to files like Work.org, anyfile.pdf, etc.:

[[org:Work][Work]]
[[doc:anyfile.pdf]]

To quickly open the list of file links, we can assign for example the F8 key to Files.org, in the .emacs file:

(global-set-key [(f8)]
  '(lambda ()
    (interactive)
    (find-file "/sdcard/Org/Files.org"))) 
@coloquio

This comment has been minimized.

Show comment
Hide comment
@coloquio

coloquio Dec 16, 2012

quite clever, thanks. another point in favor of org-mode.  Also, I had implemented a menu option to display recently used files to access from "file" in the menu line.  

vicco


From: juan-g notifications@github.com
To: zielmicha/emacs-android emacs-android@noreply.github.com
Cc: vicco desdefuera@yahoo.com
Sent: Tuesday, December 11, 2012 7:48 PM
Subject: Re: [emacs-android] can't list files on samsung galaxy tab 10.1 (#6)

Until someone figures out a correct configuration for Dired on Android, although we can't use C-x C-f to visit directories by invoking Dired, at least C-x C-f works to visit files and for tab completion.
An additional possibility is an Org-mode file such as Files.org, as a place to collect links to frequently used files. We can use link abbreviations for absolute paths with something like the following example for the /sdcard/emacs/.emacs init file:
;; Link abbreviations
(setq org-link-abbrev-alist
'(("org" . "file:/sdcard/Org/%s.org")
("doc" . "file+sys:/sdcard/My Documents/%s")))
In this way, we can write -in Files.org, or any Org documents- links to files like Work.org, anyfile.pdf, etc.:
[[org:Work][Work]]
[[doc:anyfile.pdf]]
To quickly open the list of file links, we can assign for example the F8 key to Files.org, in the .emacs file:
(global-set-key [(f8)] '(lambda () (interactive) (find-file "/sdcard/Org/Files.org")))

Reply to this email directly or view it on GitHub.

quite clever, thanks. another point in favor of org-mode.  Also, I had implemented a menu option to display recently used files to access from "file" in the menu line.  

vicco


From: juan-g notifications@github.com
To: zielmicha/emacs-android emacs-android@noreply.github.com
Cc: vicco desdefuera@yahoo.com
Sent: Tuesday, December 11, 2012 7:48 PM
Subject: Re: [emacs-android] can't list files on samsung galaxy tab 10.1 (#6)

Until someone figures out a correct configuration for Dired on Android, although we can't use C-x C-f to visit directories by invoking Dired, at least C-x C-f works to visit files and for tab completion.
An additional possibility is an Org-mode file such as Files.org, as a place to collect links to frequently used files. We can use link abbreviations for absolute paths with something like the following example for the /sdcard/emacs/.emacs init file:
;; Link abbreviations
(setq org-link-abbrev-alist
'(("org" . "file:/sdcard/Org/%s.org")
("doc" . "file+sys:/sdcard/My Documents/%s")))
In this way, we can write -in Files.org, or any Org documents- links to files like Work.org, anyfile.pdf, etc.:
[[org:Work][Work]]
[[doc:anyfile.pdf]]
To quickly open the list of file links, we can assign for example the F8 key to Files.org, in the .emacs file:
(global-set-key [(f8)] '(lambda () (interactive) (find-file "/sdcard/Org/Files.org")))

Reply to this email directly or view it on GitHub.

@mylostone

This comment has been minimized.

Show comment
Hide comment
@mylostone

mylostone May 30, 2013

There is a fix for this issue that worked for me on my Galaxy S3:
http://stackoverflow.com/questions/4076360/error-in-dired-sorting-on-os-x
(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)

By the way, I think it is the `--dired' flag that is causing the android "ls" to choke ...

Why isn't the android linux just plain-old-linux ... grumble ... grumble ...

For this emacs ... which totally rules by the way ... I'd like to see the full install including emacsclient, which obviously would require a working server. Currently, when I try to start in --daemon mode I get an error:

mylo@android:/ # emacs --daemon
emacs: Could not open file: /dev/tty
Error: server did not start correctly

M-x start-server seems to work, but still I don't know how you could then allow emacs to keep running when your session disconnects. I am currently rooted, and logging in over ssh (via adb forward tcp:2222 tcp:22)

There is a fix for this issue that worked for me on my Galaxy S3:
http://stackoverflow.com/questions/4076360/error-in-dired-sorting-on-os-x
(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)

By the way, I think it is the `--dired' flag that is causing the android "ls" to choke ...

Why isn't the android linux just plain-old-linux ... grumble ... grumble ...

For this emacs ... which totally rules by the way ... I'd like to see the full install including emacsclient, which obviously would require a working server. Currently, when I try to start in --daemon mode I get an error:

mylo@android:/ # emacs --daemon
emacs: Could not open file: /dev/tty
Error: server did not start correctly

M-x start-server seems to work, but still I don't know how you could then allow emacs to keep running when your session disconnects. I am currently rooted, and logging in over ssh (via adb forward tcp:2222 tcp:22)

@idomagal

This comment has been minimized.

Show comment
Hide comment
@idomagal

idomagal Jul 14, 2013

Switching to lisp ls worked for me on a galaxy note 10.1. Thanks.

(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)

Switching to lisp ls worked for me on a galaxy note 10.1. Thanks.

(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment