maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] GNU Emacs 24 for N900 (https://talk.maemo.org/showthread.php?t=88135)

mtvoid 2012-12-05 16:56

[Announce] GNU Emacs 2̶4̶ 25 for N900
 
Update 2016-09-20:
Emacs 25.1 is now out, and a new package, emacs25 is in the repository (it conflicts with emacs24, which will be automatically removed if you install this new version).

Some tips:
  • If you are using the default hardware keyboard layout, then it is highly recommended that you remap the keys to allow you to use Emacs effectively (you'll need to add the Esc key to the layout at least, which can then be used as the Meta modifier). As an example, I map Fn+Backspace to Escape and Fn+Return to Tab:
    Code:

    key <BKSP>  { [ BackSpace, Delete, Escape, Escape ] };
    key <RTRN>  { [ KP_Enter, KP_Enter, Tab, Tab ] };

    Use the following as a guide to customize your layout: Guide to remapping keyboard
  • To make better use of the limited screen space, I've set the menu bar and tool bar to hide on startup. If you want them, add these lines to your .emacs:
    (menu-bar-mode 1)
    (tool-bar-mode 1)
  • To switch to fullscreen mode, call the function (toggle-frame-fullscreen) (mapped to <f11> by default).
---Original announcement---
I had compiled Emacs so that I could run it on an N900, and thought of sharing the results by uploading the package, which is now in the extras-devel repository (from which Emacs was conspicuously absent until now!). It is the current stable release (24.4 [updated 2014-11-13]), and split into two packages, emacs24 and emacs24-el (optional package if you also want the elisp sources). I've made only minimal changes over the upstream version to adapt it to the Maemo environment, and I encourage you to test it and see if it works for you.

I'll update this post upon receiving further feedback. Happy testing!
---

reinob 2012-12-05 20:33

Re: [Announce] GNU Emacs 24 for N900
 
Nice. Just installed it and played a bit with it. I was however expecting a non-graphical version (emacs-nox?).

Would it be too much to ask you to package that up as well? :)

mtvoid 2012-12-05 20:45

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by reinob (Post 1301704)
Nice. Just installed it and played a bit with it. I was however expecting a non-graphical version (emacs-nox?).

Would it be too much to ask you to package that up as well? :)

Well, you can always launch it within a terminal as "emacs -nw", then you'll get the console-based version!

www.rzr.online.fr 2012-12-05 20:46

Re: [Announce] GNU Emacs 24 for N900
 
does it depends on hildon ? if not it would be a good challenge to port it to harmattan, ... for now i use zile and redak :)

mtvoid 2012-12-05 21:09

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1301709)
does it depends on hildon ? if not it would be a good challenge to port it to harmattan, ... for now i use zile and redak :)

It links to GTK+ and related libraries, but it does not have any Hildon-specific dependencies. I don't know if it will compile for harmattan; maybe with an alternate toolkit or without X support.

reinob 2012-12-05 21:13

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1301707)
Well, you can always launch it within a terminal as "emacs -nw", then you'll get the console-based version!

/me feeling incredibly stupid. Thanks for the slap.

www.rzr.online.fr 2012-12-05 21:17

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1301718)
It links to GTK+ and related libraries, but it does not have any Hildon-specific dependencies. I don't know if it will compile for harmattan; maybe with an alternate toolkit or without X support.

well we built gtk on harmattan but did not test much ... are your sources published ? link to dsc or git would be welcome ....

mtvoid 2012-12-05 21:23

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1301726)
well we built gtk on harmattan but did not test much ... are your sources published ? link to dsc or git would be welcome ....

You can download the sources from the package page: http://maemo.org/packages/source/vie...macs24/24.2-1/

I did not really have to make any modifications to the source for it to compile under scratchbox for fremantle. You can give it a try with harmattan.

dfdfdf 2012-12-05 22:19

Re: [Announce] GNU Emacs 24 for N900
 
Hello,
I just installed it, works fine but the menus go some strange background.

How can I run my program in it?
If I create .C file, how can I run it to test how it works?
in original emacs I use 'gcc file.c' then I do './a.exe' to run
How can I do it here?

Thanks.

mtvoid 2012-12-05 22:54

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by dfdfdf (Post 1301739)
Hello,
I just installed it, works fine but the menus go some strange background.

I have noticed some visual glitches with some GUI elements. I personally keep the tool bar and menu bar hidden (you can toggle with M-x tool-bar-mode and M-x menu-bar-mode)

Quote:

How can I run my program in it?
If I create .C file, how can I run it to test how it works?
in original emacs I use 'gcc file.c' then I do './a.exe' to run
How can I do it here?
It should work pretty much the same way (provided you have gcc installed of course). Just invoke gcc via M-x compile.

xes 2012-12-07 09:15

Re: [Announce] GNU Emacs 24 for N900
 
..Warning.... the package contains bin/emacs and bin/emacs24 both big binary files of the same size. I suppose that one of them should be a link to other one...

mtvoid 2012-12-07 09:29

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by xes (Post 1302156)
..Warning.... the package contains bin/emacs and bin/emacs24 both big binary files of the same size. I suppose that one of them should be a link to other one...

They are hard-linked, as seen in this extract from dpkg-deb -c emacs24_24.2-1_armel.deb:

Code:

hrwxr-xr-x root/root        0 2012-11-16 02:38 ./opt/emacs24/bin/emacs link to ./opt/emacs24/bin/emacs-24.2

xes 2012-12-07 09:37

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1302160)
They are hard-linked, as seen in this extract from dpkg-deb -c emacs24_24.2-1_armel.deb:

Code:

hrwxr-xr-x root/root        0 2012-11-16 02:38 ./opt/emacs24/bin/emacs link to ./opt/emacs24/bin/emacs-24.2

thanks!... emacs uses too much space and i was trying to verify if there is something to delete..

syake 2012-12-08 15:34

Re: [Announce] GNU Emacs 24 for N900
 
hello and nice port mtvoid.

How did you create your .deb files in scratch box?

I always create my n900 port using "dh_make & dpkg-buildpackage" commands and
editing "debian/control debian/rules /debian/dirs".

Its tired to do so on each compiles,I want to put symlinks like you did.

could you give me any advice?

mtvoid 2012-12-09 15:37

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by syake (Post 1302527)
hello and nice port mtvoid.

How did you create your .deb files in scratch box?

I always create my n900 port using "dh_make & dpkg-buildpackage" commands and
editing "debian/control debian/rules /debian/dirs".

Its tired to do so on each compiles,I want to put symlinks like you did.

could you give me any advice?

Sure. I made it the same way you do, using "dh_make -a" to prepare the debian subdirectory, then creating and editing some files within that, and using dpkg-buildpackage to generate the binaries. In debian/rules, I configure emacs with --prefix=/opt/emacs24 to optify the installation path. Additional files of my own to be installed, like the emacs.desktop file, and local customizations, are listed in debian/emacs24.install, and symlinks to be generated are listed in debian/emacs24.links. You can download the source tar.gz from the package page, and look at the contents of the debian subdir to see how I did it.

syake 2012-12-10 10:34

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1302832)
Sure. I made it the same way you do, using "dh_make -a" to prepare the debian subdirectory, then creating and editing some files within that, and using dpkg-buildpackage to generate the binaries. In debian/rules, I configure emacs with --prefix=/opt/emacs24 to optify the installation path. Additional files of my own to be installed, like the emacs.desktop file, and local customizations, are listed in debian/emacs24.install, and symlinks to be generated are listed in debian/emacs24.links. You can download the source tar.gz from the package page, and look at the contents of the debian subdir to see how I did it.

After dh_make on my directory,I couldn't have *.links and *.install in my subdirs.
but, i could find "debian/postinst"...smell of success:rolleyes:

Thank you for your big help. :)

www.rzr.online.fr 2012-12-15 09:39

Re: [Announce] GNU Emacs 24 for N900
 
I rebuilt it to n950 and it is working

May I suggest to repack it using debian orig tarball , are you using gitorious ? I can push my fixes ?

--
http://rzr.online.fr/q/emacs# #EmacS 24 ported to #MeeGo #HarmattanDev for !n950Club , works in #terminal ( --no-w) but #GtK #Ui is crashing

evujumenuk 2012-12-15 10:16

Re: [Announce] GNU Emacs 24 for N900
 
rzr, recently I'd seen Emacs pop up in MeeCatalog, but didn't confirm it was from the community repo. Was it? Why is it gone now? It was there for, like, a day or less.

www.rzr.online.fr 2012-12-15 11:28

Re: [Announce] GNU Emacs 24 for N900
 
I guess this was mine, I did that last week but did not announce it ..

pick my changes :

https://gitorious.org/downstream/emacs/graph/harmattan


Regards

t-b 2013-08-30 19:10

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1301646)
[LIST]
If you are using the default hardware keyboard layout, then it is highly recommended that you remap the keys to allow you to use Emacs effectively (you'll need to add the Esc key to the layout at least, which can then be used as the Meta modifier). Guide to remapping keyboard

I have a problem with assigning the esc. button as meta key. Can someone who already managed to do that share the method?
Tried remapping the keys but the ESC key doesn't seem to respond. here

This adjustment in rx-51 file doesn't seem to work.

key <RTRN> { [ KP_Enter, KP_Enter, Escape, Menu ] };

I hope there is someone in this community capable and willing to share the knowledge.

zoner 2013-08-30 19:50

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by t-b (Post 1370739)
I have a problem with assigning the esc. button as meta key. Can someone who already managed to do that share the method?
Tried remapping the keys but the ESC key doesn't seem to respond. here

This adjustment in rx-51 file doesn't seem to work.

key <RTRN> { [ KP_Enter, KP_Enter, Escape, Menu ] };

so are you getting escape with Fn-Ret ?
It's been a very long time, but I think I had trouble remapping RET, h and x.

-- edit, I misread your issue --
I would try something else for esc & "menu," I use S-Fn-period for menu.
There is several examples of Fn-left for escape and I've gotten used to that.

Get something working, if you really want to mod the RET key, you would at least have a fully functional emacs to do it with :)

t-b 2013-08-31 10:03

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by zoner (Post 1370747)
There is several examples of Fn-left for escape and I've gotten used to that.

Get something working, if you really want to mod the RET key, you would at least have a fully functional emacs to do it with :)

Yes I have seen reports of successful use of Escape. I remapped other buttons as well with 'Escape' and also tried 'Alt_L'.
Result is always that the key combo doesn't respond to any keypress. I have also tried updating the down key before.
So I am looking for someone who has succeeded in installing this emacs version and uses the escape button (or another one) as meta key.
Should the escape button be assigned too in the .emacs file? Seems not logical to me on my desktop the escape button is accepted without any hassle.

I still think I am not doing or should do something incredibly obvious, because I don't see any similar post with this problem in any of the emacs threads (and I have read them all..).

zoner 2013-08-31 12:55

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by t-b (Post 1370807)
I still think I am not doing or should do something incredibly obvious, because I don't see any similar post with this problem in any of the emacs threads (and I have read them all..).

The modifier keys are not sticky in emacs but I'm sure you realized this.

Do your modified keys work outside of emacs?

t-b 2013-08-31 13:46

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by zoner (Post 1370841)
The modifier keys are not sticky in emacs but I'm sure you realized this.

Do your modified keys work outside of emacs?

I have seen reports that modified keys were not registered in certain programs, but haven't seen anyone saying escape was not registered after editing the rx-51 file.
Most adjusted keys are working fine in emacs, it is just the escape key that fails. I need a meta key to be able to use emacs with org mode.

Is there another program that uses the escape key that I can test the functionality with?

The only thing I did with this phone is installing emacs and trying to get it working. Please keep in mind I don't know much about the N900 and other software. I don't even know a lot about emacs too. Just recently discovered org mode :)

zoner 2013-08-31 16:57

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by t-b (Post 1370851)
I have seen reports that modified keys were not registered in certain programs, but haven't seen anyone saying escape was not registered after editing the rx-51 file.
Most adjusted keys are working fine in emacs, it is just the escape key that fails. I need a meta key to be able to use emacs with org mode.

Is there another program that uses the escape key that I can test the functionality with?

The only thing I did with this phone is installing emacs and trying to get it working. Please keep in mind I don't know much about the N900 and other software. I don't even know a lot about emacs too. Just recently discovered org mode :)

I guess I/we need to see your rx-51 to figure this out. We're a bit OT for this thread. Can you pm or upload your rx-51 somewhere?

You're in Europe, right? You have four directional keys?

t-b 2013-08-31 23:05

Re: [Announce] GNU Emacs 24 for N900
 
One of the rx-51 files I tried is this one from Mr_Pingu
http://talk.maemo.org/showpost.php?p...43&postcount=2

[edit] and yes 4 directional keys and I am from Europe/Netherlands.

t-b 2013-09-01 18:15

Re: [Announce] GNU Emacs 24 for N900
 
1 Attachment(s)
I have attached another rx-51 file I tried.
Based on this post http://talk.maemo.org/showpost.php?p=970519&postcount=5

the part that should work:

Code:

xkb_symbols "english_base" {
// 1. row
key <AD01>        { [        Alt_L,                Alt_L,                1,                F1                ] };

I also tried Escape instead of Alt_L

I use the following method to update and use the new rx file.

1. open terminal
2. root
3. emacs /usr/share/X11/xkb/symbols/nokia_vndr/rx-51
4. edit the file
5. ctrl-x ctrl-s to save the file
6. close emacs - goto terminal
7. setxkbmap also tried setxkbmap us
8. start emacs again
9. try key (in this case q) + another key / result: no response
10. press ctrl-x and then q + another key / then I can see the result of the key - Escape/Alt is never registered

Other keys that are mapped (like < and > are registered in emacs)

t-b 2013-09-01 20:34

Re: [Announce] GNU Emacs 24 for N900
 
I just did one minor adjustment in the rx-51 file and changed F1 in 1 and after that change the q button was recognized as ESC!

After that I remapped Q as q and changed 1 back to F1 and it still worked...

I have no idea why the previous files failed, but it works now.
I can finally spend some time with org mode :)

mtvoid 2014-11-13 10:18

Re: [Announce] GNU Emacs 24 for N900
 
It was about time to bring Emacs in the Maemo repository up to date with the latest stable release (24.4), which is now done. Upgrade and enjoy!

t-b 2015-08-23 13:00

Re: [Announce] GNU Emacs 24 for N900
 
I have noticed Ubuntu 14.04 still has 24.3 in its repo - nice to have 24.4 for the N900
Using this version for a few weeks now and it works without any issue.
One of the cool things of 24.4 is the built in browser eww. Not perfect, but will work for basic sites like talk.meamo.org. Now I rarely have to leave emacs / org-mode :)
Google didn't seem to work though - executing a search query gave an error - but duckduckgo.com is an alternative that works fine.

Emacs (org-mode) is fantastic for the N900 with its excellent screen and keyboard. Thanks for the update mtvoid.

t-b 2016-08-24 19:56

Re: [Announce] GNU Emacs 24 for N900
 
Today I've set up emacs to receive email (with gnus) on my N900. Here' s what I did. It is pretty straightforward.
This thread seems to be the most appropriate to add this info but no problem to create a separate thread if that is preferred.

Source

Code:

Put the following in ~/.profile :

export EMAIL="<EMAIL_ADDRESS>"
export NAME="<FULL NAME>"
export SMTPSERVER="smtp.gmail.com"

For example, if your name is John Smith and your email address is johnsmith@gmail.com:

export EMAIL="johnsmith@gmail.com"
export NAME="John Smith"
export SMTPSERVER="smtp.gmail.com"

Now put the following in your ~/.gnus file:

(setq gnus-select-method
      '(nnimap "gmail"
              (nnimap-address "imap.gmail.com")  ; it could also be imap.googlemail.com if that's your server.
              (nnimap-server-port "imaps")
              (nnimap-stream ssl)))

(setq smtpmail-smtp-service 587
      gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

Put the following in your ~/.authinfo file, replacing <USER> with your email address and replacing <PASSWORD> with your password—or your application-specific password:


machine imap.gmail.com login <USER> password <PASSWORD> port imaps
machine smtp.gmail.com login <USER> password <PASSWORD> port 587

You need to change your gmail account / settings to enable IMAP:

http://www.howtogeek.com/wp-content/...zNASgICT6Z.png

You also need to adjust your gmail account to enable accept connecting with "Less secure apps" link

After that you should be able to read Gmail with Emacs on your N900. Just start it with M-x gnus

Additional links that might be useful.

Default gnus only shows unread mail - method to enable showing read mail link

Practical guide to use Gnus with Gmail

I haven' t been able to send email yet, but receiving it works fine. Will update this post once I made it work or have other info that might be helpful.

[edit]

update: sending email is possible with Emacs by first installing gnutls-bin from the repo and after that add below to the .gnus file.


Code:

setq smtpmail-smtp-service 587
      smtpmail-smtp-server "smtp.gmail.com"
      message-send-mail-function 'smtpmail-send-it
      starttls-extra-arguments nil
      starttls-gnutls-program "/usr/bin/gnutls-cli"
      starttls-extra-arguments nil
      starttls-use-gnutls t
      gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

(with-eval-after-load 'gnus-group
  (gnus-group-list-all-groups 5))


t-b 2016-09-18 10:29

Re: [Announce] GNU Emacs 24 for N900
 
https://lists.gnu.org/archive/html/e.../msg00451.html

Emacs 25.1 released today. It has some very nice enhancements, improvements.

@mtvoid hope you are still around, if it is not too much trouble could you please update the current version? thx :)

mtvoid 2016-09-18 10:50

Re: [Announce] GNU Emacs 24 for N900
 
@t-b I too had been waiting for the 25.1 final release announcement and now that it is out, I'll look into packaging it for Maemo.

I recently upgraded to a new computer and need to first set up a working Scratchbox environment once again. I'll try to do this in the coming days. Watch out for updates in this space!

t-b 2016-09-18 11:45

Re: [Announce] GNU Emacs 24 for N900
 
Thanks, that is great news! Looking forward to give 25.1 a spin on my N900.

mtvoid 2016-09-20 15:20

Re: [Announce] GNU Emacs 2̶4̶ 25 for N900
 
The latest Emacs release is now added to the repository! Here's the huge list of changes and new features: http://www.gnu.org/software/emacs/news/NEWS.25.1. Of course, not all the fancy new stuff is compiled in due to the limitations of what's available on the platform, but it seems to be working just fine otherwise.

The package name has changed. To upgrade, you need to install emacs25 (this will also uninstall emacs24). Enjoy!

t-b 2016-09-20 17:13

Re: [Announce] GNU Emacs 24 for N900
 
Awesome, thanks!

I just installed it. I needed to uninstall the previous package first (some conflicting packages message). No problem to do that manually though.
After installing all settings were still working (.emacs not overwritten) so that was nice :)

Checked some documents and also gave eww a try - it has some very nice improvements.

I guess no Xwidgets support possible?

Everything seems to be working fine (of course not played with it for a long time). Will test it some more the next few days and report back if there are any problems with it.

mtvoid 2016-09-20 17:25

Re: [Announce] GNU Emacs 24 for N900
 
Thanks for testing. The conflict resolution should have been handled automatically, but I have only tested it by installing the package manually instead of through the repository.

No Xwidgets, as it requires GTK+ 3, and Maemo has GTK+ 2.

t-b 2016-09-20 19:17

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by mtvoid (Post 1515367)
No Xwidgets, as it requires GTK+ 3, and Maemo has GTK+ 2.

Too bad we are missing some of the more recent libraries, would have been very nice - maybe one day...

Great article here that sums up quite well the huge list of new features in 25(.1)

t-b 2016-09-25 18:56

Re: [Announce] GNU Emacs 24 for N900
 
I've used Emacs 25.1 daily for the last 5 days and it is working flawless.

@mtvoid I've been trying to send mail with gnus and that was only possible by installing gnutls-cli.
The version of gnutls-cli that is currently available in the repo is still working but very old (and definitely not secure).
Would it be possible to compile emacs against the latest version of gnutls http://www.gnutls.org/ so that it is integrated in emacs?

mtvoid 2016-09-26 19:44

Re: [Announce] GNU Emacs 24 for N900
 
Quote:

Originally Posted by t-b (Post 1515592)
@mtvoid I've been trying to send mail with gnus and that was only possible by installing gnutls-cli.
The version of gnutls-cli that is currently available in the repo is still working but very old (and definitely not secure).

Unfortunately, the version in the repositories is now so old that Emacs is configured to not compile with it.

Quote:

Would it be possible to compile Emacs against the latest version of gnutls http://www.gnutls.org/ so that it is integrated in emacs?
While I think it should be possible in principle, this would turn out to be a large project, requiring building some new packages to be added to the repository. Can't make any promises right now, but I'll try to see if I can, if this is an important/necessary feature for you.


All times are GMT. The time now is 02:14.

vBulletin® Version 3.8.8