maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   GNU Emacs 23.1.1 for Nokia N900 (https://talk.maemo.org/showthread.php?t=37241)

白い熊 2009-12-15 02:12

GNU Emacs 23.1.1 for Nokia N900
 
I've compiled and packaged GNU Emacs 23.1.1 for the Nokia N900 GNU mobile phone:

http://sumoudou.org/0/14.html

The install package is fully optified.

UPDATE: 2009-12-15-174333 Installation deb package on the GNU Emacs page in the link updated and uploaded again.

backwoods 2009-12-15 02:17

Re: GNU Emacs 23.1.1 for Nokia N900
 
what is gmu emacs and does someone in general need this or is it for programming?

akpoff 2009-12-15 03:09

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by 白い熊 (Post 428218)
I've compiled and packaged GNU Emacs 23.1.1 for the Nokia N900 GNU mobile phone:

http://sumoudou.org/0/14.html

The install package is fully optified.

Sweet! This will be one of my first stops toward perfecting the N900 once it arrives.

akpoff 2009-12-15 03:12

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by backwoods (Post 428220)
what is gmu emacs and does someone in general need this or is it for programming?

The answer for some of us is "Yes, emacs is great in general" and "Yes, it's for programming".

It's mostly for programmers and other bit-twiddling geeks.

白い熊 2009-12-15 03:14

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by akpoff (Post 428273)
The answer for some of us is "Yes, emacs is great in general" and "Yes, it's for programming".

:)For me, the answer is: "GNU Emacs is the greatest piece of software ever written!" Intimidating at first, but once you start using it, you never cease to be amazed what you can do with it.

I can't live without it...

filologen 2009-12-15 05:33

Re: GNU Emacs 23.1.1 for Nokia N900
 
First of all I would like to thank you so much for compiling this! :)

Secondly, I have some problems with the install. I followed your new instructions for basic installation found on http://sumoudou.org/相撲外:GNU%20Emacs%...ia%20N900.html. It does install but gives me the following message:
Code:

Failed to open connection to "session" message bus: (null)
I don't know if this is problematic, but the fact remains that I cannot start emacs from the icon in the application menu and not on the command line if I just try to run "emacs" (or "emacs-23.1). I have to give include the full path (that is /opt/emacs.../bin/emacs) so it seems that the I probably have to export the path manually (no big problem).

A bigger problem seems to be related to the input method. Have you compiled it with some specific setting regarding input method? Unlike in other native maemo apps the Fn and Shift keys are not "sticky" -- you have to hold them down when hitting other keys and cannot just press them, release them and then hit the key they shall modify. This is rather annoying on the small keyboard.

There is also a problem related to the tool bar. As long as it is turned on, I cannot se the mini-buffer (no big problem since I always put "(tool-bar-mode -1)" in my .emacs).

Finally, I cannot open a directory in emacs (just individual files). If I try to, I get the following message:
Code:

Listing directory failed but `acces-file' worked
Are these problems also present in your install?

The very best regards and many thanks:)

白い熊 2009-12-15 06:17

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by filologen (Post 428396)
First of all I would like to thank you so much for compiling this! :)

Yo, most of the problems are not inherent in this build of GNU Emacs and I've solved them.

So:
Quote:

It does install but gives me the following message:
Code:

Failed to open connection to "session" message bus: (null)

When does it do that, when installing?
Quote:

I don't know if this is problematic, but the fact remains that I cannot start emacs from the icon in the application menu and not on the command line if I just try to run "emacs" (or "emacs-23.1). I have to give include the full path (that is /opt/emacs.../bin/emacs) so it seems that the I probably have to export the path manually (no big problem).
You're right, I don't use the optified GNU Emacs install, I just made it for everyone's benefit here, but probably need to check into how optification really works on N900, as you're right that the PATH doesn't include anything in /opt
Currently, I can propose that you either: edit the /usr/share/applications/hildon/emacs.desktop file and change emacs to /opt/emacs...whatever - give it full path, or add: export PATH=/opt/*/bin:$PATH to /home/user/.profile
Quote:

A bigger problem seems to be related to the input method. Have you compiled it with some specific setting regarding input method? Unlike in other native maemo apps the Fn and Shift keys are not "sticky" -- you have to hold them down when hitting other keys and cannot just press them, release them and then hit the key they shall modify. This is rather annoying on the small keyboard.
No, keys are not sticky in Emacs. I know what you're saying it's bothering me too, but haven't figured out so far how to make them sticky...
Quote:

There is also a problem related to the tool bar. As long as it is turned on, I cannot se the mini-buffer (no big problem since I always put "(tool-bar-mode -1)" in my .emacs).
Yeah, the solution to this:
http://sumoudou.org/0/20.html

Quote:

Finally, I cannot open a directory in emacs (just individual files). If I try to, I get the following message:
Code:

Listing directory failed but `acces-file' worked
Are these problems also present in your install?
Yeah, this is because the N900 doesn't use proper GNU base tools like coreutils etc, but the damned busybox instead, and you cannot install these tools from the dev repositories, because they conflict with busybox and it's needed by hildon UI etc.

I've solved this issue very elegantly.

I've developped a framework which allows me with a set of scripts to install any self-compiled program into any user directory, not messing with the base system and only dynamically exporting paths etc. This has the beauty, that you can have a number of version of one program installed, user and root can have different apps installed and you never mess anything up, because nothing gets overwritten or deleted. And no root privileges are necessary for any program linking...

I'm in the process of documenting my scripts and would like to post a writeup of this on my site. They are already packaged into one directory and easily installable. Just need to write the how to.

After this, you can just copy over further packages I've compiled, like the base utils and only dynamically export their paths, and it'll work.

You'll then be able to use dired in GNU Emacs etc., which you're not able to now.

BTW, that's how I have also Emacs itself setup, as I use my system for "optification"...

Once I post it, I'll also write here.

filologen 2009-12-15 07:41

Re: GNU Emacs 23.1.1 for Nokia N900
 
Thanks a lot for your prompt answers :)

Quote:

When does it do that, when installing?
Yes, when installing.

Nice solution with maxframe, I had allready thought of this, but hadn't tried it out.

I am looking much forward to your write up on the solution regarding coreutils etc., since the use of busybox is one of my only disappointments about the n900 (and one of the reasons behind my quite frequent use of easy debian).

Once again, thanks for all the stuff you do for the community, including the nice guides and howtos on your website!

dmg 2009-12-15 08:00

Re: GNU Emacs 23.1.1 for Nokia N900
 
Thanks a lot! I have further configured your .emacs to avoid calling maximize-frame by hand.

http://turingmachine.org/blog/index....-the-N900.html

--dmg

dmg 2009-12-15 08:04

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by filologen (Post 428396)
First of all I would like to thank you so much for compiling this! :)
[...]
Finally, I cannot open a directory in emacs (just individual files). If I try to, I get the following message:
Code:

Listing directory failed but `acces-file' worked
Are these problems also present in your install?

The very best regards and many thanks:)


easy to fix:


(setq dired-use-ls-dired nil)
(setq list-directory-brief-switches "-C")

It makes for a hell of a file browser.

--dmg

filologen 2009-12-15 08:26

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428564)
easy to fix:

(setq dired-use-ls-dired nil)
(setq list-directory-brief-switches "-C")

It makes for a hell of a file browser.

--dmg

thanks for this.

Have you guys done a lot of keyboard remapping? I remapped Escape to Shift+Space, but will have to make other remappings as well (e.g. adding Tab). As of right now I still find vim more usefull on this little device, but hope that will change since I prefer emacs on my other computers (with full keyboards)

dmg 2009-12-15 08:28

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by filologen (Post 428584)
thanks for this.

Have you guys done a lot of keyboard remapping? I remapped Escape to Shift+Space, but will have to make other remappings as well (e.g. adding Tab). As of right now I still find vim more usefull on this little device, but hope that will change since I prefer emacs on my other computers (with full keyboards)

How do you remap keys? I am looking for a way to use Escape!

thanks in advance.

--dmg

filologen 2009-12-15 09:30

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428587)
How do you remap keys? I am looking for a way to use Escape!

thanks in advance.

--dmg

I simply edit "/usr/share/X11/xkb/symbols/nokia_vndr/rx-51" (probably a good idea to take a backup first, just in case).

This thread may also be of interest:

http://talk.maemo.org/showthread.php...ight=remapping

白い熊 2009-12-15 09:36

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428587)
How do you remap keys? I am looking for a way to use Escape!

http://talk.maemo.org/showthread.php?t=35101

Unless you use Dvorak, like me, use qole's rx-51, it's the best. But inspire yourself, you can remap it the way you want. On qole's rx-51, Esc is Fn-Left etc. you'll see in the discussion.

My guide for Dvorak on the N900 at:
http://sumoudou.org/0/8.html

Let's see if we get at least one other brave soul, who treads the unknown with me and types on Dvorak on the N900 :)

dmg 2009-12-15 09:55

Re: GNU Emacs 23.1.1 for Nokia N900
 
Thanks! One nice thing is that I can use emacs from my laptop/desktop and start doing real configuration of my n900. I can't with other editors ;)

--dmg

p.s. I also use tramp and ssh to edit files from my desktop/laptop too.

白い熊 2009-12-15 09:55

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428562)
Thanks a lot! I have further configured your .emacs to avoid calling maximize-frame by hand.

Very good with the hook man!

BTW,
(setq mf-max-width 800)
(setq mf-max-height 380)

needs to be quoted out in my setup, otherwise the minibuffer ends up gigantic, 6 lines vertically or so, and will not change proportion.

The working setup is:
(add-to-list 'load-path "/path/to/maxframe.el")
;; for instance (add-to-list 'load-path "~/elisp/maxframe")
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
(maximize-frame)

白い熊 2009-12-15 10:00

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428676)
p.s. I also use tramp and ssh to edit files from my desktop/laptop too.

Yep, same here. I've been using sshfs heavily lately though, easier than ssh/tramp.
http://sumoudou.org/0/12.html

dmg 2009-12-15 10:56

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by 白い熊 (Post 428677)
Very good with the hook man!

BTW,
(setq mf-max-width 800)
(setq mf-max-height 380)

needs to be quoted out in my setup, otherwise the minibuffer ends up gigantic, 6 lines vertically or so, and will not change proportion.
[/B]

that is probably because you disable the tool-box. I noticed
that after I did.

--dmg

白い熊 2009-12-15 11:11

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by dmg (Post 428739)
that is probably because you disable the tool-box. I noticed
that after I did.

Yep, no tool-bar, no menu-bar, a hardcore Emacs pro doesn't need them, in fact loathes them :)

I'm trying to figure out how to make Emacs really go fullscreen, to cover the N900 top hildon bar, so far no luck will all combinations and approaches, I've tried. Don't know how to do it.

If you have any ideas, let's hear them!

白い熊 2009-12-15 14:43

Re: GNU Emacs 23.1.1 for Nokia N900
 
I've uploaded a fixed GNU Emacs 23.1.1 installation deb package to:
http://sumoudou.org/n900/emacs_23.1.1_armel.deb

Also, the setup instructions have been updated, taking into account remapping etc.:
http://sumoudou.org/0/14.html

sasankjampana 2009-12-16 01:06

Re: GNU Emacs 23.1.1 for Nokia N900
 
There is also the mg(editor) http://en.wikipedia.org/wiki/Mg_%28editor%29 which is emacs but small size.

xuexi 2009-12-16 05:10

Re: GNU Emacs 23.1.1 for Nokia N900
 
Who has tried teTeX on N900? If you have emacs, you may want to edit & compile a tex file.

JosefA 2009-12-18 18:46

Re: GNU Emacs 23.1.1 for Nokia N900
 
Any chance of pushing this to extras-devel or -testing if so inclined?

jjx 2009-12-18 21:09

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by 白い熊 (Post 428756)
Yep, no tool-bar, no menu-bar, a hardcore Emacs pro doesn't need them, in fact loathes them :)

I'm trying to figure out how to make Emacs really go fullscreen, to cover the N900 top hildon bar, so far no luck will all combinations and approaches, I've tried. Don't know how to do it.

If you have any ideas, let's hear them!

Copy what Microb does?

jjx 2009-12-18 21:10

Re: GNU Emacs 23.1.1 for Nokia N900
 
Btw, if someone manages to get the shift and fn keys sticky, could you please make the Ctrl key sticky too? Thanks :-)

白い熊 2009-12-19 01:00

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by jjx (Post 433850)
Copy what Microb does?

Obviously, or the terminal, or some other app. Yeah, but where's the relevant part of the sourcecode?

Give me a pointer to the code or script, that I can incorporate into the emacs build somehow...

PetriS 2009-12-20 19:50

Re: GNU Emacs 23.1.1 for Nokia N900
 
You could signal the window to go fullscreen with wmctrl
http://www.mail-archive.com/maemo-us.../msg13950.html
http://www.mail-archive.com/maemo-us.../msg13911.html
or perhaps signal gtk_window_fullscreen when needed
http://wiki.maemo.org/Documentation/...orial/Toolbars

ps. another info about Emacs on N900
http://www.natisbad.org/N900/n900-apps-emacs-22.2.html

白い熊 2009-12-20 20:08

Re: GNU Emacs 23.1.1 for Nokia N900
 
Thank you, man, for this, seriously...

I've previously already built wmctrl for the N900, but only tried running it from elisp and wasn't working.

Tried from the eshell, and lo and behold, the goddamn' Emacs is FULSCREEN...

Yes!

白い熊 2009-12-20 20:14

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by PetriS (Post 435617)
ps. another info about Emacs on N900
http://www.natisbad.org/N900/n900-apps-emacs-22.2.html

This emacs doesn't work on the N900, as it was built for 810, key input is non-working. That's why I built this one.

Also, it was only 22, this one is 23.1.

Petteri 2009-12-30 15:25

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by JosefA (Post 433726)
Any chance of pushing this to extras-devel or -testing if so inclined?

I am also hoping for this this and maybe some time in maemo extras. Then we would have both Vim and Emacs there :D

hbrock25 2010-01-08 17:26

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by 白い熊 (Post 435649)
This emacs doesn't work on the N900, as it was built for 810, key input is non-working. That's why I built this one.

Also, it was only 22, this one is 23.1.

Thanks *so much* for putting this build together, it works amazingly well.

I notice a minor bug in org-mode (org-remember is broken) that I know was fixed in a 23.1.1 update (I saw it on Fedora 12 GA but it was fixed shortly after in an update). Any chance you could respin your version from the latest 23.1.1 release branch? Alternatively, are your Makefile and build instructions available anywhere?

Thanks much,
--Hugh

P.S. Anyone else using org-mode on n900?

白い熊 2010-01-08 21:01

Re: GNU Emacs 23.1.1 for Nokia N900
 
I use org-mode, but not org-remember, therefore I haven't run into problems.

Tried compiling 23.1.1 some time ago and it wouldn't, don't remember why, so no plans for this one on the N900.

hbrock25 2010-01-10 17:11

Re: GNU Emacs 23.1.1 for Nokia N900
 
Actually, I take it back, it is now working fine. Must have been a bug in my .emacs. It has something to do with the number of args in the config list for C-c-r-t (remember a Task item).

Anyway, thanks again for the effort!

白い熊 2010-01-10 18:12

Re: GNU Emacs 23.1.1 for Nokia N900
 
Actually, I take it back too...

This is 23.1.1, I meant I had problems with 23.1.90, aka 23.2...

svanheulen 2010-01-15 04:59

Re: GNU Emacs 23.1.1 for Nokia N900
 
First off, thank you!

I was wondering if you know how to make emacs display unicode characters when running in the terminal? They just show up as question marks. edit: Nevermind, set-terminal-coding-system fixed it.

Also I was playing with the maemo 5 sdk the other day and I can't get emacs to compile with the target set to armel. qemu segfaults when it tries running temacs.... Is that normal? how did you get it to compile?

jtkim 2010-01-23 14:41

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by 白い熊 (Post 428218)
I've compiled and packaged GNU Emacs 23.1.1 for the Nokia N900 GNU mobile phone:

http://sumoudou.org/0/14.html

The install package is fully optified.

UPDATE: 2009-12-15-174333 Installation deb package on the GNU Emacs page in the link updated and uploaded again.

I've installed this following the "Basic" section. Unfortunately, the "Fix the maximization" [1] step doesn't seem to work for me. The minibuffer is not visible, regardless of whether ~/.emacs is there or not. From checking with "emacs.sh -nw" [2], I know that the maximize-frame function is there. However, running it makes no visible difference either in X window or in no-window (-nw) mode.

I'd appreciate help in getting a visible minibuffer.

Best regards, Jan

[1] http://sumoudou.org/%E7%9B%B8%E6%92%...ia%20N900.html
[2] As a micro-improvement, I've appended "$*" to the line in emacs.sh, so additional command line parameters are passed through to emacs

白い熊 2010-01-24 14:00

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by svanheulen (Post 473181)
Also I was playing with the maemo 5 sdk the other day and I can't get emacs to compile with the target set to armel. qemu segfaults when it tries running temacs.... Is that normal? how did you get it to compile?

Yeah, of course it's normal, emacs first compiles itself than uses the temacs compiled to further proceed in compilation. I doubt you can crosscompile it from scratchbox. I compiled it on the N900 directly...

白い熊 2010-01-24 18:34

Re: GNU Emacs 23.1.1 for Nokia N900
 
Quote:

Originally Posted by jtkim (Post 490501)
I've installed this following the "Basic" section. Unfortunately, the "Fix the maximization" [1] step doesn't seem to work for me. The minibuffer is not visible, regardless of whether ~/.emacs is there or not. From checking with "emacs.sh -nw" [2], I know that the maximize-frame function is there. However, running it makes no visible difference either in X window or in no-window (-nw) mode.

I have it working perfectly.

Make sure, you got ttf-droid installed.

Then add this to .emacs:

(set-default-font "-unknown-Droid Sans Mono-normal-normal-normal-*-20-*-*-*-m-0-iso10646-1")
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
(maximize-frame)


jtkim 2010-02-14 19:54

Re: GNU Emacs 23.1.1 for Nokia N900
 
1 Attachment(s)
Quote:

Originally Posted by 白い熊 (Post 492250)
I have it working perfectly.

Make sure, you got ttf-droid installed.

Then add this to .emacs:

(set-default-font "-unknown-Droid Sans Mono-normal-normal-normal-*-20-*-*-*-m-0-iso10646-1")
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
(maximize-frame)


I tried a variety of things, to no avail.

I have ttf-droid installed:
Code:

~ $ dpkg -l '*droid*'
ii  ttf-droid      1.01-dfsg0maem Font, used by Google's Android, with extensi

I have the necessary code in .emacs:
Code:

(set-default-font "-unknown-Droid Sans Mono-normal-normal-normal-*-20-*-*-*-m-0-
(add-to-list 'load-path "/usr/local/share/elisp")                             
(require 'maxframe)                                                           
(add-hook 'window-setup-hook 'maximize-frame t)                               
(maximize-frame)

The only difference to your code above is the add-to-list statement. I know that maxframe.el is loaded on startup, as invoking describe-function for "mf" gives me
[CODE
]mf is an alias for `maximize-frame' in `maxframe.el'.

(mf)

Maximizes the frame to fit the display if under a windowing
system.
[/CODE]
Also, changing the "20" in the set-default-font statement does change the font size, so I know that the startup file is processed. The attached screenshot shows the emacs window I'm getting.
Either I'm stupidly missing something obvious, or the frame size problem has changed somehow.

I'd appreciate any pointers.

Best regards & thanks in advance, Jan

filologen 2010-02-14 20:11

Re: GNU Emacs 23.1.1 for Nokia N900
 
For me it works, if I simply put the following in my .emacs:

Code:

(set-default-font "Droid Sans Mono-10")
(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
(maximize-frame)

I have also disabled menu-bar-mode and tool-bar-mode (I always do that on any system -- all they do is take up space)


All times are GMT. The time now is 04:39.

vBulletin® Version 3.8.8