Coder Social home page Coder Social logo

Comments (9)

zielmicha avatar zielmicha commented on August 23, 2024

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.

from emacs-android.

coloquio avatar coloquio commented on August 23, 2024

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?

from emacs-android.

zielmicha avatar zielmicha commented on August 23, 2024

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

from emacs-android.

SorraTheOrc avatar SorraTheOrc commented on August 23, 2024

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.

from emacs-android.

juan-g avatar juan-g commented on August 23, 2024

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.

from emacs-android.

juan-g avatar juan-g commented on August 23, 2024

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

from emacs-android.

coloquio avatar coloquio commented on August 23, 2024

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 [email protected]
To: zielmicha/emacs-android [email protected]
Cc: vicco [email protected]
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.

from emacs-android.

mylostone avatar mylostone commented on August 23, 2024

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)

from emacs-android.

dppdppd avatar dppdppd commented on August 23, 2024

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)

from emacs-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.