all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>, 34908@debbugs.gnu.org
Cc: "joão távora" <joaotavora@gmail.com>
Subject: bug#34908: Push mark in xref-push-marker-stack
Date: Tue, 19 Mar 2019 01:14:26 +0200	[thread overview]
Message-ID: <d11af47a-34bb-5d21-fa2f-a081c5ddd06e@yandex.ru> (raw)
In-Reply-To: <87h8bz29ht.fsf@mail.linkov.net>

On 18.03.2019 23:12, Juri Linkov wrote:
> X-Debbugs-CC: João Távora <joaotavora@gmail.com>, Dmitry Gutov <dgutov@yandex.ru>
> 
> Shouldn't xref-push-marker-stack push the mark like all normal commands do?

It's not a command, though. Right?

> I know there is ‘M-,’ but why not allow using the standard keys
> ‘C-x C-SPC’ (pop-global-mark) and ‘C-u C-SPC’ (in the same file)
> as well?

IMO that separation of marks between local and global ones, and 
navigation between them (where you have to remember whether your 
previous navigation was between files or inside one file) is extremely 
counter-intuitive, so I don't have a lot of experience with that facility.

Even so, I think it's been nice enough that every command can choose 
whether it pushes the mark to the local/global buffer rights, and/or it 
adds it to the xref marker stack. Do we have any particular guidelines 
in the manual for when either should happen?

xref-push-marker-stack is used externally as well as a replacement for 
find-tag-marker-ring (which is now marked obsolete). And any command 
that replaced the usage of the latter with the former, and also intended 
to push mark, probably does as a separate action.

> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index 6974d00048..861e24a85f 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -365,6 +365,7 @@ xref-set-marker-ring-length
>   
>   (defun xref-push-marker-stack (&optional m)
>     "Add point M (defaults to `point-marker') to the marker stack."
> +  (push-mark nil t)
>     (ring-insert xref--marker-ring (or m (point-marker))))

At the very least, it's missing a docstring update.





  parent reply	other threads:[~2019-03-18 23:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 21:12 bug#34908: Push mark in xref-push-marker-stack Juri Linkov
2019-03-18 21:50 ` João Távora
2019-03-18 23:14 ` Dmitry Gutov [this message]
2019-03-19 21:02   ` Juri Linkov
2019-03-20  1:47     ` Dmitry Gutov
2019-03-20 21:59       ` Juri Linkov
2019-03-21  0:59         ` Dmitry Gutov
2019-03-19  6:16 ` Eli Zaretskii
2019-03-19 11:57   ` Dmitry Gutov
2019-03-19 20:59   ` Juri Linkov
2019-03-20  5:59     ` Eli Zaretskii
2019-03-20 21:49       ` Juri Linkov
2019-03-21  3:35         ` Eli Zaretskii
2019-03-24 21:20           ` Juri Linkov

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=d11af47a-34bb-5d21-fa2f-a081c5ddd06e@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=34908@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=juri@linkov.net \
    /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.