From: martin rudalics <rudalics@gmx.at>
To: Jay Kamat <jaygkamat@gmail.com>
Cc: 29111@debbugs.gnu.org
Subject: bug#29111: 26.0.90; Erc keep-place module broken with new default of switch-to-buffer-preserve-window-point
Date: Fri, 03 Nov 2017 08:58:48 +0100 [thread overview]
Message-ID: <59FC21B8.5030508@gmx.at> (raw)
In-Reply-To: <877ev7zz3e.fsf@gmail.com>
> I tried this, and it seems to restore keep-place functionality when
> switching to buffers with M-x erc-track-switch-buffer, but not with C-x
> b. I suspect the call to switch-to-buffer in C-x b isn't handled by erc,
> so changing the function won't help. Obviously, I don't think that's an
> acceptable solution.
"keep place" means "preserve point" so it's somewhat surprising that
this is a problem in the first place. Can you explain why and how the
keep place mechanism and the ‘switch-to-buffer-preserve-window-point’
mechanisms differ? Is ‘window-point-insertion-type’ involved somehow?
> I can think of two solutions right now:
>
> 1. Add a new configuration option which allows keep-place mode to
> disable this setting dynamically, and on enabling keep-place, add erc
> buffers to the exempted list. I took a look at `switch-to-buffer' and I
> don't see any way this can be done without a new variable. I personally
> would like to use the new default for non-erc buffers, and I would
> suspect that others would like to turn it on selectively as well.
Alternatively, we could allow ‘switch-to-buffer-preserve-window-point’
have a buffer local value which would override the customizable value
and add a new value, say 'always', which would allow the user to
override a local 'nil' while the default 't' would have the local 'nil'
prevail. Maybe we'd then need a 'never' too ...
> 2. Make it impossible to miss that this variable must be turned off when
> keep-place is enabled. If this isn't done, people's config will silently
> break (which is pretty bad). I would think that keep-place should throw
> an error when this variable is t, to be safe (since it doesn't work at
> all when it is).
>
> What do you think? I would be happy if keep-place would work out of the
> box for new users of erc, but I'm not sure if that's possible...
Since ‘keep-place’ is some sort of a minor mode, enabling it should warn
the user about the ‘switch-to-buffer-preserve-window-point’
incompatibility. But I'm not familiar with ‘define-erc-module’ so we'd
probably need someone knowledgeable to do that.
martin
next prev parent reply other threads:[~2017-11-03 7:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 3:41 bug#29111: 26.0.90; Erc keep-place module broken with new default of switch-to-buffer-preserve-window-point Jay Kamat
2017-11-02 9:51 ` martin rudalics
2017-11-03 5:54 ` Jay Kamat
2017-11-03 7:58 ` martin rudalics [this message]
2017-11-03 8:59 ` Eli Zaretskii
2017-11-03 19:35 ` Jay Kamat
2017-11-04 8:36 ` martin rudalics
2017-11-18 21:57 ` Jay Kamat
2017-11-20 8:26 ` martin rudalics
2017-11-20 18:02 ` Eli Zaretskii
2017-11-21 9:23 ` martin rudalics
2017-11-21 15:44 ` Eli Zaretskii
2017-11-21 16:25 ` Jay Kamat
2017-11-22 8:21 ` martin rudalics
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=59FC21B8.5030508@gmx.at \
--to=rudalics@gmx.at \
--cc=29111@debbugs.gnu.org \
--cc=jaygkamat@gmail.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.