GNU bug report logs -
#29036
26.0.90; Feature Request: make "emacsclient +linenum file" rencenter line
Previous Next
Reported by: Xiaolong Zhang <xlzhang921 <at> gmail.com>
Date: Sat, 28 Oct 2017 03:31:02 UTC
Severity: wishlist
Found in version 26.0.90
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29036 in the body.
You can then email your comments to 29036 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29036
; Package
emacs
.
(Sat, 28 Oct 2017 03:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xiaolong Zhang <xlzhang921 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 28 Oct 2017 03:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi list,
I got no answer on stack-exchange for emacs (
https://emacs.stackexchange.com/questions/36434/make-emacs-recenter-the-line-for-latex-inverse-search)
so I'm asking here.
I'm using emacs for LaTeX file editing and emacsclient support the nice
command line option "+linenum file" to "visit file using find-file, then go
to line number linenum in it", which works well.
Is it possible to recenter to linenum at the sametime? This is the default
behavior for Notepad++ and I've tried the "--eval" option, but it won't
switch focus to emacs automatically.
Thanks.
Best,
Xiaolong
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29036
; Package
emacs
.
(Sat, 28 Oct 2017 06:50:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 29036 <at> debbugs.gnu.org (full text, mbox):
> From: Xiaolong Zhang <xlzhang921 <at> gmail.com>
> Date: Sat, 28 Oct 2017 11:30:27 +0800
>
> I'm using emacs for LaTeX file editing and emacsclient support the nice command line option "+linenum file"
> to "visit file using find-file, then go to line number linenum in it", which works well.
>
> Is it possible to recenter to linenum at the sametime? This is the default behavior for Notepad++ and I've tried
> the "--eval" option, but it won't switch focus to emacs automatically.
Emacs recenters by default, so unless you have some customizations
which disable that as side effect, it should already do what you
want. I just tried the command
emacsclient +150 configure.ac
and got line 150 centered in the window where Emacs shows the file.
If that doesn't work for you, please show the exact recipe. You seem
to invoke emacsclient from another program (I tried from the shell
prompt), so perhaps there's something in that context which affects
the issue; I'm not familiar with "SumatraPDF" and the "inverse search
feature".
Another possible reason for not recentering is that the file whose
name is passed to emacsclient is already visited in Emacs, and the
line whose number you pass to emacsclient is already visible in some
window, but not at the center of that window. In that case, Emacs
will not recenter.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29036
; Package
emacs
.
(Sun, 29 Oct 2017 10:58:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 29036 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Eli,
Thanks. You are right, vanilla ​Emacs indeed recenters a new file by
default.
I'm using spacemacs, which won't and I'm investigating the problem.
If the file is already visited in Emacs, it won't recenter. Is it possible
to make
Emacs recenter even if it's already visited? I've check with Notepad++,
which
will recenter even if it's already opened.
Best,
Xiaolong
On Sat, Oct 28, 2017 at 2:49 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Xiaolong Zhang <xlzhang921 <at> gmail.com>
> > Date: Sat, 28 Oct 2017 11:30:27 +0800
> >
> > I'm using emacs for LaTeX file editing and emacsclient support the nice
> command line option "+linenum file"
> > to "visit file using find-file, then go to line number linenum in it",
> which works well.
> >
> > Is it possible to recenter to linenum at the sametime? This is the
> default behavior for Notepad++ and I've tried
> > the "--eval" option, but it won't switch focus to emacs automatically.
>
> Emacs recenters by default, so unless you have some customizations
> which disable that as side effect, it should already do what you
> want. I just tried the command
>
> emacsclient +150 configure.ac
>
> and got line 150 centered in the window where Emacs shows the file.
> If that doesn't work for you, please show the exact recipe. You seem
> to invoke emacsclient from another program (I tried from the shell
> prompt), so perhaps there's something in that context which affects
> the issue; I'm not familiar with "SumatraPDF" and the "inverse search
> feature".
>
> Another possible reason for not recentering is that the file whose
> name is passed to emacsclient is already visited in Emacs, and the
> line whose number you pass to emacsclient is already visible in some
> window, but not at the center of that window. In that case, Emacs
> will not recenter.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29036
; Package
emacs
.
(Sun, 29 Oct 2017 11:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 29036 <at> debbugs.gnu.org (full text, mbox):
> From: Xiaolong Zhang <xlzhang921 <at> gmail.com>
> Date: Sun, 29 Oct 2017 18:57:36 +0800
> Cc: 29036 <at> debbugs.gnu.org
>
> If the file is already visited in Emacs, it won't recenter. Is it possible to make
> Emacs recenter even if it's already visited?
You can only do that by customizing the scrolling behavior in
general. There's no special behavior for visiting a file that is
already in Emacs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29036
; Package
emacs
.
(Sun, 29 Oct 2017 11:21:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 29036 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Got it. Thanks.
On Sun, Oct 29, 2017 at 7:18 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Xiaolong Zhang <xlzhang921 <at> gmail.com>
> > Date: Sun, 29 Oct 2017 18:57:36 +0800
> > Cc: 29036 <at> debbugs.gnu.org
> >
> > If the file is already visited in Emacs, it won't recenter. Is it
> possible to make
> > Emacs recenter even if it's already visited?
>
> You can only do that by customizing the scrolling behavior in
> general. There's no special behavior for visiting a file that is
> already in Emacs.
>
[Message part 2 (text/html, inline)]
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Sun, 29 Sep 2019 00:40:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xiaolong Zhang <xlzhang921 <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 29 Sep 2019 00:40:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 29036-done <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Xiaolong Zhang <xlzhang921 <at> gmail.com>
>> Date: Sun, 29 Oct 2017 18:57:36 +0800
>> Cc: 29036 <at> debbugs.gnu.org
>>
>> If the file is already visited in Emacs, it won't recenter. Is it possible to make
>> Emacs recenter even if it's already visited?
>
> You can only do that by customizing the scrolling behavior in
> general. There's no special behavior for visiting a file that is
> already in Emacs.
It seems like the reporter got the needed answer. I'm therefore closing
this bug report.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 27 Oct 2019 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.