FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 01-16-2008, 12:23 AM
 
Default Can't invoke and editor when `view source'

I didn't get much of a response on gmane.comp.kde.devel.kfm about this
trouble I'm having with konqueror (although I was told on another kde
group that was the place for it). I got one post that asked me for
certain specific information which I supplied, but got no more replys
(near 2 wks now). So noticicing some `konq' problems being discussed
at:
gmane.comp.kde.users.multimedia

I tried there and got no response at all (3 days now).

kde-3.5-8 desktop

I want konqueror to invoke emacs (or at this point, any editor) when I
choose to `View Document Source' from view menu.

I'm told that kind of setting is done at the below location:

In the Kcontrol settings:
KDE Components/File Associations/text/plain
No matter which one I choose (emacs, kwrite, kate)
When I restart konq and try to view source... I just get the bouncing
cursor that eventually times out but nothing ever comes up.

I tried putting the absolute path in the dialog but it acts no
different.

All three of those editors start without error from the command line.
I use emacs for many things so its always in working order.

I also tried using the settings under
KDE components/File Associations/text/html which I doubt is where
this should be done but still setting any of the editors doesn't seem
to help.

The machine has been rebooted a time or two for other reasons but just
letting you know that kde has been restarted but the problem persists.

I'm told kde might write some errors to an ~/.xsessions* file. Or
some ~/ file anyway.

I'm not sure what filenames to look for but:
I looked for files modified recently in ~/ that might have error
information but I see nothing that looks likely. And nothing with a
filename that looks promising.

Apparently konqueror is not throwing errors but silently timing out.

Can anyone think of a way to further trouble shoot this?

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-16-2008, 05:17 AM
"Hemmann, Volker Armin"
 
Default Can't invoke and editor when `view source'

Open webpage

right click

open with...

choose kate or any other editor.
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-16-2008, 07:25 AM
Mick
 
Default Can't invoke and editor when `view source'

On Wednesday 16 January 2008, Hemmann, Volker Armin wrote:
> Open webpage
>
> right click
>
> open with...
>
> choose kate or any other editor.

Don't know the first thing about emacs, but it may need bringing up a terminal
first which in turn runs emacs. You may want to try selecting the "Run in
terminal" or invoke it like so:

xterm -e /usr/bin/emacs

HTH.
--
Regards,
Mick
 
Old 01-16-2008, 05:56 PM
 
Default Can't invoke and editor when `view source'

Mick <michaelkintzios@gmail.com> writes:

> Don't know the first thing about emacs, but it may need bringing up
> a terminal first which in turn runs emacs. You may want to try
> selecting the "Run in terminal" or invoke it like so:
>
> xterm -e /usr/bin/emacs

This should not be a factor with X enabled emacs. And in fact calling
emacs at a cmd prompt just brigs up emacs in it own window, not
another xterm.

However, and surprisingly it does work... Inserting the xterm -e
command at:
right click/ open with/ other

Brings first an xterm which immediately spawns a new emacs window (not
in the xterm but on its own)

I'm pretty sure this is not what SHOULD happen though. I SHOULD be
able to just insert /usr/bin/emacs since it does not run in an
xterm. But... thanks .. at least I can edit a page with emacs now.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-16-2008, 05:57 PM
 
Default Can't invoke and editor when `view source'

"Hemmann, Volker Armin" <volker.armin.hemmann@tu-clausthal.de> writes:

> Open webpage
>
> right click
>
> open with...
>
> choose kate or any other editor.

Well that is at least progress... I can get kate and kwrite to appear
but still not emacs. I just get the emacs icon bouncing until it
times out.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-16-2008, 06:59 PM
Håkon Alstadheim
 
Default Can't invoke and editor when `view source'

reader@newsguy.com wrote:

Mick <michaelkintzios@gmail.com> writes:



Don't know the first thing about emacs, but it may need bringing up
a terminal first which in turn runs emacs. You may want to try
selecting the "Run in terminal" or invoke it like so:

xterm -e /usr/bin/emacs



This should not be a factor with X enabled emacs. And in fact calling
emacs at a cmd prompt just brigs up emacs in it own window, not
another xterm.

However, and surprisingly it does work... Inserting the xterm -e
command at:
right click/ open with/ other

Brings first an xterm which immediately spawns a new emacs window (not
in the xterm but on its own)

I'm pretty sure this is not what SHOULD happen though. I SHOULD be
able to just insert /usr/bin/emacs since it does not run in an
xterm. But... thanks .. at least I can edit a page with emacs now.



I have this same problem on some machines. Notably the ones where I've
put the most cruft in .emacs. I suspect that there is some bug that
stops garbage-collection from happening during startup so emacs runs
out of memory. Somehow having a tty attached works around that. A way
to test is to launch emacs in the background from a terminal (with
& at the end). If emacs hangs, I do "fg" in the shell* and hit
enter a couple of times and emacs will (sometimes) continue its
initialization process.



A better work-around than firing off emacs in the foreground is to make
more of your .emacs do AUTOLOAD rather than REQUIRE or LOAD.



Better yet is to have emacs-server or gnuserv running, and putting
emacsclient/gnuclient in the browser "editor"-config.
 
Old 01-16-2008, 08:14 PM
 
Default Can't invoke and editor when `view source'

Håkon Alstadheim <hakon@alstadheim.priv.no> writes:

> I have this same problem on some machines. Notably the ones where I've
> put the most cruft in .emacs. I suspect that there is some bug that
> stops garbage-collection from happening during startup so emacs runs
> out of memory. Somehow having a tty attached works around that. A way
> to test is to launch emacs in the background from a terminal (with &
> at the end). If emacs hangs, I do "fg" in the shell and hit enter a
> couple of times and emacs will (sometimes) continue its initialization
> process.

Here emacs starts immediately with emacs &

>
> A better work-around than firing off emacs in the foreground is to
> make more of your .emacs do AUTOLOAD rather than REQUIRE or LOAD.

There must be more to it since mine doesn't hang at all started
outside of Konq.

> Better yet is to have emacs-server or gnuserv running, and putting
> emacsclient/gnuclient in the browser "editor"-config.

This may be the best... I see that as one of the options in the
Konqueror dialog. But I've never really messed around with
gnuclient. Well rather, once years ago I tried it and never really
found it very usefull, or had trouble keeping it running smoothly
maybe. I don't recall anymore.... just recall an urge not to mess
with it...

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-16-2008, 08:25 PM
 
Default Can't invoke and editor when `view source'

Håkon Alstadheim <hakon@alstadheim.priv.no> writes:

> reader@newsguy.com wrote:
>> Mick <michaelkintzios@gmail.com> writes:
>>
>>
>>> Don't know the first thing about emacs, but it may need bringing up
>>> a terminal first which in turn runs emacs. You may want to try
>>> selecting the "Run in terminal" or invoke it like so:
>>>
>>> xterm -e /usr/bin/emacs
>>>
>>
>> This should not be a factor with X enabled emacs. And in fact calling
>> emacs at a cmd prompt just brigs up emacs in it own window, not
>> another xterm.
>>
>> However, and surprisingly it does work... Inserting the xterm -e
>> command at: right click/ open with/ other
>>
>> Brings first an xterm which immediately spawns a new emacs window (not
>> in the xterm but on its own)
>>
>> I'm pretty sure this is not what SHOULD happen though. I SHOULD be
>> able to just insert /usr/bin/emacs since it does not run in an
>> xterm. But... thanks .. at least I can edit a page with emacs now.
>>
>>
> I have this same problem on some machines. Notably the ones where I've
> put the most cruft in .emacs. I suspect that there is some bug that
> stops garbage-collection from happening during startup so emacs runs
> out of memory. Somehow having a tty attached works around that.

A little more on this. Do you mean it works just fine on some
machines as well?

Something to test your theory... (I tried it here with no better
results) is from Konq, right click/open with/other and put /usr/bin/emacs -Q

Which will start emacs with no site-file or ~/.emacs being loaded.
I tried that here but still just got the bouncing emacs icon/cursor.

Can you start emacs without problems from konqueror at right
click/open with/ on any machine? I mean without `xterm -e emacs'




--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-17-2008, 01:44 AM
Håkon Alstadheim
 
Default Can't invoke and editor when `view source'

reader@newsguy.com wrote:

Håkon Alstadheim <hakon@alstadheim.priv.no> writes:



reader@newsguy.com wrote:


Mick <michaelkintzios@gmail.com> writes:




Don't know the first thing about emacs, but it may need bringing up
a terminal first which in turn runs emacs. You may want to try
selecting the "Run in terminal" or invoke it like so:

xterm -e /usr/bin/emacs



This should not be a factor with X enabled emacs. And in fact calling
emacs at a cmd prompt just brigs up emacs in it own window, not
another xterm.

However, and surprisingly it does work... Inserting the xterm -e
command at: right click/ open with/ other

Brings first an xterm which immediately spawns a new emacs window (not
in the xterm but on its own)

I'm pretty sure this is not what SHOULD happen though. I SHOULD be
able to just insert /usr/bin/emacs since it does not run in an
xterm. But... thanks .. at least I can edit a page with emacs now.




I have this same problem on some machines. Notably the ones where I've
put the most cruft in .emacs. I suspect that there is some bug that
stops garbage-collection from happening during startup so emacs runs
out of memory. Somehow having a tty attached works around that.



A little more on this. Do you mean it works just fine on some
machines as well?

Something to test your theory... (I tried it here with no better
results) is from Konq, right click/open with/other and put /usr/bin/emacs -Q

Which will start emacs with no site-file or ~/.emacs being loaded.
I tried that here but still just got the bouncing emacs icon/cursor.

Can you start emacs without problems from konqueror at right
click/open with/ on any machine? I mean without `xterm -e emacs'



Not running konqueror here, but yes, emacs would fire up quite reliably
when I had it as my source editor in mozilla, way back when. You most
definitely SHOULD be able to run it without a terminal window. If you
are really keen on getting this to work, you could write a little script
like so to use as your editor: ----

#!/bin/bash
date >>~/emacs.log
emacs "$@" >>~/emacs.log 2>&1
-------
Come to think of it (while looking up the $@ semantics), could it be
that the argument fed from konqueror has spaces in it? Maybe it needs
quoting?


Experiment with adding </dev/null onto there (that never did it for me).
Have a look at what the log says.



--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-17-2008, 02:52 AM
 
Default Can't invoke and editor when `view source'

Håkon Alstadheim <hakon@alstadheim.priv.no> writes:

>> Can you start emacs without problems from konqueror at right
>> click/open with/ on any machine? I mean without `xterm -e emacs'
>>
>>
>>
> Not running konqueror here, but yes, emacs would fire up quite
> reliably when I had it as my source editor in mozilla, way back
> when. You most definitely SHOULD be able to run it without a terminal
> window. If you are really keen on getting this to work, you could
> write a little script like so to use as your editor: ----
> #!/bin/bash
> date >>~/emacs.log
> emacs "$@" >>~/emacs.log 2>&1

Thanks for the input... that is a good idea, and surprisingly works
fine. But does not provide the slightest clue why such a work around
is necessary. Nothing but the date gets written to emacs log.

Apparently for some reason there needs to be a sort of cutout between
Konq and emacs, but not so with kate or kwrite.

> Come to think of it (while looking up the $@ semantics), could it be
> that the argument fed from konqueror has spaces in it? Maybe it needs
> quoting?

I'm not sure how to capture whatever it is that konq is doing. I
don't think its throwing an error. But not really sure how to tell
other than looking for .xsessions* file or something else with a kde
error in it.

I think it is just timing out silently.

However it seems it would be almost guaranteed that there would be
spaces in the command `emacs %s' or something similar.

> Experiment with adding </dev/null onto there (that never did it for
> me). Have a look at what the log says.

Just for the record... no soap there. I'd already tried another
non-promising test, adding the background sign `&' which didn't seem
likely to help and as expected, did not.

--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 04:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org