When Singular is installed with the emacs useflag it still does not provide full emacs integration. Reproducible: Always Steps to Reproduce: 1. Install Singular with emacs use flag and load emacs with (require 'site-gentoo) in the init file 2. M-x Singular 3. Define a ring with "ring R = 0,(x,y),lp" 4. press M-p Actual Results: 1) When starting Singular in Emacs 2 Errormessages are given, indicating that certain files are not found. At least the given helpfile is nowhere to be found on my system. 2) M-p inserts the last command in front of the prompt making it unusable. 3) TAB-Completion does not work. Expected Results: No error messages and functional M-p/TAB-Completion/... # emerge --info Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25 i686) ================================================================= System uname: 2.6.25 i686 Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz Timestamp of tree: Fri, 06 Jun 2008 08:53:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.tiscali.nl/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US de ja es fr it" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/science /usr/portage/local/layman/science /usr/portage/local/layman/x11 /usr/portage/local/layman/gentopia /usr/portage/local/tom-overlay" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa anthy apache2 arts avahi bash-completion berkdb bluetooth bzip2 cairo canna cddb cdparanoia cdr cjk cli cracklib crypt ctype cups curl daap dbus dri dvd dvdr dvdread eds emacs encode esd evo expat fam fbcon ffmpeg firefox flac fortran freewnn ftp gd gdbm gif glut gmp gnome gnome-keyring gphoto2 gpm graphviz gstreamer gtk guile hal hdaps iconv ieee1394 imagemagick imap imlib ipod ipv6 isdnlog java javascript jpeg kde kerberos latex ldap leim libnotify lm_sensors m17n-lib mad midi migemo mikmod mime mmx mp3 mp4 mpeg mplayer mudflap mule musicbrainz mysql mysqli ncurses networkmanager nls nptl nptlonly nsplugin obex ocaml ogg oggvorbis openal opengl openmp oss pam pcmcia pcre pdf perl php plotutils png pppd python qt3 qt3support qt4 quicktime readline real reflection samba sasl sdl session slang spell spl sqlite3 sse ssl svg tcpd texlive theora tiff tk truetype unicode usb vhosts vim vim-syntax visualization vorbis wifi win32codecs wxwindows x86 xcomposite xine xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FRITZCAPI_CARDS="fcpcmcia" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US de ja es fr it" USERLAND="GNU" VIDEO_CARDS="i810" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
You are hit by several independent problems here: > 1) When starting Singular in Emacs 2 Errormessages are given, indicating > that certain files are not found. At least the given helpfile is > nowhere to be found on my system. Hm, singular-3.0.4.2-gentoo.diff already patches the path names in the source, but looks like it doesn't do it right. At least SINGULAR_EMACS_DIR and SINGULAR_INFO_FILE are wrong (I didn't check the others). Also, the Info file is only installed with USE=doc. > 2) M-p inserts the last command in front of the prompt making it unusable. I believe that this should be reported upstream. They are using Emacs' comint mode in a strange/nonstandard way. As a workaround, you may set "comint-use-prompt-regexp" to t. > 3) TAB-Completion does not work. This should be fixed if the paths from 1) are set in the right way.
Hi, some remarks. In the described setup the "doc" useflag is also set. The help partially works. C-c C-h shows the list of available singular-emacs commands, as it should. typing "?ring;" on the Singular commandline(outside emacs) correctly shows help on "ring", ie. it launches firefox on: file://localhost/usr/share/doc/singular-3.0.4.2/html/sing_149.htm#SEC189 which shows the corresponding topic. Doing the same thing in the emacs-singular prompt results in the Emacs Help Browser starting, but showing something different, not related to Singular. Probably this is just an indication of the info file not to be found... ?
I fixed the paths and things seem to work well now inside emacs. If there are any additional issues I'd appreciate if somebody could provide a patch since I don't know emacs very well at all. Best, Markus
I reported the "M-p inserts before prompt issue" upstream, referring to this bug. They don't have a public bugtracking system, but maybe they answer here.
Thanks, Thomas! I'll close this bug as "upstream". Please, don't hesitate to reopen in case there are any news. best, Markus
They are working on it, saying that it has to do with changes in emacs. The problem does not occur in <=emacs-21.* and xemacs.
Thanks for the note! Let's hope they get it figured out. Best, Markus
Created attachment 170610 [details] Replacement for singular.el
Created attachment 170612 [details] Replacement for .emacs-singular
Hi, finally my friend (a.k.a. upstream) came up with a patch for the problem. I don't know when they will release this officially. Could you integrate it ?
One more remark, the replacement files are for >=emacs-22, so the patches should be only applied in this case... (Is that possible ?)
(In reply to comment #11) > the replacement files are for >=emacs-22, > so the patches should be only applied in this case... > (Is that possible ?) I don't think so.
I will urge upstream to make a version of .emacs-singular that checks the installed emacs version.
(In reply to comment #12) > (In reply to comment #11) > > the replacement files are for >=emacs-22, > > so the patches should be only applied in this case... > > (Is that possible ?) > > I don't think so. > Thanks much for your work, Thomas! Since emacs-22 is stable on all arches wouldn't it be possible to apply them unconditionally (We could always add a quick test in pkg_setup in case somebody hasn't updated their box in a while and is still running <emacs-22)? cheers, Markus
(In reply to comment #14) > Since emacs-22 is stable on all arches wouldn't > it be possible to apply them unconditionally That would be a possibility; the ebuild should depend on >=virtual/emacs-22 then. > (We could always add a quick test in pkg_setup > in case somebody hasn't updated their box in a > while and is still running <emacs-22)? You could do something similar as in elisp_pkg_setup of elisp.eclass: if ! version_is_at_least 22 "$(elisp-emacs-version)"; then eerror "..." die "..." fi
To clarify my previous comment: _Both_ the dependency and the pkg_setup test are needed, because Emacs is slotted and the active version (selected by eselect) might not be the newest one installed.
Thank you very much for your comments, Ulrich. I'll give this a try and will update the ebuild if everything works as expected. Best, Markus
I have added the updated emacs files to the ebuild with the discussed checks for >=emacs-22 in place. Please let me know if there are any problems. Thanks again for your help! Best, Markus