Re: occur-hook changing the current buffer

2005-06-23 Thread Emilio Lopes
Juanma Barranquero  gmail.com> writes:

> What about the problem with using `fit-window-to-buffer' in occur-hook?

Don't know if it helps you, but I have the following in my "~/.emacs" and it
seems to work:

(defun occur-shrink-window ()
  "*Shrink the \"*Occur*\" window as much as possible to display its contents."
  (let ((win (get-buffer-window "*Occur*")))
(when (windowp win)
  (shrink-window-if-larger-than-buffer win
(add-hook 'occur-hook 'occur-shrink-window)




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Windows Emacs and screen readers

2005-06-29 Thread Emilio Lopes
Jason Rumney  gnu.org> writes:

> 
> Nikhil Nair  pobox.com> writes:
> 
> > However, I suspect I was reinventing the wheel, as I found some posts on
> > this list from 3 years ago which talked about the use of the system caret,
> > and JAWS working well with the GUI version; Ben Key of Freedom Scientific
> > (who develop JAWS) seemed quite happy with the results.  What I couldn't
> > tell was whether this behaviour was in version 21.3, or whether I'd need a
> > later development version;
> 
> You need the later development version. Although the first changes to
> use the system caret were made in 2001, a few months before 21.1 was
> released, it was too close to the release to make it into 21.1, and
> subsequent releases have all been bugfix releases.
> 

Here is the documentation of the relevant user option:

   w32-use-visible-system-caret's value is nil

   Flag to make the system caret visible.
   When this is non-nil, Emacs will indicate the position of point by
   using the system caret instead of drawing its own cursor.  Some screen
   reader software does not track the system cursor properly when it is
   invisible, and gets confused by Emacs drawing its own cursor, so this
   variable is initialized to t when Emacs detects that screen reader
   software is running as it starts up.

   When this variable is set, other variables affecting the appearance of
   the cursor have no effect.

   Defined in `C source code'.




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Patch to cmuscheme: start a new Scheme process if necessary

2005-07-24 Thread Emilio Lopes
In a Scheme buffer, if the user tries to evaluate an expression and no
Scheme process is running, Emacs signals an error.  This is not very
useful; Emacs can indeed do better.

With the following patch Emacs asks the user in such cases which
Scheme program to start, presenting `scheme-program-name' as the
default choice.

2005-06-12  Emilio C. Lopes  <[EMAIL PROTECTED]>

* cmuscheme.el (switch-to-scheme, scheme-proc): call
`scheme-interactively-start-process' if no Scheme buffer/process
available.
(scheme-get-process): new function extracted from `scheme-proc'
(scheme-interactively-start-process): new function


--- orig/lisp/cmuscheme.el
+++ mod/lisp/cmuscheme.el
@@ -300,12 +300,13 @@
   "Switch to the scheme process buffer.
 With argument, position cursor at end of buffer."
   (interactive "P")
-  (if (get-buffer scheme-buffer)
+  (if (or (and scheme-buffer (get-buffer scheme-buffer))
+  (scheme-interactively-start-process))
   (pop-to-buffer scheme-buffer)
-  (error "No current process buffer.  See variable `scheme-buffer'"))
-  (cond (eob-p
-	 (push-mark)
-	 (goto-char (point-max)
+(error "No current process buffer.  See variable `scheme-buffer'"))
+  (when eob-p
+(push-mark)
+(goto-char (point-max
 
 (defun scheme-send-region-and-go (start end)
   "Send the current region to the inferior Scheme process.
@@ -417,13 +418,27 @@
 for a minimal, simple implementation.  Feel free to extend it.")
 
 (defun scheme-proc ()
-  "Return the current scheme process.  See variable `scheme-buffer'."
-  (let ((proc (get-buffer-process (if (eq major-mode 'inferior-scheme-mode)
-  (current-buffer)
-  scheme-buffer
-(or proc
-	(error "No current process.  See variable `scheme-buffer'"
-
+  "Return the current Scheme process, starting one if necessary.
+See variable `scheme-buffer'."
+  (unless (and scheme-buffer
+   (get-buffer scheme-buffer) 
+   (comint-check-proc scheme-buffer))
+(scheme-interactively-start-process))
+  (or (scheme-get-process)
+  (error "No current process.  See variable `scheme-buffer'")))
+
+(defun scheme-get-process ()
+  "Return the current Scheme process or nil if none is running."
+  (get-buffer-process (if (eq major-mode 'inferior-scheme-mode)
+  (current-buffer)
+scheme-buffer)))
+
+(defun scheme-interactively-start-process (&optional cmd)
+  "Start an inferior Scheme process.  Return the process started.
+Since this command is run implicitly, always ask the user for the
+command to run."
+  (save-window-excursion
+(run-scheme (read-string "Run Scheme: " scheme-program-name
 
 ;;; Do the user's customisation...
 
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Patch to cmuscheme: start file for Scheme processes

2005-07-24 Thread Emilio Lopes
The package "comint", upon which "cmuscheme" is based, provides a
mechanism for sending commands stored in a file to the underlying
process on start-up.  Cmuscheme does not currently make use of this
mechanism, although this could be useful for Scheme interpreters that
do not provide such a functionality themselves or for providing Emacs
specific customizations.

With the following patch cmuscheme instructs comint to use such a
start file if it's present on the file system.  The name of the start
file depends on the interpreter used, so that interpreter specific
customizations are possible.


2005-06-12  Emilio C. Lopes  <[EMAIL PROTECTED]>

* cmuscheme.el (run-scheme): get start file from `scheme-start-file'
and pass it to `make-comint'.
(scheme-start-file): new function.

--- orig/lisp/cmuscheme.el
+++ mod/lisp/cmuscheme.el
@@ -233,11 +233,15 @@
 
 ;;;###autoload
 (defun run-scheme (cmd)
-  "Run an inferior Scheme process, input and output via buffer *scheme*.
+  "Run an inferior Scheme process, input and output via buffer `*scheme*'.
 If there is a process already running in `*scheme*', switch to that buffer.
 With argument, allows you to edit the command line (default is value
-of `scheme-program-name').  Runs the hooks `inferior-scheme-mode-hook'
-\(after the `comint-mode-hook' is run).
+of `scheme-program-name').
+If a file `~/.emacs_SCHEMENAME' exists, it is given as initial input.
+Note that this may lose due to a timing error if the Scheme processor
+discards input when it starts up.
+Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook'
+is run).
 \(Type \\[describe-mode] in the process buffer for a list of commands.)"
 
   (interactive (list (if current-prefix-arg
@@ -246,13 +250,24 @@
   (if (not (comint-check-proc "*scheme*"))
   (let ((cmdlist (scheme-args-to-list cmd)))
 	(set-buffer (apply 'make-comint "scheme" (car cmdlist)
-			   nil (cdr cmdlist)))
+			   (scheme-start-file (car cmdlist)) (cdr cmdlist)))
 	(inferior-scheme-mode)))
   (setq scheme-program-name cmd)
   (setq scheme-buffer "*scheme*")
   (pop-to-buffer "*scheme*"))
 ;;;###autoload (add-hook 'same-window-buffer-names "*scheme*")
 
+(defun scheme-start-file (prog)
+  "Return the name of the start file corresponding to PROG.
+Search in the directories \"~\" and \"~/.emacs.d\", in this
+order.  Return nil if no start file found."
+  (let* ((name (concat ".emacs_" (file-name-nondirectory prog)))
+ (start-file (concat "~/" name)))
+(if (file-exists-p start-file)
+start-file
+  (let ((start-file (concat user-emacs-directory name)))
+(and (file-exists-p start-file) start-file)
+
 (defun scheme-send-region (start end)
   "Send the current region to the inferior Scheme process."
   (interactive "r")
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

patch to cmuscheme: commands for tracing procedures and expanding syntactic forms

2005-07-24 Thread Emilio Lopes
Modern Scheme systems provide a myriad of debugging facilities to
their users.  Among the most ubiquitous features available are
mechanisms for tracing procedure calls as well as expansion of
syntactic forms.

This patch adds support for these features in the "cmuscheme"
library, including key bindings and customization for different
Scheme interpreters.


2005-06-26  Emilio C. Lopes  <[EMAIL PROTECTED]>

* cmuscheme.el (scheme-trace-command, scheme-untrace-command)
(scheme-macro-expand-command): new user options.
(scheme-trace-procedure, scheme-expand-current-form): new commands.
(scheme-form-at-point): new function.

--- orig/lisp/cmuscheme.el
+++ mod/lisp/cmuscheme.el
@@ -127,6 +127,8 @@
 (define-key scheme-mode-map "\C-c\M-r" 'scheme-send-region-and-go)
 (define-key scheme-mode-map "\C-c\M-c" 'scheme-compile-definition)
 (define-key scheme-mode-map "\C-c\C-c" 'scheme-compile-definition-and-go)
+(define-key scheme-mode-map "\C-c\C-t" 'scheme-trace-procedure)
+(define-key scheme-mode-map "\C-c\C-x" 'scheme-expand-current-form)
 (define-key scheme-mode-map "\C-c\C-z" 'switch-to-scheme)
 (define-key scheme-mode-map "\C-c\C-l" 'scheme-load-file)
 (define-key scheme-mode-map "\C-c\C-k" 'scheme-compile-file) ;k for "kompile"
@@ -143,6 +145,10 @@
 '("Compile Definition & Go" . scheme-compile-definition-and-go))
   (define-key map [com-def]
 '("Compile Definition" . scheme-compile-definition))
+  (define-key map [exp-form]
+'("Expand current form" . scheme-expand-current-form))
+  (define-key map [trace-proc]
+'("Trace procedure" . scheme-trace-procedure))
   (define-key map [send-def-go]
 '("Evaluate Last Definition & Go" . scheme-send-definition-and-go))
   (define-key map [send-def]
@@ -153,7 +159,7 @@
 '("Evaluate Region" . scheme-send-region))
   (define-key map [send-sexp]
 '("Evaluate Last S-expression" . scheme-send-last-sexp))
-)
+  )
 
 (defvar scheme-buffer)
 
@@ -311,6 +317,69 @@
  (beginning-of-defun)
  (scheme-compile-region (point) end
 
+(defcustom scheme-trace-command "(trace %s)"
+  "*Template for issuing commands to trace a Scheme procedure.
+Some Scheme implementations might require more elaborate commands here.
+For PLT-Scheme, e.g., one should use
+
+   (setq scheme-trace-command \"(begin (require (lib \\\"trace.ss\\\")) (trace %s))\")
+
+For Scheme 48 and Scsh use \",trace %s\"."
+  :type 'string
+  :group 'cmuscheme)
+
+(defcustom scheme-untrace-command "(untrace %s)"
+  "*Template for switching off tracing of a Scheme procedure.
+Scheme 48 and Scsh users should set this variable to \",untrace %s\"."
+
+  :type 'string
+  :group 'cmuscheme)
+
+(defun scheme-trace-procedure (proc &optional untrace)
+  "Trace procedure PROC in the inferior Scheme process.
+With a prefix argument switch off tracing of procedure PROC."
+  (interactive
+   (list (let ((current (symbol-at-point))
+   (action (if current-prefix-arg "Untrace" "Trace")))
+   (if current
+   (read-string (format "%s procedure [%s]: " action current) nil nil (symbol-name current))
+ (read-string (format "%s procedure: " action
+ current-prefix-arg))
+  (when (= (length proc) 0)
+(error "Invalid procedure name"))
+  (comint-send-string (scheme-proc)
+  (format 
+   (if untrace scheme-untrace-command scheme-trace-command)
+   proc))
+  (comint-send-string (scheme-proc) "\n"))
+
+(defcustom scheme-macro-expand-command "(expand %s)"
+  "*Template for macro-expanding a Scheme form.
+For Scheme 48 and Scsh use \",expand %s\"."
+  :type 'string
+  :group 'cmuscheme)
+
+(defun scheme-expand-current-form ()
+  "Macro-expand the form at point in the inferior Scheme process."
+  (interactive)
+  (let ((current-form (scheme-form-at-point)))
+(if current-form
+(progn
+  (comint-send-string (scheme-proc)
+  (format 
+   scheme-macro-expand-command
+   current-form))
+  (comint-send-string (scheme-proc) "\n"))  
+  (error "Not at a form"
+
+(defun scheme-form-at-point ()
+  (let ((next-sexp (thing-at-point 'sexp)))
+(if (and next-sexp (string-equal (substring next-sexp 0 1) "("))
+next-sexp
+  (save-excursion
+(backward-up-list)
+(scheme-form-at-point)
+
 (defun switch-to-scheme (eob-p)
   "Switch to the scheme process buffer.
 With argument, position cursor at end of buffer."



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reposting cmuscheme patches as context diffs

2005-07-26 Thread Emilio Lopes
At request I'm reposting here my changes to cmuscheme as context diffs.


cmuscheme-runscheme.patch
Description: Binary data


cmuscheme-startfile.patch
Description: Binary data


cmuscheme-trace.patch
Description: Binary data
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Support for "special" file local variables

2005-08-02 Thread Emilio Lopes
The following patch implements support for "special" file local variables,
in the vein of the already existent `Mode' and `Coding'.

These special variables can be a short alias for a "real" file local.  They
can also trigger some special action when the variable is set in the local
variable specifications.

My motivation was to support (for historical reasons) file variable
specifications like

   ; -*- Mode: Scheme; Syntax: Scheme; Package: vm; -*-

without polluting the name space with short-named variables like `syntax'
or `package'.

It's such a simple change that I see no obvious reason why this could not
be added to Emacs.  I'm sure others will find nice applications for this
too.

Do you find this useful?


2005-08-02  Emilio C. Lopes  <[EMAIL PROTECTED]>

* files.el (hack-one-local-variable): support "special" file
local variables.
(special-local-variables-alist): new user option.


*** orig/lisp/files.el
--- mod/lisp/files.el
***
*** 473,478 
--- 473,494 
 (other :tag "Query" other))
:group 'find-file)
  
+ (defcustom special-local-variables-alist nil
+   "Alist of local variable names to be handled specially.
+ Each element looks like (VAR-NAME . NEW-VAR).
+ 
+ Whenever VAR-NAME is set to some value in the local variable
+ specifications that value is actually assigned to NEW-VAR.
+ 
+ As a special case, NEW-VAR can be a function.  In this case it
+ will be called with two arguments, the name of the variable and
+ the corresponding value, and should do whatever is necessary to
+ actually accomplish the assignment."
+   :type '(repeat (cons (symbol :tag "Original variable name")
+  (choice (symbol :tag "New variable name")
+  (function :tag "Function called to accomplish 
the assignment"
+   :group 'find-file)
+ 
  ;; Avoid losing in versions where CLASH_DETECTION is disabled.
  (or (fboundp 'lock-buffer)
  (defalias 'lock-buffer 'ignore))
***
*** 2469,2475 
"\"Set\" one variable in a local variables spec.
  A few patterns are specified so that any name which matches one
  is considered risky."
!   (cond ((eq var 'mode)
 (funcall (intern (concat (downcase (symbol-name val))
  "-mode"
((eq var 'coding)
--- 2485,2498 
"\"Set\" one variable in a local variables spec.
  A few patterns are specified so that any name which matches one
  is considered risky."
!   (cond ((assq var special-local-variables-alist)
!  (let ((new-var (cdr (assq var special-local-variables-alist
!(if (functionp new-var)
!(funcall new-var var val)
!  ;; note that there's no check for recursive entries in
!  ;; `special-local-variables-alist'
!  (hack-one-local-variable new-var val
! ((eq var 'mode)
 (funcall (intern (concat (downcase (symbol-name val))
  "-mode"
((eq var 'coding)





___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Warning about `user-emacs-directory'

2005-08-08 Thread Emilio Lopes
Juanma Barranquero  gmail.com> writes:

> 
> Compiling cmuscheme.el warns about a non-existent
> `user-emacs-directory'. Was the change shown in patch below the
> intended effect, or is a non-GNU Emacs variable?
> 

My error.  I'll send a patch to fix this later today when I'm home.

 -ECL




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Leaving isearch-mode and keeping the highlite

2005-08-12 Thread Emilio Lopes
Lennart Borgman  student.lu.se> writes:

> I would find it very helpful to be able to leave isearch-mode but keep 
> the highlite. Is this something other would find helpful too?

Have you tried "M-x highlight-regexp"?  You could even write a wrapper to
fetch the last search string automatically.

Perhaps you want something like

   http://www.emacswiki.org/cgi-bin/wiki/InteractiveSearch#CallOccurFromIsearch

I think these are far cleaner UIs than leaving isearch matches highlighted.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


grep-use-null-device

2005-08-15 Thread Emilio Lopes
The documentation of this variable says:

   grep-use-null-device's value is nil

   If t, append the value of `null-device' to `grep' commands.
   This is done to ensure that the output of grep includes the filename of
   any match in the case where only a single file is searched, and is not
   necessary if the grep program used supports the `-H' option.

   The default value of this variable is set up by `grep-compute-defaults';
   call that function before using this variable in your program.

   You can customize this variable.

   Defined in `grep'.


If I understood it right, it says that I don't need a "/dev/null"
appended to my grep commands if my grep program supports the
option "-H".

Let's see:

   ~% grep --version
   grep (GNU grep) 2.5.1

   Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions. There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

   ~% grep --help | grep -- -H
 -H, --with-filename   print the filename for each match

So, my grep program supports "-H" but it apparently has not the
expected semantics.

As a result, if I forget to provide a filename to "M-x grep" it will run
forever, waiting for me to kill it.

Do I have the "wrong" grep?

Is there a case where having a `null-device' too much will hurt?



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


no prompt when reading chars

2005-08-15 Thread Emilio Lopes
Start a fresh Emacs:

   % ./src/emacs --no-init-file --no-site-file

Now press e.g. "C-x r w" (`window-configuration-to-register')
*slowly*, i.e. with more than `echo-keystrokes' seconds of pause
between the key presses.

Instead of the expected prompt "Window configuration to register: "
you'll see "C-x r w-".

Can someone else reproduce this?



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: grep-use-null-device

2005-08-16 Thread Emilio Lopes
Emilio Lopes writes:

> As a result, if I forget to provide a filename to "M-x grep" it will
> run forever, waiting for me to kill it.

Richard M Stallman writes:

> So, my grep program supports "-H" but it apparently has not the
> expected semantics.

> That is a very vague statement.  It tells us nothing.

No, no.  It's very concrete if you consider the rest of the message,
which you didn't quote.  Anyway, I understand the problem better now.

If the user forgets to provide a filename to "M-x grep" (as in
"grep -nH foo") it will run indefinitely waiting for input from
stdin until killed.  In such cases it's useful to have `null-device'
appended, even if the grep program supports the option "-H" (which
has an other purpose anyway).

One could even argue if Emacs should not append *two* instances of
`null-device', in the case the use just press enter at the grep prompt
without even typing a regexp.




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: grep-use-null-device

2005-08-16 Thread Emilio Lopes
David Kastrup writes:

> I think what rather should be done is that standard input on the
> grep process gets closed.  That requires no special options, and it
> will lead to a sensible result without obscure extra options.

This seems a rather clean solution.  Karl Chen pointed out that Kevin
Rodgers already posted such a patch to this list.  Here is the URL:

   http://article.gmane.org/gmane.emacs.devel/33146

I'll try his patch out.

> grep-use-null-device is just for getting file names on matches, not
> for dealing with bad commands.

That was my confusion.  It saved me a lot of times as I forgot to
provide grep with filenames, so that for me it was its obvious purpose.
A nice hack indeed.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: grep-use-null-device

2005-08-16 Thread Emilio Lopes
Karl Chen writes:

> Kevin Rodgers posted a patch that would allow `grep' to close stdin,
> solving this annoyance, but it appears it was never followed up.

> http://lists.gnu.org/archive/html/emacs-devel/2005-02/msg00452.html

Yes, that's exactly what David Kastrup suggested in another reply.

Thanks for posting the URL, though it seems that the web interface at
lists.gnu.org eats multiple spaces.  Here is the Gmane URL for the
original post from Kevin Rodgers with correct indentation:

   http://article.gmane.org/gmane.emacs.devel/33146

-- 
Emílio C. Lopes
Munich, Germany



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


update of emacsclient.1

2005-08-17 Thread Emilio Lopes
enclosed is a patch updating the man page of Emacsclient.  I hope the
changes are appropriate.

I have one question though.  Under "DESCRIPTION" it says:

   You  typically  do not call emacsclient directly.  Instead, you set the
   environment variable EDITOR to emacsclient and let programs like 'vipw'
   or  'bug'  or anything run it for you, which will use an existing Emacs
   to visit the file.

I myself call `emacsclient' often from the shell.  And should these
`vipw' and `bug' programs be really mentioned?  I use Debian GNU/Linux,
the system for which the man page was originally written, but I don't
have this `bug' program.

What people think of changing the above paragraph to

   You can either call emacsclient directly or set the environment
   variable EDITOR to 'emacsclient' and let other programs run it for
   you, thus using an existing Emacs to edit the file.

?

Here is the patch:

2005-08-17  Emilio C. Lopes  <[EMAIL PROTECTED]>

* emacsclient.1 (DESCRIPTION): reflect inclusion in the Emacs
distribution.
(OPTIONS): documented `-s', `-V' and `-h' as well as their long
name counterparts.
(BUGS): removed since its contents doesn't
apply anymore.
  
diff -rN -c old-emacs-darcs.eclig/etc/emacsclient.1 
new-emacs-darcs.eclig/etc/emacsclient.1
*** old-emacs-darcs.eclig/etc/emacsclient.1 Wed Aug 17 12:27:14 2005
--- new-emacs-darcs.eclig/etc/emacsclient.1 Wed Aug 17 12:18:48 2005
***
*** 9,21 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.
! This manual page was written for the Debian GNU/Linux distribution
! because the original program does not have a manual page.
! Instead, it has documentation in the GNU Info format; see below.
  .PP
  .B emacsclient 
! works in conjunction with the built-in server of Emacs.
  .PP
  You typically do not call 
  .B emacsclient
--- 9,21 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.  Full documentation is available in the GNU Info format; see
! below.
! This manual page was originally written for the Debian GNU/Linux
! distribution, but is not specific to that system.
  .PP
  .B emacsclient 
! works in conjunction with the built-in Emacs server.
  .PP
  You typically do not call 
  .B emacsclient
***
*** 54,79 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
- .SH BUGS
- If there is no running Emacs server, 
- .B emacsclient 
- cannot launch one. I use a small Perl script instead of raw 
- .B emacsclient
- to do it (it works only with systems which have BSD sockets, which is fine
- for Debian GNU/Linux).
  .SH AUTHOR
  This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>,
! for the Debian GNU/Linux system (but may be used by others).
  .SH COPYING
  This manual page is in the public domain.
  
--- 54,81 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
+ .B \-s, \-\-socket-name=FILENAME
+ Use socket named FILENAME for communication.
+ .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
+ .TP
+ .B \-V, \-\-version
+ print version information and exit
+ .TP
+ .B \-h, \-\-help
+ print this usage information message and exit
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
  .SH AUTHOR
  This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>,
! for the Debian GNU/Linux system.
  .SH COPYING
  This manual page is in the public domain.
  




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Avoiding moving point into minibuffer prompt area

2005-08-17 Thread Emilio Lopes
Richard M Stallman writes:

> I think it is quite confusing that you can move the point into
> the prompt area in the minibuffer. Why don't we use something
> like the code below to avoid this:

> If we want to make it impossible to move point into the prompt, it
> should suffice to give it an intangible property of t, right?
> People could try that and see if they like it.  However, we've
> already seen one person say that he finds it useful to move into the
> prompt.

I think the situation is somewhat similar with the case of e-mail
headers in Rmail.  Having used fascist e-mail clients before I was
scared that with Emacs you could indeed *change* the headers yourself
and maybe even break something.  But with time I learned to appreciate
the extra power.

I myself don't move into the prompt that often, but I like to know
that I can if I need to, without having to hunt for some newly added
user option.

So, comfort and ease-of-use, yes; restriction and over-protection, no.

 -ECL



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Emacs icons

2005-08-17 Thread Emilio Lopes
David Ponce writes:

> Here is another simpler image proposal.  Looks good scaled to 16x16.

How about something along the lines of



(in allusion to Einstein's E=mc2)? Could look nice with colors and
pretty fonts.

It was not my idea. I first saw it in a post by Christoph Conrad,
where he attributes this "discovery" to Peter Ikier.
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Re: update of emacsclient.1

2005-08-17 Thread Emilio Lopes
I wrote:

> enclosed is a patch updating the man page of Emacsclient.  I hope
> the changes are appropriate. [...]

After collecting suggestions from others, I came up with the following
changes.  They already include the patch I sent before.

2005-08-17  Emilio C. Lopes  <[EMAIL PROTECTED]>

* emacsclient.1 (DESCRIPTION): reflect inclusion in the Emacs
distribution. Made the role of EDITOR clearer.
(OPTIONS): documented `-s', `-V' and `-h' as well as their long
name counterparts.
(BUGS): removed since its contents doesn't
apply anymore.
  
diff -rN -c old-emacs-darcs.eclig/etc/emacsclient.1 
new-emacs-darcs.eclig/etc/emacsclient.1
*** old-emacs-darcs.eclig/etc/emacsclient.1 Wed Aug 17 18:54:07 2005
--- new-emacs-darcs.eclig/etc/emacsclient.1 Wed Aug 17 18:51:17 2005
***
*** 9,29 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.
! This manual page was written for the Debian GNU/Linux distribution
! because the original program does not have a manual page.
! Instead, it has documentation in the GNU Info format; see below.
  .PP
  .B emacsclient 
! works in conjunction with the built-in server of Emacs.
  .PP
! You typically do not call 
  .B emacsclient
! directly.  Instead, you set the environment variable EDITOR
! to 
! .B emacsclient
! and let programs like 'vipw' or 'bug' or anything run
! it for you, which will use an existing Emacs to visit the file.
  
  For
  .B emacsclient 
--- 9,31 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.  Full documentation is available in the GNU Info format; see
! below.
! This manual page was originally written for the Debian GNU/Linux
! distribution, but is not specific to that system.
  .PP
  .B emacsclient 
! works in conjunction with the built-in Emacs server.
  .PP
! You can either call
  .B emacsclient
! directly or let other programs run it for you when necessary.  On
! GNU/Linux and Unix systems many programs consult the environment
! variable EDITOR (sometimes also VISUAL) to obtain the command used for
! editing.  Thus, setting this environment variable to 'emacsclient'
! will allow these programs to use an already running Emacs for editing.
! Other operating systems might have their own methods for defining the
! default editor.
  
  For
  .B emacsclient 
***
*** 54,79 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
- .SH BUGS
- If there is no running Emacs server, 
- .B emacsclient 
- cannot launch one. I use a small Perl script instead of raw 
- .B emacsclient
- to do it (it works only with systems which have BSD sockets, which is fine
- for Debian GNU/Linux).
  .SH AUTHOR
! This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>,
! for the Debian GNU/Linux system (but may be used by others).
  .SH COPYING
  This manual page is in the public domain.
  
--- 56,83 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
+ .B \-s, \-\-socket-name=FILENAME
+ Use socket named FILENAME for communication.
+ .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
+ .TP
+ .B \-V, \-\-version
+ print version information and exit
+ .TP
+ .B \-h, \-\-help
+ print this usage information message and exit
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
  .SH AUTHOR
! This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>
! for the Debian GNU/Linux system.
  .SH COPYING
  This manual page is in the public domain.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Emacs icons

2005-08-18 Thread Emilio Lopes
Stefan Reichör writes:

> Emilio Lopes <[EMAIL PROTECTED]> writes:
>>
>> (in allusion to Einstein's E=mc2)? Could look nice with colors and
>> pretty fonts.
>>
>> It was not my idea. I first saw it in a post by Christoph Conrad,
>> where he attributes this "discovery" to Peter Ikier.

> Does someone have a copy of that image?

Sure:

   http://home.tiscali.de/emilio.lopes/emacs/albert_emacs.html

> The page http://www1.physik.tu-muenchen.de/~ecl/albert_emacs.html is
> no longer accessible.

Yes, I left the TUM in October 2002.  And I must say, Peter Ikier's
discovery sure influenced my decision :-).

-- 
Emílio C. Lopes
Munich, Germany



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: update of emacsclient.1

2005-08-19 Thread Emilio Lopes
Richard M Stallman writes:

> These changes are ok.  I think it would be better to say "on GNU and
> Unix systems" because this is not limited to GNU systems where the
> kernel is Linux.

Sure.  Here is a patch including this change:

2005-08-19  Emilio C. Lopes  <[EMAIL PROTECTED]>

* emacsclient.1 (DESCRIPTION): reflect inclusion in the Emacs
distribution. Made role of EDITOR clearer.
(OPTIONS): documented `-s', `-V' and `-h' as well as their long
name counterparts.
(BUGS): removed since its contents doesn't
apply anymore.
  
diff -rN -c old-emacs-darcs.eclig/etc/emacsclient.1 
new-emacs-darcs.eclig/etc/emacsclient.1
*** old-emacs-darcs.eclig/etc/emacsclient.1 Fri Aug 19 18:26:38 2005
--- new-emacs-darcs.eclig/etc/emacsclient.1 Fri Aug 19 18:23:34 2005
***
*** 9,29 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.
! This manual page was written for the Debian GNU/Linux distribution
! because the original program does not have a manual page.
! Instead, it has documentation in the GNU Info format; see below.
  .PP
  .B emacsclient 
! works in conjunction with the built-in server of Emacs.
  .PP
! You typically do not call 
  .B emacsclient
! directly.  Instead, you set the environment variable EDITOR
! to 
! .B emacsclient
! and let programs like 'vipw' or 'bug' or anything run
! it for you, which will use an existing Emacs to visit the file.
  
  For
  .B emacsclient 
--- 9,31 
  .SH "DESCRIPTION"
  This manual page documents briefly the
  .BR emacsclient
! command.  Full documentation is available in the GNU Info format; see
! below.
! This manual page was originally written for the Debian GNU/Linux
! distribution, but is not specific to that system.
  .PP
  .B emacsclient 
! works in conjunction with the built-in Emacs server.
  .PP
! You can either call
  .B emacsclient
! directly or let other programs run it for you when necessary.  On
! GNU and Unix systems many programs consult the environment
! variable EDITOR (sometimes also VISUAL) to obtain the command used for
! editing.  Thus, setting this environment variable to 'emacsclient'
! will allow these programs to use an already running Emacs for editing.
! Other operating systems might have their own methods for defining the
! default editor.
  
  For
  .B emacsclient 
***
*** 54,79 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
- .SH BUGS
- If there is no running Emacs server, 
- .B emacsclient 
- cannot launch one. I use a small Perl script instead of raw 
- .B emacsclient
- to do it (it works only with systems which have BSD sockets, which is fine
- for Debian GNU/Linux).
  .SH AUTHOR
! This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>,
! for the Debian GNU/Linux system (but may be used by others).
  .SH COPYING
  This manual page is in the public domain.
  
--- 56,83 
  do not visit files but instead evaluate the arguments as Emacs
  Lisp expressions.
  .TP
+ .B \-s, \-\-socket-name=FILENAME
+ Use socket named FILENAME for communication.
+ .TP
  .B \-a, \-\-alternate-editor=EDITOR
  if the Emacs server is not running, run the specified editor instead.
  This can also be specified via the `ALTERNATE_EDITOR' environment variable.
  .TP
  .B \-d, \-\-display=DISPLAY
  tell the server to display the files on the given display.
+ .TP
+ .B \-V, \-\-version
+ print version information and exit
+ .TP
+ .B \-h, \-\-help
+ print this usage information message and exit
  .SH "SEE ALSO"
  The program is documented fully in
  .IR "Using Emacs as a Server"
  available via the Info system.
  .SH AUTHOR
! This manual page was written by Stephane Bortzmeyer <[EMAIL PROTECTED]>
! for the Debian GNU/Linux system.
  .SH COPYING
  This manual page is in the public domain.
  



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


bug fix lispref node "Finding Overlays"

2005-08-23 Thread Emilio Lopes
the example at the end of the referred node seems to be bogus.  Here is
a possible fix:

2005-08-23  Emilio C. Lopes  <[EMAIL PROTECTED]>

* display.texi (Finding Overlays): fixed `find-overlay-prop' in
example of `next-overlay-change'.
  
diff -rN -c old-emacs-darcs.eclig/lispref/display.texi 
new-emacs-darcs.eclig/lispref/display.texi
*** old-emacs-darcs.eclig/lispref/display.texi  Tue Aug 23 17:12:47 2005
--- new-emacs-darcs.eclig/lispref/display.texi  Tue Aug 23 17:02:29 2005
***
*** 1501,1520 
  @code{(point-min)}.
  @end defun
  
!   Here's an easy way to use @code{next-overlay-change} to search for the
! next character which gets a [EMAIL PROTECTED] @code{happy} property from
  either its overlays or its text properties (@pxref{Property Search}):
  
  @smallexample
  (defun find-overlay-prop (prop)
(save-excursion
  (while (and (not (eobp))
! (not (get-char-property (point) 'happy)))
(goto-char (min (next-overlay-change (point))
!   (next-single-property-change (point) 'happy
  (point)))
  @end smallexample
  
  @node Width
  @section Width
  
--- 1501,1526 
  @code{(point-min)}.
  @end defun
  
!   Here's a function which uses @code{next-overlay-change} to search
! for the next character which gets a given property @code{prop} from
  either its overlays or its text properties (@pxref{Property Search}):
  
  @smallexample
  (defun find-overlay-prop (prop)
(save-excursion
  (while (and (not (eobp))
! (not (get-char-property (point) prop)))
(goto-char (min (next-overlay-change (point))
!   (next-single-property-change (point) prop
  (point)))
  @end smallexample
  
+   Now one can simply write, for example:
+ 
+ @smallexample
+ (find-overlay-prop 'happy)
+ @end smallexample
+ 
  @node Width
  @section Width
  




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: [EMAIL PROTECTED]: popd in tcsh fails]

2005-08-23 Thread Emilio Lopes
Richard Stallman writes:

> Can someone please look at this, then ack to me?

I started Emacs with this command:

   ./src/emacs --no-init-file --no-site-file -l ~/tcsh-init.el

The file ~/tcsh-init.el contains the following:

   (setq shell-file-name "tcsh")
   (setenv "SHELL" shell-file-name)
   (setq explicit-shell-file-name shell-file-name)

   (setq comint-completion-recexact t)
   (setq comint-input-ignoredups t)
   (setq comint-input-ring-file-name ".emacs.d/foo_history")
   (setq comint-prompt-regexp "^[a-z]+ [0-9]+ / ")
   (setq comint-use-prompt-regexp nil)
   (setq shell-cd-regexp "[cp]d")
   (setq shell-dirtrack-verbose nil)
   (setq shell-pushd-regexp "p(ush|)d")


The first three lines are there to convince shell-mode to start `tcsh'
as the default shell.  The rest are variables customized by original
bug reporter.

My first test was to issue a "pushd /etc" and see if a "C-x C-f" would
offer me that directory as the default one.  Test failed.  Emacs is
not even recognizing "pushd"s.

So I noted that the customization of `shell-pushd-regexp' (see above)
is bogus.  I changed that to

   (setq shell-pushd-regexp "p\\(ush\\|\\)d")

and tried some "pushd"s and "popd"s again.  Emacs seems to correctly
keep track of the working directory now.

The problem was not tcsh specific AFAICT. 



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: [EMAIL PROTECTED]: popd in tcsh fails]

2005-08-23 Thread Emilio Lopes
Emilio Lopes writes:


[...]

> So I noted that the customization of `shell-pushd-regexp' (see
> above) is bogus.  I changed that to

>(setq shell-pushd-regexp "p\\(ush\\|\\)d")

> and tried some "pushd"s and "popd"s again.  Emacs seems to correctly
> keep track of the working directory now.

BTW, I've just got an e-mail from Peter Dyballa acknowledging that
this was indeed the problem.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


patch for woman (woman-topic-at-point)

2005-08-25 Thread Emilio Lopes
[ Sorry for the long message.  I wanted to make the problem clear
  also for people not familiar with `woman'. ]

The variable `woman-topic-at-point' controls whether the command
`woman' should offer the word at point as a suggestion when asking the
user for the name of a manual page.

The default value is `confirm' and being neither t nor nil means to
use the word at point as a suggestion but give the user the option to
reject or confirm this suggestion.

The problem is that "to suggest" for `woman' means to actually
*insert* the suggested name in the minibuffer, a behavior described
as deprecated in the documentation of `completing-read'.

And because the word at point rarely (at least for me) is the name of a
man page actually installed in the system, this means that most of the
time the user has the burden of having to delete the useless suggestion
before entering the desired man page.  I find this annoying.

The following patch introduces a new possible value for
`woman-topic-at-point': if this variable is the symbol `exact',
`woman' will offer the word at point as a default ONLY IF it actually
matches the name of an existing man page in the system.  Even in this
case it will *not* insert the suggestion in the minibuffer.

This change is backwards compatible.

If I could only change the behavior of *any* woman with a patch :-)


2005-08-19  Emilio C. Lopes  <[EMAIL PROTECTED]>

* woman.el (woman-topic-at-point-default, woman-topic-at-point):
new possible value `exact'.
(woman-file-name): support for this new value of
`woman-topic-at-point'.


diff -rN -c old-emacs-darcs.eclig/lisp/woman.el 
new-emacs-darcs.eclig/lisp/woman.el
*** old-emacs-darcs.eclig/lisp/woman.el Thu Aug 25 19:59:24 2005
--- new-emacs-darcs.eclig/lisp/woman.el Fri Aug 19 18:07:36 2005
***
*** 144,151 
  ;; topic must be confirmed or edited in the minibuffer.  This
  ;; suggestion can be turned off, or `woman' can use the suggested
  ;; topic without confirmation* if possible, by setting the user-option
! ;; `woman-topic-at-point' to nil or t respectively.  (Its default
! ;; value is neither nil nor t, meaning ask for confirmation.)
  
  ;; [* Thanks to Benjamin Riefenstahl for suggesting this
  ;; functionality.]
--- 144,153 
  ;; topic must be confirmed or edited in the minibuffer.  This
  ;; suggestion can be turned off, or `woman' can use the suggested
  ;; topic without confirmation* if possible, by setting the user-option
! ;; `woman-topic-at-point' to nil or t respectively.  If it is the
! ;; symbol `exact' then the word at point will be offered as a
! ;; suggestion only if it is an exact match for an existing topic.
! ;; (Its default value is none of these, meaning ask for confirmation.)
  
  ;; [* Thanks to Benjamin Riefenstahl for suggesting this
  ;; functionality.]
***
*** 422,430 
  ;;   Geoff Voelker <[EMAIL PROTECTED]>
  ;;   Eli Zaretskii <[EMAIL PROTECTED]>
  
- ;;; History:
- ;;  For recent change log see end of file.
- 
  
  ;;; Code:
  
--- 424,429 
***
*** 721,738 
"*Default value for `woman-topic-at-point'."
:type '(choice (const :tag "Yes" t)
 (const :tag "No" nil)
 (other :tag "Confirm" confirm))
:group 'woman-interface)
  
  (defcustom woman-topic-at-point woman-topic-at-point-default
"*Controls use by `woman' of `word at point' as a topic suggestion.
! If non-nil then the `woman' command uses the word at point as an
! initial topic suggestion when it reads a topic from the minibuffer; if
! t then the `woman' command uses the word at point WITHOUT
! INTERACTIVE CONFIRMATION if it exists as a topic.  The default value
! is `confirm', meaning suggest a topic and ask for confirmation."
:type '(choice (const :tag "Yes" t)
 (const :tag "No" nil)
 (other :tag "Confirm" confirm))
:group 'woman-interface)
  
--- 720,743 
"*Default value for `woman-topic-at-point'."
:type '(choice (const :tag "Yes" t)
 (const :tag "No" nil)
+  (const :tag "Exact" exact)
 (other :tag "Confirm" confirm))
:group 'woman-interface)
  
  (defcustom woman-topic-at-point woman-topic-at-point-default
"*Controls use by `woman' of `word at point' as a topic suggestion.
! If t then the `woman' command uses the word at point WITHOUT
! INTERACTIVE CONFIRMATION if it exists as a topic.
! If it is the symbol `exact' then the word at point will be offered
! as a suggestion only if it is an exact match for an existing topic.
! If it has other non-nil value then the `woman' command uses the word
! at point as an initial topic suggestion when it reads a topic from
! the minibuffer.
! The default value is `confirm', meaning suggest a topic and ask
! for confirmation."
:type '(choice (const :tag "Yes" t)
 (const :tag "No" nil)
+  (const :tag "Exact" exact)
 (other 

formating-related fixes to `woman'

2005-08-26 Thread Emilio Lopes

diff -rN -c old-emacs-darcs.eclig/lisp/woman.el 
new-emacs-darcs.eclig/lisp/woman.el
*** old-emacs-darcs.eclig/lisp/woman.el Fri Aug 26 16:37:23 2005
--- new-emacs-darcs.eclig/lisp/woman.el Fri Aug 26 16:36:36 2005
***
*** 422,430 
  ;;   Geoff Voelker <[EMAIL PROTECTED]>
  ;;   Eli Zaretskii <[EMAIL PROTECTED]>
  
- ;;; History:
- ;;  For recent change log see end of file.
- 
  
  ;;; Code:
  
--- 422,427 
***
*** 956,963 
  :group 'woman-faces)
  
(defcustom woman-use-symbol-font nil
! "*If non-nil then may use the symbol font.  It is off by default,
! mainly because it may change the line spacing (in NTEmacs 20.5)."
  :type 'boolean
  :group 'woman-faces)
  
--- 953,961 
  :group 'woman-faces)
  
(defcustom woman-use-symbol-font nil
! "*If non-nil then may use the symbol font.
! It is off by default,mainly because it may change the line spacing
! \(in NTEmacs 20.5)."
  :type 'boolean
  :group 'woman-faces)
  
***
*** 1259,1268 
;; Unread the command event (TAB = ?\t = 9) that runs the command
;; `minibuffer-complete' in order to automatically complete the
;; minibuffer contents as far as possible.
!   (setq unread-command-events '(9))   ; and delete any type-ahead!
(completing-read "Manual file: " files nil 1
!(try-completion "" files) 'woman-file-history)))
!   )))
  
  (defun woman-select (predicate list)
"Select unique elements for which PREDICATE is true in LIST.
--- 1257,1265 
;; Unread the command event (TAB = ?\t = 9) that runs the command
;; `minibuffer-complete' in order to automatically complete the
;; minibuffer contents as far as possible.
!   (setq unread-command-events '(9)) ; and delete any type-ahead!
(completing-read "Manual file: " files nil 1
!(try-completion "" files) 'woman-file-history))
  
  (defun woman-select (predicate list)
"Select unique elements for which PREDICATE is true in LIST.




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: patch for woman (woman-topic-at-point)

2005-08-26 Thread Emilio Lopes
Richard M Stallman writes:

> The problem is that "to suggest" for `woman' means to actually
> *insert* the suggested name in the minibuffer, a behavior
> described as deprecated in the documentation of
> `completing-read'.

> That is an unnecessarily complex solution.  It would be better just
> to change *how* that name is offered.  Instead of inserting it in
> the minibuffer, make it the default, more or less as below.

I wanted to do it this way too initially.  It didn't work because:

   1- The code following `completing-read' expects the result from
  that function to be an existing man page.  I think this is a
  legitimate assumption.

   2- The argument REQUIRE-MATCH in `completing-read', currently used
  to satisfy item 1 above, has no effect on the argument DEF,
  the default value offered.  It affects only the argument
  INITIAL-INPUT.

Item 2 means that if the user just press  at the prompt
`completing-read' will happily return DEF whether or not it matches
an item in TABLE.  This would break the assumption in item 1.

It follows from the above that if you want to offer some suggestion using
the argument DEF of `completing-read' the suggestion must be "valid".
Otherwise you'll break the code following the `completing-read'.  This is
accomplished by the patches I sent.

Yes, the patches make the code somewhat more complex, but that's
because I wanted it to be backwards compatible.  *I* would just remove
the old behavior, since it makes no sense for me to suggest man pages
which do not exist.

The following patch implements this simpler and more sensible behavior.
It is *not* backwards compatible.  To make that clear, I renamed the
variable `woman-topic-at-point' to `woman-use-topic-at-point'.


2005-08-26  Emilio C. Lopes  <[EMAIL PROTECTED]>

* woman.el (woman-topic-at-point-default): renamed to
woman-use-topic-at-point-default.
(woman-topic-at-point): renamed to woman-use-topic-at-point.
(woman-file-name): reflect renames above.  Automatically use the
word at point as topic if woman-use-topic-at-point is non-nil.
Otherwise offer it as default but don't insert it in the
minibuffer.
  
diff -rN -c old-emacs-darcs.eclig/lisp/woman.el 
new-emacs-darcs.eclig/lisp/woman.el
*** old-emacs-darcs.eclig/lisp/woman.el Fri Aug 26 17:11:11 2005
--- new-emacs-darcs.eclig/lisp/woman.el Fri Aug 26 16:54:51 2005
***
*** 136,162 
  ;;   man man_page_name
  
  
! ;; Using the `word at point' as a topic suggestion
! ;; ===
  
! ;; By default, the `woman' command uses the word nearest to point in
! ;; the current buffer as a suggestion for the topic to look up.  The
! ;; topic must be confirmed or edited in the minibuffer.  This
! ;; suggestion can be turned off, or `woman' can use the suggested
! ;; topic without confirmation* if possible, by setting the user-option
! ;; `woman-topic-at-point' to nil or t respectively.  (Its default
! ;; value is neither nil nor t, meaning ask for confirmation.)
  
! ;; [* Thanks to Benjamin Riefenstahl for suggesting this
! ;; functionality.]
! 
! ;; The variable `woman-topic-at-point' can be rebound locally, which
! ;; may be useful to provide special private key bindings, e.g.
  
  ;;  (global-set-key "\C-cw"
  ;;  (lambda ()
  ;;(interactive)
! ;;(let ((woman-topic-at-point t))
  ;;  (woman)
  
  
--- 136,158 
  ;;   man man_page_name
  
  
! ;; Using the word at point as the default topic
! ;; 
  
! ;; The `woman' command uses the word nearest to point in the current
! ;; buffer as the default topic to look up if it matches the name of a
! ;; manual page installed on the system.  The default topic can also be
! ;; used without confirmation by setting the user-option
! ;; `woman-use-topic-at-point' to t; thanks to Benjamin Riefenstahl for
! ;; suggesting this functionality.
  
! ;; The variable `woman-use-topic-at-point' can be rebound locally,
! ;; which may be useful to provide special private key bindings, e.g.
  
  ;;  (global-set-key "\C-cw"
  ;;  (lambda ()
  ;;(interactive)
! ;;(let ((woman-use-topic-at-point t))
  ;;  (woman)
  
  
***
*** 711,736 
:type 'string
:group 'woman-interface)
  
! (defcustom woman-topic-at-point-default 'confirm
!   ;; `woman-topic-at-point' may be let-bound when woman is loaded, in
!   ;; which case its global value does not get defined.
;; `woman-file-name' sets it to this value if it is unbound.
!   "*Default value for `woman-topic-at-point'."
:type '(choice (const :tag "Yes" t)
!(const :tag "No" nil)
!(other :tag "Confirm" confirm))
:group 'woman-interface)
  
! (defcustom woman-topic-at-point woman-topic-at-point-default
!   "*Controls use by `woman

Re: patch for woman (woman-topic-at-point)

2005-08-26 Thread Emilio Lopes
Richard M Stallman writes:

> Your diff includes some other miscellanious fixes, such as breaking
> a line in a doc string, which might be good to install independent
> of this.

I've just sent only those miscellaneous changes in another separate
message.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: update of emacsclient.1

2005-08-27 Thread Emilio Lopes
Richard M Stallman writes:

> Would someone please install your changes?

It seems `someone' forgot this... :-(




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: patch for woman (woman-topic-at-point)

2005-08-27 Thread Emilio Lopes
Stefan Monnier writes:

> Instead of assoc, I'd recommend you use test-completion.  It's
> probably equivalent given the current code, but it makes the
> intention much more clear and will work if the completion table is
> ever changed to some other format.

Thanks for the suggestion.  I changed my local copy and will send a
new version of the patch if there's interest on the changes.

BTW, is there a more elegant way of writing the following?  I have the
feeling I'm missing obvious something here...

   (and word-at-point
   (test-completion word-at-point woman-topic-all-completions)
   word-at-point)



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


announcing defaults when reading from minibuffer

2005-08-28 Thread Emilio Lopes
I've just asked myself if there's any convention for announcing
defaults when reading from minibuffer.  Skimming the Elisp manual
didn't reveal anything in this regard.  Seaching the archives of this
list I found this message from RMS:

   The standard for Emacs is (default foo).  There may be some
   nonstandard functions that use [foo], due to imperfect quality
   control, but we should stick to the standard (unless we decide to
   change it).

[http://lists.gnu.org/archive/html/emacs-devel/2004-06/msg00085.html]

So I documented this convention in "(elisp) Text from Minibuffer".

Here's the patch:


2005-08-28  Emilio C. Lopes  <[EMAIL PROTECTED]>

* minibuf.texi (Text from Minibuffer): mention convention for
announcing default values when reading from the minibuffer.

diff -rN -c old-emacs-darcs.eclig/lispref/minibuf.texi 
new-emacs-darcs.eclig/lispref/minibuf.texi
*** old-emacs-darcs.eclig/lispref/minibuf.texi  Sun Aug 28 14:20:31 2005
--- new-emacs-darcs.eclig/lispref/minibuf.texi  Sun Aug 28 14:05:41 2005
***
*** 154,159 
--- 154,167 
  empty string, @code{""}.  In this respect, it is different from all
  the other minibuffer input functions in this chapter.
  
+ Note that the standard way in Emacs to announce a default value when
+ reading from the minibuffer is to put it between parenthesis following
+ the word ``default'' as in
+ 
+ @smallexample
+ Enter value (default 42): 
+ @end smallexample
+ 
  If @var{keymap} is [EMAIL PROTECTED], that keymap is the local keymap to
  use in the minibuffer.  If @var{keymap} is omitted or @code{nil}, the
  value of @code{minibuffer-local-map} is used as the keymap.  Specifying




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


make `occur' use word at point as default

2005-08-28 Thread Emilio Lopes
The command `occur' currently uses the last item in the regexp history
as the default value.  I think it would be more useful to offer the
word at point (if any) as default, since the previous history item can
be easily fetched with "M-p".

2005-08-28  Emilio C. Lopes  <[EMAIL PROTECTED]>

* replace.el (occur-read-primary-args): use word at point as
default.

diff -rN -c old-emacs-darcs.eclig/lisp/replace.el 
new-emacs-darcs.eclig/lisp/replace.el
*** old-emacs-darcs.eclig/lisp/replace.el   Sun Aug 28 14:30:13 2005
--- new-emacs-darcs.eclig/lisp/replace.el   Sun Aug 28 13:37:51 2005
***
*** 903,909 
(nreverse result
  
  (defun occur-read-primary-args ()
!   (list (let* ((default (car regexp-history))
   (input
(read-from-minibuffer
 (if default
--- 903,909 
(nreverse result
  
  (defun occur-read-primary-args ()
!   (list (let* ((default (or (current-word t) (car regexp-history)))
   (input
(read-from-minibuffer
 (if default




___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: make `occur' use word at point as default

2005-08-29 Thread Emilio Lopes
Richard M Stallman writes:

> The command `occur' currently uses the last item in the regexp
> history as the default value.

> Please do not change that.  Peopel are accustomed to just typing RET
> to search for the same thing again.

That's a good point.

But the problem remains: too often I have to first mark a word or symbol,
copy the region, start a command (`grep', `occur', `query-replace',
whatever), paste it, press .  That's three keystrokes too many.

How do other people accomplish this?

I think something like isearch's "C-w" and friends extended to other
commands which read from the minibuffer would be useful.

Opinions?



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: patch for woman (woman-topic-at-point)

2005-08-29 Thread Emilio Lopes
David Kastrup writes:

> Emilio Lopes <[EMAIL PROTECTED]> writes:
>> BTW, is there a more elegant way of writing the following?  I have
>> the feeling I'm missing obvious something here...
>>
>> (and word-at-point (test-completion word-at-point
>> woman-topic-all-completions) word-at-point)

> (when (and word-at-point
>(test-completion word-at-point
>woman-topic-all-completions))
>   word-at-point)

> It's more verbose, but brings across the purpose somewhat better.

OTOH at a first glance *I* don't expect a control structures such as
`when' to return any useful value when the conditional clause fails.
But maybe I've been doing too much Scheme these days. (no, surely not
;-)

I'll use your suggestion, thanks.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: announcing defaults when reading from minibuffer

2005-08-29 Thread Emilio Lopes
Richard M Stallman writes:

> It seems to me that a better place to put this is in the Tips
> appendix--do you agree?

I was also in doubt.  I thought it's best to have this information
together with the rest of the documentation of the function in
question, whenever possible.  That way people will learn good Elisp
style when they first learn the mechanics of the function.

Such separation makes sense when documenting languages which can be
used in different projects, each having its own coding conventions.
Elisp can be used only within Emacs.

OTOH there are already precedence cases (`error', e.g.).  So maybe
it's better not to open this can of worms now and instead install the
change as you posted.  I guess people will find the information either
way.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: patch for woman (woman-topic-at-point)

2005-08-31 Thread Emilio Lopes
Drew Adams writes:

> Why don't we let `test-completion' return the completion (string)
> argument, whenever the return value is non-nil?

I could imagine this is for consistency with `try-completion', which
returns a string with the longest string common to all matches or t if
the given string was already an exact match.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


`woman-topic-at-point' patch

2005-09-01 Thread Emilio Lopes
Here is an update with minor changes to the patch for `woman' as
posted and discussed earlier on this list.  This causes woman to only
suggest a man page as default if it really exists on the system.

Here is a possible entry for the NEWS file:

   ** The variable `woman-topic-at-point' was renamed
   to `woman-use-topic-at-point' and behaves now differently: If this
   variable is non-nil the `woman' command uses the word at point
   automatically, without interactive confirmation.  Otherwise the word
   at point is suggested as default, but not inserted at the prompt.


Thanks to David Kastrup and Stefan Monnier for their suggestions.

2005-09-01  Emilio C. Lopes  <[EMAIL PROTECTED]>
  
* woman.el (woman-topic-at-point-default): renamed to
woman-use-topic-at-point-default.
(woman-topic-at-point): renamed to woman-use-topic-at-point.
(woman-file-name): reflect renames above.  Automatically use the
word at point as topic if woman-use-topic-at-point is non-nil.
Otherwise offer it as default but don't insert it in the
minibuffer.  Also use `test-completion' instead of
`assoc' as suggested by Stefan Monnier.


diff -rN -c old-emacs-darcs.eclig/lisp/woman.el 
new-emacs-darcs.eclig/lisp/woman.el
*** old-emacs-darcs.eclig/lisp/woman.el Thu Sep  1 20:50:12 2005
--- new-emacs-darcs.eclig/lisp/woman.el Mon Aug 29 19:48:11 2005
***
*** 136,162 
  ;;   man man_page_name
  
  
! ;; Using the `word at point' as a topic suggestion
! ;; ===
  
! ;; By default, the `woman' command uses the word nearest to point in
! ;; the current buffer as a suggestion for the topic to look up.  The
! ;; topic must be confirmed or edited in the minibuffer.  This
! ;; suggestion can be turned off, or `woman' can use the suggested
! ;; topic without confirmation* if possible, by setting the user-option
! ;; `woman-topic-at-point' to nil or t respectively.  (Its default
! ;; value is neither nil nor t, meaning ask for confirmation.)
  
! ;; [* Thanks to Benjamin Riefenstahl for suggesting this
! ;; functionality.]
! 
! ;; The variable `woman-topic-at-point' can be rebound locally, which
! ;; may be useful to provide special private key bindings, e.g.
  
  ;;  (global-set-key "\C-cw"
  ;;  (lambda ()
  ;;(interactive)
! ;;(let ((woman-topic-at-point t))
  ;;  (woman)
  
  
--- 136,158 
  ;;   man man_page_name
  
  
! ;; Using the word at point as the default topic
! ;; 
  
! ;; The `woman' command uses the word nearest to point in the current
! ;; buffer as the default topic to look up if it matches the name of a
! ;; manual page installed on the system.  The default topic can also be
! ;; used without confirmation by setting the user-option
! ;; `woman-use-topic-at-point' to t; thanks to Benjamin Riefenstahl for
! ;; suggesting this functionality.
  
! ;; The variable `woman-use-topic-at-point' can be rebound locally,
! ;; which may be useful to provide special private key bindings, e.g.
  
  ;;  (global-set-key "\C-cw"
  ;;  (lambda ()
  ;;(interactive)
! ;;(let ((woman-use-topic-at-point t))
  ;;  (woman)
  
  
***
*** 711,736 
:type 'string
:group 'woman-interface)
  
! (defcustom woman-topic-at-point-default 'confirm
!   ;; `woman-topic-at-point' may be let-bound when woman is loaded, in
!   ;; which case its global value does not get defined.
;; `woman-file-name' sets it to this value if it is unbound.
!   "*Default value for `woman-topic-at-point'."
:type '(choice (const :tag "Yes" t)
!(const :tag "No" nil)
!(other :tag "Confirm" confirm))
:group 'woman-interface)
  
! (defcustom woman-topic-at-point woman-topic-at-point-default
!   "*Controls use by `woman' of `word at point' as a topic suggestion.
! If non-nil then the `woman' command uses the word at point as an
! initial topic suggestion when it reads a topic from the minibuffer; if
! t then the `woman' command uses the word at point WITHOUT
! INTERACTIVE CONFIRMATION if it exists as a topic.  The default value
! is `confirm', meaning suggest a topic and ask for confirmation."
:type '(choice (const :tag "Yes" t)
!(const :tag "No" nil)
!(other :tag "Confirm" confirm))
:group 'woman-interface)
  
  (defvar woman-file-regexp nil
--- 707,727 
:type 'string
:group 'woman-interface)
  
! (defcustom woman-use-topic-at-point-default nil
!   ;; `woman-use-topic-at-point' may be let-bound when woman is loaded,
!   ;; in which case its global value does not get defined.
;; `woman-file-name' sets it to this value if it is unbound.
!   "*Default value for `woman-use-topic-at-point'."
:type '(choice (const :tag "Yes" t)
!(const :tag "No" nil))
:group 'wo

Patch: Follow convention for reading with the minibuffer.

2005-09-06 Thread Emilio Lopes
Recently RMS documented in "(elisp)Programming Tips" a convention for
reading with the minibuffer:

   * When you mention a default value in a minibuffer prompt, put it
 and the word `default' inside parentheses.  It should look like
 this:

  Enter the answer: (default 42)

Not all files in the Emacs sources follow this convention.  The
following patch fixes the cases I could find with a simple grep.

I'm not sure whether blindly following such a convention is always a
Good Thing.  For example:

   Translate buffer from format (default: guess):

versus

   Translate buffer from format: (default guess)

   
I double-checked these changes twice (sic).  Nevertheless I would
appreciate if somebody else review this patch again before committing.

lisp/ChangeLog:

2005-09-06  Emilio C. Lopes  <[EMAIL PROTECTED]>

* vc-mcvs.el (vc-mcvs-register): 
* shadowfile.el (shadow-define-literal-group): 
* progmodes/antlr-mode.el (antlr-end-of-rule): 
* woman.el (woman-file-name): 
* vc.el (vc-version-diff, vc-merge): 
* textmodes/reftex-index.el (reftex-index-complete-tag): 
* format.el (format-decode-buffer, format-decode-region): 
* emulation/viper-cmd.el (viper-read-string-with-history): 
* emacs-lisp/debug.el (cancel-debug-on-entry): 
* emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): 
* ediff.el (ediff-merge-revisions)
(ediff-merge-revisions-with-ancestor, ediff-revision): 
* completion.el (interactive-completion-string-reader): 
* calc/calc-prog.el (calc-user-define-formula): Follow convention
for reading with the minibuffer.

lisp/gnus/ChangeLog:

2005-09-06  Emilio C. Lopes  <[EMAIL PROTECTED]>

* message.el (message-check-news-header-syntax): Follow convention
for reading with the minibuffer.
  
diff -rN -c old-emacs-darcs.eclig/lisp/calc/calc-prog.el 
new-emacs-darcs.eclig/lisp/calc/calc-prog.el
*** old-emacs-darcs.eclig/lisp/calc/calc-prog.elTue Sep  6 19:35:56 2005
--- new-emacs-darcs.eclig/lisp/calc/calc-prog.elMon Sep  5 20:23:23 2005
***
*** 197,205 
 (progn
   (setq cmd-base-default (concat "User-" keyname))
 (setq cmd (completing-read 
!   (concat "Define M-x command name (default: calc-"
cmd-base-default
!   "): ")
obarray 'commandp nil
(if (and odef (symbolp (cdr odef)))
(symbol-name (cdr odef))
--- 197,205 
 (progn
   (setq cmd-base-default (concat "User-" keyname))
 (setq cmd (completing-read 
!   (concat "Define M-x command name: (default calc-"
cmd-base-default
!   ") ")
obarray 'commandp nil
(if (and odef (symbolp (cdr odef)))
(symbol-name (cdr odef))
***
*** 233,240 
   (setq func 
   (concat "calcFunc-"
   (completing-read 
!   (concat "Define algebraic function name (default: "
!   cmd-base-default "): ")
(mapcar (lambda (x) (substring x 9))
(all-completions "calcFunc-"
 obarray))
--- 233,240 
   (setq func 
   (concat "calcFunc-"
   (completing-read 
!   (concat "Define algebraic function name: (default "
!   cmd-base-default ") ")
(mapcar (lambda (x) (substring x 9))
(all-completions "calcFunc-"
 obarray))
diff -rN -c old-emacs-darcs.eclig/lisp/completion.el 
new-emacs-darcs.eclig/lisp/completion.el
*** old-emacs-darcs.eclig/lisp/completion.elTue Sep  6 19:35:57 2005
--- new-emacs-darcs.eclig/lisp/completion.elMon Sep  5 20:23:25 2005
***
*** 1343,1349 
(let* ((default (symbol-under-or-before-point))
 (new-prompt
  (if default
! (format "%s: (default: %s) " prompt default)
  (format "%s: " prompt)))
 (read (completing-read new-prompt cmpl-obarray)))
  (if (zerop (length read)) (setq read (or default "")))
--- 1343,1349 
(let* ((default (symbol-under-or-before-point))
 (new-prompt
  (if default
! (format "%s: (default %s) " prompt default)
  (format "%s: " prompt)))
 (read (completing-read new-prompt cmpl-obarray)))
  (if (zerop (length read)) (setq read (or default "")))
diff -rN -c old-emacs-darcs.eclig/lisp/ediff.el 
new-emacs-darcs.eclig/lisp/ed

Re: New mirrors for my Emacs arch archive: [EMAIL PROTECTED]

2005-09-11 Thread Emilio Lopes
Miles Bader writes:

> For those of you who were using my arch archive,
> [EMAIL PROTECTED] to track Emacs sources:

> My previous publicly available mirror (at push.sourcecontrol.net)
> has been stale for quite some time, due to hardware failures.

Yes, that incident motivated me to setup my own "dual" Emacs source
code repository, first using CVS + GNU Arch (tla) and later using
CVS + Darcs.  It has be working very well for quite some time now.  I
described the setup in

   http://darcs.net/DarcsWiki/InteroperabilityWithCvs

Darcs is a free revision control system, released under the GPL and
available from http://darcs.net.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


with-current-buffer

2005-09-11 Thread Emilio Lopes
Start Emacs (latest CVS on GNU/Linux) with

   ./src/emacs --no-init-file --no-site-file

Display a buffer, let's say "FOO", with some content.  Move point to
its beginning.

Insert the following code in the "*scratch*" buffer:

   (with-current-buffer "FOO"
 (goto-char (point-max))
 (insert "bar"))

Now execute the code above in these two different situations:

   1- The buffer "FOO" is visible along with the "*scratch*" buffer.

   2- The buffer "FOO" is not visible.

In both cases the insertion is done at the right spot, but in case 1
point in buffer "FOO" is restored after the code is executed.

Is that intended behavior?

I expected the point to be moved permanently in both cases.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: with-current-buffer

2005-09-11 Thread Emilio Lopes
Stefan Monnier writes:

>> In both cases the insertion is done at the right spot, but in case
>> 1 point in buffer "FOO" is restored after the code is executed.

>> Is that intended behavior?

>> I expected point to be moved permanently in both cases.

> Which point?

The point in buffer "FOO", of course.  I expected the point to stay at
point max after `with-current-buffer' exits.  In the case 1 explained
in the original message the code behaves as if it were wrapped with
`save-excursion'.

Can you reproduce it?



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: with-current-buffer

2005-09-12 Thread Emilio Lopes
Stefan Monnier writes:

> If foo is displayed in a window, it has 2 points: its own and the
> one of the window.

My first thought was to ask if this is a new feature.  It isn't.

It's just plain embarrassing that one can work more than ten years
with an editor without ever noting something as fundamental as this.

Thanks to you and Luc for enlightening me.

-- 
Emílio C. Lopes
Munich, Germany



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Release timelines and Unicode2 branch

2005-09-13 Thread Emilio Lopes
Romain Francoise writes:

> "Chong Yidong" <[EMAIL PROTECTED]> writes:
>> (2) Fix recognition of shell's `dirs' command.

> I can reproduce it with bash and 'stty echo', or with zsh.  We
> installed a change in 2003 that is supposed to fix the problem but
> doesn't work in all cases.  I spent some time a few weeks ago to try
> to find a fix but failed; I plan to work on this again in the near
> future as motivation allows...

Maybe you could report your experience so far, so that others with the
motivation need not to go all the process for themselves again.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Release timelines and Unicode2 branch

2005-09-14 Thread Emilio Lopes
Thanks for taking the time to explain the problem.  I can definitely
reproduce this.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Meta-data in source files

2005-09-18 Thread Emilio Lopes
Could we agree to refrain from storing meta-data in source files?  I'm
referring here to things like "Time-stamp: ..." and CVS' "$Id" and
friends.

The right place for this information is in the version control system.
Putting them in the source files causes spurious conflicts, specially
in the case of "Time-stamp", which CVS doesn't understand.



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Re: Meta-data in source files

2005-09-19 Thread Emilio Lopes
Richard M Stallman writes:

> Could we agree to refrain from storing meta-data in source
> files?  I'm referring here to things like "Time-stamp: ..." and
> CVS' "$Id" and friends.

> I have always preferred not to have such things in Emacs source
> files.  It is the people who wrote the files (outside Emacs) who
> want them, but in Emacs itself they tend to cause confusion.  I have
> stopped pushing on it, but I would be glad if those were deleted.

Bellow is a patch which removes the `Time-stamp' templates.  I left
one though, because it's used to update the date in a Texinfo manual.

2005-09-19  Emilio C. Lopes  <[EMAIL PROTECTED]>

* winner.el: 
* ps-print.el: 
* ps-mule.el: 
* ps-bdf.el: 
* progmodes/ebnf2ps.el: 
* progmodes/ebnf-yac.el: 
* progmodes/ebnf-otz.el: 
* progmodes/ebnf-iso.el: 
* progmodes/ebnf-ebx.el: 
* progmodes/ebnf-dtd.el: 
* progmodes/ebnf-bnf.el: 
* progmodes/ebnf-abn.el: 
* printing.el: 
* net/newsticker.el: 
* find-lisp.el: 
* delim-col.el: 
* calculator.el: deleted `time-stamp' templates.

diff -rN -c old-emacs-darcs.eclig/lisp/calculator.el 
new-emacs-darcs.eclig/lisp/calculator.el
*** old-emacs-darcs.eclig/lisp/calculator.elMon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/calculator.elMon Sep 19 20:38:29 2005
***
*** 5,11 
  
  ;; Author: Eli Barzilay <[EMAIL PROTECTED]>
  ;; Keywords: tools, convenience
- ;; Time-stamp: <2005-07-18 17:45:34 juri>
  
  ;; This file is part of GNU Emacs.
  
--- 5,10 
diff -rN -c old-emacs-darcs.eclig/lisp/delim-col.el 
new-emacs-darcs.eclig/lisp/delim-col.el
*** old-emacs-darcs.eclig/lisp/delim-col.el Mon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/delim-col.el Mon Sep 19 20:38:27 2005
***
*** 5,11 
  
  ;; Author: Vinicius Jose Latorre <[EMAIL PROTECTED]>
  ;; Maintainer: Vinicius Jose Latorre <[EMAIL PROTECTED]>
- ;; Time-stamp: <2004/03/09 21:32:06 vinicius>
  ;; Version: 2.1
  ;; Keywords: internal
  ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
--- 5,10 
diff -rN -c old-emacs-darcs.eclig/lisp/find-lisp.el 
new-emacs-darcs.eclig/lisp/find-lisp.el
*** old-emacs-darcs.eclig/lisp/find-lisp.el Mon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/find-lisp.el Mon Sep 19 20:43:20 2005
***
*** 3,9 
  ;; Author: Peter Breton
  ;; Created: Fri Mar 26 1999
  ;; Keywords: unix
- ;; Time-stamp: <2001-07-16 12:42:35 pavel>
  
  ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
  ;;   2005 Free Software Foundation, Inc.
--- 3,8 
diff -rN -c old-emacs-darcs.eclig/lisp/net/newsticker.el 
new-emacs-darcs.eclig/lisp/net/newsticker.el
*** old-emacs-darcs.eclig/lisp/net/newsticker.elMon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/net/newsticker.elMon Sep 19 20:43:18 2005
***
*** 9,15 
  ;; URL: http://www.nongnu.org/newsticker
  ;; Created: 17. June 2003
  ;; Keywords:News, RSS
- ;; Time-stamp:  "26. August 2005, 16:33:46 (ulf)"
  
  (defconst newsticker-version "1.8" "Version number of newsticker.el.")
  
--- 9,14 
diff -rN -c old-emacs-darcs.eclig/lisp/printing.el 
new-emacs-darcs.eclig/lisp/printing.el
*** old-emacs-darcs.eclig/lisp/printing.el  Mon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/printing.el  Mon Sep 19 20:43:17 2005
***
*** 4,10 
  
  ;; Author: Vinicius Jose Latorre <[EMAIL PROTECTED]>
  ;; Maintainer: Vinicius Jose Latorre <[EMAIL PROTECTED]>
- ;; Time-stamp: <2005/06/11 19:51:32 vinicius>
  ;; Keywords: wp, print, PostScript
  ;; Version: 6.8.4
  ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
--- 4,9 
diff -rN -c old-emacs-darcs.eclig/lisp/progmodes/ebnf-abn.el 
new-emacs-darcs.eclig/lisp/progmodes/ebnf-abn.el
*** old-emacs-darcs.eclig/lisp/progmodes/ebnf-abn.elMon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/progmodes/ebnf-abn.elMon Sep 19 20:43:15 2005
***
*** 4,10 
  
  ;; Author: Vinicius Jose Latorre <[EMAIL PROTECTED]>
  ;; Maintainer: Vinicius Jose Latorre <[EMAIL PROTECTED]>
- ;; Time-stamp: <2004/04/03 16:43:57 vinicius>
  ;; Keywords: wp, ebnf, PostScript
  ;; Version: 1.1
  
--- 4,9 
diff -rN -c old-emacs-darcs.eclig/lisp/progmodes/ebnf-bnf.el 
new-emacs-darcs.eclig/lisp/progmodes/ebnf-bnf.el
*** old-emacs-darcs.eclig/lisp/progmodes/ebnf-bnf.elMon Sep 19 20:52:09 2005
--- new-emacs-darcs.eclig/lisp/progmodes/ebnf-bnf.elMon Sep 19 20:43:14 2005
***
*** 5,11 
  
  ;; Author: Vinicius Jose Latorre <[EMAIL PROTECTED]>
  ;; Maintainer: Vinicius Jose Latorre <[EMAIL PROTECTED]>
- ;; Time-stamp: <2004/04/03 16:42:18 vinicius>
  ;; Keywords: wp, ebnf, PostScript
  ;; Version: 1.9
  
--- 5,10 
diff -rN -c old-emacs-darcs.eclig/lisp/progmodes/ebnf-dtd.el 
new-emacs-darcs.eclig/lisp/progmodes/ebnf-dtd.el
*** old-emacs-darcs.eclig/lisp/p

Re: Meta-data in source files

2005-09-19 Thread Emilio Lopes
Eric Hanchrow writes:

>>>>>> "Emilio" == Emilio Lopes <[EMAIL PROTECTED]> writes:
 
Emilio> Putting them in the source files causes spurious
Emilio> conflicts

> Other revision control systems don't have this problem -- notably
> Subversion, which is designed specifically to appeal to CVS users.
> I hope the FSF considers using it.

Such problems as I mentioned are exactly the reason why "modern"
version control programms do not support "keyword expansion".



___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel


Allow anonymous functions in `iswitchb-buffer-ignore'

2005-10-02 Thread Emilio Lopes
When preseting the user a list of buffers to choose from, `iswitchb'
uses the variable `iswitchb-buffer-ignore' to decide whether a certain
buffer should be ignored or not.

The variable `iswitchb-buffer-ignore' should be a list of either
regexps or functions.  To test if a item in that list is a function
the code currently uses `fboundp'.  This rules anonymous functions out.

I think this is an unnecessary constraint.  The following patch
removes this constraint by using `functionp' instead.


2005-10-02  Emilio C. Lopes  <[EMAIL PROTECTED]>

* iswitchb.el (iswitchb-ignore-buffername-p): use `functionp'
instead of `fboundp' in order to allow for anonymous functions.


diff -rN -c old-emacs-darcs.eclig/lisp/iswitchb.el 
new-emacs-darcs.eclig/lisp/iswitchb.el
*** old-emacs-darcs.eclig/lisp/iswitchb.el  Sun Oct  2 15:44:14 2005
--- new-emacs-darcs.eclig/lisp/iswitchb.el  Sun Oct  2 15:31:16 2005
***
*** 942,948 
  (progn
(setq ignorep t)
(setq re-list nil
!((fboundp nextstr)
  (if (funcall nextstr bufname)
  (progn
(setq ignorep t)
--- 942,948 
  (progn
(setq ignorep t)
(setq re-list nil
!((functionp nextstr)
  (if (funcall nextstr bufname)
  (progn
(setq ignorep t)





___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel