Stefan Monnier | 1 Mar 03:33 2012
Picon

bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy

>>> Maybe we could change the entry in files.texi like this:
>> [...]
>>>  <at> defun file-equal-p file1 file2
>>> This function returns  <at> code{t} if the files  <at> var{file1} and
>>> !  <at> var{file2} name the same file.  If  <at> var{file1} or  <at> var{file2} does
>>> ! not exist, the return value is unspecified.
>> 
>> That looks good.
> What can be done also is to return a string in this case.
> So possible return values could be e.g:
> "unspecified" => mean one of the files doesn't exists.
> nil           => files exist and are not equal
> t             => files exist and are equal.

No, we may decide in the future to return a particular value (maybe not
always the same one), but we don't know yet what might be useful, so
instead we say it's not specified.

        Stefan

Stefan Monnier | 1 Mar 03:42 2012
Picon

bug#10907: 24.0.94; Updating display of Customize buffer

>> but being able to have a dynamic set of `choice's would be helpful.
> When might you want to use such a thing, as opposed to having :type a
> static list that encompasses all possible valid settings?

In the email to which you respond, I mention completion-styles, since
these can refer to styles that are provided by external packages.

> I can only see it being harmful.  Eg if you want to compute the :type
> based on whether some external utility is installed on the system, you
> could end up with saved settings in ~/.emacs that suddenly become
> invalid (wrong type) if said utility gets removed from the system.

Just because there are scenarios where you can bump into bugs doesn't
mean it can't be very useful.  E.g. types such as `function' also accept
a set of values that depends on what's installed, yet it hasn't proved
to be a problem.

        Stefan

Eli Zaretskii | 1 Mar 05:04 2012
Picon

bug#10913: 24.0.94; Crash in redisplay code

> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Wed, 29 Feb 2012 22:23:48 +0100
> Cc: Hannu Koivisto <azure <at> iki.fi>,
>  10913 <at> debbugs.gnu.org
> 
> > Anyway, if I'm to believe this backtrace (which I don't, since the
> > build is evidently optimized), the crash happened here:
> > 
> > 	  switch (SWITCH_ENUM_CAST ((re_opcode_t) *pat++))
> > 	    {
> > 	    case on_failure_keep_string_jump:
> > 	      assert (str == NULL);
> > 	      goto continue_failure_jump;
> > 
> > 	    case on_failure_jump_nastyloop:
> > 	      assert ((re_opcode_t)pat[-2] == no_op);
> > 	      PUSH_FAILURE_POINT (pat - 2, str);
> > 	      /* Fallthrough */
> > 	    ...
> > 	    default:
> > 	      abort (); <<<<<<<<<<<<<<<<<<<<<
> > 	    }
> > 
> > which means what? that compile_pattern produced an invalid result?
> > I'd be surprised.
> 
> 
> Remember that optimization may join aborts together, so they look like they happened there, but it can be
just about any abort in that file.

(Continue reading)

Hannu Koivisto | 1 Mar 08:53 2012
Picon
Picon

bug#10913: 24.0.94; Crash in redisplay code

Eli Zaretskii <eliz <at> gnu.org> writes:

> This is an optimized build, right?  Otherwise, some variables shown
> here make no sense at all.  E.g., this:

The build has been made without giving configure.bat or make any
options/variables that are related to optimization or debugging.
That is, it is what one gets by default.  I still have some build
output in my terminal window and I see commands such as

gcc -I. -c -gdwarf-2 -g3 -mno-cygwin -mtune=pentium4 -O2 -Demacs=1
    -DHAVE_CONFIG_H -I../lib -I../nt/inc -DHAVE_NTGUI=1
    -DUSE_CRT_DLL=1 -ooo-spd/i386/region-cache.o region-cache.c

that indicate optimization is used.

--

-- 
Hannu

Michael Albinus | 1 Mar 09:37 2012
Picon
Picon

bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Maybe we could change the entry in files.texi like this:
> [...]
>>    <at> defun file-equal-p file1 file2
>>   This function returns  <at> code{t} if the files  <at> var{file1} and
>> !  <at> var{file2} name the same file.  If  <at> var{file1} or  <at> var{file2} does
>> ! not exist, the return value is unspecified.
>
> That looks good.

Committed to files.texi and files.el.

>         Stefan

Best regards, Michael.

Niels Möller | 1 Mar 11:10 2012
Picon
Picon
Picon

bug#10916: Using occur to list occurrencies of the symbol at point

Hi,

I'm using both M-x grep and M-x occur quite a lot. I have been a bit
annoyed that they interpret a prefix argument very differently. With C-u
M-x grep, it searches for the symbol (or word or tag; I'm not sure
exactly how it's delimited) under point, which is a feature I find very
useful.

I first expected C-u M-x occur to behave the same way, but instead it
interprets the prefix argument as the amount of additional context to
include in the output buffer. This is a feature I don't need very often.
I'm not sure it's a good idea to change the behaviour of M-x occur, so
instead I wrote the following function to do what I want:

(defun occur-tag (regexp nlines)
  (interactive
   (let ((tag (funcall (or find-tag-default-function
			   (get major-mode 'find-tag-default-function)
			   'find-tag-default))))
     (if tag
	 (list (concat "\\_<" (regexp-quote tag) "\\_>")
	       (when current-prefix-arg
		 (prefix-numeric-value current-prefix-arg)))
       (occur-read-primary-args))))
  (occur regexp nlines))

It gets the symbol under point in the same way as M-x grep, and
constructs a regexp to use with occur. I this it mainly for searching in
source files, which is why I use \_< and \_> rather than \< and \> when
constructing the regexp.
(Continue reading)

sergei karhof | 1 Mar 11:27 2012
Picon

bug#10895: Quirky behaviours with Arabic text

>> What I suspect is that Emacs is doing more in terms of supporting
>> Arabic than the uniscribe shaping engine expects.
>
> Like what, for example?
>
> Does anyone know of a good treatise for Arabic shaping with Uniscribe?

I don't know much about these technical matters (I am just an
end-user), but I would like to point out that as for 'shaping' the
letters (if I understand correctly what it means), it is no issue at
all, because the letters AND the vowel marks are shaped correctly. The
problem is that the vowel marks are not displayed where they should,
that they are out of synch, and that there is not enough vertical
space to contain all the vowel marks.
So I guess that the underlying rendering engine might not be the
problem; maybe it's just the way the whole thing is implemented.

sergei

Juri Linkov | 1 Mar 11:42 2012

bug#10916: Using occur to list occurrencies of the symbol at point

> I first expected C-u M-x occur to behave the same way, but instead it
> interprets the prefix argument as the amount of additional context to
> include in the output buffer. This is a feature I don't need very often.

`C-u M-x occur' doesn't interpret the prefix argument as the amount of
additional context.  `C-u M-x occur' collects strings matching regexp.
It is like grep command line argument `-o --only-matching' that prints
only the matched parts of a matching line, with each such part
on a separate output line.

> Or maybe there's already some emacs function which does this and does it
> better, which I'm not aware of...

Have you tried `M-x occur M-n RET'?

Niels Möller | 1 Mar 13:18 2012
Picon
Picon
Picon

bug#10916: Using occur to list occurrencies of the symbol at point

Juri Linkov <juri <at> jurta.org> writes:

> `C-u M-x occur' doesn't interpret the prefix argument as the amount of
> additional context.  `C-u M-x occur' collects strings matching regexp.

I'm not following you. If I type C-u M-x occur RET gcd_hook RET, I get
an *Occur* buffer looking like this:

3 matches for "gcd_hook" in buffer: gcd.c
       :  mp_size_t gn;
       :};
       :
       :static void
     61:gcd_hook (void *p, mp_srcptr gp, mp_size_t gn,
       :	  mp_srcptr qp, mp_size_t qn, int d)
       :{
       :  struct gcd_ctx *ctx = (struct gcd_ctx *) p;
       :  MPN_COPY (ctx->gp, gp, gn);
-------
       :	}
       :      else
       :	{
       :	  /* Temporary storage n */
    209:	  n = mpn_gcd_subdiv_step (up, vp, n, gcd_hook, &ctx, tp);
       :	  if (n == 0)
       :	    goto done;
       :	}
       :    }
-------
       :	     small, or the difference is very small. Perform one
(Continue reading)

Juri Linkov | 1 Mar 13:28 2012

bug#10916: Using occur to list occurrencies of the symbol at point

> This is with emacs-23.2, but I think it's the same in other emacs
> versions I have used.

`C-u M-x occur' is a new feature in 24.1.  You can read about it in
http://bzr.sv.gnu.org/lh/emacs/trunk/annotate/head:/etc/NEWS#L968

>> Have you tried `M-x occur RET M-n RET'?
>
> Now I have. Seems to give the symbol at point in recent emacs versions.
> Slightly less convenient than a prefix argument, but I think that does
> what I want.

It's less convenient because the default value (displayed in parens)
for `occur' is not the symbol under point, but the last history element
(that is also easy to get via `M-p').  This is for historical reasons.


Gmane