Re: Fontification problem with fancy diary display

2006-05-10 Thread Glenn Morris
Stephen Berman wrote:

 Friday, also in other months and years -- and failed to get the
 fontification problem with all of them except '(5 4 2006) and '(5 5
 2006)!  With those two dates, and apparently those alone, I can
 replicate the fontification problem at will.  I have no idea what's
 going on here, nor why you don't see what I do.

I wasn't using those two particular dates. Now that I am, I can see
the problem too. Well done tracking *that* down! :) As to the cause,
umm...



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: other-holidays can have dates far away and mark holidays fails

2006-05-10 Thread Glenn Morris
Miguel V. S. Frasson wrote:

 emacs -Q --eval \
 (progn \
  (setq debug-on-error t) \
  (setq other-holidays '('((( 2 27 2006) \Emacs bug\)

This is not a bug, because you should be using:

emacs -Q --eval (progn \
  (setq debug-on-error t) \
  (setq other-holidays '((holiday-fixed 2 27 \No bug\

as per the examples in the doc string of `calendar-holidays'. You
can't just add constant dates to the holiday lists - you need to use
functions that return nil when the relevant date is outside the
visible range of the calendar. holiday-fixed is the appropriate one
for a constant date.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Fontification problem with fancy diary display

2006-05-10 Thread Stephen Berman
On Wed, 10 May 2006 03:00:00 -0400 Glenn Morris [EMAIL PROTECTED] wrote:

 Stephen Berman wrote:

 Friday, also in other months and years -- and failed to get the
 fontification problem with all of them except '(5 4 2006) and '(5 5
 2006)!  With those two dates, and apparently those alone, I can
 replicate the fontification problem at will.  I have no idea what's
 going on here, nor why you don't see what I do.

 I wasn't using those two particular dates. Now that I am, I can see
 the problem too. Well done tracking *that* down! :) As to the cause,
 umm...

I'm relieved that you see it now; I was beginning to think there was
something quirky in just my Emacs source tree.  I don't have much else
to suggest at the moment, except, as I mentioned in my OP, I'm quite
sure I've seen this problem before, which means it's not, after all,
just those two dates (at least I don't recall having looked at these
specific future calendar dates).  I don't have time right now to try
and systematically test other dates, but I assume there must be a
pattern somewhere (I did, however, test (5 5 2005) and (5 4 2005) and
they didn't show the fontification problem).

Steve Berman



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Org mode and view-calendar-holidays-initially.

2006-05-10 Thread Matt Hodges
In GNU Emacs 22.0.50.49 (i686-pc-linux-gnu, GTK+ Version 2.8.17)
 of 2006-05-10 on escpc40
configured using `configure '--with-gtk''

With non-nil view-calendar-holidays-initially, org-schedule results in
an error.  This is reproducible with emacs -Q and:

(load-library org.el)
(with-temp-buffer
  (org-mode)
  (let ((view-calendar-holidays-initially t))
(org-schedule)))

which gives the following backtrace:

Debugger entered--Lisp error: (void-variable displayed-month)
  calendar-cursor-to-date()
  (if (calendar-cursor-to-date) (progn (let* ... ...)))
  (when (calendar-cursor-to-date) (let* (... ...) (setq ans2 ...)))
  (let ((sw ...)) (select-window (get-buffer-window *Calendar*)) (eval 
form) (when (calendar-cursor-to-date) (let* ... ...)) (org-move-overlay 
org-date-ovl (1- ...) (1+ ...) (current-buffer)) (select-window sw))
  org-eval-in-calendar(nil)
  (save-window-excursion (calendar) (calendar-forward-day (- ... ...)) 
(org-eval-in-calendar nil) (let* (... ... ...) (define-key map ... ...) 
(define-key map ... ...) (define-key map ... ...) (define-key 
minibuffer-local-map [...] ...) (define-key minibuffer-local-map [...] ...) 
(define-key minibuffer-local-map [...] ...) (define-key minibuffer-local-map 
[...] ...) (define-key minibuffer-local-map [...] ...) (define-key 
minibuffer-local-map [...] ...) (define-key minibuffer-local-map  ...) 
(define-key minibuffer-local-map  ...) (unwind-protect ... ...)))
  (save-excursion (save-window-excursion (calendar) (calendar-forward-day 
...) (org-eval-in-calendar nil) (let* ... ... ... ... ... ... ... ... ... ... 
... ... ...)))
  (if org-popup-calendar-for-date-prompt (save-excursion 
(save-window-excursion ... ... ... ...)) (setq ans (read-string prompt  nil 
timestr)))
  (let* ((org-time-stamp-rounding-minutes ...) (ct ...) (default-time ...) 
(calendar-move-hook nil) (view-diary-entries-initially nil) (timestr ...) 
(prompt ...) ans ans1 ans2 second minute hour day month year tl wday wday1) (if 
org-popup-calendar-for-date-prompt (save-excursion ...) (setq ans ...)) 
(org-detatch-overlay org-date-ovl) (if (string-match ^ 
*\\(\\([0-9]+\\)-\\)?\\([0-1]?[0-9]\\)-\\([0-3]?[0-9]\\)\\([^-0-9]\\|$\\) ans) 
(progn ... ... ...)) (setq tl (parse-time-string ans) year (or ... ...) month 
(or ... ...) day (or ... ...) hour (or ... ...) minute (or ... ...) second (or 
... 0) wday (nth 6 tl)) (when (and wday ...) (setq wday1 ...) (unless ... ...)) 
(if (and ... ...) (setq org-time-was-given t)) (if ( year 100) (setq year 
...)) (if to-time (encode-time second minute hour day month year) (if ... ... 
...)))
  org-read-date(nil to-time)
  (format-time-string (car org-time-stamp-formats) (org-read-date nil 
(quote to-time)))
  (insert org-scheduled-string   (format-time-string (car 
org-time-stamp-formats) (org-read-date nil ...)))
  org-schedule()
  (let ((view-calendar-holidays-initially t)) (org-schedule))
  (save-current-buffer (set-buffer temp-buffer) (org-mode) (let (...) 
(org-schedule)))
  (with-current-buffer temp-buffer (org-mode) (let (...) (org-schedule)))
  (unwind-protect (with-current-buffer temp-buffer (org-mode) (let ... 
...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer 
... ...) (and ... ...)))
  (with-temp-buffer (org-mode) (let (...) (org-schedule)))
  (progn (load-library org.el) (with-temp-buffer (org-mode) (let ... 
...)))
  eval((progn (load-library org.el) (with-temp-buffer (org-mode) (let ... 
...
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)

It looks like binding view-calendar-holidays-initially to nil in
org-read-date (cf. view-diary-entries-initially) may be the right fix:

--- org.el	24 Apr 2006 09:00:30 +0100	1.89
+++ org.el	10 May 2006 13:37:21 +0100	
@@ -4348,6 +4348,7 @@
 			(parse-time-string (match-string 1
 	 ct))
 	 (calendar-move-hook nil)
+	 (view-calendar-holidays-initially nil)
 	 (view-diary-entries-initially nil)
 	 (timestr (format-time-string
 		   (if with-time %Y-%m-%d %H:%M %Y-%m-%d) default-time))

Thanks,

Matt
___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: other-holidays can have dates far away and mark holidays fails

2006-05-10 Thread Miguel V. S. Frasson

You are right. Thanks.

Miguel.

On 5/10/06, Glenn Morris [EMAIL PROTECTED] wrote:

Miguel V. S. Frasson wrote:

 emacs -Q --eval \
 (progn \
  (setq debug-on-error t) \
  (setq other-holidays '('((( 2 27 2006) \Emacs bug\)

This is not a bug, because you should be using:

emacs -Q --eval (progn \
  (setq debug-on-error t) \
  (setq other-holidays '((holiday-fixed 2 27 \No bug\

as per the examples in the doc string of `calendar-holidays'. You
can't just add constant dates to the holiday lists - you need to use
functions that return nil when the relevant date is outside the
visible range of the calendar. holiday-fixed is the appropriate one
for a constant date.





--
Miguel Vinicius Santini Frasson
[EMAIL PROTECTED]


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Stefan Monnier
 ;;;###autoload
 (put 'allout-numbered-bullet 'safe-local-variable
  (lambda (x) (or (not x) (stringp x

 ... instead of...

 ;;;###autoload(put 'allout-numbered-bullet 'safe-local-variable (lambda (x) 
 (or (not x) (stringp x

 ... (and similar for other many other variables) in `allout.el'.

Actually, we should use string-or-null-p here.


Stefan



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Reiner Steib
On Wed, May 10 2006, Stefan Monnier wrote:

[ (lambda (x) (or (not x) (stringp x))) ]
 Actually, we should use string-or-null-p here.

ACK.  And (member x (quote (t nil))) should be booleanp.

But there are also expressions in `allout.el' where no predefined
predicate exists (AFAICS):

allout-use-mode-specific-leader
allout-reindent-bodies
allout-layout

Bye, Reiner.
-- 
   ,,,
  (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Luc Teirlinck
Reiner Steib wrote:

   -use @code{booleanp} as the property value.
   +use @code{booleanp} as the property value.  Lambda expressions should
   +be quoted so that @code{describe-variable} can display the predicate.

This is ambiguous.

What is meant by quoting a lambda expression '(lambda ... ) or
#'(lambda ... )?  If you use '(lambda ... ) the expression does not get
compiled, which can be a nuisance if the lambda does any real work.
If you use #'(lambda ... ) then `C-h v' still displays byte code,
so this form of quoting is useless for the stated purpose.

I personally still believe that the best thing to do would just be to
simply remove this annoying safe-local-variable clutter from the `C-h v'
output entirely.

Sincerely,

Luc.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Luc Teirlinck
_If_ we are going to keep that safe-local-variable trivia in the `C-h v'
output, then at least it should be formulated in a less confusing way:

  This variable is safe to use as a file local variable only if its value
  satisfies the predicate ...

These variables are perfectly safe to use as file local variables in
one's own files.  What is not safe is to blindly accept somebody
else's use of these file local variables.

Also, the present text looks like a warning message: Beware, this is
a dangerous variable!', whereas variables without safe-local-variable
property are actually considered _more_ dangerous by default.

An improvement would be:

  This variable is considered safe as a file local variable if its
  value satisfies the predicate ...

Deleting to use avoids the first confusion.  Replacing only if by
if avoids the warning aspect.  The is considered weakens the
implication that all other values are necessarily dangerous, whereas
usually only some are.

Sincerely,

Luc.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Ken Manheimer

On 5/10/06, Reiner Steib [EMAIL PROTECTED] wrote:

On Wed, May 10 2006, Stefan Monnier wrote:

[ (lambda (x) (or (not x) (stringp x))) ]
 Actually, we should use string-or-null-p here.

ACK.  And (member x (quote (t nil))) should be booleanp.


i can make those changes.  (booleanp must be rather new addition -
it's not in my CVS emacs built a week and a half ago.)


But there are also expressions in `allout.el' where no predefined
predicate exists (AFAICS):

allout-use-mode-specific-leader
allout-reindent-bodies
allout-layout


is it necessary to have a predefined predicate in all cases, or will
quoting the lambda be sufficient?  i could define functions to be used
as predicates, and have them autoloaded, but i see no particular gain
there.

(please cc me in followups in this thread...)
--
ken manheimer
[EMAIL PROTECTED]
http://myriadicity.net


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Ken Manheimer

On 5/10/06, Reiner Steib [EMAIL PROTECTED] wrote:

On Wed, May 10 2006, Reiner Steib wrote:

 I still think we should avoid printing byte-code even in case third
 party libraries forget to quote a lambda expression.

I noticed that we also get byte-code for the `allout.el' variables
like `allout-numbered-bullet'.  This happens because Ken Manheimer
(cc-ed) used...

;;;###autoload
(put 'allout-numbered-bullet 'safe-local-variable
 (lambda (x) (or (not x) (stringp x

... instead of...

;;;###autoload(put 'allout-numbered-bullet 'safe-local-variable (lambda (x) (or 
(not x) (stringp x

... (and similar for other many other variables) in `allout.el'.


i haven't seen some of this conversation (i looked in the archive, and
these messages aren't there yet), and i'm not clear whether something
is being requested here.

i deliberately chose to use the form that defines the variables in the
file's bytecode, as well as in loaddefs, because i want to be able to
use the most recent version of allout in versions of emacs that are
not built with allout (eg, the old emacs version i'm running on my
zaurus).  i would like to be able to use the same source code in such
cases.  (i imagine other people might be in the same situation.)  i
haven't seen drawbacks in doing it this way, and so went with it.

i don't want to make allout objectionable for distribution with emacs,
and am willing to conform to the conventions, if necessary.  is having
the definitions exist only in loaddefs being asked, or will it be
enough to have the active definitions in allout as well, but quote the
lambda expressions so they're not byte-compiled (and so don't clutter
the help)?

(i will respond to reiner's subsequent message separately.)

--
ken manheimer
[EMAIL PROTECTED]
http://myriadicity.net


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


ediff failure if diff doesn't exist

2006-05-10 Thread Jesper Harder
Hi,

On ms-windows when you (require 'ediff) on a computer where the diff
executable doesn't exist you get the backtrace below.

Of course, ediff probably isn't that useful if you don't have diff,
but still it would be nice to fail in a more gracefull way.

To reproduce, set ediff-diff-program to something that doesn't exist
and require ediff.

Debugger entered--Lisp error: (file-error Searching for program no
such file or directory diff)
 call-process(diff nil nil nil --binary NUL NUL)
 apply(call-process (diff nil nil nil --binary NUL NUL))
 ediff-diff-mandatory-option(diff)
 ediff-reset-diff-options(ediff-diff-options )
 custom-initialize-reset(ediff-diff-options )
 custom-declare-variable(ediff-diff-options 
(r:/Dev/Common/Util/Emacs/lisp/ediff-diff.elc . -3371) :set
ediff-reset-diff-options :type string :group ediff-diff)
 require(ediff-diff)

-- 
Cheers,
Jesper Harder


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Richard Stallman
I still think we should avoid printing byte-code even in case third
party libraries forget to quote a lambda expression.  May I install
the following change in `describe-variable'?  

Yes, that change is ok.





___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Richard Stallman
What is meant by quoting a lambda expression '(lambda ... ) or
#'(lambda ... )?

The former.

  If you use '(lambda ... ) the expression does not get
compiled, which can be a nuisance if the lambda does any real work.

Speed is not important for these functions, so it is fine if they
are never compiled.



___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: add info about safe-local-variable to describe-variable

2006-05-10 Thread Richard Stallman
An improvement would be:

  This variable is considered safe as a file local variable if its
  value satisfies the predicate ...

That change is good; please install it.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug