GNU bug report logs - #35058
[PATCH] Use display-graphic-p in more cases

Previous Next

Package: emacs;

Reported by: Alex <agrambot <at> gmail.com>

Date: Sat, 30 Mar 2019 23:39:01 UTC

Severity: wishlist

Tags: patch

Done: Alex <agrambot <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alex <agrambot <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 35058 <at> debbugs.gnu.org
Subject: bug#35058: [PATCH] Use display-graphic-p in more cases
Date: Wed, 03 Apr 2019 14:26:30 -0600
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Alex <agrambot <at> gmail.com>
>> Cc: 35058 <at> debbugs.gnu.org
>> Date: Tue, 02 Apr 2019 23:14:06 -0600
>> 
>> >> > If it is very inconvenient to use hyper on text terminals, then I
>> >> > think we shouldn't require users to do that.
>> >> 
>> >> It wouldn't be a matter of requiring, but instead forcing the modifier
>> >> back to 'meta if both in terminal Emacs and cua-rectangle-modifier-key
>> >> is 'hyper.
>> >
>> > Sorry, I don't understand.  Can you show how would you like to remove
>> > the condition?
>> 
>> I don't agree with my position in my last email since I found out that
>> my terminal has a special workaround for 'super.
>> 
>> Removing the condition would just mean always using
>> cua-rectangle-modifier-key in cua--init-keymaps even if in a terminal:
>> 
>> (setq cua--rectangle-modifier-key cua-rectangle-modifier-key)
>> 
>> This would mean that terminal users that can't use super/hyper modifiers
>> easily would might find it confusing, but the current behaviour is a bit
>> confusing as is.
>
> I think the use case behind that condition is of a user who uses both
> GUI and TTY frames, and have cua-rectangle-modifier-key customized to
> something that doesn't easily work on TTY.  Perhaps the right solution
> would be to have 2 separate defcustom's, one each for every frame type.

Okay, I did that below.

>> How about display-symbol-keys-p (if TTY frames can't support symbols in
>> key sequences)? 
>
> Fine with me, thanks.  Although having 2 defcustom's might eliminate
> the need for the test and for the predicate.

The 2 defcustom situation applies to the CUA code, not for
normal-erase-is-backspace-mode (where display-symbol-keys-p is used).

I've attached a patch series below (including the logb change Basil
recommended). Are these okay to apply?

The first patch does still use display-graphic-p in a few cases in
frame.el for the predicates concerning pixel dimensions. Do you really
want them to use memq instead?

[0001-Use-display-graphic-p-and-display-multi-frame-p-in-m.patch (text/x-patch, attachment)]
[0002-Define-and-use-new-procedure-display-symbol-keys-p.patch (text/x-patch, attachment)]
[0003-Define-and-use-new-alias-display-blink-cursor-p.patch (text/x-patch, attachment)]
[0004-Introduce-new-defcustom-for-terminal-CUA-rectangle-c.patch (text/x-patch, attachment)]
[0001-lisp-frame.el-display-planes-Use-logb-over-truncate-.patch (text/x-patch, attachment)]

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

Previous Next


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