Gentoo Archives: gentoo-user

From: "Håkon Alstadheim" <hakon@×××××××××××××××.no>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [konqueror] Can't invoke and editor when `view source'
Date: Thu, 17 Jan 2008 02:45:27
Message-Id: 478EC12A.2070505@alstadheim.priv.no
In Reply to: [gentoo-user] Re: [konqueror] Can't invoke and editor when `view source' by reader@newsguy.com
1 reader@×××××××.com wrote:
2 > Håkon Alstadheim <hakon@×××××××××××××××.no> writes:
3 >
4 >
5 >> reader@×××××××.com wrote:
6 >>
7 >>> Mick <michaelkintzios@×××××.com> writes:
8 >>>
9 >>>
10 >>>
11 >>>> Don't know the first thing about emacs, but it may need bringing up
12 >>>> a terminal first which in turn runs emacs. You may want to try
13 >>>> selecting the "Run in terminal" or invoke it like so:
14 >>>>
15 >>>> xterm -e /usr/bin/emacs
16 >>>>
17 >>>>
18 >>> This should not be a factor with X enabled emacs. And in fact calling
19 >>> emacs at a cmd prompt just brigs up emacs in it own window, not
20 >>> another xterm.
21 >>>
22 >>> However, and surprisingly it does work... Inserting the xterm -e
23 >>> command at: right click/ open with/ other
24 >>>
25 >>> Brings first an xterm which immediately spawns a new emacs window (not
26 >>> in the xterm but on its own)
27 >>>
28 >>> I'm pretty sure this is not what SHOULD happen though. I SHOULD be
29 >>> able to just insert /usr/bin/emacs since it does not run in an
30 >>> xterm. But... thanks .. at least I can edit a page with emacs now.
31 >>>
32 >>>
33 >>>
34 >> I have this same problem on some machines. Notably the ones where I've
35 >> put the most cruft in .emacs. I suspect that there is some bug that
36 >> stops garbage-collection from happening during startup so emacs runs
37 >> out of memory. Somehow having a tty attached works around that.
38 >>
39 >
40 > A little more on this. Do you mean it works just fine on some
41 > machines as well?
42 >
43 > Something to test your theory... (I tried it here with no better
44 > results) is from Konq, right click/open with/other and put /usr/bin/emacs -Q
45 >
46 > Which will start emacs with no site-file or ~/.emacs being loaded.
47 > I tried that here but still just got the bouncing emacs icon/cursor.
48 >
49 > Can you start emacs without problems from konqueror at right
50 > click/open with/ on any machine? I mean without `xterm -e emacs'
51 >
52 >
53 >
54 Not running konqueror here, but yes, emacs would fire up quite reliably
55 when I had it as my source editor in mozilla, way back when. You most
56 definitely SHOULD be able to run it without a terminal window. If you
57 are really keen on getting this to work, you could write a little script
58 like so to use as your editor: ----
59 #!/bin/bash
60 date >>~/emacs.log
61 emacs "$@" >>~/emacs.log 2>&1
62 -------
63 Come to think of it (while looking up the $@ semantics), could it be
64 that the argument fed from konqueror has spaces in it? Maybe it needs
65 quoting?
66
67 Experiment with adding </dev/null onto there (that never did it for me).
68 Have a look at what the log says.
69
70
71 --
72 gentoo-user@l.g.o mailing list

Replies