* bug#40814: 26.3; show-paren-mode hightlights parentheses at eol
@ 2020-04-24 10:16 Abdo Haji-Ali
2020-04-24 10:37 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Abdo Haji-Ali @ 2020-04-24 10:16 UTC (permalink / raw)
To: 40814
In the following text:
```
Some text (other text)
```
If `show-paren-mode` is on, `show-paren-when-point-in-periphery` is true and the point is anywhere before 'S', the parenthesis at the *end* of the line is highlighted. Is this intentional?
If not, the offending line seems to be paren.el:162 here
```
158: ;; Point is in the whitespace before the code.
159: ((and show-paren-when-point-in-periphery
160: (<= (point) ind-pos))
161: (or (show-paren--categorize-paren ind-pos)
162: (show-paren--categorize-paren (1- eol-pos))))
```
For some reason if the point "is in the whitespace before the code" the parenthesis in `(1- eol-pos)` is categorized.
---------------------------------------------------------------------------
In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-09-16 built on lcy01-amd64-030
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 18.04.4 LTS
Configured using:
'configure --build=x86_64-linux-gnu --prefix=/usr
'--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
'--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
--disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
'--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
--disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
--program-suffix=26 --with-modules --with-file-notification=inotify
--with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets
--with-lcms2 'CFLAGS=-g -O2
-fdebug-prefix-map=/build/emacs26-TP6iDo/emacs26-26.3~1.git96dd019=.
-fstack-protector-strong -Wformat -Werror=format-security -no-pie'
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie''
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD LCMS2
Important settings:
value of $LANG: en_GB.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8
Major mode: Elisp
Minor modes in effect:
TeX-PDF-mode: t
TeX-source-correlate-mode: t
diff-hl-margin-mode: t
eros-mode: t
highlight-quoted-mode: t
rainbow-delimiters-mode: t
highlight-numbers-mode: t
git-gutter-mode: t
show-paren-mode: t
save-place-mode: t
global-so-long-mode: t
ws-butler-global-mode: t
ws-butler-mode: t
flycheck-popup-tip-mode: t
global-flycheck-mode: t
flycheck-mode: t
recentf-mode: t
gcmh-mode: t
which-key-mode: t
better-jumper-mode: t
better-jumper-local-mode: t
company-prescient-mode: t
prescient-persist-mode: t
global-company-mode: t
company-mode: t
volatile-highlights-mode: t
winner-mode: t
savehist-mode: t
solaire-global-mode: t
solaire-mode: t
display-time-mode: t
doom-modeline-mode: t
flyspell-mode: t
vi-tilde-fringe-mode: t
goto-address-prog-mode: t
hl-line-mode: t
display-line-numbers-mode: t
yas-minor-mode: t
org-clock-today-mode: t
org-super-agenda-mode: t
hl-todo-mode: t
global-magit-file-mode: t
magit-file-mode: t
diff-auto-refine-mode: t
global-git-commit-mode: t
async-bytecomp-package-mode: t
outline-minor-mode: t
whitespace-mode: t
smartparens-global-mode: t
smartparens-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
shell-dirtrack-mode: t
ivy-rich-mode: t
ivy-mode: t
global-hungry-delete-mode: t
hungry-delete-mode: t
persp-mode: t
delete-selection-mode: t
projectile-mode: t
general-override-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
window-divider-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-save-visited-mode: t
Load-path shadows:
/home/abdo/Work/Apps/doom-emacs/.local/straight/build/cmake-mode/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/26.3/lisp/textmodes/rst
/usr/share/emacs/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/26.3/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/26.3/lisp/textmodes/ispell
/home/abdo/Work/Apps/doom-emacs/.local/straight/build/let-alist/let-alist hides /usr/share/emacs/26.3/lisp/emacs-lisp/let-alist
Features:
(shadow emacsbug format-all language-id autoload finder-inf try
cus-start cus-load reftex-parse mparen company-auctex company-math
math-symbol-lists company-reftex reftex-cite texmathp
multiple-cursors-core rect eieio-opt speedbar sb-image ezimage dframe
multi-paren two-column amx misearch multi-isearch anzu preview prv-emacs
adaptive-wrap hideshow tex-fold reftex-dcr reftex-auc reftex
reftex-loaddefs reftex-vars tex-bar toolbar-x font-latex auctex-latexmk
tex-buf latex latex-flymake flymake-proc flymake warnings tex-ispell
tex-style tex smartparens-latex tex-mode latexenc lisp-mnt
irony-cdb-libclang irony-cdb-json irony-cdb-clang-complete irony-cdb
irony-eldoc company-irony-c-headers company-irony company-template
irony-completion irony-snippet flycheck-irony irony-diagnostics irony
irony-iotask rtags repeat asm-mode modern-cpp-font-lock company-anaconda
url-cache anaconda-mode pythonic pipenv smartparens-python pyvenv python
tabify elisp-demos helpful trace edebug info-look info dash-functional
help-fns radix-tree elisp-refs loop cl-print debug mhtml-mode css-mode
smie smartparens-javascript js cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs smartparens-html
sgml-mode view hide-mode-line xterm-color em-term term ehelp em-script
em-prompt em-ls em-hist em-pred em-glob em-cmpl em-basic em-banner
em-alias diff-hl-margin diff-hl-dired diff-hl vc-dir ewoc vc
vc-dispatcher magit-extras magit-gitflow forge-list forge-commands
forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea
forge-gitlab glab forge-github forge-notify forge-revnote forge-pullreq
forge-issue forge-topic bug-reference forge-post smartparens-markdown
markdown-mode edit-indirect forge-repo forge forge-core forge-db closql
emacsql-sqlite emacsql emacsql-compiler diary-lib diary-loaddefs cal-iso
origami origami-parsers flycheck-cask ffap array ace-window avy
company-ispell company-yasnippet epa-file network-stream starttls
mailalias company-dabbrev dtrt-indent timezone shr-color shr svg dom
sort smiley gnus-cite mm-archive mail-extr qp gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range gnus-win gnus nnheader mu4e-alert alert log4e notifications
dbus xml gntp org-mu4e mu4e desktop frameset mu4e-org mu4e-main
mu4e-view browse-url mu4e-headers mu4e-compose mu4e-context mu4e-draft
mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark mu4e-message
flow-fill mu4e-proc mu4e-utils doc-view jka-compr image-mode mu4e-lists
mu4e-vars mu4e-meta eros highlight-quoted rainbow-delimiters
highlight-numbers parent-mode elisp-mode git-gutter-fringe fringe-helper
git-gutter disp-table cursor-sensor tramp-sh vc-git auto-minor-mode
paren saveplace so-long ws-butler flycheck-popup-tip popup flycheck
magit-bookmark bookmark org-capture lv recentf tree-widget wid-edit gcmh
which-key better-jumper company-prescient prescient company-capf company
etags volatile-highlights face-remap winner nav-flash pulse savehist
solaire-mode doom-themes-ext-org doom-one-theme doom-themes
doom-themes-base time doom-modeline doom-modeline-segments
doom-modeline-env doom-modeline-core shrink-path rotate smartrep
iso-transl org-eldoc flyspell-lazy flyspell ispell toc-org org-bullets
vi-tilde-fringe goto-addr hl-line display-line-numbers doom-snippets
doom-snippets-lib yasnippet-snippets yasnippet elec-pair org-indent
ol-bibtex bibtex smartparens-org org-checklist org-clock-today org-clock
org-super-agenda ts ht org-habit org-agenda org-refile org-tempo tempo
orgit magit-todos pcre2el rxt re-builder hl-todo f github-review s
ghub-graphql treepy gsexp ghub url-http tls url-gw nsm url-auth url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap let-alist json map gnutls magit-autoloads
magit-submodule magit-obsolete magit-popup magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit core-packages package url-handlers url-parse url-vars
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process magit-mode git-commit
transient magit-git magit-section magit-utils crm log-edit message rmc
puny rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util
add-log with-editor async-bytecomp async server org-yt org-element
avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs
find-func cal-menu calendar cal-loaddefs whitespace smartparens-config
smartparens-text smartparens goto-chg undo-tree diff better-eshell
esh-var esh-io esh-groups esh-help man em-unix eshell-z em-dirs esh-cmd
esh-proc esh-arg esh-ext esh-opt eshell esh-module esh-mode esh-util
tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time format-spec auth-source password-cache perspex
all-the-icons-ivy all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons memoize ivy-rich counsel xdg ivy-xref xref project
eieio eieio-core eieio-loaddefs swiper ivy colir color ivy-overlay
mm-util mail-prsvr openwith dired-subtree dired-hacks-utils dash
dired-single dired dired-loaddefs advice hungry-delete persp-mode delsel
projectile grep compile comint ansi-color ring ibuffer-vc ibuf-ext
ibuffer ibuffer-loaddefs seq byte-opt thingatpt html2text easy-mmode
ibuf-macs core-editor core-projects core-ui edmacro kmacro core-keybinds
pp general cl-extra help-mode easymenu cl-seq use-package-core bytecomp
byte-compile cconv cl tex-site rx core-modules core core-lib pcase
cl-macs gv subr-x cl-loaddefs cl-lib time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 1978238 359320)
(symbols 48 119048 194)
(miscs 40 5299 4416)
(strings 32 368931 38626)
(string-bytes 1 10050756)
(vectors 16 151320)
(vector-slots 8 3170627 262476)
(floats 8 2197 1366)
(intervals 56 39103 8274)
(buffers 992 438))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40814: 26.3; show-paren-mode hightlights parentheses at eol
2020-04-24 10:16 bug#40814: 26.3; show-paren-mode hightlights parentheses at eol Abdo Haji-Ali
@ 2020-04-24 10:37 ` Eli Zaretskii
2020-04-24 10:55 ` Al Haji-Ali
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2020-04-24 10:37 UTC (permalink / raw)
To: Abdo Haji-Ali; +Cc: 40814
> From: Abdo Haji-Ali <abdo.haji.ali@gmail.com>
> Date: Fri, 24 Apr 2020 11:16:52 +0100
>
> In the following text:
>
> ```
> Some text (other text)
> ```
>
> If `show-paren-mode` is on, `show-paren-when-point-in-periphery` is true and the point is anywhere before 'S', the parenthesis at the *end* of the line is highlighted. Is this intentional?
Looks like it is. From the option's doc string:
If non-nil, show parens when point is in the line’s periphery.
The periphery is at the beginning or end of a line or in any
whitespace there.
What you describe seems to fit the "any whitespace there" part.
maybe this text is confusing in some way? What did you expect to see
as the effect of this option?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40814: 26.3; show-paren-mode hightlights parentheses at eol
2020-04-24 10:37 ` Eli Zaretskii
@ 2020-04-24 10:55 ` Al Haji-Ali
2021-06-13 12:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Al Haji-Ali @ 2020-04-24 10:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 40814
I see. I think the documentation is unclear as to which parenthesis is
meant. After all, `(paren)` in the following text
Some text (paren) some other text.
would not be highlighted if the point is in beginning (or end) of the
line even though this location meets the definition of the "line's
periphery" as defined in the documentation.
Based on this case, I would expect the consistent behaviour (to my
mind) that the text
some other text (paren)
would highlight `(paren)` only if the point is at the end of the line,
not the beginning. This would also be consistent with the following
case
(paren1) some other text (paren2)
where, correctly, (paren1) is highlighted if the point is in the
beginning of the line and (paren2) is highlighted if the point is in
the end of the line.
On Fri, Apr 24, 2020 at 11:37 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Abdo Haji-Ali <abdo.haji.ali@gmail.com>
> > Date: Fri, 24 Apr 2020 11:16:52 +0100
> >
> > In the following text:
> >
> > ```
> > Some text (other text)
> > ```
> >
> > If `show-paren-mode` is on, `show-paren-when-point-in-periphery` is true and the point is anywhere before 'S', the parenthesis at the *end* of the line is highlighted. Is this intentional?
>
> Looks like it is. From the option's doc string:
>
> If non-nil, show parens when point is in the line’s periphery.
> The periphery is at the beginning or end of a line or in any
> whitespace there.
>
> What you describe seems to fit the "any whitespace there" part.
>
> maybe this text is confusing in some way? What did you expect to see
> as the effect of this option?
>
> Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40814: 26.3; show-paren-mode hightlights parentheses at eol
2020-04-24 10:55 ` Al Haji-Ali
@ 2021-06-13 12:29 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-13 12:29 UTC (permalink / raw)
To: Al Haji-Ali; +Cc: 40814
Al Haji-Ali <abdo.haji.ali@gmail.com> writes:
> would highlight `(paren)` only if the point is at the end of the line,
> not the beginning. This would also be consistent with the following
> case
>
> (paren1) some other text (paren2)
>
> where, correctly, (paren1) is highlighted if the point is in the
> beginning of the line and (paren2) is highlighted if the point is in
> the end of the line.
Looking at the code and the documentation, as far as I can tell, this is
working as designed (even if it's slightly eccentric). With this
setting, when point is in the "periphery" of a line, it'll highlight the
closest parens -- if those parens are also in the "periphery". Which is
what the manual says:
@vindex show-paren-when-point-in-periphery
@code{show-paren-when-point-in-periphery}, when non-@code{nil}, causes
highlighting also when point is in whitespace at the beginning or end
of a line, and there is a paren at, respectively, the first or last,
or the last, non-whitespace position on the line.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-13 12:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 10:16 bug#40814: 26.3; show-paren-mode hightlights parentheses at eol Abdo Haji-Ali
2020-04-24 10:37 ` Eli Zaretskii
2020-04-24 10:55 ` Al Haji-Ali
2021-06-13 12:29 ` Lars Ingebrigtsen
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.