all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 13687@debbugs.gnu.org
Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first
Date: Sat, 09 Mar 2013 21:51:11 +0530	[thread overview]
Message-ID: <87sj44o87c.fsf@gmail.com> (raw)
In-Reply-To: <BB1C8B03F0E445DEAD2A1CD5AF5F664C@us.oracle.com> (Drew Adams's message of "Sat, 9 Mar 2013 07:08:54 -0800")


Drew

You are beating a dead horse and the first line clearly says it is a
DEAD HORSE.  The mail only stated why I KILLED the horse.

It is my way of saying my earlier patch to hi-lock and the previous
patch to occur stands and is useful.  I will definitely look in to
comments that you may have to offer with the patch that introduces
`occur-read-regexp-defaults-function'.

Grouping - I don't know why you are beating on it - will now be user's
responsibility not that of Emacs.

Jambunathan K.



"Drew Adams" <drew.adams@oracle.com> writes:

>> EXPERIMENTAL and ABANDONED PATCH
>
>> Use of `this-command' is very fragile and flaky.
>
> No, but it is somewhat fragile.
>
>> Consider `multi-occur-in-matching-buffers' which does multiple
>> `read-regexp' - one for the buffers and one for the actual
>> regexp.  It is not possible to return a two different regexps
>> for the same `this-command'.
>
> You don't need to.  If a user needs to test for
> `multi-occur-in-matching-buffers' via `this-command' then s?he can do that and
> act accordingly.  No need for general code that tries to second-guess things. 
>
>> Interestingly, I am attaching a long from *Messages* buffer 
>> and it looks like `this-command' is not reliable (Do you see 
>> `exit-minibuffer' in the logs.)
>
> See below.
>
>> So `this-command' could work for simple commands like highlighting
>> commands but will be flaky to be applied in general.
>> 
>> Anyways good to experiment and see where an idea takes us...
>
> As I said, we should not encourage this.  And yes, any use of `last-command' or
> `this-command' is somewhat fragile, because some functions intentionally change
> their values.
>
> And yes, comparing functions is also problematic in general.  No eta reduction,
> for one thing: (equal (lambda (x) (car x)) 'car).
>
> See what I wrote earlier.  Let users choose any string-returning function they
> want to use for defaulting.  If a user wants to use a function that conditions
> its return value on `this-command', s?he can always do so.
>
> But there is no reason to encourage that.  Any set of commands that we design to
> use the same defaulting choice (via the same user option) should be a cohesive
> group: the same choice should make sense across that set.
>
> If you have one or more commands that do not fit that, then give them their own
> defaulting options (grouping again, where appropriate).
>
> There is nothing new here - just common sense.  The solution is simple, IMO.
>
>> Interestingly, I am attaching a long from *Messages* buffer 
>> and it looks like `this-command' is not reliable (Do you see 
>> `exit-minibuffer' in the logs.)
>>
>> cmd: exit-minibuffer defaults: nil
>
> Your code checks only (eq user-defaults t).  When `user-defaults' is nil, this
> returns nil.





  reply	other threads:[~2013-03-09 16:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1UA5QC-0006Vm-Qb@vcs.savannah.gnu.org>
     [not found] ` <877glsyecw.fsf@gmail.com>
2013-02-28 18:12   ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): Let-bind `default' to the first Juri Linkov
2013-03-03  9:31     ` Juri Linkov
2013-03-06 18:00       ` Jambunathan K
2013-03-08 13:02       ` Jambunathan K
2013-03-08 15:29         ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): " Drew Adams
2013-03-08 16:53           ` Jambunathan K
2013-03-08 17:10             ` Drew Adams
2013-03-08 17:27               ` Jambunathan K
2013-03-08 17:28           ` Juri Linkov
2013-03-08 18:16             ` Drew Adams
2013-03-08 18:30               ` Jambunathan K
2013-03-08 18:53                 ` Drew Adams
2013-03-08 19:03                   ` Jambunathan K
2013-03-08 21:08                     ` Drew Adams
2013-03-09  8:47                 ` Jambunathan K
2013-03-09 15:08                   ` Drew Adams
2013-03-09 16:21                     ` Jambunathan K [this message]
2013-03-09 16:37                       ` Drew Adams
2013-03-09 16:59                         ` Jambunathan K
2013-03-09 17:14                           ` Drew Adams
2013-03-09 17:25                             ` Jambunathan K
2013-03-09 17:55                               ` Drew Adams
2013-03-10 18:28                   ` Juri Linkov
2013-03-18  7:24                     ` Jambunathan K
2013-03-04  5:46     ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): " Jambunathan K
2013-03-04  9:28       ` Juri Linkov
2013-03-06 18:03         ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj44o87c.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=13687@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

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