all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 22891@debbugs.gnu.org, Constantine Vetoshev <vetoshev@gmail.com>
Subject: bug#22891:
Date: Sun, 24 Apr 2016 21:07:08 +0200	[thread overview]
Message-ID: <CABr8eba=VaXrAFrf0FnnebzWxdr4Tg=1aST=S1gw+AuhWv9CkQ@mail.gmail.com> (raw)
In-Reply-To: <571C868D.2010006@gmx.at>


[-- Attachment #1.1: Type: text/plain, Size: 694 bytes --]

Hi!

Here comes a new patch with both changes. Unless anybody complains, I will
push it to "master".

Just a little concern: I just took a look at the Emacs lisp directory. I
estimate is that a majority (but no all) of calls to `window-width',
`window-text-width', and `window-body-width' really should be to
`window-max-chars-per-line'.

    -- Anders


On Sun, Apr 24, 2016 at 10:40 AM, martin rudalics <rudalics@gmx.at> wrote:

> > I think that I already have solved this, but awaiting confirmation I
> > haven't committed the change.
>
> Please either post a patch or install your changes.  From my experience,
> Constantine very reliably confirms whether it will work or not.
>
> martin
>

[-- Attachment #1.2: Type: text/html, Size: 1209 bytes --]

[-- Attachment #2: term.diff --]
[-- Type: text/plain, Size: 2050 bytes --]

diff --git a/lisp/term.el b/lisp/term.el
index 2d5d3e9..28be8c8 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -919,19 +919,6 @@ is buffer-local."
 
 (term-set-escape-char (or term-escape-char ?\C-c))
 
-(defvar overflow-newline-into-fringe)
-
-(defun term-window-width ()
-  (if (and (not (featurep 'xemacs))
-	   (display-graphic-p)
-	   overflow-newline-into-fringe
-	   ;; Subtract 1 from the width when any fringe has zero width,
-	   ;; not just the right fringe.  Bug#18601.
-	   (/= (frame-parameter nil 'left-fringe) 0)
-	   (/= (frame-parameter nil 'right-fringe) 0))
-      (window-body-width)
-    (1- (window-body-width))))
-
 \f
 (put 'term-mode 'mode-class 'special)
 
@@ -1018,7 +1005,7 @@ Entry to this mode runs the hooks on `term-mode-hook'."
   (setq buffer-display-table term-display-table)
   (set (make-local-variable 'term-home-marker) (copy-marker 0))
   (set (make-local-variable 'term-height) (1- (window-height)))
-  (set (make-local-variable 'term-width) (term-window-width))
+  (set (make-local-variable 'term-width) (window-max-chars-per-line))
   (set (make-local-variable 'term-last-input-start) (make-marker))
   (set (make-local-variable 'term-last-input-end) (make-marker))
   (set (make-local-variable 'term-last-input-match) "")
diff --git a/lisp/window.el b/lisp/window.el
index e086efb..9f63e86 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8560,10 +8560,10 @@ WINDOWS is a list of windows associated with PROCESS.  REDUCER is
 a two-argument function used to combine the widths and heights of
 the given windows."
   (when windows
-    (let ((width (window-body-width (car windows)))
+    (let ((width (window-max-chars-per-line (car windows)))
           (height (window-body-height (car windows))))
       (dolist (window (cdr windows))
-        (setf width (funcall reducer width (window-body-width window)))
+        (setf width (funcall reducer width (window-max-chars-per-line window)))
         (setf height (funcall reducer height (window-body-height window))))
       (cons width height))))
 

  parent reply	other threads:[~2016-04-24 19:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  6:38 bug#22891: 25.0.92; set-fringe-mode with left fringe 0 breaks window width calculations on Mac OS (again) Constantine Vetoshev
2016-04-11  6:58 ` martin rudalics
2016-04-15  1:24   ` Constantine Vetoshev
2016-04-20 13:48     ` martin rudalics
2016-04-14  5:33 ` Anders Lindgren
2016-04-14 15:17   ` Eli Zaretskii
2016-04-14 18:19     ` Anders Lindgren
2016-04-14 19:24       ` Eli Zaretskii
2016-04-15  7:11         ` Anders Lindgren
2016-04-15  7:42           ` Eli Zaretskii
2016-04-15  8:05             ` Anders Lindgren
2016-04-15  8:25               ` Eli Zaretskii
2016-04-23 18:42 ` bug#22891: Anders Lindgren
2016-04-23 19:03   ` bug#22891: Daniel Colascione
2016-04-24  8:40   ` bug#22891: martin rudalics
2016-04-24 13:04     ` bug#22891: Anders Lindgren
2016-04-24 19:07     ` Anders Lindgren [this message]
2016-04-26  6:34       ` bug#22891: martin rudalics
2016-04-26  6:44         ` bug#22891: Eli Zaretskii
2016-04-26 19:10         ` bug#22891: Anders Lindgren
2016-04-26 19:17           ` bug#22891: Eli Zaretskii
2016-04-26 21:07             ` bug#22891: Anders Lindgren
2016-04-27  6:21               ` bug#22891: Eli Zaretskii
2016-04-27 21:30                 ` bug#22891: Anders Lindgren
2016-04-28  6:33                   ` bug#22891: martin rudalics
2016-04-26 19:03       ` bug#22891: Constantine Vetoshev
2016-04-27 21:38 ` bug#22891: Fixed: 25.0.92; set-fringe-mode with left fringe 0 breaks window width calculations on Mac OS (again) Anders Lindgren

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='CABr8eba=VaXrAFrf0FnnebzWxdr4Tg=1aST=S1gw+AuhWv9CkQ@mail.gmail.com' \
    --to=andlind@gmail.com \
    --cc=22891@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    --cc=vetoshev@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.