GNU bug report logs - #32372
[PATCH] Add "uuid" to thing-at-point.el

Previous Next

Package: emacs;

Reported by: Raimon Grau <raimon <at> konghq.com>

Date: Sun, 5 Aug 2018 23:14:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 32372 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 32372 <at> debbugs.gnu.org
Cc: Raimon Grau <raimon <at> konghq.com>,
 "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#32372: [PATCH] Add "uuid" to thing-at-point.el 
Date: Fri, 10 Aug 2018 06:37:12 +0000
>>>>> Basil L Contovounesios <contovob <at> tcd.ie> writes:
>>>>> Raimon Grau <raimon <at> konghq.com> writes:
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

 >>> While either ‘and’ or ‘if’ can be used here, to exactly the same
 >>> effect, the indentation above is one for ‘if’; ‘and’ should instead
 >>> look like:

 >>> (and (thing-at-point-looking-at thing-at-point-uuid-regexp 36)
 >>>      (cons (match-beginning 0) (match-end 0)))

 >>> I think in this case it’s marginally better to keep indentation and
 >>> replace ‘and’ with ‘if’ than the other way around.

 >> What about ‘when’?  Is it ok to use it?

	Yes.  Actually, I’ve somehow confused if with when in the above
	comment; with if, the indentation will be like:

   (if (thing-at-point-looking-at thing-at-point-uuid-regexp 36)
       (cons (match-beginning 0) (match-end 0)))

 >> One branch 'if' look funny to me but I don’t see many (any?) ‘when’
 >> in the emacs codebase.

 > If you grep the codebase you will see countless occurrences of and,
 > or, if-then, if-then-else, when, unless, etc.

 > What to use here is a mostly a matter of personal style, and a bit of
 > a bikeshed at that, so you are likely to get varied opinions.  At the
 > end of the day it doesn’t really matter what you go with.

	Yes.

[…]

-- 
FSF associate member #7257  np. Undercurrent — Jami Sieber




This bug report was last modified 6 years and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.