Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241582 - sci-visualization/gle-4.1.2b: fix Emacs support
Summary: sci-visualization/gle-4.1.2b: fix Emacs support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 184166
  Show dependency tree
 
Reported: 2008-10-12 12:40 UTC by Ulrich Müller
Modified: 2008-10-14 11:51 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed changes for gle-4.1.2b.ebuild (gle-4.1.2b.ebuild.patch,1.14 KB, patch)
2008-10-13 07:18 UTC, Ulrich Müller
Details | Diff
Proposed changes for files/64gle-gentoo.el (sitefile.patch,329 bytes, patch)
2008-10-13 07:20 UTC, Ulrich Müller
Details | Diff
files/gle-4.1.2b-gle-emacs.patch (gle-4.1.2b-gle-emacs.patch,840 bytes, patch)
2008-10-13 07:23 UTC, Ulrich Müller
Details | Diff
files/gle-4.1.2b-gle-emacs.patch (gle-4.1.2b-gle-emacs.patch,1.90 KB, patch)
2008-10-14 09:10 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2008-10-12 12:40:14 UTC
Function elisp-site-file-install should not be used to install general elisp files. Please use elisp-install instead (this is well-documented in elisp-common.eclass, btw):

-		elisp-site-file-install "${DISTDIR}"/gle-emacs.el gle-mode.el
+		elisp-install "${DISTDIR}"/gle-emacs.el gle-mode.el || die

Also, files/64gle-gentoo.el should include the following as its first line:

(add-to-list 'load-path "@SITELISP@")
Comment 1 Ulrich Müller gentoo-dev 2008-10-12 12:54:00 UTC
After looking into gle-emacs.el I come to the conclusion that this requires more work. Patch will follow.
Comment 2 Ulrich Müller gentoo-dev 2008-10-13 07:18:18 UTC
Created attachment 168254 [details, diff]
Proposed changes for gle-4.1.2b.ebuild

This will byte compile gle-mode.el and use the proper functions to install files.
Comment 3 Ulrich Müller gentoo-dev 2008-10-13 07:20:25 UTC
Created attachment 168256 [details, diff]
Proposed changes for files/64gle-gentoo.el

Set load-path for Emacs (and some comment changes).
Comment 4 Ulrich Müller gentoo-dev 2008-10-13 07:23:20 UTC
Created attachment 168260 [details, diff]
files/gle-4.1.2b-gle-emacs.patch

This patch removes some invasive things from gle-mode.el, like setting of global keybindings and setting the major mode at load time.

In general, setting of keybindings (or menu entries) should never be done at load time.
Comment 5 Andrey Grozin gentoo-dev 2008-10-14 06:50:59 UTC
(In reply to comment #4)
> This patch removes some invasive things from gle-mode.el, like setting of
> global keybindings and setting the major mode at load time.
> 
> In general, setting of keybindings (or menu entries) should never be done at
> load time.
I suspect I'm the only real user of gle-mode out here (I use gle very often, and prefer to work from emacs). And I don't quite like these changes. Why remove the GLE menu and the keybindings C-c C-p (create postscript) and C-c C-v (view postscript)? I use them all the time: change a line in a gle file and view the result. If this functionality is in a wrong place, let's move it to the right place, not just delete it.
Comment 6 Ulrich Müller gentoo-dev 2008-10-14 09:10:38 UTC
Created attachment 168384 [details, diff]
files/gle-4.1.2b-gle-emacs.patch

You are right of course. Probably I overreacted when I saw that horrible way of doing things. ;-)

Please try if attached new patch works for you. (Note that the keybindings and menu bar entries only appear when you are in gle-mode.)
Comment 7 Andrey Grozin gentoo-dev 2008-10-14 11:51:06 UTC
Many thanks, a fixed ebuild is in cvs.

I've checked that, when I have some LaTeX files and some gle files in emacs (a typical situation), the menu GLE appears only when I'm in a gle file, and gle keybindings like C-c C-p only work in gle files.

I'll send your patch upstream.