all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Visiting files with gnuclient don't add to history
@ 2006-09-16 14:46 Slawomir Nowaczyk
  2006-09-16 16:55 ` Jason Rumney
  2006-09-17 15:12 ` Richard Stallman
  0 siblings, 2 replies; 11+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-16 14:46 UTC (permalink / raw)


Hello,

Currently, when I visit a file using gnuclient, it does not get added to
the history. It used to work just fine some time ago (a month, maybe
two, I think). Try emacs -Q

(require 'gnuserv)
(gnuserv-start)

Visit some file using gnuclient. file-name-history is still nil.

Is this a problem in Emacs or is there something wrong with my version
of gnuserv/gnuclient?

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

A seminar on Time Travel will be held two weeks ago.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-16 14:46 Visiting files with gnuclient don't add to history Slawomir Nowaczyk
@ 2006-09-16 16:55 ` Jason Rumney
  2006-09-17  0:08   ` Lennart Borgman
  2006-09-17 15:12 ` Richard Stallman
  1 sibling, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2006-09-16 16:55 UTC (permalink / raw)
  Cc: emacs-devel

Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:

> Is this a problem in Emacs or is there something wrong with my version
> of gnuserv/gnuclient?

The code that visits the files sent by gnuclient will be in
gnuserv.el, so that would be the first place to look.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-16 16:55 ` Jason Rumney
@ 2006-09-17  0:08   ` Lennart Borgman
  2006-09-17 17:29     ` Slawomir Nowaczyk
  0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2006-09-17  0:08 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, emacs-devel

Jason Rumney wrote:
> Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:
>
>   
>> Is this a problem in Emacs or is there something wrong with my version
>> of gnuserv/gnuclient?
>>     
>
> The code that visits the files sent by gnuclient will be in
> gnuserv.el, so that would be the first place to look.
>
>   

Slawomir, which gnuserv/gnuclient are you using? Are you on w32? I just 
added a line to gnuserv.el that should fix the problem:

diff -c "c:/Program Files/Emacs/EmacsW32/bin/gnuserv.el~" "c:/Program 
Files/Emacs/EmacsW32/bin/gnuserv.el"
*** c:/Program Files/Emacs/EmacsW32/bin/gnuserv.el~    Wed Jul  5 
17:21:44 2006
--- c:/Program Files/Emacs/EmacsW32/bin/gnuserv.el    Sun Sep 17 
02:07:03 2006
***************
*** 313,321 ****
           (progn (select-screen gnuserv-frame)
              (find-file file))
             (select-screen (create-screen (find-file-noselect file)))))
!
!         (t (find-file file))))) ;; emacs18+
!   )
 
  (defun gnuserv-edit-files-quickly (list)
    "For each (line-number . file) pair in LIST, edit the file at 
line-number.
--- 313,320 ----
           (progn (select-screen gnuserv-frame)
              (find-file file))
             (select-screen (create-screen (find-file-noselect file)))))
!         (t (find-file file)))  ;; emacs18+
!       (add-to-history 'file-name-history file))))
 
  (defun gnuserv-edit-files-quickly (list)
    "For each (line-number . file) pair in LIST, edit the file at 
line-number.

Diff finished.  Sun Sep 17 02:07:32 2006

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-16 14:46 Visiting files with gnuclient don't add to history Slawomir Nowaczyk
  2006-09-16 16:55 ` Jason Rumney
@ 2006-09-17 15:12 ` Richard Stallman
  2006-09-17 15:27   ` Lennart Borgman
                     ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Richard Stallman @ 2006-09-17 15:12 UTC (permalink / raw)
  Cc: emacs-devel

We don't maintain gnuclient, but it is possible that this is due
to a bug in Emacs.  If you debug what's going on, you can determine
whether an Emacs bug is involved.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 15:12 ` Richard Stallman
@ 2006-09-17 15:27   ` Lennart Borgman
  2006-09-17 17:29   ` Slawomir Nowaczyk
  2006-09-17 20:00   ` Jason Rumney
  2 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2006-09-17 15:27 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, emacs-devel

Richard Stallman wrote:
> We don't maintain gnuclient, but it is possible that this is due
> to a bug in Emacs.  If you debug what's going on, you can determine
> whether an Emacs bug is involved.
>   

I looked at the problem and I believe it was due to a bug in the version 
of gnuserv.el which I distribute with the w32 build I make. I have 
corrected the problem there. More than that I do not know what to do.

I distribute this because there is still no emacsclient/server for w32.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17  0:08   ` Lennart Borgman
@ 2006-09-17 17:29     ` Slawomir Nowaczyk
  0 siblings, 0 replies; 11+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-17 17:29 UTC (permalink / raw)


On Sun, 17 Sep 2006 02:08:37 +0200
Lennart Borgman <lennart.borgman.073@student.lu.se> wrote:

#> Jason Rumney wrote:
#> > Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> writes:

#> >> Is this a problem in Emacs or is there something wrong with my
#> >> version of gnuserv/gnuclient?
#> >
#> > The code that visits the files sent by gnuclient will be in
#> > gnuserv.el, so that would be the first place to look.
#> 
#> Slawomir, which gnuserv/gnuclient are you using?

I am not entirely sure... I remember it took me quite some time (long
ago) before I found a version which actually worked reliably. My
gnuserv.el contains this:

(defconst gnuserv-rcs-header-id "$Header: gnuserv.el,v 2.1 95/02/16 12:00:16 arup alpha $")

but that is probably meaningless, since the latest change (of those
listed explicitly, at least) is:

;; Lennart Borgman <lennart DOT borgman DOT 073 AT student DOT lu DOT se> 2005-01-29
;;      Added aliases for old server-* functions called from gnuclient.

I have now downloaded a seemingly newer version (at least, the gnuclient
program has new Emacs icon and is 900kb in size, as opposed to 80kb
which I have been using ;) from http://www.emacswiki.org/cgi-bin/wiki/GnuClient
namely this: http://ourcomments.org/Emacs/DL/EmacsW32%20only/EmacsW32-alone-1.06.zip

(I did not want to download the whole EmacsW32)

#> Are you on w32?

Yes. But I use "pure" emacs, pulled from CVS and compiled by myself, not
EmacsW32.

#> I just added a line to gnuserv.el that should fix the problem:

Thanks, I applied this patch and it works great.

The reason I have wrote here, though, is that the version of gnuserv I
was using, without this modification, *used to* work just fine a couple
of weeks/months ago. I do not know what changed... all I found in NEWS
(searching for "history") which could be related are those two changes:

*** New function `add-to-history' adds an element to a history list.
*** The new variable `history-add-new-input' specifies whether to add new

but I do not see from their descriptions why should they affect things
like gnuserv. I may miss something, but if this was supposed to be an
incompatible change, maybe it would be worthwhile to document it better.
And if not, then maybe there is a bug somewhere.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Real Programmers just whistle the binary code into the modem

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 15:12 ` Richard Stallman
  2006-09-17 15:27   ` Lennart Borgman
@ 2006-09-17 17:29   ` Slawomir Nowaczyk
  2006-09-17 20:00   ` Jason Rumney
  2 siblings, 0 replies; 11+ messages in thread
From: Slawomir Nowaczyk @ 2006-09-17 17:29 UTC (permalink / raw)


On Sun, 17 Sep 2006 11:12:04 -0400
Richard Stallman <rms@gnu.org> wrote:

#> We don't maintain gnuclient, but it is possible that this is due to a
#> bug in Emacs.

That was the reason why I have written on emacs-devel -- since it used
to work some time ago, it is either an old bug in gnuserv which was
uncovered by some change in emacs, a bug in emacs or a change which was
not backwards compatible.

I do not know which one is it -- but maybe there is someone for whom the
description rings a bell?

#> If you debug what's going on, you can determine whether an Emacs bug
#> is involved.

I might try, but I do not think I have time to do it, certainly not
right now, and I am not familiar with the code involved. Also, since
things I working fine with Lennart's fix to gnuserv.el, it may not be
worth the trouble.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Sometimes I lie awake at night, and I ask, 'Where have I gone wrong?'
Then a voice says to me, 'This is going to take more than one night.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 15:12 ` Richard Stallman
  2006-09-17 15:27   ` Lennart Borgman
  2006-09-17 17:29   ` Slawomir Nowaczyk
@ 2006-09-17 20:00   ` Jason Rumney
  2006-09-17 22:36     ` Lennart Borgman
  2 siblings, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2006-09-17 20:00 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, emacs-devel

Richard Stallman wrote:
> We don't maintain gnuclient, but it is possible that this is due
> to a bug in Emacs.  If you debug what's going on, you can determine
> whether an Emacs bug is involved.
>   
I don't think it is a bug, only interactive use of find-file should add 
to history. There is already code in server.el to add to history, since 
it is calling find-file non-interactively but in response to user 
interaction. dnd.el on the other hand does not add to history, but 
probably should.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 20:00   ` Jason Rumney
@ 2006-09-17 22:36     ` Lennart Borgman
  2006-09-17 22:49       ` Jason Rumney
  0 siblings, 1 reply; 11+ messages in thread
From: Lennart Borgman @ 2006-09-17 22:36 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, rms, emacs-devel

Jason Rumney wrote:
> Richard Stallman wrote:
>> We don't maintain gnuclient, but it is possible that this is due
>> to a bug in Emacs.  If you debug what's going on, you can determine
>> whether an Emacs bug is involved.
>>   
> I don't think it is a bug, only interactive use of find-file should 
> add to history. There is already code in server.el to add to history, 
> since it is calling find-file non-interactively but in response to 
> user interaction. dnd.el on the other hand does not add to history, 
> but probably should.

Why should only interactive use inside of Emacs add to history? I 
believe users of emacsserver/client or gnuserver/client expects that 
files opened those ways should be treated the same.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 22:36     ` Lennart Borgman
@ 2006-09-17 22:49       ` Jason Rumney
  2006-09-17 22:57         ` Lennart Borgman
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Rumney @ 2006-09-17 22:49 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, rms, emacs-devel

Lennart Borgman wrote:
> Jason Rumney wrote:  
>> I don't think it is a bug, only interactive use of find-file should 
>> add to history. There is already code in server.el to add to history, 
>> since it is calling find-file non-interactively but in response to 
>> user interaction. dnd.el on the other hand does not add to history, 
>> but probably should.
>
> Why should only interactive use inside of Emacs add to history? 
Because the user is generally not interested in files that are found 
behind the scenes when they look at history, they are only interested in 
the files they have explicitly opened.

> I believe users of emacsserver/client or gnuserver/client expects that 
> files opened those ways should be treated the same.
Indeed, because such use IS interactive.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Visiting files with gnuclient don't add to history
  2006-09-17 22:49       ` Jason Rumney
@ 2006-09-17 22:57         ` Lennart Borgman
  0 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2006-09-17 22:57 UTC (permalink / raw)
  Cc: Slawomir Nowaczyk, rms, emacs-devel

Jason Rumney wrote:
> Lennart Borgman wrote:
>> Jason Rumney wrote: 
>>> I don't think it is a bug, only interactive use of find-file should 
>>> add to history. There is already code in server.el to add to 
>>> history, since it is calling find-file non-interactively but in 
>>> response to user interaction. dnd.el on the other hand does not add 
>>> to history, but probably should.
>>
>> Why should only interactive use inside of Emacs add to history? 
> Because the user is generally not interested in files that are found 
> behind the scenes when they look at history, they are only interested 
> in the files they have explicitly opened.
I meant the emphase should be on INSIDE ;-)
>
>> I believe users of emacsserver/client or gnuserver/client expects 
>> that files opened those ways should be treated the same.
> Indeed, because such use IS interactive.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-09-17 22:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-16 14:46 Visiting files with gnuclient don't add to history Slawomir Nowaczyk
2006-09-16 16:55 ` Jason Rumney
2006-09-17  0:08   ` Lennart Borgman
2006-09-17 17:29     ` Slawomir Nowaczyk
2006-09-17 15:12 ` Richard Stallman
2006-09-17 15:27   ` Lennart Borgman
2006-09-17 17:29   ` Slawomir Nowaczyk
2006-09-17 20:00   ` Jason Rumney
2006-09-17 22:36     ` Lennart Borgman
2006-09-17 22:49       ` Jason Rumney
2006-09-17 22:57         ` Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.